Refactor xinit to be more structured and set $EDITOR if unset to vis
This commit is contained in:
parent
d2ee25d724
commit
5c4c6c15e2
3 changed files with 60 additions and 36 deletions
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
EDITOR=vis
|
||||
LOGDIR="$XDG_CONFIG_HOME"/sxmo/modem
|
||||
|
||||
err() {
|
||||
|
@ -16,7 +15,7 @@ modem_n() {
|
|||
editmsg() {
|
||||
TMP="$(mktemp --suffix "$1_msg")"
|
||||
echo "$2" > "$TMP"
|
||||
TEXT="$(st -e $EDITOR "$TMP")"
|
||||
TEXT="$(st -e "$EDITOR" "$TMP")"
|
||||
cat "$TMP"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue