mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-14 13:09:37 +01:00
36 lines
812 B
Python
36 lines
812 B
Python
import subprocess
|
|
import os
|
|
|
|
from libqtile import hook
|
|
|
|
|
|
@hook.subscribe.startup
|
|
def autostart():
|
|
subprocess.call(["autostart.sh"])
|
|
|
|
|
|
@hook.subscribe.client_managed
|
|
def show_window(window):
|
|
window.group.cmd_toscreen()
|
|
|
|
|
|
@hook.subscribe.client_killed
|
|
def toggle_previous_group_if_last_window_killed(window):
|
|
group = window.group
|
|
if len(group.info()['windows']) == 1:
|
|
group.screen.toggle_group()
|
|
|
|
|
|
@hook.subscribe.client_managed
|
|
@hook.subscribe.client_urgent_hint_changed
|
|
@hook.subscribe.client_killed
|
|
@hook.subscribe.setgroup
|
|
@hook.subscribe.group_window_add
|
|
@hook.subscribe.current_screen_change
|
|
@hook.subscribe.changegroup
|
|
def hook_response(*args, **kwargs):
|
|
file = os.path.expanduser('~/.cache/workspaces')
|
|
with open(file, 'a') as f:
|
|
print('workspace changed', file=f)
|
|
|