diff options
-rw-r--r-- | home-configuration.scm | 15 | ||||
-rw-r--r-- | i3.conf | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/home-configuration.scm b/home-configuration.scm index fa266f90..74abf75d 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -48,6 +48,10 @@ ;; relative to the working directory, not this file's directory. #.(define catppuccin-theme-variant "mocha") +;; "Base" colour from the active Catppuccin theme (see +;; https://github.com/catppuccin/catppuccin). +(define catppuccin-background-color "1e1e2e") + (define* (package-binary specification #:optional (binary specification)) "Get the path of BINARY inside the package referred to by SPECIFICATION." (file-append (specification->package specification) @@ -318,6 +322,17 @@ replacement spec (to which `regexp-substitute/global' is applied)." (".local/bin/icat" ; kitty's "catimg" equivalent ,(program-file "icat" #~(apply execl #$(package-binary "kitty") "kitty" "+kitten" "icat" (cdr (command-line))))) + (".local/bin/screenlock" + ,(program-file + "screenlock" + #~(begin ; Wrapper around i3lock to turn off the screen and pause notifications. + (system* #$(package-binary "dunst" "dunstctl") "set-paused" "true") + (system* #$(package-binary "xset") "dpms" "0" "0" "5") + ;; We mustn't use `package-binary' here, as we have to pick up the + ;; setuid binary for i3lock installed by the system config. + (system* "i3lock" "-nc" #$catppuccin-background-color) + (system* #$(package-binary "xset") "dpms" "0" "0" "0") + (system* #$(package-binary "dunst" "dunstctl") "set-paused" "false")))) ;; With #:recursive? #t, Guix keeps the files' permission bits, i.e. makes them executable. (".local/bin/sessionmenu" ,(local-file "sessionmenu" #:recursive? #t)) ; rofi logout/reboot menu (".local/bin/passmenu" ,(local-file "passmenu" #:recursive? #t)) ; rofi passwords menu @@ -65,7 +65,7 @@ bindsym $mod+shift+n exec dunstctl history-pop bindsym $mod+period exec dunstctl context # screen locking -bindsym $mod+shift+slash exec dunstctl set-paused true && xset dpms 5 5 5 && i3lock -n && xset dpms 0 0 0 && dunstctl set-paused false +bindsym $mod+shift+slash exec screenlock # kill focused window bindsym $mod+shift+q kill |