diff --git a/hosts/gerg-desktop/1_mon.conf b/hosts/gerg-desktop/1_mon.conf index ffb1779..7d06eb3 100644 --- a/hosts/gerg-desktop/1_mon.conf +++ b/hosts/gerg-desktop/1_mon.conf @@ -1,29 +1,3 @@ -Section "InputClass" - Identifier "libinput mouse configuration" - MatchDriver "libinput" - MatchIsPointer "on" - Option "AccelerationProfile" "0" - Option "AccelerationScheme" "flat" - Option "AccelSpeed" "3" - Option "LeftHanded" "off" - Option "MiddleEmulation" "on" - Option "NaturalScrolling" "off" - Option "ScrollMethod" "twofinger" - Option "HorizontalScrolling" "on" - Option "SendEventsMode" "enabled" - Option "Tapping" "on" - Option "TappingDragLock" "on" - Option "DisableWhileTyping" "off" - Option "Resolution" "3000" -EndSection - -Section "ServerFlags" - Option "StandbyTime" "0" - Option "SuspendTime" "0" - Option "OffTime" "0" - Option "BlankTime" "0" -EndSection - Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 @@ -40,7 +14,6 @@ Section "Monitor" Option "Primary" "true" Modeline "1920x1080_144" 332.75 1920 1952 2016 2080 1080 1084 1089 1111 +HSync +VSync Option "PreferredMode" "1920x1080_144" - Option "DPMS" "false" EndSection Section "Device" diff --git a/hosts/gerg-desktop/2_mon.conf b/hosts/gerg-desktop/2_mon.conf index 9d5a422..e1ba0c9 100644 --- a/hosts/gerg-desktop/2_mon.conf +++ b/hosts/gerg-desktop/2_mon.conf @@ -1,42 +1,13 @@ -Section "ServerFlags" - Option "AllowMouseOpenFail" "on" - Option "DontZap" "on" - Option "StandbyTime" "0" - Option "SuspendTime" "0" - Option "OffTime" "0" - Option "BlankTime" "0" -EndSection - -Section "Monitor" - Identifier "Monitor" - Option "DPMS" "false" -EndSection - -Section "InputClass" - Identifier "libinput mouse configuration" - MatchDriver "libinput" - MatchIsPointer "on" - Option "AccelerationProfile" "0" - Option "AccelerationScheme" "flat" - Option "AccelSpeed" "3" - Option "LeftHanded" "off" - Option "MiddleEmulation" "on" - Option "NaturalScrolling" "off" - Option "ScrollMethod" "twofinger" - Option "HorizontalScrolling" "on" - Option "SendEventsMode" "enabled" - Option "Tapping" "on" - Option "TappingDragLock" "on" - Option "DisableWhileTyping" "off" - Option "Resolution" "3000" -EndSection - Section "ServerLayout" Identifier "layout" Screen 0 "nvidia" Inactive "amdgpu" EndSection +Section "Monitor" + Identifier "Monitor" +EndSection + Section "Device" Identifier "nvidia" Driver "nvidia" @@ -47,7 +18,6 @@ EndSection Section "Screen" Identifier "nvidia" Device "nvidia" - Option "RandRRotation" "on" Option "AllowEmptyInitialConfiguration" EndSection diff --git a/hosts/gerg-desktop/shared.conf b/hosts/gerg-desktop/shared.conf new file mode 100644 index 0000000..5da3121 --- /dev/null +++ b/hosts/gerg-desktop/shared.conf @@ -0,0 +1,16 @@ +Section "ServerFlags" + Option "AllowMouseOpenFail" "on" + Option "DontZap" "on" + Option "StandbyTime" "0" + Option "SuspendTime" "0" + Option "OffTime" "0" + Option "BlankTime" "0" +EndSection + +Section "InputClass" + Identifier "libinput pointer catchall" + MatchIsPointer "on" + MatchDevicePath "/dev/input/event*" + Driver "libinput" + Option "AccelProfile" "flat" +EndSection diff --git a/hosts/gerg-desktop/vfio.nix b/hosts/gerg-desktop/vfio.nix index b147081..c46d642 100644 --- a/hosts/gerg-desktop/vfio.nix +++ b/hosts/gerg-desktop/vfio.nix @@ -32,14 +32,14 @@ in }; services.xserver = { - config = lib.mkForce ""; displayManager.setupCommands = lib.mkBefore '' if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then ${lib.getExe cfg_monitors} fi - ${lib.getExe pkgs.xorg.xset} -dpms ''; + + config = lib.mkForce (builtins.readFile "${_dir}/shared.conf"); }; systemd.tmpfiles.rules = [ diff --git a/modules/DE/dwm.nix b/modules/DE/dwm.nix index 180d207..1f3790d 100644 --- a/modules/DE/dwm.nix +++ b/modules/DE/dwm.nix @@ -11,9 +11,8 @@ config = lib.mkIf config.local.DE.dwm.enable { systemd.user.services = { sxhkd = { - path = [ pkgs.sxhkd ]; - script = "sxhkd -c /etc/sxhkd/sxhkdrc"; serviceConfig = { + ExecStart = "${lib.getExe pkgs.sxhkd} -c /etc/sxhkd/sxhkdrc"; Restart = "always"; RestartSec = 2; ExecReload = "pkill -usr1 -x $MAINPID"; @@ -21,9 +20,8 @@ }; picom = { - path = [ pkgs.picom ]; - script = "picom"; serviceConfig = { + ExecStart = "${lib.getExe pkgs.picom} --backend glx"; Restart = "always"; RestartSec = 2; ExecReload = "pkill -usr1 -x $MAINPID"; @@ -79,15 +77,22 @@ numlockx picom sxhkd - alock + xscreensaver ; + + xsecurelock = pkgs.writeShellScriptBin "xsecurelock" '' + export XSECURELOCK_BLANK_TIMEOUT="30" + export XSECURELOCK_AUTH_TIMEOUT="30" + export XSECURELOCK_BLANK_DPMS_STATE="off" + export XSECURELOCK_BACKGROUND_COLOR="#000000" + export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808" + export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd" + export XSECURELOCK_FONT="Overpass" + export XSECURELOCK_SHOW_DATETIME="1" + ${lib.getExe pkgs.xsecurelock} + ''; }; etc = { - "xdg/Xresources".text = '' - ALock*input.frame*input: #74b2ff - ALock*input.frame*check: #36c692 - ALock*Input.frame*width: 2 - ''; "sxhkd/sxhkdrc".text = '' XF86AudioPlay playerctl play-pause @@ -116,7 +121,7 @@ super + ctrl + r pkill -usr1 -x sxhkd super + ctrl + l - sleep 1 && xset dpms force off && alock + xsecurelock ''; }; };