summaryrefslogtreecommitdiff
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
parent3a23c3baf129ccaf927b12c54aa2558e15fb0e19 (diff)
toggle mouse
-rw-r--r--i3/config17
-rwxr-xr-xi3/toggle_mouse.sh8
-rwxr-xr-xlink.sh1
3 files changed, 22 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
diff --git a/link.sh b/link.sh
index 77dc788..341b721 100755
--- a/link.sh
+++ b/link.sh
@@ -23,5 +23,6 @@ ln -sf ~/dotfiles/password-store ~/.password-store
# i3
ln -sf ~/dotfiles/i3/config ~/.config/i3/config
ln -sf ~/dotfiles/i3/lock.sh ~/.config/i3/lock.sh
+ln -sf ~/dotfiles/i3/toggle_mouse.sh ~/.config/i3/toggle_mouse.sh
mkdir ~/.config/i3status
ln -sf ~/dotfiles/i3/i3status+config ~/.config/i3status/config