Qtile 在 Ubuntu 18.04 上可用性显著提高, System tray 能够正常显示图标了, 与 i3wm 相比,优点是提供了丰富的 layout, 尤其是 Monad Tall 比较有吸引力,缺点是稳定性较差, 有些 layout 和 status widget 有 bug 会导致整个 wm 死掉, 只能在其他 console 里 kill Qtile PID。 下面是通过今天的试验总结出比较好的 layouts, keybindings 和 status widgets:
$ cat ~/.config/qtile/config.py
...
mod = 'mod1'
layouts = [
layout.Max(name="Max"),
layout.TreeTab(name='Tree Max'),
layout.Matrix(name='Matrix'),
layout.MonadTall(name='Monad Tail', border_focus='#00008B'),
layout.Columns(),
layout.VerticalTile(),
]
keys = [
Key([mod], "k", lazy.layout.down()),
Key([mod], "j", lazy.layout.up()),
Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
Key([mod], "space", lazy.layout.next()),
Key([mod, "shift"], "space", lazy.layout.swap_left()),
Key([mod], "Tab", lazy.next_layout()),
Key([mod, "shift"], "q", lazy.window.kill()),
Key([mod, "shift"], "r", lazy.restart()),
Key([mod, "shift"], "e", lazy.shutdown()),
Key([mod], "d", lazy.spawncmd()),
Key([mod], "g", lazy.layout.grow()),
Key([mod], "s", lazy.layout.shrink()),
Key([mod], 'o', lazy.layout.maximize()),
Key([mod], 'n', lazy.layout.normalize()),
Key([mod, "shift"], "h", lazy.layout.swap_left()),
Key([mod], "Return", lazy.spawn("terminator")),
Key([mod, "shift"], "f", lazy.spawn('/home/leo/apps/firefox/firefox')),
Key([mod, 'control'], 'l', lazy.spawn('i3lock -c 000000')),
]
screens = [
Screen(
bottom=bar.Bar(
[
widget.GroupBox(),
widget.Prompt(),
widget.WindowName(),
widget.TextBox("Layout:"),
widget.CurrentLayout(),
widget.TextBox("CPU:"),
widget.CPUGraph(),
widget.TextBox("Mem:"),
widget.MemoryGraph(),
widget.TextBox("Net:"),
widget.NetGraph(),
widget.Systray(),
widget.Clock(format='%Y-%m-%d %H:%M %a'),
],
24,
),
),
]
Ref: