-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print to standard output instead of passing to dmenu #39
Comments
I just ran into the same "problem" and trying to figure it out. I've also been looking for alternatives to j4-dmenu-desktop that could print available programs from .desktop to standard output, but to no avail so far. |
There is a command line utility to introspect .desktop files written in Python by an Arch Linux guy, hosted on Github. Don't remember the name, though, but you may be able to find it. |
While I took a stab at #51, I remembered this. This should work, mostly:
It relies on some conventions, i.e. readlink -f resolving symlinks, /proc/$PID, and that FD 1 of a shell process is the active standard output. You'll need to put this in a script and run that. The other way around is possible, too
( With this it should be quite possible to integrate j4-dmenu-desktop with practically any kind of menu. #48 |
Wow, I have not expected this 👍 |
Hm, this should be transparent if the shell script is run like a shell script in a separate shell process. I don't know Rofi, maybe it documents somewhere how exactly it implements these modis. Edit: Rofi appears to be a C program, so I'd expect it uses a proper shell process to execute scripts handed to it. |
I will report this issue to Rofi's developer, he might be interested. |
I wonder if it is possible to print everything that
j4-dmenu-desktop
passes to dmenu to standard output.I am trying to integrate
j4-dmenu-desktop
with rofi so it can be used as one of it's so-called "modis" instead of be executed viaj4-dmenu-desktop
's--dmenu
argument.The best I've come so far is using temporary file, as simple
cat
does not work (tries to execute first element, interpreting new line character as a user interaction):This, however, is just a half way to the success, because:
.desktop
file it is related with; this is how temporary file looks like:How this could be accomplished, if at all?
The text was updated successfully, but these errors were encountered: