From 02ad740c33bf4291616ac080e9705fcdfa621575 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 3 Mar 2019 13:19:25 +0100 Subject: .config/qtile/config.py: Adding WIP for retrieving and killing compton on demand. Adding call to DIY backlight script call, instead of xbacklight. --- .config/qtile/config.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 244b836..5bf23ee 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -6,7 +6,8 @@ import os import re import subprocess from libqtile.log_utils import logger - +# import psutil +# import getpass mod = "mod4" alt = "mod1" @@ -18,9 +19,9 @@ terminal = "termite" drun_launcher = "rofi -show drun" run_launcher = "rofi -show run" lock = home+"/bin/xorg_lock" -brightness_step = "5" -brightness_up = "xbacklight -inc "+brightness_step -brightness_down = "xbacklight -dec "+brightness_step +brightness_step = "2" +brightness_up = "backlight -i "+brightness_step +brightness_down = "backlight -i -"+brightness_step volume_up = home+"/bin/set_volume increase" volume_down = home+"/bin/set_volume decrease" volume_toggle = home+"/bin/set_volume toggle" @@ -482,3 +483,14 @@ def autostart_conky(): @hook.subscribe.startup_complete def autostart_compton(): subprocess.call(compton) +# get_user_processes('compton') + + +# def get_user_processes(process_name): +# for process in psutil.process_iter(attrs=['name', 'username']): +# if process.info['username'] == getpass.getuser() and \ +# process.info['name'] == process_name: +# logger.setLevel(logging.INFO) +# logger.info(process.pid) +# logger.info(process.info['name']) +# logger.setLevel(logging.WARNING) -- cgit v1.2.3-70-g09d2