From 53f9a13c444f99c512965cb3f13b3d67160653b7 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Wed, 8 Jul 2015 16:28:44 +0200 Subject: [PATCH] Moving the background definition to the startup hook. --- .config/qtile/config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/qtile/config.py b/.config/qtile/config.py index dad8dba..f6c1870 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -16,7 +16,7 @@ from libqtile.config import Key, Screen, Group, Drag, Click -from libqtile import layout, bar, widget +from libqtile import layout, bar, widget, hook from libqtile.command import lazy from glob import glob import subprocess @@ -125,9 +125,14 @@ class ConfigWrapper: return mouse -if __name__ in ['config', '__main__']: +@hook.subscribe.startup +def startup(): cnf = ConfigWrapper() cnf.set_wallpaper() + + +if __name__ in ['config', '__main__']: + cnf = ConfigWrapper() groups = cnf.set_groups() layouts = cnf.set_layouts() screens = cnf.set_screens()