Guake (Русский)

From ArchWiki
Jump to: navigation, search


Guake - это "выпадающий" терминал в стиле Quake аналогичный Tilda или Yakuake для KDE.

Contents

Установка

Просто установите guake из официальных репозиториев.

Также доступна разрабатываемая версия в AUR: guake-git.

Использование

После установки, вы можете запустить guake из терминала командой

$ guake

После запуска quake нажмите на его окне правой кнопкой мыши, выберите "Preferences". Там, в числе прочих настроек, вы можете сменить горячую клавишу для появления окна guake. По умолчанию это F12.

Автозапуск

Если вы хотите, чтобы guake запускался автоматически вместе с вашим DE, сделайте следущее:

# cp /usr/share/applications/guake.desktop /etc/xdg/autostart/

Или обратитесь к инструкции по автозапуску программ в вашем DE.

Ширина окна

По умолчанию, guake занимает всю ширину вашего монитора, и не предоставляет никаких настроек для смены ширины. Это может быть неудобно, если у вас большой монитор. Это можно победить непосредственным редактированием программы, которая представляет собой питоновый скрипт. В арче скрипт находится в /usr/bin:

# nano /usr/bin/guake

Найдите строку

width = 100

Это значение ширины окна в процентах, замените его на любое удобное для вас.

Если вы хотите, чтобы новое, "уменьшенное" окно guake располагалось не по центру экрана, а слева или справа, то найдите строку

if halignment == ALIGN_CENTER:

и замените CENTER на LEFT или RIGHT.

'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