summaryrefslogtreecommitdiff
path: root/.config/hypr
diff options
context:
space:
mode:
Diffstat (limited to '.config/hypr')
-rw-r--r--.config/hypr/.exrc1
-rw-r--r--.config/hypr/.gitignore1
-rw-r--r--.config/hypr/Makefile4
-rw-r--r--.config/hypr/hyprland.conf.in (renamed from .config/hypr/hyprland.conf)26
-rw-r--r--.config/hypr/macros.m414
5 files changed, 35 insertions, 11 deletions
diff --git a/.config/hypr/.exrc b/.config/hypr/.exrc
new file mode 100644
index 0000000..a2e90ff
--- /dev/null
+++ b/.config/hypr/.exrc
@@ -0,0 +1 @@
+autocmd BufWritePost hyprland.conf.in make
diff --git a/.config/hypr/.gitignore b/.config/hypr/.gitignore
new file mode 100644
index 0000000..66e0378
--- /dev/null
+++ b/.config/hypr/.gitignore
@@ -0,0 +1 @@
+hyprland.conf
diff --git a/.config/hypr/Makefile b/.config/hypr/Makefile
new file mode 100644
index 0000000..f091ebc
--- /dev/null
+++ b/.config/hypr/Makefile
@@ -0,0 +1,4 @@
+all: hyprland.conf
+
+hyprland.conf: macros.m4 hyprland.conf.in
+ m4 macros.m4 hyprland.conf.in >$@
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf.in
index b52bdc2..eee9d5e 100644
--- a/.config/hypr/hyprland.conf
+++ b/.config/hypr/hyprland.conf.in
@@ -73,25 +73,29 @@ misc {
$modkey = SUPER
-# WM Behavior
+# WM behavior
bind = $modkey, F, fullscreen, 0
bind = $modkey, Q, killactive
bind = $modkey SHIFT, F, togglefloating
-# Programs
-bind = $modkey, C, exec, exec foot ec
-bind = $modkey, D, exec, exec woman 2>/dev/null
-bind = $modkey, E, exec, exec emacsclient -c -a emacs
-bind = $modkey, M, exec, exec foot aerc
-bind = $modkey, P, exec, exec vlt get 2>/dev/null
-bind = $modkey, U, exec, exec uni 2>/dev/null
-bind = $modkey, W, exec, exec firefox
-bind = $modkey, X, exec, exec chkb 2>/dev/null
-bind = $modkey, Space, exec, exec fuzzel --log-level=warning --show-actions
+# Global programs
+bind = $modkey, M, exec, exec foot aerc 2>/dev/null
bind = $modkey, Return, exec, exec foot
+bind = $modkey, Space, exec, exec fuzzel --log-level=warning --show-actions
bind = , Print, exec, exec scst 2>/dev/null
bind = SHIFT, Print, exec, exec scst -f 2>/dev/null
+# Prompt-/Dmenu-style programs
+__submap(prompt, P, [
+ __subbind(C, foot ec)
+ __subbind(D, woman)
+ __subbind(E, emacsclient -c -a emacs)
+ __subbind(P, vlt get)
+ __subbind(U, uni)
+ __subbind(W, firefox)
+ __subbind(X, chkb)
+])
+
# Change focused window
bind = $modkey, H, movefocus, l
bind = $modkey, J, movefocus, d
diff --git a/.config/hypr/macros.m4 b/.config/hypr/macros.m4
new file mode 100644
index 0000000..f466f63
--- /dev/null
+++ b/.config/hypr/macros.m4
@@ -0,0 +1,14 @@
+changequote([,])
+
+define(__submap, [
+ bind = $modkey, $2, submap, $1
+ submap = $1
+ $3
+ bind = , escape, submap, reset
+ submap = reset
+])
+
+define(__subbind, [
+ bind = , $1, exec, exec $2 2>/dev/null
+ bind = , $1, submap, reset
+])