fix: workspaces
This commit is contained in:
parent
4e9bd8c864
commit
b9625ae52f
2 changed files with 58 additions and 36 deletions
|
|
@ -1,14 +1,16 @@
|
|||
#!/bin/bash
|
||||
workspaces() {
|
||||
|
||||
ws1="ID 1"
|
||||
ws2="ID 2"
|
||||
ws3="ID 3"
|
||||
ws4="ID 4"
|
||||
ws5="ID 5"
|
||||
ws6="ID 6"
|
||||
ws7="ID 7"
|
||||
ws8="ID 8"
|
||||
ws1="ID 1 "
|
||||
ws2="ID 2 "
|
||||
ws3="ID 3 "
|
||||
ws4="ID 4 "
|
||||
ws5="ID 5 "
|
||||
ws6="ID 6 "
|
||||
ws7="ID 7 "
|
||||
ws8="ID 8 "
|
||||
ws9="ID 9 "
|
||||
ws0="ID 10"
|
||||
|
||||
# check if Occupied
|
||||
o1=$(hyprctl workspaces | grep "$ws1" )
|
||||
|
|
@ -19,16 +21,20 @@ o5=$(hyprctl workspaces | grep "$ws5" )
|
|||
o6=$(hyprctl workspaces | grep "$ws6" )
|
||||
o7=$(hyprctl workspaces | grep "$ws7" )
|
||||
o8=$(hyprctl workspaces | grep "$ws8" )
|
||||
o9=$(hyprctl workspaces | grep "$ws9" )
|
||||
o0=$(hyprctl workspaces | grep "$ws0" )
|
||||
|
||||
# check if Focused
|
||||
f1=$(hyprctl monitors | grep "workspace: 1" -A 4 | grep "focused: yes" )
|
||||
f2=$(hyprctl monitors | grep "workspace: 2" -A 4 | grep "focused: yes" )
|
||||
f3=$(hyprctl monitors | grep "workspace: 3" -A 4 | grep "focused: yes" )
|
||||
f4=$(hyprctl monitors | grep "workspace: 4" -A 4 | grep "focused: yes" )
|
||||
f5=$(hyprctl monitors | grep "workspace: 5" -A 4 | grep "focused: yes" )
|
||||
f6=$(hyprctl monitors | grep "workspace: 6" -A 4 | grep "focused: yes" )
|
||||
f7=$(hyprctl monitors | grep "workspace: 7" -A 4 | grep "focused: yes" )
|
||||
f8=$(hyprctl monitors | grep "workspace: 8" -A 4 | grep "focused: yes" )
|
||||
f1=$(hyprctl monitors | grep "workspace: 1 " -A 4 | grep "focused: yes" )
|
||||
f2=$(hyprctl monitors | grep "workspace: 2 " -A 4 | grep "focused: yes" )
|
||||
f3=$(hyprctl monitors | grep "workspace: 3 " -A 4 | grep "focused: yes" )
|
||||
f4=$(hyprctl monitors | grep "workspace: 4 " -A 4 | grep "focused: yes" )
|
||||
f5=$(hyprctl monitors | grep "workspace: 5 " -A 4 | grep "focused: yes" )
|
||||
f6=$(hyprctl monitors | grep "workspace: 6 " -A 4 | grep "focused: yes" )
|
||||
f7=$(hyprctl monitors | grep "workspace: 7 " -A 4 | grep "focused: yes" )
|
||||
f8=$(hyprctl monitors | grep "workspace: 8 " -A 4 | grep "focused: yes" )
|
||||
f9=$(hyprctl monitors | grep "workspace: 9 " -A 4 | grep "focused: yes" )
|
||||
f0=$(hyprctl monitors | grep "workspace: 10" -A 4 | grep "focused: yes" )
|
||||
|
||||
if [ "$o1" != "" ]; then
|
||||
ic_1="①"
|
||||
|
|
@ -70,6 +76,16 @@ if [ "$o8" != "" ]; then
|
|||
else
|
||||
ic_8=""
|
||||
fi
|
||||
if [ "$o9" != "" ]; then
|
||||
ic_9="⑨"
|
||||
else
|
||||
ic_9=""
|
||||
fi
|
||||
if [ "$o0" != "" ]; then
|
||||
ic_0="⑩"
|
||||
else
|
||||
ic_0=""
|
||||
fi
|
||||
|
||||
if [ "$f1" != "" ]; then
|
||||
ic_1="➊"
|
||||
|
|
@ -87,11 +103,16 @@ elif [ "$f7" != "" ]; then
|
|||
ic_7="➐"
|
||||
elif [ "$f8" != "" ]; then
|
||||
ic_8="➑"
|
||||
elif [ "$f9" != "" ]; then
|
||||
ic_9="➒"
|
||||
elif [ "$f0" != "" ]; then
|
||||
ic_0="➓"
|
||||
fi
|
||||
|
||||
|
||||
#ic_1=$(hyprctl workspaces)
|
||||
#ic_2="t"
|
||||
echo "(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" (button :onclick \"hyprctl dispatch workspace 1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"hyprctl dispatch workspace 2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"hyprctl dispatch workspace 3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"hyprctl dispatch workspace 4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"hyprctl dispatch workspace 5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"hyprctl dispatch workspace 6\" :class \"$un$o6$f6\" \"$ic_6\") (button :onclick \"hyprctl dispatch workspace 7\" :class \"$un$o7$f7\" \"$ic_7\") (button :onclick \"hyprctl dispatch workspace 8\" :class \"$un$o8$f8\" \"$ic_8\"))"
|
||||
echo "(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"false\" (button :onclick \"hyprctl dispatch workspace 1\" :class \"$un$o1$f1\" \"$ic_1\") (button :onclick \"hyprctl dispatch workspace 2\" :class \"$un$o2$f2\" \"$ic_2\") (button :onclick \"hyprctl dispatch workspace 3\" :class \"$un$o3$f3\" \"$ic_3\") (button :onclick \"hyprctl dispatch workspace 4\" :class \"$un$o4$f4\" \"$ic_4\") (button :onclick \"hyprctl dispatch workspace 5\" :class \"$un$o5$f5\" \"$ic_5\") (button :onclick \"hyprctl dispatch workspace 6\" :class \"$un$o6$f6\" \"$ic_6\") (button :onclick \"hyprctl dispatch workspace 7\" :class \"$un$o7$f7\" \"$ic_7\") (button :onclick \"hyprctl dispatch workspace 8\" :class \"$un$o8$f8\" \"$ic_8\") (button :onclick \"hyprctl dispatch workspace 9\" :class \"$un$o9$f9\" \"$ic_9\") (button :onclick \"hyprctl dispatch workspace 10\" :class \"$un$o0$f0\" \"$ic_0\"))"
|
||||
}
|
||||
workspaces
|
||||
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep -E --line-buffered "Changed to workspace|focus to surface" | while read -r; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue