Code Monkey home page Code Monkey logo

Comments (11)

Liupold avatar Liupold commented on May 24, 2024

Thanks for taking your time and reporting this, Does other programs works? Try with feh and see if that works. sxiv will not work as of not as of now there is a issue open xyb3rt/sxiv#398. If other programs are also not working , please start a program (say mpv, vlc, zathura), and then provide the output for.
psteee -spTA $(pidof <name>).

from pidswallow.

ioio85 avatar ioio85 commented on May 24, 2024

Thanks for your reply.
Unfortunately it still does not work for other programs. Here are the tests I have done.
pstree -spTA $(pidof mpv) systemd(1)---alacritty(4054)---zsh(4061)---mpv(5916)

pstree -spTA $(pidof feh) systemd(1)---alacritty(5978)---zsh(5988)---feh(7029)
here is my bspwmrc just in case.

Thanks

from pidswallow.

Liupold avatar Liupold commented on May 24, 2024

comment out the line from bspwmrc and run from the terminal with verbose=1.

sorry for the previous comments (my phone screwed me up. thought there was a line break '
your pstree looks as expected. no problem there.

from pidswallow.

Liupold avatar Liupold commented on May 24, 2024

just downloaded and tried alacritty. works fine. Try to run from the terminal and see if that works. Btw do you have all the requirements installed ?

from pidswallow.

ioio85 avatar ioio85 commented on May 24, 2024

Hi sorry for the delay in my response,

I found that if I run it from the command line it works.
In addition if I run bspwmrc file (i.e. ./.config/bspwm/bspwmrc) it also work.
But if I restart bspwm it does not work and there isn't any pidswallow process. My guess it fails to start at startup but I am not sure why. Do you know a way to access error log from bspwm? Thanks a lot for your help.

from pidswallow.

Liupold avatar Liupold commented on May 24, 2024

pidswallow will not be shown as process as it is not active all the time. The process which remains active and pipe widow id is bspc. If you are not using any other script which requires bspc actively. For debugging I recommend you to modify the echo statement of pidswallow such that it appends to a file.

Eg:
echo "$pwid and $cwid" >> /path/to/my/log (inside pidswallow).

I think i know why restarting will won't work. If you restart you create two bspc monitor. (one hides and one unhides instantly) Hence no change.

This can be solved by killing bspc before starting another (adding a line before your bspc.

Add this before the bspc command.
kill $(pgrep -f 'bspc subscribe node_add node_remove')

from pidswallow.

SeerLite avatar SeerLite commented on May 24, 2024

I think i know why restarting will won't work. If you restart you create two bspc monitor. (one hides and one unhides instantly) Hence no change.

This can be solved by killing bspc before starting another (adding a line before your bspc.

Add this before the bspc command.
kill $(pgrep -f 'bspc subscribe node_add node_remove')

Hey, I was looking around and immediately noticed this! Since all bspwm does when "restarting" is clear all rules and execute bspwmrc again, that monitor process would still be running in the background and another one would start. Multiple restarts would clutter it with a lot of these.
I think the kill command should be added to the instructions in the readme. Maybe there even is a cleaner way to deal with it?

As for the original issue here, I have no clue hehe. Still trying to wrap my head around all this process-tree stuff.

from pidswallow.

Liupold avatar Liupold commented on May 24, 2024

ya i am not happy with this myself. How would you advice this is done. (Though a another script or within the same script?). As others are also having issue with this.

from pidswallow.

SeerLite avatar SeerLite commented on May 24, 2024

I think having the entire bspc subscribe line inside the script would be a great idea. That way, it's just adding a pidswallow & to bspwmrc.

Still, I don't know how to deal with killing the script in case it's already running. This has always been a thing that bothers me about scripts and even some binaries, that's why I started running systemd user services for some of them (although that introduces another set of problems entirely lol)

If bspc subscribe just had a flag for exiting when it detects bspwm restarting... that'd make this whole thing easier. That the script has to stop on each restart.

from pidswallow.

SeerLite avatar SeerLite commented on May 24, 2024

Ok, I might be wrong about this but I think I found something that could be useful (although maybe slow):

bspc subscribe report has this whole deal about reporting the status of the WM in general, right? So I did some tests and I think (I'm not 100% sure!) that each time a restart is done, it outputs a line with a single W. I'm gonna play around a bit with it, maybe we could read report in some way and exit the script once W is received?

Edit: It's gonna be a bit difficult to implement, as the script currently only reads for a window id.

from pidswallow.

Liupold avatar Liupold commented on May 24, 2024

The script now is super easy to install and support restarting.

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.