Difference between revisions of "Guake"
m (→Usage: some fixes) |
(→'Ctrl' keybind problem: keep it simple >_<) |
||
Line 127: | Line 127: | ||
=== 'Ctrl' keybind problem === | === 'Ctrl' keybind problem === | ||
− | As of {{Pkg|guake}} 0.4.2-7 | + | As of {{Pkg|guake}} 0.4.2-7 there has been a noted bug affecting multiple users concerning the use of the {{ic|Ctrl}} key to toggle Guake window visibility (i.e. users that setup {{ic|Ctrl+Shift+z}} to open the guake console are able to open it by just pressing {{ic|Shift+z}}, independent on whether {{ic|Ctrl}} key has been pressed). |
− | + | To solve the problem you should manually fix the value of the GConf key {{ic|/apps/guake/keybindings/global/show_hide}}. Open a ''gconf-editor'', navigate to ''apps > guake > keybindings > global > show_hide'' and replace {{ic|<Primary>}} with {{ic|<Control>}}. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* [http://linux.die.net/man/1/guake man guake(1)] on die.net | * [http://linux.die.net/man/1/guake man guake(1)] on die.net |
Revision as of 12:43, 3 December 2014
Guake is a top-down terminal for GNOME (in the style of Yakuake for KDE, Tilda or the terminal used in Quake).
Contents
Installation
Install guake, available in the official repositories.
Usage
Once installed, you can start Guake from the terminal with:
$ guake
After guake has started you can right click on the interface and select Preferences to change the hotkey to drop the terminal automatically, by default it is set to F12
.
Also, you can adjust many of the Guake preferences with gconf-editor tool under apps > guake. If it's not enough for you, you are always free to copy the guake executable (/usr/bin/guake
) to /usr/local/bin/guake
and edit it in text editor, since it's just a Python script. Remember to make the file executable.
Autostartup
You may want Guake to load on starting up Desktop Environment. To do this, you need to
# cp /usr/share/applications/guake.desktop /etc/xdg/autostart/
See Autostarting for more info.
Guake scripting
Like Yakuake, Guake allows to control itself at runtime by sending the D-Bus messages. Thus it can be used to start Guake in a user defined session. You can create tabs, assign names for them and also ask to run any specific command in any opened tab or just to show/hide Guake window, manually in a terminal or by creating a custom script for it.
Example of such a script is given below this section.
You can use guake executable itself to send D-Bus messages. Here is the list of available options you may be interested in:
-
-t
,--toggle-visibility
— toggle the visibility of the terminal window. Actually, you can just typeguake
, and it will toggle the visibility of already running instance. -
-f
,--fullscreen
— put Guake to fullscreen mode. -
--show
— show Guake main window. -
--hide
— hide Guake main window. -
-n CUR_DIR
,--new-tab=CUR_DIR
— create new tab and select it. Value ofCUR_DIR
used to set a current directory for the tab, if specified. -
-s INDEX
,--select-tab=INDEX
— select tab with indexINDEX
. Tab indexes are started with 0. -
-g
,--selected-tab
— print index of currently selected tab. -
-e CMD
,--execute-command=CMD
— execute an arbitrary commandCMD
in the selected tab. -
-i INDEX
,--tab-index=INDEX
— used with--rename-tab
to specify indexINDEX
of a tab to rename. Default value is 0. -
--rename-tab=TITLE
— set the tab name toTITLE
. You can reset tab title to default value by passing a single dash ("-"
). Use-i
option to specify which tab to rename. -
--bgcolor=RGB
— set the hexadecimal (#rrggbb
) background colorRGB
of the selected tab. -
--fgcolor=RGB
— set the hexadecimal (#rrggbb
) foreground colorRGB
of the selected tab. -
-r TITLE
,--rename-current-tab=TITLE
— same as--rename-tab
, but renames the currently selected tab. -
-q
,--quit
— shutdown running Guake instance.
Multiple options may be combined in a single call. If there's no guake instance running, all of the options specified will be applied to the newly created instance.
To display list of all available options, type guake --help
.
Example:
#!/bin/bash /usr/bin/guake & sleep 5 # let main guake process start and initialize D-Bus session # adjust tab which was opened by default guake --rename-tab="iotop" --execute="/usr/bin/iotop" # create new tab, start bash session in it guake --new-tab --execute="/usr/bin/bash" # and then execute htop, renaming the tab to "htop" guake --execute="/usr/bin/htop" --rename-tab="htop" # ... guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/atop" --rename-tab="atop" guake --new-tab --execute="/usr/bin/bash" guake --execute="~/.iptables.sh" --rename-tab="iptables -nvL" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/journalctl --follow --full" --rename-tab="journalctl" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/irssi" --rename-tab="irssi" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/sudo -i" --rename-tab="rootshell0" guake --new-tab --execute="/usr/bin/bash" guake --execute="/usr/bin/sudo -i" --rename-tab="rootshell1" guake --new-tab --execute="/usr/bin/bash" guake --rename-tab="shell0" guake --new-tab --execute="/usr/bin/bash" guake --rename-tab="shell1"
Notice than we should wait some time calling sleep to avoid race conditions between running instances.
Throubleshooting
Dual monitor workaround
The traditional patch for dual monitors is no longer available, but a workaround is to define the start points for the window.
Open /usr/bin/guake
and find this string:
window_rect.y = 0
is the default point in Y coordinate if you need change for the width of top desktop bar (or the long from the top of the bar to below), if you use it, and add the default X coordinate in the line below, for positioned the window I use:
window_rect.x = total_width - window_rect.width # fixme: this line gives no effect? window_rect.y = 24 window_rect.x = 1024 return window_rect
My first window is 1024 pixels and my second window is 1280 pixels, so guake get size of the first window from left to right which is why I must increase the width by a percentage.
Find that string
width = 100
Change de value 100
for a more greater, in my case 125
(1280 divided by 1024 and multiplicated by 100).
If the window width identified wrong, try to change the display number in
window_rect = screen.get_monitor_geometry(0)
'Ctrl' keybind problem
As of guake 0.4.2-7 there has been a noted bug affecting multiple users concerning the use of the Ctrl
key to toggle Guake window visibility (i.e. users that setup Ctrl+Shift+z
to open the guake console are able to open it by just pressing Shift+z
, independent on whether Ctrl
key has been pressed).
To solve the problem you should manually fix the value of the GConf key /apps/guake/keybindings/global/show_hide
. Open a gconf-editor, navigate to apps > guake > keybindings > global > show_hide and replace <Primary>
with <Control>
.
See also
- man guake(1) on die.net