hyprland: Add tags script

This somewhat replicates the cool tag functionality observed in dwm,
river, and similar window managers.
This commit is contained in:
Donovan Glover 2023-04-30 12:59:04 -04:00
parent b00d8c9ebb
commit 68a8b3369c
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

11
hyprland/.config/hypr/tags.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
# Tag-like script that moves windows from X workspace to the current workspace
# Get IDs of windows on the other workspace
ids="$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == "$1") | .address")"
# Move those windows to the current workspace
for id in $ids; do
hyprctl dispatch movetoworkspacesilent "$(hyprctl monitors | rg active | choose 2)",address:"$id"
hyprctl dispatch focuswindow address:"$id"
done