2

Is it possible to swallow a terminal running Tmux? I can't seem to get the patch working unless Tmux is disabled.

I've tried with "Screen" on st and there were no issues :/.

Thanks!

https://dwm.suckless.org/patches/swallow/ (Using dwm-swallow-20200522-7accbcf.diff)

EDIT:

Couldn't figure it out, but found something awesome:

DVTM (Similar to running DWM in a terminal).

https://github.com/martanne/dvtm

1 Answer 1

1

I was having the same issue as you so I did some digging into how the swallow patch works and why it can't swallow tmux windows.

Basically, dwm’s swallow patch is incapable of handling applications launched from terminal emulators running tmux because the patch figures out which window should be swallowed by finding the parent process of the recently launched GUI application. This fails when running tmux because tmux forks applications from its server process which is a direct child of PID 1 (the init process). There’s no direct path up the process tree from the GUI application to the terminal emulator which means dwm can't figure out which terminal should be swallowed by the new application so it spawns the application normally.

Swallowing still works with screen because screen is a child process of the terminal emulator and so are applications launched from it. In this case, there is a direct path up the process tree from the GUI application to the terminal emulator so dwm can find out which terminal to swallow.

I have a more in depth exploration of how it works along with process tree graphs on my blog if you're interested.

There is a workaround in the form of a program called devour. It doesn't provide true window swallowing the same way the swallowing patch does, but it does work with tmux.

1
  • 1
    Hey, Thanks for the detailed response. I've also read through your blog and that does make a lot of sense! Props for figuring all that out with printf statements :). Not too ~attached to tmux either, but will probably miss the vi-copy-mode for text selection. Alternatives like the keyboard_select (st.suckless.org/patches/keyboard_select) and Screen/Dvtm isn't very compatible with the scrollback patch and just doesn't feel the same :/ Anyway, cheers :). Commented Jun 27, 2020 at 4:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.