fix: updated script to use new lua dispatch command for hyprctl
This commit is contained in:
@@ -26,16 +26,16 @@ fi
|
||||
|
||||
client_tty="$(
|
||||
tmux list-clients -F '#{client_tty} #{client_termname}' 2>/dev/null \
|
||||
| awk '$2 ~ /ghostty/ { print $1; exit }' || true
|
||||
| awk '$2 ~ /xterm/ { print $1; exit }' || true
|
||||
)"
|
||||
|
||||
if [ -n "${client_tty}" ]; then
|
||||
# switch that client to the chosen session
|
||||
tmux switch-client -c "${client_tty}" -t "${chosen}"
|
||||
address=$(hyprctl clients -j | jq -r "to_entries | .[] | select(.value.class == \"com.mitchellh.ghostty\") | \"\(.value.address)\"")
|
||||
address=$(hyprctl clients -j | jq -r "to_entries | .[] | select(.value.class == \"foot\") | \"\(.value.address)\"")
|
||||
workspace=$(hyprctl clients -j | jq -r ".[] | select(.address == \"$address\") | \"(.workspace.id)\"")
|
||||
hyprctl dispatch focusworkspaceoncurrentmonitor "$workspace"
|
||||
hyprctl dispatch focuswindow "address:$address"
|
||||
hyprctl dispatch "hl.dsp.focus({workspace = $workspace , on_current_monitor = true})"
|
||||
hyprctl dispatch "hl.dsp.focus({ window = \"address:$address\" })"
|
||||
tmux switch-client -c "${client_tty}" -t "${chosen}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user