aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/ChangeLayout.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2023-10-22 15:55:57 +0900
committerJaKooLit <jimmielovejay@gmail.com>2023-10-22 15:55:57 +0900
commitc222e1bad2ba5e779c3af5b956906c82ead43271 (patch)
treea5253e0861c200ff90354169e1f67ef42ebf0ef9 /config/hypr/scripts/ChangeLayout.sh
parentbb0be21dba7980fc1c047eaba24eda1712bd7f31 (diff)
Initial upload
Diffstat (limited to 'config/hypr/scripts/ChangeLayout.sh')
-rwxr-xr-xconfig/hypr/scripts/ChangeLayout.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh
new file mode 100755
index 00000000..6cb342fa
--- /dev/null
+++ b/config/hypr/scripts/ChangeLayout.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
+
+case $LAYOUT in
+"master")
+ hyprctl keyword general:layout dwindle
+ hyprctl keyword unbind SUPER,J
+ hyprctl keyword unbind SUPER,K
+ hyprctl keyword bind SUPER,J,cyclenext
+ hyprctl keyword bind SUPER,K,cyclenext,prev
+ hyprctl keyword bind SUPER,O,togglesplit
+ notify-send "Dwindle Layout"
+ ;;
+"dwindle")
+ hyprctl keyword general:layout master
+ hyprctl keyword unbind SUPER,J
+ hyprctl keyword unbind SUPER,K
+ hyprctl keyword unbind SUPER,O
+ hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
+ hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
+ notify-send "Master Layout"
+ ;;
+*) ;;
+
+esac
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage