aboutsummaryrefslogtreecommitdiffstats
path: root/i3
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-07-28 14:06:00 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-07-28 14:06:00 +0100
commit068dd950068dd21baa642bc5072f7e621071fda4 (patch)
tree1b54904ac6be50099e2fdb76b41b02c3e8442b2d /i3
parent661351626c0e9ed881878c1ee5f6940c40e38fb2 (diff)
downloaddotfiles-068dd950068dd21baa642bc5072f7e621071fda4.tar.gz
dotfiles-068dd950068dd21baa642bc5072f7e621071fda4.zip
Better i3 bindings and adding script
Diffstat (limited to 'i3')
-rw-r--r--i3/config26
-rwxr-xr-xi3/i3exit30
2 files changed, 43 insertions, 13 deletions
diff --git a/i3/config b/i3/config
index 09fb289..4755987 100644
--- a/i3/config
+++ b/i3/config
@@ -43,10 +43,10 @@ bindsym $mod+d exec i3-dmenu-desktop
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
-bindsym $mod+j focus left
-bindsym $mod+k focus down
-bindsym $mod+l focus up
-bindsym $mod+semicolon focus right
+bindsym $mod+h focus left
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
@@ -55,10 +55,10 @@ bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
-bindsym $mod+Shift+j move left
-bindsym $mod+Shift+k move down
-bindsym $mod+Shift+l move up
-bindsym $mod+Shift+semicolon move right
+bindsym $mod+Shift+h move left
+bindsym $mod+Shift+j move down
+bindsym $mod+Shift+k move up
+bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
@@ -67,7 +67,7 @@ bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
-bindsym $mod+h split h
+bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
@@ -131,10 +131,10 @@ mode "resize" {
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
- bindsym j resize shrink width 10 px or 10 ppt
- bindsym k resize grow height 10 px or 10 ppt
- bindsym l resize shrink height 10 px or 10 ppt
- bindsym semicolon resize grow width 10 px or 10 ppt
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
diff --git a/i3/i3exit b/i3/i3exit
new file mode 100755
index 0000000..4292234
--- /dev/null
+++ b/i3/i3exit
@@ -0,0 +1,30 @@
+#!/bin/sh
+lock() {
+ i3lock -c 2f2f2f
+}
+
+case "$1" in
+ lock)
+ lock
+ ;;
+ logout)
+ i3-msg exit
+ ;;
+ suspend)
+ lock && systemctl suspend
+ ;;
+ hibernate)
+ lock && systemctl hibernate
+ ;;
+ reboot)
+ systemctl reboot
+ ;;
+ shutdown)
+ systemctl poweroff
+ ;;
+ *)
+ echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
+ exit 2
+esac
+
+exit 0