Difference between revisions of "Package:Qtile"

From Funtoo
Jump to: navigation, search
m (smaller links)
(Added configuration details)
Line 50: Line 50:
 
You can press [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L82 <code>Mod4 + r</code> to open a prompt box], then type a program name to launch it. You can also [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L74 run xterm with the shortcut <code>Mod4 + Return</code>]. To [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L78 close a window, press <code>Mod4 + w</code>].
 
You can press [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L82 <code>Mod4 + r</code> to open a prompt box], then type a program name to launch it. You can also [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L74 run xterm with the shortcut <code>Mod4 + Return</code>]. To [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L78 close a window, press <code>Mod4 + w</code>].
  
Workspaces are highlighted in [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L136 white font] when windows are opened in them (against [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L137 gray font] when it contains no window). The current workspace is [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L164 surrounded with a blue border], if you have multiple screens, workspaces currently displayed in other screens are [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L169 surrounded with a gray border].
+
Workspaces are highlighted in [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L136 white font] when windows are opened in them (against [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L137 gray font] when it contains no window). The current workspace is [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L164 surrounded with a blue border], if you have multiple screens, workspaces currently displayed in other screens are [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/widget/groupbox.py#L169 surrounded with a gray border]. You can [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L90 go to a given workspace pressing <code>Mod4 + <workspace ID></code>] (a, s, d, f, u, i, o or p by default). If you go to a workspace that is already displayed in another screen, workspaces will be swapped. You can [https://github.com/qtile/qtile/blob/v0.9.1/libqtile/resources/default_config.py#L95 move the current window to a given workspace pressing <code>Mod4 + Shift + <workspace ID></code>].
  
 
=== Configuration ===
 
=== Configuration ===
Line 57: Line 57:
  
 
# The location specified by the <code>-f</code> argument.
 
# The location specified by the <code>-f</code> argument.
# <code>$XDG_CONFIG_HOME/qtile/config.py</code>, if it is set
+
# <code>$XDG_CONFIG_HOME/qtile/config.py</code>
 
# <code>~/.config/qtile/config.py</code>
 
# <code>~/.config/qtile/config.py</code>
 +
 +
{{tip|At anytime, you can fire <code>Mod4 + Ctrl + r</code> to restart qtile with your new configuration. You should also `tail -f ~/.qtile.log` to checkout errors and warnings while editing your Qtile configuration.}}
 +
 +
In order to configure your Qtile environnement, I would suggest you to start with the default config base and tweak it bit by bit:
 +
 +
<console>
 +
$##i## mkdir -p ~/.config/qtile
 +
$##i## wget -O ~/.config/qtile/config.py https://raw.githubusercontent.com/qtile/qtile/v0.9.1/libqtile/resources/default_config.py
 +
$##i## vim ~/.config/qtile/config.py
 +
</console>
 +
 +
{{warning|Don't forget to replace "v0.9.1" with the version you installed or it may not work.}}
 +
 +
==== Configuration examples ====
 +
 +
{| class="wikitable"
 +
|-
 +
! Screenshot !! Name !! Link
 +
|-
 +
| ''Not yet available'' || [[User:Pytony|pytony]]'s configuration || https://github.com/apinsard/mycfg-qtile/config.py
 +
|}
  
 
{{EbuildFooter}}
 
{{EbuildFooter}}
  
 
[[Category:Desktop]]
 
[[Category:Desktop]]

Revision as of 15:27, May 24, 2015

Qtile

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


   Warning

This document does not cover the current qtile ebuild that comes from the Gentoo portage tree. It covers this ebuild that will normally be merge to funtoo-overlay soon.

About Qtile

Qtile is a highly configurable tiling window manager distributed under MIT license. It handles both tiling and floating layouts. It is especially a good alternative to Awesome for those who are more used to Python than Lua. Indeed, Qtile is written and configured entirely in Python. So whether you are Python guru or whether you are learning Python for a few time, Qtile is an ideal choice to get your environment fit your needs and feel. If you don't know Python, you can still stuck to the default configuration or pick out one of the configuration examples but a basic understanding of Python language is recommended though.

Installation

root # emerge -av qtile

It is generally a good idea to enable the dbus useflag to deal with dbus messages. The widget-* useflags are only needed if you would like to include the given widgets. These widgets are included in Qtile, but require additional dependencies. Leaving widget-* useflags unset will remove the underlying widgets from qtile sources to avoid warnings about missing dependencies.

Very likely, you don't need to enable multiple python ABIs for qtile. To make your mind, here are the few things to know to choose the right ABI:

  • Python 2.7 uses trollius, Python 3.3 uses asyncio, Python 3.4 has asyncio built-in.
  • GoogleCalendar and Wlan widgets depend on packages that are python 2.7 only. If you plan to use one of these widgets, use python 2.7 ABI.


Once you've emerged qtile with the useflags and python ABI of your choice, you can skip to #Getting Started if you use a display manager. The following lines describe how to use qtile with Xinit.

In order to run qtile with xinit, add this line to your ~/.xinitrc:

   ~/.xinitrc
exec --sh-syntax --exit-with-session qtile

You might also want to pass ck-launch-session and/or dbus-launch if you want respectively ConsoleKit and/or dbus support (note that the latter requires the `dbus` useflag). Your ~/.xinitrc would then look like:

   ~/.xinitrc - with consolekit and dbus support
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session qtile

And run xinit to launch qtile. You can also configure a display manager instead, but this is not covered in this document.

Getting Started

   Tip

As far as possible, when a default behavior is explained, a link to the related configuration snippet is given so that you can get more information and tweak it as you want.

When Qtile is run and no valid configuration file is found, it fallsback to the default configuration. So, the first time you run qtile, you should be welcomed with a black background and a bottom bar. On the left of this bottom bar, stands the list of your workspaces represented by the characters 'a', 's', 'd', 'f', 'u', 'i', 'o', 'p'. On the right of the bottom bar, you should see "default config" followed by the date and time.

You can press Mod4 + r to open a prompt box, then type a program name to launch it. You can also run xterm with the shortcut Mod4 + Return. To close a window, press Mod4 + w.

Workspaces are highlighted in white font when windows are opened in them (against gray font when it contains no window). The current workspace is surrounded with a blue border, if you have multiple screens, workspaces currently displayed in other screens are surrounded with a gray border. You can go to a given workspace pressing Mod4 + <workspace ID> (a, s, d, f, u, i, o or p by default). If you go to a workspace that is already displayed in another screen, workspaces will be swapped. You can move the current window to a given workspace pressing Mod4 + Shift + <workspace ID>.

Configuration

Qtile looks in the following places for a configuration file, in order:

  1. The location specified by the -f argument.
  2. $XDG_CONFIG_HOME/qtile/config.py
  3. ~/.config/qtile/config.py
   Tip

At anytime, you can fire Mod4 + Ctrl + r to restart qtile with your new configuration. You should also `tail -f ~/.qtile.log` to checkout errors and warnings while editing your Qtile configuration.

In order to configure your Qtile environnement, I would suggest you to start with the default config base and tweak it bit by bit:

user $ mkdir -p ~/.config/qtile
user $ wget -O ~/.config/qtile/config.py https://raw.githubusercontent.com/qtile/qtile/v0.9.1/libqtile/resources/default_config.py
user $ vim ~/.config/qtile/config.py
   Warning

Don't forget to replace "v0.9.1" with the version you installed or it may not work.

Configuration examples

Screenshot Name Link
Not yet available pytony's configuration https://github.com/apinsard/mycfg-qtile/config.py