@@ 132,8 132,6 @@
;; TODO the services should be started by shepherd
(".start-dwl" ,(start-dwl #:dwl dwl-mine #:waybar waybar-mine))
- (".config/dwl/scripts/print.sh" ,(local-file "dotfiles/dwl/print.sh"))
-
(".config/gammastep/config.ini" ,(local-file "dotfiles/gammastep.ini"))
(".config/zsh/direnv/direnv" ,direnv)
@@ 227,11 227,12 @@ static const Key keys[] = {
{ 0, Key_XF86AudioPlay2, spawn, SHCMD(SEQUENCE_DETECTOR "-g mpris play") },
{ 0, Key_XF86AudioNext, spawn, SHCMD(SEQUENCE_DETECTOR "-g mpris next") },
{ 0, Key_XF86AudioPrev, spawn, SHCMD(SEQUENCE_DETECTOR "-g mpris prev") },
- { 0, Key_XF86MonBrightnessUp, spawn, SHCMD("$HOME/.config/dwl/scripts/brightness.sh up") },
- { 0, Key_XF86MonBrightnessDown, spawn, SHCMD("$HOME/.config/dwl/scripts/brightness.sh down") },
- { 0, Key_Print, spawn, SHCMD("$HOME/.config/dwl/scripts/print.sh -s") },
+ { 0, Key_XF86MonBrightnessUp, spawn, SHCMD("%brightness% up") },
+ { 0, Key_XF86MonBrightnessDown, spawn, SHCMD("%brightness% down") },
+ { 0, Key_Print, spawn, SHCMD("%printscreen% -s") },
- { MODKEY, Key_y, spawn, SHCMD("emacs-anywhere") },
+ /* { MODKEY, Key_y, spawn, SHCMD("emacs-anywhere") }, */
+ // todo better passmenu with totp etc.
{ MODKEY, Key_p, spawn, SHCMD("passmenu") },
{ MODKEY, Key_c, togglesticky, {0} },
@@ 6,6 6,8 @@
#:use-module (gnu packages emacs)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages terminals)
+ #:use-module (gnu packages hardware)
+ #:use-module (gnu packages image)
#:use-module (ruther packages wayland)
#:use-module (ruther home passwords)
@@ 43,6 45,46 @@
"XLIBS = xcb xcb-icccm")
#$original-flags))))))
+;; TODO: make this a guile script
+;; but I am too lazy for now.
+(define brightness-script-builder
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (set-path-environment-variable
+ "PATH" (list "bin")
+ (list #$brillo))
+
+ (invoke #$(file-append bash "/bin/sh")
+ #$(local-file "scripts/brightness.sh")))))
+
+(define-public brightness-script
+ (program-file
+ "brightness-script"
+ brightness-script-builder))
+
+;; TODO: make this a guile script
+;; but I am too lazy for now.
+(define printscreen-script-builder
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (set-path-environment-variable
+ "PATH" (list "bin")
+ (list #$slurp
+ #$grim
+ #$wl-clipboard))
+
+ (invoke #$(file-append bash "/bin/bash")
+ #$(local-file "scripts/print.sh")))))
+
+(define-public printscreen-script
+ (program-file
+ "printscreen-script"
+ printscreen-script-builder))
+
(define-public dwl-mine-unwrapped
(let ((base (make-dwl-xwayland dwl-0.7)))
(package
@@ 66,7 108,9 @@
(("\"foot\"") (string-append "\"" #$foot "/bin/foot\""))
(("\"rofi\"") (string-append "\"" #$rofi-wayland "/bin/rofi\""))
(("\"passmenu\"") (string-append "\"" #$password-store-wl "/bin/passmenu\""))
- (("\"emacsclient\"") (string-append "\"" #$emacs-pgtk "/bin/emacsclient\""))))))))))))
+ (("\"emacsclient\"") (string-append "\"" #$emacs-pgtk "/bin/emacsclient\""))
+ (("%brightness%") #$brightness-script)
+ (("%printscreen%") #$printscreen-script)))))))))))
;; Packages I use when in the WM, it's dependent on those.
(define wm-packages