blob: 0981c52c8c3d1f934bfdf9486663571d79cfee5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
while getopts "dmt" o; do case "${o}" in
d) DWINDLE="y" && unset MASTER ;;
m) MASTER="y" && unset DWINDLE ;;
t) TOGGLE="y" ;;
esac done
if [ -n "$TOGGLE" ]; then
#CURRENT="$(hyprctl getoptions general:layout -j | jq -a .str | sed 's/"//g')"
#case "$CURRENT" in
# dwindle) MASTER="y" ;;
# master) DWINDLE="y" ;;
#esac
sed -i -E 's/(layout = )dwindle$/\1mastert/;s/(layout = )master$/\1dwindlet/;s/dwindlet$/dwindle/;s/mastert$/master/' ~/.config/hypr/hyprland.conf
fi
if [ -n "$MASTER" ]; then
hyprctl keywords general:layout master
elif [ -n "$DWINDLE" ]; then
hyprctl keywords general:layout dwindle
fi
|