aboutsummaryrefslogtreecommitdiffstats
path: root/oni
diff options
context:
space:
mode:
authorGravatar Tom Willemse2025-09-24 16:46:06 -0700
committerGravatar Tom Willemse2025-09-24 16:46:06 -0700
commit24eb071631187cb60394a2d246ba236797d2e476 (patch)
tree73d77aba1d241742340cb3898bde89b6b3d69c8f /oni
parent6506e3a04eb221d46f798fb1867b887337030790 (diff)
downloadnew-dotfiles-24eb071631187cb60394a2d246ba236797d2e476.tar.gz
new-dotfiles-24eb071631187cb60394a2d246ba236797d2e476.zip
sxhkd: Add configuration
Diffstat (limited to 'oni')
-rw-r--r--oni/home/config/sxhkdrc84
-rw-r--r--oni/home/services/xdisorg.scm38
2 files changed, 116 insertions, 6 deletions
diff --git a/oni/home/config/sxhkdrc b/oni/home/config/sxhkdrc
new file mode 100644
index 0000000..2ad4ab5
--- /dev/null
+++ b/oni/home/config/sxhkdrc
@@ -0,0 +1,84 @@
+super + q
+ shutdown-rofi
+
+super + shift + r
+ herbstclient reload
+
+super + k
+ herbstclient close
+
+super + alt + k
+ herbstclient remove
+
+super + Return
+ herbstclient spawn kitty
+
+super + t
+ herbstclient spawn hlwm-run-or-raise "\(URxvt\|Hyper\|kitty\|org\.wezfurlong\.wezterm\)" kitty
+
+super + b
+ herbstclient spawn hlwm-run-or-raise "\(Conkeror\|[Ff]irefox\|Chromium\|Nyxt\|qutebrowser\|Zen\)" firefox
+
+super + e
+ herbstclient spawn hlwm-run-or-raise Emacs emacsclient --create-frame
+
+ctrl + alt + l
+ herbstclient spawn i3lock --color 000000
+
+super + x
+ herbstclient spawn hlwm-switch-tags
+
+super + shift + {b,n,p,f}
+ herbstclient shift {left,down,up,right}
+
+super + ctrl + {b,n,p,f}
+ herbstclient resize {left,down,up,right} +0.05
+
+super + shift + underscore
+ herbstclient split bottom 0.5
+
+super + shift + bar
+ herbstclient split right 0.5
+
+super + period
+ herbstclient use_index +1 --skip-visible
+
+super + comma
+ herbstclient use_index -1 --skip-visible
+
+super + shift + ctrl + f
+ herbstclient floating toggle
+
+super + f
+ herbstclient cycle_layout 1 vertical max
+
+super + m
+ herbstclient fullscreen toggle
+
+super + p
+ herbstclient pseudotile toggle
+
+super + space
+ herbstclient or , and . compare tags.focus.curframe_wcount = 2 . cycle_layout +1 vertical horizontal max vertical grid , cycle_layout +1
+
+super + BackSpace
+ herbstclient cycle_monitor
+
+super + u
+ herbstclient jumpto urgent
+
+# XF86AudioPlay
+# herbstclient spawn playerctl toggle
+# XF86AudioNext
+# herbstclient spawn playerctl next
+# XF86AudioPrev
+# herbstclient spawn playerctl prev
+
+super + s; f
+ flameshot full ~/pictures/screenshots/
+
+super + s; c
+ flameshot gui
+
+super + o
+ herbstclient cycle_frame
diff --git a/oni/home/services/xdisorg.scm b/oni/home/services/xdisorg.scm
index f64be17..b4e7bd3 100644
--- a/oni/home/services/xdisorg.scm
+++ b/oni/home/services/xdisorg.scm
@@ -2,19 +2,26 @@
#:use-module ((gnu home services)
#:select (service-type
service-extension
- home-profile-service-type))
+ home-profile-service-type
+ home-xdg-configuration-files-service-type
+ home-run-on-change-service-type))
#:use-module ((gnu home services shepherd)
#:select (home-shepherd-service-type
shepherd-service))
+ #:use-module ((gnu packages admin)
+ #:select (shepherd))
#:use-module ((gnu packages xdisorg)
#:select (xss-lock
sxhkd))
#:use-module ((gnu services configuration)
- #:select (define-configuration
- serialize-package))
+ #:select (serialize-package
+ define-configuration
+ text-config?
+ serialize-text-config))
#:use-module ((guix gexp)
#:select (gexp
- file-append))
+ file-append
+ mixed-text-file))
#:use-module ((guix packages)
#:select (package?))
@@ -61,11 +68,20 @@
(define-configuration home-sxhkd-configuration
(package
(package sxhkd)
- "Package to use for setting sxhkd"))
+ "Package to use for setting sxhkd")
+ (configurations
+ (text-config '())
+ "Extra configuration."))
(define (add-sxhkd-packages config)
(list (home-sxhkd-configuration-package config)))
+(define (home-sxhkd-config-files config)
+ `(("sxhkd/sxhkdrc"
+ ,(mixed-text-file
+ "sxhkdrc"
+ (serialize-text-config config (home-sxhkd-configuration-configurations config))))))
+
(define (home-sxhkd-shepherd-service config)
(list
(shepherd-service
@@ -78,6 +94,10 @@
#:log-file (format #f "~a/.local/var/log/sxhkd.log" (getenv "HOME"))))
(stop #~(make-kill-destructor)))))
+(define (reload-sxhkd-config-gexp _)
+ `(("files/.config/sxhkd/sxhkdrc"
+ ,#~(system* #$(file-append shepherd "/bin/herd") "restart" "sxhkd"))))
+
(define home-sxhkd-service-type
(service-type
(name 'home-sxhkd)
@@ -87,7 +107,13 @@
add-sxhkd-packages)
(service-extension
home-shepherd-service-type
- home-sxhkd-shepherd-service)))
+ home-sxhkd-shepherd-service)
+ (service-extension
+ home-xdg-configuration-files-service-type
+ home-sxhkd-config-files)
+ (service-extension
+ home-run-on-change-service-type
+ reload-sxhkd-config-gexp)))
(compose identity)
(default-value (home-sxhkd-configuration))
(description "Install and configure sxhkd.")))