Skip to content

Instantly share code, notes, and snippets.

@mathewpeterson
Created August 29, 2015 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathewpeterson/b489bc34fe8feee04c69 to your computer and use it in GitHub Desktop.
Save mathewpeterson/b489bc34fe8feee04c69 to your computer and use it in GitHub Desktop.
sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool -y
sudo mkdir -p /usr/local/src/matchbox-keyboard
git clone https://github.com/xlab/matchbox-keyboard.git /usr/local/src/matchbox-keyboard
cd /usr/local/src/matchbox-keyboard && ./autogen.sh && make && sudo make install
sudo apt-get install libmatchbox1 -y
cat << EOF | sudo tee /usr/bin/toggle-matchbox-keyboard.sh
#!/bin/bash
#This script toggle the virtual keyboard
PID=`pidof matchbox-keyboard`
if [ ! -e $PID ]; then
killall matchbox-keyboard
else
matchbox-keyboard &
fi
EOF
sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh
cat << EOF | sudo tee /usr/local/share/applications/toggle-matchbox-keyboard.desktop
[Desktop Entry]
Name=Toggle Matchbox Keyboard
Comment=Toggle Matchbox Keyboard
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True
EOF
echo << EOF
Please add the button to your launchbar:
Button {
id=toggle-matchbox-keyboard.desktop
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment