Yakuake its hands down the best drop down terminal emulator on Linux, but it can be tricky to get it to play nice with gnome.
THE PROBLEM
The behavior should be this:
- I hit my yakuake hotkeys(defined in the yakuake shortcut settings) and yakuake toggles between hidden or shown.
- I hit my show desktop hotkey and it toggles all the windows off and on.
- I hit my yakuake hotkeys(defined in the yakuake shortcut settings) and yakuake does nothing.
- If yakuake is being show if i hit my showdesktop hotkey, yakuake ignores it and remains.
My solution involves
Dont set a hotkey in the yakuake shortcut settings(delete any shortcuts)
Set a hotkey using the keyboard shortcuts gnome system application: adding a new shortcut that runs the command yakuake, to my desired hotkey.
To fix the show desktop im using wmctrl, which you can get using a simple:
sudo apt-get install wmctrl
Then create the file showdesktop
sudo gedit /usr/local/bin/showdesktop
Paste this content into the file and save it
#!/bin/sh
if wmctrl -m | grep "mode: ON"; then
wmctrl -k off
if ! wmctrl -l | grep Yakuake; then
yakuake
fi
else
wmctrl -k on
if wmctrl -l | grep Yakuake; then
yakuake
fi
fi
Give it permission to runif wmctrl -m | grep "mode: ON"; then
wmctrl -k off
if ! wmctrl -l | grep Yakuake; then
yakuake
fi
else
wmctrl -k on
if wmctrl -l | grep Yakuake; then
yakuake
fi
fi
sudo chmod +x /usr/local/bin/showdesktop
And then go again to the keyboard shortcuts gnome system application and add a new shortcut that simply runs showdesktop.Boom, now all works as expected.
No hay comentarios:
Publicar un comentario