Improve wayland configs
This commit is contained in:
parent
35f4e0c88f
commit
ceea1c316a
18 changed files with 549 additions and 41 deletions
23
.config/hypr/handler.sh
Executable file
23
.config/hypr/handler.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i sh -p socat jq
|
||||
|
||||
ws_media="[08]"
|
||||
ws_voip="[09]"
|
||||
|
||||
_handler_check_ws_media_empty() {
|
||||
has_zero_windows=$(hyprctl workspaces -j | jq ".[] | select(.name == \"$ws_media\") | .windows == 0")
|
||||
|
||||
if [ "$has_zero_windows" == "true" ]; then
|
||||
hyprctl dispatch workspace "$ws_voip"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
handle() {
|
||||
case $1 in
|
||||
movewindow*) _handler_check_ws_media_empty "$1" ;;
|
||||
closewindow*) _handler_check_ws_media_empty "$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
socat -U - "UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done
|
Loading…
Add table
Add a link
Reference in a new issue