1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
qtile-config/modules/hook.py

26 lines
752 B
Python
Raw Normal View History

2020-02-11 17:49:21 +01:00
from libqtile import hook
from subprocess import run
2020-02-11 17:49:21 +01:00
@hook.subscribe.client_new
def auto_group(c):
if c.name == "Vivaldi - Vivaldi":
c.togroup("\N{globe with meridians}")
elif c.name in ["Discord", "Telegram"]:
c.togroup("\N{incoming envelope}")
elif c.name == "Typora":
c.togroup("\N{briefcase}")
elif c.name in ["win0", "DataGrip", "CLion", "IntelliJ IDEA", "PyCharm"]:
c.togroup("\N{floppy disk}")
elif c.name == "docs":
c.togroup("\N{bookmark tabs}")
2020-02-16 22:07:35 +01:00
elif c.name in ["Lutris", "Shadow", "Steam"] or c.name[:9] == "Minecraft":
2020-02-11 17:49:21 +01:00
c.togroup("\N{video game}")
@hook.subscribe.screen_change
def restart_on_randr(qtile, ev):
run(["xrandr", "--auto"])
2020-02-11 17:49:21 +01:00
qtile.cmd_restart()