New backup 2024-04-09 20:30:02

This commit is contained in:
Penelope Gwen 2024-04-09 20:30:02 -06:00
parent eda150e471
commit 005457f39c
3 changed files with 6 additions and 18 deletions

View file

@ -4,7 +4,10 @@
#
bindsym $mod+Shift+r exec $HOME/.config/sway/scripts/ws-rename
bindsym $mod+p exec "$HOME/.config/sway/scripts/profiles.sh Personal"
bindsym $mod+Bracketleft exec "$HOME/.config/sway/scripts/profiles.sh Development"
bindsym $mod+Bracketright exec "$HOME/.config/sway/scripts/profiles.sh School"
bindsym $mod+Backslash exec "$HOME/.config/sway/scripts/profiles.sh Work"
#set $pn "1"
# Switch to

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
op=$( echo -e "~ Personal\n Development\n School\n Work" | wofi -i --dmenu --width 250 --height 320 | awk '{print $2}' )
[[ -z $1 ]] && op=$( echo -e "~ Personal\n Development\n School\n Work" | wofi -i --dmenu --width 250 --height 320 | awk '{print $2}' ) || op="${1}"
echo "$op"
profile_number=""
@ -32,16 +32,4 @@ for i in {1..10};do
echo $k
swaymsg 'bindsym $mod+'"$k"' workspace number "'"${p_number}${i}:${p_icon}"'"'
done
exit
new_ws="$op"
int=0
while [[ "\"$new_ws\"" == $(swaymsg -t get_workspaces | jq '.[] | select(.name=="'$new_ws'")|.name') ]];do
int=$(($int+1))
new_ws="${op}${int}"
done
echo "new_ws: $new_ws"
swaymsg workspace "${new_ws}"
sway reload
swaymsg 'workspace number "'"${p_number}"'"1'

View file

@ -1,10 +1,7 @@
#!/bin/bash
active_wsname=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .name')
#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]")
new_wsname="${ws_prefix}$(wofi -i --dmenu --height 1)"
swaymsg 'rename workspace "'"${active_wsname}"'" to "'"${new_wsname}"'"'