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