From 18cc3c5a7a91344602ffa8e717577d3a5d575dd6 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 23 Jun 2023 09:03:24 +0200 Subject: [PATCH] fixed i3 problems --- nixos/components/gui/home-manager/default.nix | 14 ---------- nixos/components/gui/home-manager/i3.nix | 26 ++++++++++++++++++- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/nixos/components/gui/home-manager/default.nix b/nixos/components/gui/home-manager/default.nix index 35459bb..11dac28 100644 --- a/nixos/components/gui/home-manager/default.nix +++ b/nixos/components/gui/home-manager/default.nix @@ -158,20 +158,6 @@ with lib; image/jpeg=sxiv.desktop ''; - # todo : still needed? - # home.file.".xprofile".text = '' - # # to allow sudo commands to access X - # # todo : only allow the browsers and rambox access - # ${pkgs.xorg.xhost}/bin/xhost + - # # no shitty pcspkr crap - # ${pkgs.xorg.xset}/bin/xset -b - # # no sleeping monitor - # ${pkgs.xorg.xset}/bin/xset -dpms - # ${pkgs.xorg.xset}/bin/xset s off - # ${pkgs.flameshot}/bin/flameshot & - # # cleanup xmonad - # rm -f ~/.xmonad/xmonad.state - # ''; xdg.configFile."khal/config".text = '' [calendars] diff --git a/nixos/components/gui/home-manager/i3.nix b/nixos/components/gui/home-manager/i3.nix index 043df04..8578586 100644 --- a/nixos/components/gui/home-manager/i3.nix +++ b/nixos/components/gui/home-manager/i3.nix @@ -12,7 +12,7 @@ let }; backgroundCommand = pkgs.writers.writeDash "background" '' - ${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | \ + ${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | grep "primary" | \ ${pkgs.gnused}/bin/sed -E "s/primary //" | \ ${pkgs.coreutils-full}/bin/cut -d' ' -f 3 | \ ${pkgs.gnused}/bin/sed -E 's/\+.*$//g' | \ @@ -138,8 +138,32 @@ in [ { command = "${pkgs.albert}/bin/albert"; always = true; } { command = toString backgroundCommand; always = true; } + { + command = toString (pkgs.writers.writeDash "xsettings" '' + # to allow sudo commands to access X + ${pkgs.xorg.xhost}/bin/xhost + + # no shitty pcspkr crap + ${pkgs.xorg.xset}/bin/xset -b + # no sleeping monitor + ${pkgs.xorg.xset}/bin/xset -dpms + ${pkgs.xorg.xset}/bin/xset s off + ''); + always = true; + } # { command = "${pkgs.wireplumber}/bin/wireplumber"; always = true; } # { command = "systemctl --user restart polybar"; always = true; notification = false; } + + + # todo : still needed? + # home.file.".xprofile".text = '' + # # todo : only allow the browsers and rambox access + # + # ${pkgs.flameshot}/bin/flameshot & + # # cleanup xmonad + # rm -f ~/.xmonad/xmonad.state + # ''; + + ]; fonts = { names = [ "JetBrains Mono" ];