Wednesday, November 06, 2013
Invert the colours of your screen - create a Linux shortcut using this handy script.
Here's a script for you. With help text. This is to invert the colours of your screen - but I've not added the final stage regarding the keyboard shortcut, yet. Will add later..
#!/bin/bash # script to invert the colours
# to install xcalib do "sudo apt-get install xcalib"
# will need to make a keyboard shortcut for it too such as Super + M
#but need to create a softlink to the script first clear sleep 1 echo "This will invert the colours" sleep 1 /usr/bin/xcalib -invert -alter;
#here are clearer instructions to replicate this keyboard shortcut on other computers
#put this script in bin (not the Bin - the 'bin' in the Home folder or ~)
#make it executable (chmod 777 ~/bin/invertcolours)
#make softlink to it - so you can access it from Desktop or Documents, say.
#create softlink - "ln -s ~/bin/invertcolours ~/Documents/Softlinks/invert_softlink" or something #don't forget to test the usr command above #then test the script in bin (double click it)
#then test the shortcut/softlink
#then create the keyboard shortcut - forgotten how - look it up for your distro - for Lubuntu.
#..for Lubuntu - https://help.ubuntu.com/community/Lubuntu/Keyboard
#Create New Keyboard shortcuts
#There is no automatic way to create new keyboard shortcuts or hotkeys in lubuntu. You will either have to edit Lubuntu's openbox configuration file (~/.config/openbox/lubuntu-rc.xml) and edit, or alternatively install xbindkeys.
#Obkey will edit the keyboard parts of your Openbox configuration file for you. Download the .tar.gz and unarchive it. After unpacking the tar.gz, open a command line in the new folder and run obkey like this: ./obkey ~/.config/openbox/lubuntu-rc.xml
#Hint: back up your config file.
#After saving the config file, you will need to run this command to have openbox use the changed config: openbox --reconfigure