mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 07:39:36 +01:00
Switch to prev group when last window closed
This commit is contained in:
parent
47ab9eb1b3
commit
6bf82016de
@ -14,6 +14,13 @@ def show_window(window):
|
|||||||
window.group.cmd_toscreen()
|
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_managed
|
||||||
@hook.subscribe.client_urgent_hint_changed
|
@hook.subscribe.client_urgent_hint_changed
|
||||||
@hook.subscribe.client_killed
|
@hook.subscribe.client_killed
|
||||||
@ -25,3 +32,4 @@ def hook_response(*args, **kwargs):
|
|||||||
file = os.path.expanduser('~/.cache/workspaces')
|
file = os.path.expanduser('~/.cache/workspaces')
|
||||||
with open(file, 'a') as f:
|
with open(file, 'a') as f:
|
||||||
print('workspace changed', file=f)
|
print('workspace changed', file=f)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user