Last active
January 22, 2019 12:29
-
-
Save ruslux/208d03e4b3e83eda785bfa51d01fd606 to your computer and use it in GitHub Desktop.
old_qtile_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! coding:utf-8 | |
from libqtile.config import Key, Screen, Group, Drag, Click | |
from libqtile.command import lazy | |
from libqtile import layout, bar, widget | |
mod = "mod4" | |
keys = [ | |
Key( | |
[mod], "k", | |
lazy.layout.down() | |
), | |
Key( | |
[mod], "j", | |
lazy.layout.up() | |
), | |
Key( | |
[mod, "control"], "k", | |
lazy.layout.shuffle_down() | |
), | |
Key( | |
[mod, "control"], "j", | |
lazy.layout.shuffle_up() | |
), | |
Key( | |
[mod], "space", | |
lazy.layout.next() | |
), | |
Key( | |
[mod, "shift"], "space", | |
lazy.layout.rotate() | |
), | |
Key( | |
[mod, "shift"], "Return", | |
lazy.layout.toggle_split() | |
), | |
Key([mod], "Return", lazy.spawn("terminator")), | |
Key([mod], "Tab", lazy.next_layout()), | |
Key([mod], "w", lazy.window.kill()), | |
Key([mod, "control"], "r", lazy.restart()), | |
Key([mod, "control"], "q", lazy.shutdown()), | |
Key([mod], "r", lazy.spawncmd()), | |
] | |
groups_config = [ | |
dict( | |
name="other 2", | |
keys=["slash", "question", u"period", u"comma"] | |
), | |
dict( | |
name="other 1", | |
keys=["quoteright", 'quotedbl', u"Cyrillic_e", u"Cyrillic_E"] | |
), | |
dict( | |
name="browser", | |
keys=["semicolon", "colon", u"Cyrillic_zhe", u"Cyrillic_ZHE"] | |
), | |
dict( | |
name="pycharm", | |
keys=["bracketleft", "braceleft", u"Cyrillic_ha", u"Cyrillic_HA"] | |
), | |
dict( | |
name="terminal", | |
keys=["bracketright", "braceright", u"Cyrillic_hardsign", u"Cyrillic_HARDSIGN"] | |
), | |
] | |
groups = [] | |
for group_config in groups_config: | |
groups.append(Group(group_config["name"])) | |
for key in group_config["keys"]: | |
keys.append( | |
Key([mod], key, lazy.group[group_config["name"]].toscreen()) | |
) | |
keys.append( | |
Key([mod, "shift"], key, lazy.window.togroup(group_config["name"])) | |
) | |
layouts = [ | |
layout.Max(), | |
layout.TreeTab(sections=['root']), | |
] | |
widget_defaults = dict( | |
font='Arial', | |
fontsize=16, | |
padding=3, | |
) | |
screens = [ | |
Screen( | |
bottom=bar.Bar( | |
[ | |
widget.GroupBox(fontsize=16), | |
widget.Sep(), | |
widget.Prompt(), | |
widget.Sep(), | |
widget.WindowName(), | |
widget.Systray(), | |
widget.Sep(), | |
widget.Clock(format='%Y-%m-%d %a %I:%M:%S %p'), | |
widget.Sep(), | |
widget.HDDBusyGraph(), | |
widget.CPUGraph(samples=50, line_width=1, width=50, | |
graph_color='FF2020', | |
fill_color='C01010'), | |
widget.MemoryGraph(samples=50, line_width=1, width=50, | |
graph_color='0066FF', | |
fill_color='001188'), | |
widget.NetGraph(samples=50, line_width=1, | |
width=50, interface="eth0", | |
graph_color='22FF44', | |
fill_color='11AA11'), | |
widget.Sep(), | |
widget.Volume(foreground="70ff70", ), | |
], | |
30, | |
), | |
), | |
] | |
# Drag floating layouts. | |
mouse = [ | |
Drag([mod], "Button1", lazy.window.set_position_floating(), | |
start=lazy.window.get_position()), | |
Drag([mod], "Button3", lazy.window.set_size_floating(), | |
start=lazy.window.get_size()), | |
Click([mod], "Button2", lazy.window.bring_to_front()) | |
] | |
dgroups_key_binder = None | |
dgroups_app_rules = [] | |
main = None | |
follow_mouse_focus = True | |
bring_front_click = False | |
cursor_warp = False | |
floating_layout = layout.Floating() | |
auto_fullscreen = True | |
focus_on_window_activation = "smart" | |
keys.append(Key([mod], "l", lazy.spawn("xscreensaver-command -lock"))) | |
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this | |
# string besides java UI toolkits; you can see several discussions on the | |
# mailing lists, github issues, and other WM documentation that suggest setting | |
# this string if your java app doesn't work correctly. We may as well just lie | |
# and say that we're a working one by default. | |
# | |
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in | |
# java that happens to be on java's whitelist. | |
wmname = "LG3D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment