Closed useredsa closed 4 years ago
I’m not sure if there is another way. If you find a better handling, I will happily merge.
I’m not sure if there is another way. If you find a better handling, I will happily merge.
I only know that STDIN is not matched to a terminal in my particular case, so checking with test -t 0
would suffice. Instead of replacing a test with the other one, I suggest including both, which, even though it doesn't quite solve the problem, I believe will be more robust. What do you think?
After I suggested (I apologize for caussing this issue)
kak-desktop
should open the file passed in the terminal if it is run from there, the following lines where added tokak-desktop
:I wonder if there's a better way to check if
kak-desktop
is being run inside a terminal than to check the output file descriptor. The reason is, if I spawndolphin
usingsxhkd
its output is linked totty1
, which also happens to the spawnedkak-desktop
process when I try to open a file. As a result, the file is not opened in a new terminal emulator. I know this can be fixed startingdolphin
asdolphin >/dev/null
, but perhaps there's a different way to check whether the process indeed has access to a virtual terminal displayed to the user.