iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i3 improvements
[distro-setup]
/
i3-event-hook
diff --git
a/i3-event-hook
b/i3-event-hook
index 196e6081296f73f0fe343f86918226f223294c25..bcee20e9d6077bd3aecb9cc5664a8842f606a533 100755
(executable)
--- a/
i3-event-hook
+++ b/
i3-event-hook
@@
-39,21
+39,21
@@
from i3ipc import Connection, Event
from pprint import pprint
from pprint import pprint
-def find_
parent
(i3, window_id):
+def find_
workspace
(i3, window_id):
"""
"""
- Find the
parent
of a given window id
+ Find the
workspace
of a given window id
"""
"""
- def finder(con,
parent,
workspace):
+ def finder(con, workspace):
if con.id == window_id:
if con.id == window_id:
- return (
parent,
workspace)
+ return (workspace)
for node in con.nodes:
for node in con.nodes:
- res = finder(node, con
, con
if con and con.type == 'workspace' else workspace)
+ res = finder(node, con if con and con.type == 'workspace' else workspace)
if res:
return res
return None
if res:
return res
return None
- return finder(i3.get_tree(), None
, None
)
+ return finder(i3.get_tree(), None)
def kill_single_win_containers(i3, e, node, parent):
def kill_single_win_containers(i3, e, node, parent):
@@
-98,7
+98,7
@@
def focus_hook(i3, e):
# 'window': None,
# 'window_type': None,
# 'window': None,
# 'window_type': None,
-
parent, workspace = find_parent
(i3, e.container.id)
+
workspace = find_workspace
(i3, e.container.id)
# debugging
#exit(0)
# debugging
#exit(0)