From e0b2d75cfb7c54d53c2841feb6dbd1ad749e54b4 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 20 Feb 2023 16:35:27 -0300 Subject: Use xss-lock, i3lock and xset to lock after 5 minutes on usurpador --- etc/guix/home.scm | 2 +- etc/nix/configuration.nix | 1 + etc/sh/rc | 8 ++++++-- etc/xmonad/xmonad.hs | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/etc/guix/home.scm b/etc/guix/home.scm index f2458aa..8201cdf 100644 --- a/etc/guix/home.scm +++ b/etc/guix/home.scm @@ -470,7 +470,7 @@ dmenu xmodmap brightnessctl - lightdm + xss-lock weechat qtox diff --git a/etc/nix/configuration.nix b/etc/nix/configuration.nix index b8d7749..2e2f757 100644 --- a/etc/nix/configuration.nix +++ b/etc/nix/configuration.nix @@ -84,6 +84,7 @@ xmobar slack zoom-us + i3lock kubernetes flutter2 hover diff --git a/etc/sh/rc b/etc/sh/rc index 4e93a30..f687142 100644 --- a/etc/sh/rc +++ b/etc/sh/rc @@ -291,7 +291,9 @@ f() { r() { . ~/.profile - xset r rate 225 100 + if [ -n "$DISPLAY" ]; then + xset r rate 225 100 + fi } _edit_without_executing() { @@ -334,7 +336,9 @@ if [ -r "$F" ]; then . "$F" fi - +if [ -n "$DISPLAY" ]; then + xset s 300 +fi # # From here on, bash-specific things. diff --git a/etc/xmonad/xmonad.hs b/etc/xmonad/xmonad.hs index b65b04d..4f14952 100644 --- a/etc/xmonad/xmonad.hs +++ b/etc/xmonad/xmonad.hs @@ -13,6 +13,7 @@ import XMonad.StackSet main :: IO () main = do xmproc <- spawnPipe "xmobar" + xmproc <- spawnPipe "xss-lock i3lock" xmonad $ docks $ def -- Fullscreen handling: -- https://stackoverflow.com/questions/20446348/xmonad-toggle-fullscreen-xmobar @@ -66,7 +67,7 @@ myKeyPBindings = , ("M-S-", withFocused $ windows . XMonad.StackSet.sink) -- Lock screen - , ("C-M-l", spawn "dm-tool switch-to-greeter") + , ("C-M-l", spawn "loginctl lock-session") -- Toggle appearence of xmobar -- https://stackoverflow.com/a/27646652 -- cgit v1.2.3