This approach to swallowing works.

This commit is contained in:
Bartek Stalewski 2022-08-01 01:21:30 +02:00
parent 8230063ad2
commit 6c4240ad22
2 changed files with 22 additions and 19 deletions

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
mkdir -p $XDG_CONFIG_HOME/firefox mkdir -p $XDG_CONFIG_HOME/firefox
[ -n "$1" ] && HOME=$XDG_CONFIG_HOME/firefox /usr/bin/firefox "$*" || HOME=$XDG_CONFIG_HOME/firefox /usr/bin/firefox [ -n "$1" ] && HOME=$XDG_CONFIG_HOME/firefox /usr/bin/firefox "$*" || HOME=$XDG_CONFIG_HOME/firefox /usr/bin/firefox &

View file

@ -1,3 +1,4 @@
import psutil
import subprocess import subprocess
from libqtile import bar, extension, hook, layout, widget from libqtile import bar, extension, hook, layout, widget
from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen
@ -166,25 +167,27 @@ floating_layout = layout.Floating(
border_width=2, border_width=2,
) )
# @hook.subscribe.client_new @hook.subscribe.client_new
# def _swallow(window): def _swallow(window):
# pid = window.window.get_net_wm_pid() pid = window.window.get_net_wm_pid()
# ppid = psutil.Process(pid).ppid() ppid = psutil.Process(pid).ppid()
# cpids = {c.window.get_net_wm_pid(): wid for wid, c in window.qtile.windows_map.items()} cpids = {c.window.get_net_wm_pid(): wid for wid, c in window.qtile.windows_map.items()}
# for i in range(5): for i in range(5):
# if not ppid: if not ppid:
# return return
# if ppid in cpids: if ppid in cpids:
# parent = window.qtile.windows_map.get(cpids[ppid]) parent = window.qtile.windows_map.get(cpids[ppid])
# parent.minimized = True if parent.window.get_wm_class()[0] != "xterm-256color":
# window.parent = parent return
# return parent.minimized = True
# ppid = psutil.Process(ppid).ppid() window.parent = parent
return
ppid = psutil.Process(ppid).ppid()
# @hook.subscribe.client_killed @hook.subscribe.client_killed
# def _unswallow(window): def _unswallow(window):
# if hasattr(window, 'parent'): if hasattr(window, 'parent'):
# window.parent.minimized = False window.parent.minimized = False
auto_fullscreen = True auto_fullscreen = True
auto_minimize = True auto_minimize = True