diff options
author | calvin <calvin@it13.HOLTDOM.COM> | 2015-02-09 09:52:19 -0500 |
---|---|---|
committer | calvin <calvin@it13.HOLTDOM.COM> | 2015-02-09 09:52:19 -0500 |
commit | 03893d39d5adaf3372f77e9ca22f988d79f113c5 (patch) | |
tree | c1c04cc5b7a6067673b106320026d0f2bdfdec41 |
initial commit
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | config | 40 | ||||
-rwxr-xr-x | rename_workspace | 6 |
3 files changed, 47 insertions, 0 deletions
@@ -0,0 +1 @@ +copy this script into your path, and update your i3config too look like this. then you shall have a working renamer @@ -0,0 +1,40 @@ +set $mod Mod1 + +# use whatever bindings you want +bindsym $mod+Shift+P exec /home/calvin/bin/rename_workspace + +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + + +# switch to workspace X +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container to workspace +bindsym $mod+Shift+exclam move container to workspace $ws1 +bindsym $mod+Shift+at move container to workspace $ws2 +bindsym $mod+Shift+numbersign move container to workspace $ws3 +bindsym $mod+Shift+dollar move container to workspace $ws4 +bindsym $mod+Shift+percent move container to workspace $ws5 +bindsym $mod+Shift+asciicircum move container to workspace $ws6 +bindsym $mod+Shift+ampersand move container to workspace $ws7 +bindsym $mod+Shift+asterisk move container to workspace $ws8 +bindsym $mod+Shift+parenleft move container to workspace $ws9 +bindsym $mod+Shift+parenright move container to workspace $ws10 diff --git a/rename_workspace b/rename_workspace new file mode 100755 index 0000000..adfda65 --- /dev/null +++ b/rename_workspace @@ -0,0 +1,6 @@ +#!/bin/bash +OLD=$(i3-msg -t 'get_workspaces' | sed -e 's/{"num/\n{"num/g' | grep \"focused\":true | sed -e 's/,"/\n/g' | grep name | cut -d\" -f 3) +NEW=$(zenity --text="Enter new name:" --entry --title="Rename workspace $OLD" --entry-text="$OLD") +i3-msg "rename workspace \"$OLD\" to \"$NEW\"" +sed ~/.i3/config -i -e "s,^set \$\(ws[0-9]\+\) \"$OLD\",set \$\1 \"$NEW\"," +i3-msg reload |