Commit ef49afd5 authored by Maxime Bombar's avatar Maxime Bombar
Browse files

Add a command to slide current workspace to left and right

parent bdcab464
#!/bin/sh
# Slide current workspace to the left on i3-bar
name=$(i3-msg -t get_outputs | jq | grep 'current_workspace' | awk '{split($0,a,": "); print a[2]}' | cut -d : -f 2 | cut -d \" -f 1 | head -n 1)
number=$(i3-msg -t get_outputs | jq | grep 'current_workspace' | awk '{split($0,a,": "); print a[2]}' | cut -d : -f 1 | cut -d \" -f 2 | head -n 1)
if [-z $number]; then number=-1; fi
i3-msg rename workspace to "$(expr $number - 1):$name"
#!/bin/sh
# Slide current workspace to the right on i3-bar
name=$(i3-msg -t get_outputs | jq | grep 'current_workspace' | awk '{split($0,a,": "); print a[2]}' | cut -d : -f 2 | cut -d \" -f 1 | head -n 1)
number=$(i3-msg -t get_outputs | jq | grep 'current_workspace' | awk '{split($0,a,": "); print a[2]}' | cut -d : -f 1 | cut -d \" -f 2 | head -n 1)
if [-z $number]; then number=-1; fi
i3-msg rename workspace to "$(expr $number + 1):$name"
......@@ -98,6 +98,7 @@ bindsym --release Print exec scrot -s '%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv
bar {
status_command i3status
tray_output $ScreenLaptop
strip_workspace_numbers yes
}
bar {
......@@ -149,6 +150,13 @@ bindsym $mod+space focus mode_toggle
bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/bin/new_workspace.sh
bindsym Control+$alt+n exec --no-startup-id ~/.config/i3/bin/new_workspace.sh
# Move current workspace to the right
bindsym $alt+Shift+Right exec --no-startup-id ~/.config/i3/bin/slide_workspace_right.sh
# Move current workspace to the left
bindsym $alt+Shift+Left exec --no-startup-id ~/.config/i3/bin/slide_workspace_left.sh
# Kill all windows on current workspace
bindsym $mod+Delete focus parent, kill
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment