Code Monkey home page Code Monkey logo

Comments (3)

Liupold avatar Liupold commented on May 25, 2024

I don't think its a problem with sxhkd. your pstree output looks what it should be. Launch a gui app from terminal (Eg: mpv). And then provide the verbose output. If it works perfectly launching from term let me know. (As i intend to make the installation more simple).

from pidswallow.

SeerLite avatar SeerLite commented on May 25, 2024

Alright here's me starting Alacritty from a sxhkd shortcut, and running mpv.

systemd (sxhkd.service):

$ bspc subscribe node_add node_remove | grep -o --line-buffered '0x[0-9A-F]\+$' | xargs -n1 ./pidswallow
systemd(727)---alacritty(3425)---zsh(3430)
systemd(727)---alacritty(3425)---zsh(3430)---mpv(3535)

bspwmrc autostart (sxhkd &):

$ bspc subscribe node_add node_remove | grep -o --line-buffered '0x[0-9A-F]\+$' | xargs -n1 ./pidswallow
alacritty(6485)---zsh(6493)
alacritty(6485)---zsh(6493)---mpv(6570)
mpv(0x06A00002) swallowed alacritty(100663300)
0x06A00002 vomited 100663300

As you can see, it works if sxhkd is not a systemd service.

from pidswallow.

SeerLite avatar SeerLite commented on May 25, 2024

Ok, I finally understand the script completely haha. So yeah, the problem here is indeed systemd is in the way. But more importantly, the problem is we're not swallowing the immediate parents.

This problem can also be reproduced by running a terminal process inside another terminal process. The first terminal is gonna get swallowed, while it should be the second one.

I found this. I think this is a great way to implement it, since it doesn't rely on pstree output. I'll play around with it and if it works I'll create a pull request.

from pidswallow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.