dotfiles/de/home/.config/sway/scripts/ws-rename
2024-04-09 20:30:02 -06:00

7 lines
306 B
Bash
Executable file

#!/bin/bash
active_wsname=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .name')
ws_prefix=$(echo $active_wsname | tr -d '"' | grep -o "[1-9]*:[^a-zA-Z1-9]")
new_wsname="${ws_prefix}$(wofi -i --dmenu --height 1)"
swaymsg 'rename workspace "'"${active_wsname}"'" to "'"${new_wsname}"'"'