feat(hyprland): swallow GUI windows spawned from foot into the terminal
A viewer opened from a foot shell (zathura/imv, incl. from mc) now hides the terminal and takes its place, restoring it on close. Requires standalone foot: server/client mode shares one process across all windows, so PID-based swallow cannot tell them apart. `$mod+Return` runs `foot`, not `footclient`, and the `foot --server` exec-once is dropped.
This commit is contained in:
+9
-6
@@ -504,6 +504,14 @@ in
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
# Window swallowing: a GUI spawned from a foot shell (e.g. zathura/imv
|
||||
# from mc) hides the terminal and takes its place, restoring it on close.
|
||||
# Matches on the *parent* terminal's class. Needs standalone foot: in
|
||||
# server/client mode all windows share one process, so PID ancestry can't
|
||||
# tell them apart and swallowing breaks — that's why $mod+Return runs
|
||||
# `foot`, not `footclient`.
|
||||
enable_swallow = true;
|
||||
swallow_regex = "^(foot)$";
|
||||
};
|
||||
|
||||
input = {
|
||||
@@ -522,7 +530,7 @@ in
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, Return, exec, footclient"
|
||||
"$mod, Return, exec, foot"
|
||||
"$mod, q, killactive"
|
||||
"$mod SHIFT, q, exit"
|
||||
"$mod, f, fullscreen, 1"
|
||||
@@ -563,11 +571,6 @@ in
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
# foot in server/daemon mode: $mod+Return runs `footclient`, which
|
||||
# attaches to this one process → faster new-window startup, shared RAM.
|
||||
# Uses foot's default socket, which footclient also defaults to.
|
||||
# Tradeoff: if the server dies, all foot windows die with it.
|
||||
"foot --server"
|
||||
# wallpaper (see modules/media.nix): start the awww daemon, then restore
|
||||
# the persisted choice. awww keeps no state across restarts, so re-push
|
||||
# the ~/.local/share/bg symlink if it exists.
|
||||
|
||||
Reference in New Issue
Block a user