Article 55DMZ 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?

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:
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
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!latest?d=yIl2AUoC8zA latest?i=yVrB9D1dEjc:EE0wPHUgZoE:F7zBnMy latest?i=yVrB9D1dEjc:EE0wPHUgZoE:V_sGLiP latest?d=qj6IDK7rITs latest?i=yVrB9D1dEjc:EE0wPHUgZoE:gIN9vFwyVrB9D1dEjc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments