================
Installing Guake
================

System-wide installation
========================

On wayland systems, you will need to set the hotkey for opening Guake from your window manager's global settings.

For GNOME:

1. Open Gnome Settings
2. Go to Devices -> Keyboard
3. Scroll in the list of the keyboard shorcuts all way down to Custom Shortcuts
4. Press + to add a custom shortcut
5. In the Add Custom Shortcut dialog type guake-toggle for command
6. Enter the name and specify a shortcut, then press Add

Always prefer using your package manager to install guake.

Debian / Ubuntu
---------------

Ubuntu and Debian users will use ``sudo apt install guake``.


Guake also has a PPA. You can add the Guake PPA to your system by entering:

.. code-block:: bash

   $ sudo add-apt-repository ppa:linuxuprising/guake
   $ sudo apt-get update

After which you will be able to install and update to the latest version of Guake on the PPA.


Fedora
------

Tested in Fedora 34:
We can use dnf to install it.

.. code-block:: bash

    $ sudo dnf install guake

Then you can open it via:

.. code-block:: bash

    $ guake

To allow global 'F12' to open the guake, go to Setting >> Device >> Keyboard >> Scroll to bottom >> "+" to create a new global short cut with 'F12' keybinding and comand 'guake'.

You may notice the style may have some error. You can fix this by installing and apply custom theme.

.. code-block:: bash

    $ sudo dnf install arc-theme gnome-tweaks

Then use

.. code-block:: bash

    $ gnome-tweaks

to change theme to change theme to one of the yakuake will fix this.


Arch Linux
----------

Guake is available on *community* repository, just use: ``sudo pacman -S guake`` to install it.


Manjaro
-------

Manjaro users can use ``pacman -S guake``.


Install from Pypi
=================

Guake is now automatically published on Pypi.

Please note the recommended way is to install Guake using ``pipx`` that will put Guake in a
dedicated, isolated environment for your local user. Ensure ``$HOME/.local/bin`` is in your ``PATH``.

.. code-block:: bash

   $ python3 -m pip install --user pipx
   $ pipx install guake

Alternatively, you can use the following command to install on a local environment:

.. code-block:: bash

   $ pip install --user guake


Avoid using ``pip install guake`` without the ``--user``, you may break your system.

You need to ensure the following points are met in your configuration:

- ``$HOME/.local/bin`` should be in your ``$PATH``
- You need to have some dependencies installed on your system:
   - ``gir1.2-keybinder-3.0``
   - ``gir1.2-notify-0.7``
   - ``gir1.2-vte-2.91``
   - ``libkeybinder-3.0-0``
   - ``libutempter0``
   - ``python3-setuptools``
   - ``python3-cairo``
   - ``python3-dbus``
   - ``python3-gi``
   - ``python3-pip``
   - ``python3``

Install from source
===================

If you want to install Guake from its sources, please follow this procedure:

- First, **DO NOT USE TARBALLS GENERATED BY GITHUB** on the Release Page. They
   are automatically generated and cannot be used alone. We use a package, namely
   ``PBR``, that requires the full git history to work.

   Checkout the HEAD of the source tree with:

   .. code-block:: bash

      $ git clone https://github.com/Guake/guake.git

- make sure that you have the needed system dependencies (Python GTK, VTE, ...)
   installed for your system.
   If you are unsure about the dependencies, you can run this script to install them:

   .. code-block:: bash

      $ ./scripts/bootstrap-dev-[debian, arch, fedora].sh run make

Note: Insert your distribution in the square brackets.

To install Guake itself, use:

.. code-block:: bash

   $ make
   $ sudo make install

To uninstall, still in the source directory:

.. code-block:: bash

   $ make
   $ sudo make uninstall

Tips for a complete Guake reinstallation (without system dependencies):

.. code-block:: bash

   $ sudo make uninstall && make && sudo make install
   $ # Or use this shortcut:
   $ make reinstall  # (do not sudo it!)
