Hi everyone! Hope you're all having a nice life and a wonderful 2020!
We all love having shortcut keys for launching our most used apps, open directories or execute certain tasks, but sometimes it might be hard to remember each and every single one of them, even more if like me, you hardly ever use the mouse but rely on the keyboard most of the times. Once I had this idea of having a wallpaper with all the SCKs, but eventually I realized how inconvenient that was, besides the fact that it wasn't the prettiest background to look at day after day I memorized a few and thought that was the best thing to do and the only solution, only it wasn't. A couple of years ago I discovered aswesome-wm and inmediately loved it; it's keyboard driven so most actions can be triggered by pressing a key combo, and that includes displaying all the available key combos, by pressing Meta key (win key)+S a quick presentation is displayed on the desktop with all of the shorcut keys available for every action you can perform; switch between windows, close/open a window, open a terminal, restart the window manager and so on ... so everytime I switched back to XFCE I really wanted to be able to do this, which I did and today I'm going to share with you how you can do it too.
1.- Create an image cointaining the shortcut keys you want to have at hand. You can do this by taking some screenshots at Settings >> Keyboard >> Application Shortcuts and Settings >> Window Manager >> Keyboard Then use something like GIMP and put those images together thus creating a new one, with the resolution of your screen i.e 1920x1080 or another size of your choice, name it whatever you like (I named mine sheet) and save it to your home directory or any other location of your choice. If you have the skiils, the time and the will to do so - I didn't - , you could also create your own custom image by tipying and/or copying and pasting them using GIMP or whatever it is you use.
2.- You need feh, https://feh.finalrewind.org/ app size is around 2mb and total install size is around 10.5mb, so it won't eat your HDD/SSD space. Don't close the terminal just yet, you still need it. ;D
3.- Once feh's installed type and paste the following lines in the new file
press Ctrl+o and then Enter to save the file, then press Ctrl+x to close nano. Don't close the terminal, you need to make the file executable, for that type and hit Enter. Now you can test the script to see whether or not it works, to do that just type if eveything went right you'll be presented with your cheat sheet on your screen, to close the image, click on your terminal window and hit the up arrow key in your keyboard to go back a command in your history, which unless you had typed something else should be the script, then hit enter, o simply click on the close button in the feh window, that is, click on the "x". Alternatively, if you don't like using the terminal, then open a text editor of your choice i.e mousepad and create a new file, paste the lines above and save it with the .sh extension, open the location of the file in your file manager, right click on it, select properties from the context menu and check the box that reads Allow this file to run as a program, double-click on it or select it and hit enter to test it.
4.- Open the terminal and type nano or use another text editor i.e mousepad, then copy and paste the following
Save it and name it whatever you like with the .desktop extension in /home/your_user/.local/share/applications (I named mine Sheet.desktop) now the script will be available in whisker menu.
5.- We want this to be available with a shorcut; it will run and stop the action when pressing the keys you assigned, so go to Settings >> Keyboard >> Application Shortcut click on the "+ Add" button and in the window that pops up where it reads command type /home/your_user/sc_cheat.sh or click on the open button and navigate to the script's location and select it, then click on OK and when asked press the keys you want to assign for launching it as well as stopping it and that's it.
You can also make the window borderless by passing the -x flag to feh, for that our script should look like this.
Now you won't have to remember every single one of your shortcut keys but just one, instead you can use that space in your memory you just gained for something else. ;D
We all love having shortcut keys for launching our most used apps, open directories or execute certain tasks, but sometimes it might be hard to remember each and every single one of them, even more if like me, you hardly ever use the mouse but rely on the keyboard most of the times. Once I had this idea of having a wallpaper with all the SCKs, but eventually I realized how inconvenient that was, besides the fact that it wasn't the prettiest background to look at day after day I memorized a few and thought that was the best thing to do and the only solution, only it wasn't. A couple of years ago I discovered aswesome-wm and inmediately loved it; it's keyboard driven so most actions can be triggered by pressing a key combo, and that includes displaying all the available key combos, by pressing Meta key (win key)+S a quick presentation is displayed on the desktop with all of the shorcut keys available for every action you can perform; switch between windows, close/open a window, open a terminal, restart the window manager and so on ... so everytime I switched back to XFCE I really wanted to be able to do this, which I did and today I'm going to share with you how you can do it too.
1.- Create an image cointaining the shortcut keys you want to have at hand. You can do this by taking some screenshots at Settings >> Keyboard >> Application Shortcuts and Settings >> Window Manager >> Keyboard Then use something like GIMP and put those images together thus creating a new one, with the resolution of your screen i.e 1920x1080 or another size of your choice, name it whatever you like (I named mine sheet) and save it to your home directory or any other location of your choice. If you have the skiils, the time and the will to do so - I didn't - , you could also create your own custom image by tipying and/or copying and pasting them using GIMP or whatever it is you use.
2.- You need feh, https://feh.finalrewind.org/
Quote:an X11 image viewer aimed mostly at console users. Unlike most other viewers, it does not have a fancy GUI, but simply displays images. It is controlled via commandline arguments and configurable key/mouse actions.This will be the app responsible for displaying your cheat sheet, to install it just open a terminal and type
Code:
sudo apt-get install feh
3.- Once feh's installed type
Code:
nano sc_cheat.sh
Code:
#!/bin/bash
#Show shortcut keys cheat sheet
if pidof feh [0-9]
then
killall feh
else
feh sheet.png & #this works if the img file is in your /home otherwise you have to specify the location or it won't. i.e feh /path/to/image &
fi
press Ctrl+o and then Enter to save the file, then press Ctrl+x to close nano. Don't close the terminal, you need to make the file executable, for that type
Code:
chmod 755 sc_cheat.sh
Code:
./sc_cheat.sh
4.- Open the terminal and type nano or use another text editor i.e mousepad, then copy and paste the following
Code:
[Desktop Entry]
Version=1.0
Name=Sheet
Categories=Accesories
Comment=Show shortcut keys cheat sheet
Exec=/home/youruser/sc_cheat.sh #change "youruser" for your actual username
Icon=your_icon.png #change "your_icon.png" for the actual name of the .png file.
Type=Application
Save it and name it whatever you like with the .desktop extension in /home/your_user/.local/share/applications (I named mine Sheet.desktop) now the script will be available in whisker menu.
5.- We want this to be available with a shorcut; it will run and stop the action when pressing the keys you assigned, so go to Settings >> Keyboard >> Application Shortcut click on the "+ Add" button and in the window that pops up where it reads command type /home/your_user/sc_cheat.sh or click on the open button and navigate to the script's location and select it, then click on OK and when asked press the keys you want to assign for launching it as well as stopping it and that's it.
You can also make the window borderless by passing the -x flag to feh, for that our script should look like this.
Code:
#!/bin/bash
#Show shortcut keys cheat sheet
if pidof feh [0-9]
then
killall feh
else
feh -x sheet.png & #this will make the window borderless
fi
Now you won't have to remember every single one of your shortcut keys but just one, instead you can use that space in your memory you just gained for something else. ;D
Without each others help there ain't no hope for us
Need a translation service? https://www.deepl.com/es/translator
Need a translation service? https://www.deepl.com/es/translator