Devour

So a couple of days ago I’ve watched Luke Smith’s video on dwm’s swallow patch and to be honest it’s pretty useful to spawn some applications like zathura and sxiv without having them open separately from the terminal itself. I wanted to find something similar to use in yax and I’ve found this Devour script on github that does the same thing only using xdo. Works on any wm, including dwm if you don’t want to apply the swallow patch.
If anyone wants to give it a try, you just have to put both scripts in your $PATH and edit the launch_devour script to use your terminal (by default it uses alacritty). Open the file you want by running the launch_devour (i.e. launch_devour somevideo.mp4 ) and the terminal is 'devoured until you quit the spawned application.
I also added a keybind to run it in Nate’s noice and it works pretty well, so probably it works fine with ranger, lf, nnn etc.

4 Likes

Thx for sharing @rml . Looks interesting.

1 Like

That’s very cool

2 Likes