Created
September 10, 2013 18:51
-
-
Save staydecent/6513877 to your computer and use it in GitHub Desktop.
Config for Qtile
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.manager import Key, Screen, Group | |
from libqtile.command import lazy | |
from libqtile import layout, bar, widget, hook | |
# | |
# Global optiosn | |
# | |
main = None | |
follow_mouse_focus = True | |
cursor_warp = False | |
# global font options | |
widget_defaults = dict( | |
font = 'Source Code Pro', | |
fontsize = 11, | |
padding = 2, | |
) | |
# | |
# Keys | |
# | |
keys = [ | |
Key(["mod1"], "k", lazy.layout.down()), | |
Key(["mod1"], "j", lazy.layout.up()), | |
Key(["mod1", "shift"], "space", lazy.layout.rotate()), | |
Key(["mod1", "shift"], "Return", lazy.layout.toggle_split()), | |
Key(["mod1"], "Tab", lazy.nextlayout()), | |
Key(["mod1"], "equal", lazy.layout.grow()), | |
Key(["mod1"], "minus", lazy.layout.shrink()), | |
Key(["mod1"], "n", lazy.layout.normalize()), | |
Key(["mod1"], "m", lazy.layout.maximize()), | |
Key(["mod1"], "g", lazy.switchgroup()), | |
Key(["mod1"], "Return", lazy.spawn("xfce4-terminal")), | |
Key(["mod1"], "space", lazy.spawncmd()), | |
Key(["mod1"], "q", lazy.window.kill()), | |
Key(["mod1", "control"], "q", lazy.shutdown()), | |
Key(["mod1", "control"], "r", lazy.restart()), | |
] | |
# | |
# Groups | |
# | |
groups = [ | |
Group("h"), | |
Group("l"), | |
Group("0"), | |
] | |
for i in groups: | |
keys.append( | |
Key(["mod1"], i.name, lazy.group[i.name].toscreen()) | |
) | |
keys.append( | |
Key(["mod1", "shift"], i.name, lazy.window.togroup(i.name)) | |
) | |
# | |
# Layouts | |
# | |
layouts = [ | |
layout.Max(), | |
#layout.Stack(stacks=2), | |
layout.xmonad.MonadTall(ratio=0.6) | |
] | |
# Automatically float these types. This overrides the default behavior (which | |
# is to also float utility types), but the default behavior breaks our fancy | |
# gimp slice layout specified later on. | |
floating_layout = layout.Floating(auto_float_types=[ | |
"notification", | |
"toolbar", | |
"splash", | |
"dialog", | |
]) | |
# | |
# Bar / panel | |
# | |
# Below is a screen with a top bar that contains several basic qtile widgets. | |
screens = [Screen(top = bar.Bar([ | |
widget.GroupBox(urgent_alert_method='text', **widget_defaults), | |
widget.Prompt(**widget_defaults), | |
widget.WindowName(**widget_defaults), | |
#widget.Volume(**widget_defaults), | |
widget.Clock('%a %I:%M %p', **widget_defaults), | |
widget.Systray(**widget_defaults), | |
widget.BatteryIcon(**widget_defaults), | |
], 24, opacity=0.6)), | |
] | |
# | |
# Hooks | |
# | |
@hook.subscribe.startup | |
def runner(): | |
import subprocess | |
subprocess.Popen(['xsetroot', '-cursor_name', 'left_ptr']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment