-
Notifications
You must be signed in to change notification settings - Fork 330
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
Identify running lf applications #1088
Comments
From memory (you should double-check), I think the id of each process is the same as its process id. So, For your usecase, I would just send a command to all instances of |
And how can I do it? I tried the following, but it doesn't work (terminal command: tput cols): lf -remote "send $tput cols" Either I get an error message, or all lf shows the $ sign in the bottom bar and waits for the command. |
Firstly, newer versions of Back to your questions, I think that's an issue with quoting which can get really confusing in such examples as they get more complicated. From my shell, If you do this from
You can replace |
Aha. When I changed double-quotes with single-quotes, then working great, thank u! So now it was easy to solve that every time lf is started, it sends a check to every instance to see if it needs to be resized:
|
I would like to make it so that every time an lf is opened, a test is run on all lf instances regarding the size of the window, so that if it is smaller than a certain size, it turns off the preview image. I wrote the script, but I ran into a problem about how I can refer to each individual lf instance. I see only two cases in the documentation:
The current instance is: lf -remote "send $id echo hello world"
All instances: lf -remote 'send echo hello world'
Also, if I give the given client the id number after send, I can also run a command on it. But how do I know under what id number all the lf clients are running? How can I list it so that I can pass it to a variable.
The text was updated successfully, but these errors were encountered: