New backup 2024-04-09 20:15:03

This commit is contained in:
Penelope Gwen 2024-04-09 20:15:03 -06:00
parent 5b45dfc075
commit eda150e471

View file

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