diff --git a/.config/xmonad/xmonad.hs b/.config/xmonad/xmonad.hs index 14aacd3..c739d6a 100644 --- a/.config/xmonad/xmonad.hs +++ b/.config/xmonad/xmonad.hs @@ -233,8 +233,10 @@ myStartupHook = do spawnOnce myScreenSetup spawnOnce "systemctl --user start fehbg.timer" spawnOnce "xsetroot -cursor_name left_ptr" - spawnOnce "xautolock -time 10 -locker slock -detectsleep" - spawnOnce "systemctl --user start xautolock-inhibit" + spawnOnce "xset s 590 10" + spawnOnce "xset dpms 0 0 900" + spawnOnce "xss-lock -n xidle-dim -l -- screen-lock" + spawnOnce "systemctl --user start xidle-inhibit" spawnOnce "redshift-gtk" spawnOnce "systemctl --user start udiskie" spawnOnce "nm-applet" diff --git a/.local/bin/screen-lock b/.local/bin/screen-lock new file mode 100755 index 0000000..70f6284 --- /dev/null +++ b/.local/bin/screen-lock @@ -0,0 +1,14 @@ +#!/bin/sh +# i3lock-color with a background image and the keyboard layout shown. + +image=/usr/share/backgrounds/arch_1920x1080.png + +# -n: stay in the foreground, as xss-lock needs to see when the screen is unlocked. +# --indicator keeps the ring (and the layout text) visible before typing. +# The layout's default spot (dx:dy+30) falls inside the ring: put it below. +exec i3lock -n -i "$image" -F -c 000000ff \ + -e -f --indicator --keylayout 0 \ + --layout-pos='ix:iy+r+40' --layout-color=ffffffff \ + --layout-size=24 \ + --time-color=ffffffff --date-color=ffffffff --date-str='%A, %d %B' \ + --ring-color=1793d1ff --line-uses-ring "$@"