Skip to content

Instantly share code, notes, and snippets.

@volgar1x
Created November 28, 2019 12:58
Show Gist options
  • Save volgar1x/d1663ae2ae319e88db79b39e81efbfc5 to your computer and use it in GitHub Desktop.
Save volgar1x/d1663ae2ae319e88db79b39e81efbfc5 to your computer and use it in GitHub Desktop.
/usr/bin/gnome-terminal
#!/bin/sh
if test "$1" = "-x"; then
shift
command=$@
/usr/bin/x-terminal-emulator -e sh -c "$command"
else
/usr/bin/x-terminal-emulator $@
fi
@volgar1x
Copy link
Author

Compatibility script for xdg-open which uses /usr/bin/gnome-terminal by default or /usr/bin/xterm instead of the standard /usr/bin/x-terminal-emulator which can be configured using sudo udpate-alternatives --config x-terminal-emulator.

I use this to automatically open & edit files from Nautilus using Neovim inside Alacritty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment