diff options
Diffstat (limited to 'cusmodules/wallpaper.py')
-rwxr-xr-x | cusmodules/wallpaper.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cusmodules/wallpaper.py b/cusmodules/wallpaper.py index 226fe52..711c507 100755 --- a/cusmodules/wallpaper.py +++ b/cusmodules/wallpaper.py @@ -1,5 +1,4 @@ #!/usr/bin/env python - #Copyright (C) 2024 Michael Kantor #This program is free software: you can redistribute it and/or modify @@ -20,6 +19,7 @@ import sys import json import toml import signal +import openrazer.client from PIL import Image from pathlib import Path from random import randint @@ -176,7 +176,7 @@ if __name__ == '__main__': #subprocess.check_call(['qtile', 'shell', '-c', 'restart()']) #run(['kill', '-SIGUSR1', os.popen('pidof qtile').read().strip('\n')]) #run(['qtile', 'shell', '-c', 'restart()']) - run([f'{home}/git/qtile/bin/qtile', 'shell', '-c', 'reload_config()']) + run([f'{home}/git/qtile/.venv/bin/qtile', 'shell', '-c', 'reload_config()']) except: os.system('killall dwm') @@ -277,7 +277,13 @@ if __name__ == '__main__': #subprocess.check_call(['qtile', 'shell', '-c', 'restart()']) #run(['qtile', 'shell', '-c', 'restart()']) #run(['kill', '-SIGUSR1', os.popen('pidof qtile').read().strip('\n')]) - run([f'{home}/git/qtile/bin/qtile', 'shell', '-c', 'reload_config()']) + run([f'{home}/git/qtile/.venv/bin/qtile', 'shell', '-c', 'reload_config()']) + + rgb = tuple(int(bottom_color.lstrip('#')[i:i+2], 16) for i in (0, 2, 4)) + devman = openrazer.client.DeviceManager() + + for device in devman.devices: + device.fx.static(rgb[0], rgb[1], rgb[2]) #os.system('qtile shell -c "restart()"') except: |