Skip to content

Instantly share code, notes, and snippets.

@duese
Created November 5, 2015 10:55
Show Gist options
  • Save duese/72bebfd84b8b3c207736 to your computer and use it in GitHub Desktop.
Save duese/72bebfd84b8b3c207736 to your computer and use it in GitHub Desktop.
Simple script to switch mouse buttons on Openbox. Source: http://crunchbang.org/forums/viewtopic.php?id=1760
#!/bin/bash
# Source: http://crunchbang.org/forums/viewtopic.php?id=1760
current=$(xmodmap -pp | head -5 | tail -1 | awk '{print $2}');
if [ "$current" -eq "1" ]
then
xmodmap -e "pointer = 3 2 1";
else
xmodmap -e "pointer = 1 2 3";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment