Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Bombar
Config_Files
Commits
ef49afd5
Commit
ef49afd5
authored
Aug 30, 2020
by
Maxime Bombar
Browse files
Add a command to slide current workspace to left and right
parent
bdcab464
Changes
3
Hide whitespace changes
Inline
Side-by-side
.config/i3/bin/slide_workspace_left.sh
0 → 100755
View file @
ef49afd5
#!/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
"
.config/i3/bin/slide_workspace_right.sh
0 → 100755
View file @
ef49afd5
#!/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
"
.config/i3/config
View file @
ef49afd5
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment