aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/hypr/hyprland.conf5
-rwxr-xr-x.local/bin/sysact26
2 files changed, 30 insertions, 1 deletions
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf
index f2077e2..b6fba33 100644
--- a/.config/hypr/hyprland.conf
+++ b/.config/hypr/hyprland.conf
@@ -136,7 +136,6 @@ $mainMod = SUPER # Sets "Windows" key as main modifier
bind = $mainMod, Return, exec, $terminal
bind = $mainMod, Q, killactive,
-bind = $mainMod, M, exit,
bind = $mainMod, W, exec, $browser
bind = $mainMod, R, exec, $fileManager
bind = $mainMod SHIFT, D, exec, tessen
@@ -149,11 +148,15 @@ bind = $mainMod, F, fullscreen,
bind = $mainMod SHIFT, Return, swapnext
bind =, Print, exec, menurecord
bind = SHIFT, Print, exec, menurecord kill
+bind = $mainMod, E, exec, foot -e neomutt; pkill -RTMIN+12 waybar
+bind = $mainMod SHIFT, N, exec, foot -e newsboat; pkill -RTMIN+6 waybar
bind = $mainMod SHIFT, S, exec, slurp | grim -t jpeg -g - - | wl-copy -t image/jpeg
+bind = $mainMod SHIFT, R, exec, foot -e btop
bind =,XF86AudioPlay, exec, playerctl play-pause
bind =,XF86AudioPrev, exec, playerctl previous
bind =,XF86AudioNext, exec, playerctl next
bind =,mouse:276, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && pkill -RTMIN+8 waybar
+bind = $mainMod SHIFT, Q, exec, sysact
bind = $mainMod SHIFT, L, resizeactive, 100 0
bind = $mainMod SHIFT, H, resizeactive, -100 0
diff --git a/.local/bin/sysact b/.local/bin/sysact
new file mode 100755
index 0000000..b54872b
--- /dev/null
+++ b/.local/bin/sysact
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# A dmenu wrapper script for system functions.
+export WM="Hyprland"
+case "$(readlink -f /sbin/init)" in
+ *systemd*) ctl='systemctl' ;;
+ *) ctl='loginctl' ;;
+esac
+
+wmpid(){ # This function is needed if there are multiple instances of the window manager.
+ tree="$(pstree -ps $$)"
+ tree="${tree#*$WM(}"
+ echo "${tree%%)*}"
+}
+
+case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | rofi -dmenu -i -p 'Action: ')" in
+ '🔒 lock') slock ;;
+ "🚪 leave $WM") hyprctl dispatch exit ;;
+ "♻️ renew $WM") hyprctl reload ;;
+ '🐻 hibernate') slock $ctl hibernate -i ;;
+ '💤 sleep') slock $ctl suspend -i ;;
+ '🔃 reboot') $ctl reboot -i ;;
+ '🖥️shutdown') $ctl poweroff -i ;;
+ '📺 display off') xset dpms force off ;;
+ *) exit 1 ;;
+esac