slitaz-tools view tinyutils/editor @ rev 1025

More German translations (thanks kubepc)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 09 17:09:01 2017 +0200 (2017-10-09)
parents eb791cfb71c0
children
line source
1 #!/bin/sh
2 # Launch SliTaz default Text Editor.
3 #
5 . /etc/slitaz/applications.conf
7 USER_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/slitaz/applications.conf"
8 [ -f $USER_CONFIG ] && . $USER_CONFIG
10 if [ -z "$XAUTHORITY" ]; then
11 # console session
12 EXEC="$EDITOR"
13 else
14 # Xorg session
15 EXEC="terminal -e $EDITOR"
16 fi
18 case $EDITOR in
19 emacs|joe|jed|ht|le|nano|vi*) $EXEC $@ ;;
20 mcedit) $EXEC -a -S nicedark $@ ;;
21 *) exec setsid $EDITOR $@ ;;
22 esac
24 exit 0