summaryrefslogtreecommitdiff
path: root/i3
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2017-10-05 09:31:35 -0700
committerBlaise Thompson <blaise@untzag.com>2017-10-05 09:31:35 -0700
commitcf91b9eb13af5c64a04b1d1c128bd5d2720f299b (patch)
treed9b1be8e9814ae12993bf8c7c29c10e21c4d489d /i3
parent3a23c3baf129ccaf927b12c54aa2558e15fb0e19 (diff)
toggle mouse
Diffstat (limited to 'i3')
-rw-r--r--i3/config17
-rwxr-xr-xi3/toggle_mouse.sh8
2 files changed, 21 insertions, 4 deletions
diff --git a/i3/config b/i3/config
index 75330d5..56bdabf 100644
--- a/i3/config
+++ b/i3/config
@@ -23,18 +23,27 @@ bindsym $mod+Shift+q kill
# launcher
bindsym $mod+d exec rofi -show run -hide-scrollbar -separator-style "solid"
-# i3lock
-bindsym $mod+l exec ~/.config/i3/lock.sh
-exec xautolock -time 15 -locker '~/.config/i3/lock.sh'
-
# reload the configuration file
bindsym $mod+Shift+c reload
+
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
+
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
+# --- custom shortcuts ----------------------------------------------------------------------------
+
+
+# i3lock
+bindsym $mod+l exec ~/.config/i3/lock.sh
+exec xautolock -time 15 -locker '~/.config/i3/lock.sh'
+
+# touchpad toggle
+bindsym $mod+t exec ~/.config/i3/toggle_mouse.sh
+
+
# --- navigation ----------------------------------------------------------------------------------
diff --git a/i3/toggle_mouse.sh b/i3/toggle_mouse.sh
new file mode 100755
index 0000000..9343810
--- /dev/null
+++ b/i3/toggle_mouse.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+if [ -z "$(synclient | grep TouchpadOff | grep 1)" ]; then
+ synclient TouchpadOff=1
+ unclutter -idle 0 &
+else
+ synclient TouchpadOff=0
+ unclutter -idle 5 &
+fi