From 4825cc70c47952fa707810a26f6bdc4e386cda94 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 2 Jun 2018 12:26:14 +0200 Subject: .config/qtile/config.py: Lint-fixing, streamlining compton startup. Adding JabRef and Libreoffice to office group. --- .config/qtile/config.py | 54 +++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 26 deletions(-) (limited to '.config/qtile') diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 04e4d87..a9174e5 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -43,7 +43,6 @@ background = ['feh', '--recursive', '--bg-fill', home+'/cloud/photos/desktop/'] -kill_compton = "killall compton" compton = ['/usr/bin/compton', '-CGb', '-d', @@ -225,12 +224,12 @@ matchers = { ], 'office': [ Match(wm_class=[ - re.compile('libreoffice'), re.compile('Scribus'), - re.compile('net-sf-jabref-JabRefMain'), ]), Match(title=[ re.compile('^calibre'), + re.compile('^JabRef'), + re.compile("Libreoffice\sWriter$"), ]), ], 'admin': [ @@ -441,40 +440,43 @@ wmname = "LG3D" def main(qtile): - qtile.cmd_warning() + qtile.cmd_warning() @hook.subscribe.screen_change def restart_on_randr(qtile, ev): - kill_compton - qtile.cmd_restart() + subprocess.run(['/usr/bin/killall', '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) +def autostart_background(): + subprocess.run(['/usr/bin/killall', 'compton']) + subprocess.call(background) + @hook.subscribe.startup_once -def autostart(): - subprocess.call(conky_network) - subprocess.call(conky_general) +def autostart_conky(): + subprocess.call(conky_network) + subprocess.call(conky_general) -@hook.subscribe.startup_complete -def autostart(): - subprocess.call(compton) +@hook.subscribe.startup_complete +def autostart_compton(): + subprocess.call(compton) -- cgit v1.2.3-70-g09d2