From 9e9ff053904aec6303c025041cd469d05dd82dcf Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 16 Dec 2015 19:31:15 +0000 Subject: Add script to create/change workspace --- .i3/config | 2 +- .zsh/zshrc | 2 +- bin/workspace | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100755 bin/workspace diff --git a/.i3/config b/.i3/config index ef59ca3..91546de 100644 --- a/.i3/config +++ b/.i3/config @@ -155,6 +155,7 @@ bindsym $mod+period workspace next # Programs shortcuts bindsym $mod+b exec uzbl-browser bindsym $mod+at exec chromium-browser +bindsym $mod+n exec workspace # Configuration # bindsym F1 exec $HOME/.xinitrc @@ -178,6 +179,5 @@ bindsym XF86MonBrightnessUp exec xbacklight -inc 10 bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # font pango:DejaVu Sans Mono 10 - bindsym F1 exec --no-startup-id feh --bg-fill --randomize /usr/share/backgrounds bindsym $mod+semicolon exec --no-startup-id /home/urbain/dotfiles/bin/run diff --git a/.zsh/zshrc b/.zsh/zshrc index 8957fe8..03b5172 100644 --- a/.zsh/zshrc +++ b/.zsh/zshrc @@ -10,7 +10,7 @@ bindkey '^P' history-beginning-search-backward bindkey '^N' history-beginning-search-forward # Paths of executables -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin/core_perl" +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin/core_perl:/home/urbain/bin" # Editor export EDITOR=/usr/bin/vim diff --git a/bin/workspace b/bin/workspace new file mode 100755 index 0000000..9082f39 --- /dev/null +++ b/bin/workspace @@ -0,0 +1,5 @@ +#!/bin/zsh + +workspaces=$(i3-msg -t get_workspaces | grep -Po '"name":.*?[^\\]"' | sed 's/"name":"\([0-9a-zA-Z]\+\)"/\1/g') +target=$(echo $workspaces | dmenu -i -p "Go to workspace:") +exec i3-msg workspace $target -- cgit v1.2.3