-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support in-terminal application detection #12
Comments
It seems difficult because it is necessary to handle the execution of Shell commands.
Please reconsider the necessity of this feature; clarifying the specific use case might make its value clearer. |
In vim or tmux, we can use the touchpad to switch windows |
Sorry, Idk if it's diffcult. but how |
I don't know. However the behavior of Would it be possible to create a script that retrieves the foreground process using any commands? |
of course. ❯ ps --ppid 76432
PID TTY TIME CMD
184521 pts/0 00:00:01 vim and it's search a vim process and it's parent process: #!/bin/sh
VIM_PID=$(pgrep vim)
# parent pid
PPID=$(ps -o ppid= -p $VIM_PID)
ps -p $VIM_PID
ps -p $PPID |
If you can get what application is selected, I think you can get it's pid?(sorry I don't know ruby so I didn't check source code) |
You can through system call to get these information. e.g. |
There are a few issues to consider:
Considering these points, detecting the foreground application can be challenging. |
Hi.
Can you add detection of foreground applications in the terminal? When I use this tool, I can only detect Gnome-shell. I think it should also list the foreground applications in the shell, which is a reasonable feature. It can get rid of long shortcut keys in vim and more app.
If I knew ruby, I would definitely submit a PR...
The text was updated successfully, but these errors were encountered: