aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2018-01-23 00:26:14 +0100
committerDavid Runge <dave@sleepmap.de>2018-01-23 00:26:14 +0100
commit4e4c9f4b488ab6acf250c8351587b1efe4e72e1c (patch)
tree1b5ef818ab2de87f395b5d8fa85ca01f5591a5de
parentcf748cad1c27df2663e1524cf12ceda2d098c09f (diff)
downloaddotfiles-4e4c9f4b488ab6acf250c8351587b1efe4e72e1c.tar.gz
dotfiles-4e4c9f4b488ab6acf250c8351587b1efe4e72e1c.tar.bz2
dotfiles-4e4c9f4b488ab6acf250c8351587b1efe4e72e1c.tar.xz
dotfiles-4e4c9f4b488ab6acf250c8351587b1efe4e72e1c.zip
.config/qtile/config.py: Adding conky to the startup_once hook, compton to the startup_complete hook and adding kill_compton command to the screen_change hook, before restarting qtile.
Moving hooks to the bottom of the configuration.
-rw-r--r--.config/qtile/config.py79
1 files changed, 51 insertions, 28 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py
index 3479fff..55bebbf 100644
--- a/.config/qtile/config.py
+++ b/.config/qtile/config.py
@@ -12,14 +12,15 @@ mod = "mod4"
alt = "mod1"
home = os.path.expanduser("~")
+hostname = os.uname().nodename
+display = os.environ['DISPLAY']
terminal = "termite"
drun_launcher = "rofi -show drun"
run_launcher = "rofi -show run"
-lock = "/usr/bin/i3lock -f -c 000000"
+lock = home+"/bin/xorg_lock"
brightness_step = "5"
brightness_up = "xbacklight -inc "+brightness_step
brightness_down = "xbacklight -dec "+brightness_step
-
volume_up = home+"/bin/set_volume increase"
volume_down = home+"/bin/set_volume decrease"
volume_toggle = home+"/bin/set_volume toggle"
@@ -27,18 +28,26 @@ audio_prev = home+"/bin/notify_mpd prev"
audio_next = home+"/bin/notify_mpd next"
audio_toggle = home+"/bin/notify_mpd toggle"
audio_stop = home+"/bin/notify_mpd stop"
-
-
-# startup
-@hook.subscribe.startup
-def autostart():
- background = ['feh',
- '--randomize',
- '--recursive',
- '--bg-fill',
- home+'/cloud/photos/desktop/']
- subprocess.call(background)
-
+conky_network = ['/usr/bin/conky',
+ '-X',
+ display,
+ '-c',
+ home+'/.config/conky/'+hostname+'-network.conf']
+conky_general = ['/usr/bin/conky',
+ '-X',
+ display,
+ '-c',
+ home+'/.config/conky/'+hostname+'-general.conf']
+background = ['feh',
+ '--randomize',
+ '--recursive',
+ '--bg-fill',
+ home+'/cloud/photos/desktop/']
+kill_compton = "killall compton"
+compton = ['/usr/bin/compton',
+ '-CGb',
+ '-d',
+ display]
colors = {
"grey": "#555555",
@@ -425,26 +434,40 @@ wmname = "LG3D"
def main(qtile):
- qtile.cmd_warning()
+ qtile.cmd_warning()
@hook.subscribe.screen_change
def restart_on_randr(qtile, ev):
- qtile.cmd_restart()
+ kill_compton
+ qtile.cmd_restart()
@hook.subscribe.client_new
def floating_dialogs(client):
- wm_class = client.window.get_wm_class()
- logger.setLevel(logging.INFO)
- logger.info('New client window name: %s' % client.name)
-# logger.info('New client window class: %c' % wm_class)
- logger.setLevel(logging.WARNING)
- for client_regex in floating_clients:
- match = client_regex.match(client.name)
- if match:
- client.floating = True
- transient = client.window.get_wm_transient_for()
- if transient:
- client.floating = True
+ wm_class = client.window.get_wm_class()
+ logger.setLevel(logging.INFO)
+# logger.info('New client window name: %s' % client.name)
+# logger.info('New client window class: %c' % wm_class)
+ logger.setLevel(logging.WARNING)
+ for client_regex in floating_clients:
+ match = client_regex.match(client.name)
+ if match:
+ client.floating = True
+ transient = client.window.get_wm_transient_for()
+ if transient:
+ client.floating = True
+
+@hook.subscribe.startup
+def autostart():
+ subprocess.call(background)
+
+@hook.subscribe.startup_once
+def autostart():
+ subprocess.call(conky_network)
+ subprocess.call(conky_general)
+
+@hook.subscribe.startup_complete
+def autostart():
+ subprocess.call(compton)