Skip to content

Instantly share code, notes, and snippets.

@sgnyjohn
Created July 15, 2019 14:05
Show Gist options
  • Save sgnyjohn/56394ae42b83c67eb83ea42d43269c9a to your computer and use it in GitHub Desktop.
Save sgnyjohn/56394ae42b83c67eb83ea42d43269c9a to your computer and use it in GitHub Desktop.
shell editor - script
#!/bin/bash
cmd=
for i in geany gedit leafpad scite; do
cmd=$(which $i)
if [ ".$cmd" != "." ]; then
break
fi
done
if [ $UID -eq 0 ]; then
export HOME=/root
export XDG_CONFIG_HOME=$HOME/.config
fi
$cmd "$@" &
exit
#"-cwd:/home/signey/SciTE" $*
#"-loadsession:/home/signey/lixo1.ses"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment