Saturday, June 7, 2014

LXDE Screenshot

Migrating from Gnome3 to LXDE  is so much fun! Experiencing lightweight desktop.
But hitting my PrtSc resulting no respon... What? Argghh i have to added manually.
The keybinding of PrtSc to LXDE. Calm down.. it wont hurt you anyway. Here is
the How-to:

1. $ sudo yum install -y scrot
2. create a bash-script then copy-paste and name it screenshot.sh
#!/bin/bash

scrot '%Y-%m-%d%H:%M:%S_scrot.png' -e 'mv $f /home/adesanto/Pictures'

3. $ sudo chmod a+x screenshoot.sh
4. Copy the script to /usr/local/bin/screenshot.sh
5. Add this code into ~/.config/openbox/lxde-rc.xml

   
        screenshot.sh
   

6. $ openbox --reconfigure

For additional feature i would like to have a click or snap sound whenever my PrtSc button
got hit/press. Edit the screenshot.sh to

scrot '%Y-%m-%d%H:%M:%S_scrot.png' -e 'mv $f /home/adesanto/Pictures' && paplay /opt/android-sdk-linux/samples/android-13/AccessibilityService/res/raw/sound_view_clicked.ogg

Notice i am using paplay to play an *.ogg file. Fedora has this as default application.
Have fun!

No comments: