Difference between revisions of "Guake"

From ArchWiki
Jump to: navigation, search
m (Style)
(Dual monitor workaround)
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
[[de:Guake]]
 
[[de:Guake]]
 
[[ru:Guake]]
 
[[ru:Guake]]
{{Expansion}}
 
 
 
{{Article summary start}}
 
{{Article summary start}}
 
{{Article summary text|This article demonstrates the installation of Guake}}
 
{{Article summary text|This article demonstrates the installation of Guake}}
 
{{Article summary end}}
 
{{Article summary end}}
 
 
[http://guake.org Guake] is a top-down terminal for [[GNOME]] (in the style of Yakuake for [[KDE]], [[Tilda]] or the terminal used in Quake).
 
[http://guake.org Guake] is a top-down terminal for [[GNOME]] (in the style of Yakuake for [[KDE]], [[Tilda]] or the terminal used in Quake).
  
Line 48: Line 45:
  
 
The traditional patch for dual monitors is no longer available, but a workaround is to define the start points for the window.
 
The traditional patch for dual monitors is no longer available, but a workaround is to define the start points for the window.
{{bc|# nano /usr/bin/guake}}
+
Edit {{ic|/usr/bin/guake}}.
 
+
 
Find that string
 
Find that string
  
Line 55: Line 51:
  
 
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,  
 
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  
+
and add the default x coordinate in the line below, for positioned the window I use:
  
{{bc|                  window_rect.x = total_width - window_rect.width
+
        window_rect.x = total_width - window_rect.width
 
         window_rect.y = 24  
 
         window_rect.y = 24  
 
         window_rect.x = 1024  
 
         window_rect.x = 1024  
         return window_rect}}
+
         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
 
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
Line 66: Line 62:
 
Find that string
 
Find that string
  
{{bc|width = 100}}
+
width = 100
 +
 
 +
Change de value 100 for a more greater, in my case 125 (1280 divided by 1024 and multiplicated by 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 ==
 
== 'Ctrl' Keybind Problem ==
  
As of {{pkg|guake}} 0.4.2-7, there has been a noted bug affecting multiple users concerning the use of the 'Ctrl' key on the Keyboard Shortcuts to toggle guake visibility in the "Keyboard shortcuts" tab of guake-prefs (i.e. Users that setup 'Ctrl+Shift+z' to open the guake console can open it by pressing 'Shift+z', hence having the Ctrl key-bind irrelevant.
+
As of {{Pkg|guake}} 0.4.2-7, there has been a noted bug affecting multiple users concerning the use of the 'Ctrl' key on the Keyboard Shortcuts to toggle guake visibility in the "Keyboard shortcuts" tab of guake-prefs (i.e. Users that setup 'Ctrl+Shift+z' to open the guake console can open it by pressing 'Shift+z', hence having the Ctrl key-bind irrelevant.
 
•••••••••••
 
•••••••••••
 
There is a bug in the program that stores the settings in Toggle Guake Visibility that places the Ctrl string as "<Primary>" instead of "<Control>".
 
There is a bug in the program that stores the settings in Toggle Guake Visibility that places the Ctrl string as "<Primary>" instead of "<Control>".
  
The workaround is to use the command-line gconftool-2 from {{pkg|gconf}} package, get the current string shortcut string from /apps/guake/keybindings/global/show_hide, and replace all instances of "<Primary>" to "<Control>".
+
The workaround is to use the command-line gconftool-2 from {{Pkg|gconf}} package, get the current string shortcut string from {{ic|/apps/guake/keybindings/global/show_hide}}, and replace all instances of "<Primary>" to "<Control>".
  
 
To get what the current keyboard shortcut string is:
 
To get what the current keyboard shortcut string is:
{{bc|# gconftool-2 -g /apps/guake/keybindings/global/show_hide}}
+
# gconftool-2 -g /apps/guake/keybindings/global/show_hide
  
 
To activate the guake console with Ctrl+Shift+z for example:
 
To activate the guake console with Ctrl+Shift+z for example:
{{bc|# gconftool-2 -t string -s /apps/guake/keybindings/global/show_hide "<Control><Shift>z"}}
+
# gconftool-2 -t string -s /apps/guake/keybindings/global/show_hide "<Control><Shift>z"
  
It would be easier to use the graphical gconftool equivalent {{pkg|gconf-editor}} to browse for and edit the /apps/guake/keybindings/global/show_hide string. Replace "<Primary>" in the string with "<Control>".
+
It would be easier to use the graphical gconftool equivalent {{Pkg|gconf-editor}} to browse for and edit the {{ic|/apps/guake/keybindings/global/show_hide}} string. Replace "<Primary>" in the string with "<Control>".
  
Alternatively you can use this script to replace instances of <Primary> with <Control> in the /apps/guake/keybindings/global/show_hide string:
+
Alternatively you can use this script to replace instances of <Primary> with <Control> in the {{ic|/apps/guake/keybindings/global/show_hide}} string:
 
{{hc|~/replaceit.sh
 
{{hc|~/replaceit.sh
|#! /bin/bash
+
|#!/bin/bash
 
|2=<nowiki>if which gconftool-2 &> /dev/null
 
|2=<nowiki>if which gconftool-2 &> /dev/null
 
  then
 
  then

Revision as of 13:34, 3 July 2013

Summary help replacing me
This article demonstrates the installation of Guake

Guake is a top-down terminal for GNOME (in the style of Yakuake for KDE, Tilda or the terminal used in Quake).

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.

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.

Window width

Guake takes all the width of your display by default and there's no such option in "Preferences". To change width you can edit the program itself (/usr/bin/guake) which is python script. Find that string:

width = 100

It is width value in percents, change it to whatever you like.

If you want to align new "narrowed" window left or right find string

if halignment == ALIGN_CENTER:

and replace CENTER with LEFT or RIGHT. To avoid overwrites on update, save it as /usr/local/bin/guake and remember to make it executable.

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. Edit /usr/bin/guake. Find that 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
       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 on the Keyboard Shortcuts to toggle guake visibility in the "Keyboard shortcuts" tab of guake-prefs (i.e. Users that setup 'Ctrl+Shift+z' to open the guake console can open it by pressing 'Shift+z', hence having the Ctrl key-bind irrelevant. ••••••••••• There is a bug in the program that stores the settings in Toggle Guake Visibility that places the Ctrl string as "<Primary>" instead of "<Control>".

The workaround is to use the command-line gconftool-2 from gconf package, get the current string shortcut string from /apps/guake/keybindings/global/show_hide, and replace all instances of "<Primary>" to "<Control>".

To get what the current keyboard shortcut string is:

# gconftool-2 -g /apps/guake/keybindings/global/show_hide

To activate the guake console with Ctrl+Shift+z for example:

# gconftool-2 -t string -s /apps/guake/keybindings/global/show_hide "<Control><Shift>z"

It would be easier to use the graphical gconftool equivalent gconf-editor to browse for and edit the /apps/guake/keybindings/global/show_hide string. Replace "<Primary>" in the string with "<Control>".

Alternatively you can use this script to replace instances of <Primary> with <Control> in the /apps/guake/keybindings/global/show_hide string:

~/replaceit.sh
if which gconftool-2 &> /dev/null
 then
  val=$(printf "%s" $(gconftool-2 -g /apps/guake/keybindings/global/show_hide))
  newval=${val/"<Primary>"/"<Control>"}
  if [ "$newval" = "$val" ]
    then echo "No changes made. Could not find or replace <Primary> in your settings."
   else
    echo "Replacing old string $val with new string:$newval"
    gconftool-2 -t string -s /apps/guake/keybindings/global/show_hide "$newval"
  fi
 else
  echo "gconftool-2 not found. Please install gconf. Exiting..."
fi