16 lines
645 B
Bash
Executable File
16 lines
645 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
|
|
set -x
|
|
current_window="$(hyprctl -j activewindow | jq --compact-output)"
|
|
current_addr=$(jq --raw-output '.address' <<< "${current_window}")
|
|
current_class=$(jq --raw-output '.class' <<< "${current_window}")
|
|
current_title=$(jq --raw-output '.title' <<< "${current_window}")
|
|
|
|
typeset -a workspaces
|
|
workspaces=("$(hyprctl -j workspaces | jq --raw-output --compact-output '.[] | .name')")
|
|
|
|
new_workspace_name="$(rofi -dmenu -p "Move window of ${current_class} with title '${current_title}' to which workspace? " <<< ${workspaces})"
|
|
|
|
hyprctl dispatch movetoworkspacesilent "${new_workspace_name}","address:${current_addr}"
|
|
set +x
|