[Github-comments] [geany/geany] Open file in geany in current desktop? (#1025)
Nazar Mokrynskyi
notifications at xxxxx
Sat May 5 01:45:26 UTC 2018
@zaxebo1, thanks for the link!
I've modified it to this:
```bash
#!/bin/sh
socket=`xprop -root _NET_CURRENT_DESKTOP`
socket=${socket##* }
if [ "$socket" ]
then
if [ "$DISPLAY" ]
then
socket="${DISPLAY%.*}-$socket"
socket=${socket#*:}
else
socket="NODISPLAY-$socket"
fi
exec /usr/bin/geany --socket-file "/tmp/geany_socket_$socket" "$@"
else
exec /usr/bin/geany "$@"
fi
```
Then I've saved it as `~/.local/bin/geany`, made it executable and added `~/.local/bin` to PATH.
SInce in Ubuntu `geany.desktop` uses simply `geany` instead of full path, all file types associations now use this new script as well as direct execution from menu. Works wonderfully, finally proper replacement for slow gedit.
IMHO, this should be the default behavior.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1025#issuecomment-386770780
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180505/2cfb325e/attachment.html>
More information about the Github-comments
mailing list