Add explicit configuration options

This commit is contained in:
Davide Depau 2019-09-09 01:55:42 +02:00
parent 014d202387
commit 12c77cfe00

19
shcrt
View file

@ -1,7 +1,22 @@
#!/bin/bash
############ Script config #############
## GUI mode
#
# Console based:
# dialog - ncurses, runs fine on WSL
# none - works everywhere
#
# GUI based:
# yad, gtkdialog, kdialog, Xdialog - GNU/Linux only
# zenity - Windows port available, doesn't work very well because Microsoft is a little bitch and
# argument passing between Linux and Windows doesn't work well.
export supermode="dialog"
## Emojis - auto, yes, no
export emojis="auto"
########### /Script config #############
function is_wsl {
grep -q Microsoft /proc/version
return $?
@ -21,6 +36,8 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
export supertitle="shcrt"
export SHELL_LIBRARY_PATH="$SHELL_LIBRARY_PATH:$DIR/easybashgui/lib"
export PATH="$PATH:$DIR/easybashgui/src"
source easybashgui
@ -62,7 +79,7 @@ function scrt_session_path {
fi
}
if is_wsl; then
if [[ "$emojis" == "no" ]] || ([[ "$emojis" != "yes" ]] && is_wsl); then
dir_char="+"
file_char=" "
search_entry="> Search"