How can I make a script apear as an icon in the menu or my favorites so i can run form the menu instead of the console?
by questionsBot from LinuxQuestions.org on (#55DMZ)
I have a script that disabled my keyboard compleatly and enables it if the script is run a second time. I needed this as my laptop folds into a tablet. When you use the laptop in this mode, it needs the entire keyboard to be disabled. In windows it automatically disables and enabled the keyboard, but I just can't get it to do that in Linux.
So I wrote a simple script that enables or disabled the keyboard for me.
Quote:
This seems to work fine. The thing is as it disables the keyboard I can't enable in the terminal, I need to click the actual script in my fie manager and execute it.
: TL;DR :
How can I turn this script into a entry in the actual BodHi menu, with an Icon and everything. So I can simply click my desktop, go favorites and click the icon to disable, and enable the keyboard?
Thanks!


So I wrote a simple script that enables or disabled the keyboard for me.
Quote:
Originally Posted by sKeyboardSwap#! /bin/bash # sKeyboard # http://ubuntuforums.org/showthread.php?t=2100744 DEVICE="AT Translated Set 2 keyboard" STATUS=`xinput list-props "$DEVICE" | grep 'Device Enabled' | sed 's/.*\([0-9]\)$/\1/'` if [ "$STATUS" = "1" ] then xinput set-prop "$DEVICE" 'Device Enabled' 0 #echo "KeyBoard Disabled" # notify-send "Touch-screen" "Disabled" -i /usr/share/pixmaps/touch-screen.png elif [ "$STATUS" = "0" ] then xinput set-prop "$DEVICE" 'Device Enabled' 1 #echo "KeyBoard Enabled" # notify-send "Touch-screen" "Enabled" -i /usr/share/pixmaps/touch-screen.png else echo "Error : bad argument" fi |
: TL;DR :
How can I turn this script into a entry in the actual BodHi menu, with an Icon and everything. So I can simply click my desktop, go favorites and click the icon to disable, and enable the keyboard?
Thanks!