fetch_or_launch and focus_or_launch now swap the target client to master layout position when it is not already the master. Scripts switched from raw hl.dsp.* calls to --persistent lua function dispatches (fetch_or_launch / focus_or_launch), and both now guard against empty rofi selection.
12 lines
565 B
Bash
Executable File
12 lines
565 B
Bash
Executable File
#!/bin/sh
|
|
#chooser="walker -d"
|
|
chooser="rofi -i -dmenu -display-columns 1"
|
|
workspace=$(hyprctl activeworkspace -j | jq -r '.id')
|
|
selected=$(hyprctl clients -j | jq -r 'to_entries | .[] | select(.value.hidden == false) | "\(.value.title)\t\(.value.class)::\(.value.address)"' | $chooser -p 'Client to Fetch')
|
|
address=$(echo "$selected" | awk -F '::' '{print $NF}')
|
|
if [ -z "$address" ]; then
|
|
notify-send "No client selected"
|
|
exit 1
|
|
fi
|
|
hyprctl dispatch "fetch_or_launch({ match = '$address', field = 'address', cmd = 'notify-send \"$selected not found\"'})"
|