Code Monkey home page Code Monkey logo

Comments (19)

Liupold avatar Liupold commented on May 23, 2024 1

Opps, I just tried that. It will not work

systemd(1)───urxvtd(128371)─┬─zsh(128646)
                            └─zsh(128809)

As the process will not split. There is no way to identify which child brought which window and which to hide. (Atleast with the current impl)

rohnch:~/$ xdotool search --pid 129750  
33554468
33554442

urxvtd will not work with this script. And I am not actively looking to implement this.
If you have any idea or want to add this feel free to do so.

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024 1

@smkuehnhold

Try this script: https://github.com/Liupold/pidswallow/blob/daemon-fix/pidswallow.

  • Add this script to your path.
  • Launch with pidswallow -fgl
    * Add urxvtd (to swallowable)
    let me know if there is any issue (should work with urxvtd).

from pidswallow.

smkuehnhold avatar smkuehnhold commented on May 23, 2024 1

Try out the latest commit (same url).

Still having the same issues. Here is a video for a quick sanity check.

Hope your repo will push that update soon.

Debian Stable 😢

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024 1

Thanks for reporting, I think you might wan't to kill the pidswallow from before runs.
Keep the term open.
use pidswallow -Vfl (logs) in a separate window instead of htop. And then try it.
are you using bspwm?

  • killall pidswallow; pidswallow -Vfl (Don't close / send to another workspace)
  • Test on the second term.

(It's working fine on my laptop, sorry about that)

Debian Stable 😢

xev -1 will be resolved shortly. (we will use xev without -1). Thanks a lot for the help.

from pidswallow.

smkuehnhold avatar smkuehnhold commented on May 23, 2024 1

are you using bspwm?

Yes. bspwm 0.9.9 github

use pidswallow -Vfl (logs) in a separate window instead of htop

New video.

Output:

SWALLOWABLE: "   xterm konsole xfce4-terminal urxvtd  "
swallow - Scanning process tree of feh(7529): xdg-open:7461 bash:7440 urxvtd:3340 bspwm:3327 xinit:3322 startx:3298 login:3293 systemd:1
swallow - urxvtd(3340) detected as swallowable
swallow - 33554433 swallowing 0x00C000D0 using xdo hide {%pwid}
swallow - feh(33554433) swallowed urxvtd(0x00C000D0)
vomit - 33554433 vomiting 0x00C000D0 using xdo show {%pwid}
vomit - 33554433 vomited 0x00C000D0
swallow - Scanning process tree of feh(7675): xdg-open:7607 bash:7440 urxvtd:3340 bspwm:3327 xinit:3322 startx:3298 login:3293 systemd:1
swallow - urxvtd(3340) detected as swallowable
swallow - 33554433 swallowing 0x00C000D0 using xdo hide {%pwid}
swallow - feh(33554433) swallowed urxvtd(0x00C000D0)
vomit - 33554433 vomiting 0x00C000D0 using xdo show {%pwid}
vomit - 33554433 vomited 0x00C000D0
swallow - Scanning process tree of feh(7803): xdg-open:7735 bash:7440 urxvtd:3340 bspwm:3327 xinit:3322 startx:3298 login:3293 systemd:1
swallow - urxvtd(3340) detected as swallowable
swallow - 33554433 swallowing 0x00C000D0 using xdo hide {%pwid}
swallow - feh(33554433) swallowed urxvtd(0x00C000D0)
vomit - 33554433 vomiting 0x00C000D0 using xdo show {%pwid}
vomit - 33554433 vomited 0x00C000D0
swallow - Scanning process tree of feh(7957): xdg-open:7889 bash:7440 urxvtd:3340 bspwm:3327 xinit:3322 startx:3298 login:3293 systemd:1
swallow - urxvtd(3340) detected as swallowable
swallow - 33554433 swallowing 0x00C000D0 using xdo hide {%pwid}
swallow - feh(33554433) swallowed urxvtd(0x00C000D0)
vomit - 33554433 vomiting 0x00C000D0 using xdo show {%pwid}
vomit - 33554433 vomited 0x00C000D0
swallow - Scanning process tree of MainThread(5314): systemd:1

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024 1

I am thinking of something which will make this completely unnecessary. Need around a week at max. Thanks for your patience. using shell instead of terminal,

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

add urxvtd to the swallowable var. (Refer adding terminal in README). and let me know if the issue persists. (you can just add a d at the end of urxvt.)

from pidswallow.

smkuehnhold avatar smkuehnhold commented on May 23, 2024

No, It'd have to be someone else ... or me in the not-so-near future (probably not). I appreciate the quick response. I wasn't sure if it was expected behavior (with an easy fix) and wanted to pass along an observation I had made. Now I know to look at alternative solutions or to make changes to my terminal emulator.

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

I was looking into it urxvtd.
It seems around 30 MB less memory fro 100 terms. (for day to day usage 10-20 Terminals it will be very less. )

I don't know about your use case but using urxvt (non daemon) might not be terrible. (Just a suggestion).
Let this issue be open, if you found something that works. post here. Thanks a lot for reporting this issue.

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

I am closing this as this issue is now pinned as #36.

from pidswallow.

smkuehnhold avatar smkuehnhold commented on May 23, 2024

@smkuehnhold

Try this script: https://github.com/Liupold/pidswallow/blob/daemon-fix/pidswallow.

* Add this script to your path.

* Launch with `pidswallow -fgl`
  ~* Add urxvtd (to `swallowable`)~
  let me know if there is any issue (should work with urxvtd).

I'm glad progress has been made on this issue! I seem to have a couple of issues with the new script however. Sometimes the terminal is correctly swallowed and sometimes it is not. Also, sometimes when a terminal is swallowed, and it's child closed, the terminal remains hidden/is not vomited.

I am also seeing a couple of error messages.

  • cat: /tmp/pidswallow.pid: No such file or directory when first calling pidswallow -fgl after a reboot.
  • xev: unrecognized argument '-1' after opening a window from urxvtd

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

This is not important. :

* `cat: /tmp/pidswallow.pid: No such file or directory` when first calling `pidswallow  -fgl` after a reboot.

But, this seems odd,
Try running: xev -root -1 (and see if this provide any error)

* `xev: unrecognized argument '-1'` after opening a window from urxvtd

It xev is causing problem you might want to drop -g from the pidswallow command.
try running pidswallow -fl.

from pidswallow.

smkuehnhold avatar smkuehnhold commented on May 23, 2024

Try running: xev -root -1 (and see if this provide any error)

xev -root -1 does return the same error xev: unrecognized argument '-1'

It xev is causing problem you might want to drop -g from the pidswallow command.
try running pidswallow -fl

pidswallow -fl does remove the error message, but there seems to still be the same inconsistency with the swallowing.

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

Try out the latest commit (same url).

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

Try running: xev -root -1 (and see if this provide any error)

xev -root -1 does return the same error xev: unrecognized argument '-1'

https://gitlab.freedesktop.org/xorg/app/xev/-/commit/c51ca8f59ce5fff6b8c0705bd296460d8116cff2
(it's only in the new releases). Hope your repo will push that update soon.

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

@smkuehnhold
you might like this: https://github.com/Liupold/pidswallow/tree/shell-based/
(follow the instructions in readme of that branch).

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

@smkuehnhold let me know if this is working or not.

@smkuehnhold
you might like this: https://github.com/Liupold/pidswallow/tree/shell-based/
(follow the instructions in readme of that branch).

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

This will be closed when dev is merged to master. It's all seems to work at our end.
If you want you can now try out the dev branch. And let me know about any issue.

from pidswallow.

Liupold avatar Liupold commented on May 23, 2024

Fixed: 40104a9

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.