Browse Source

Some code for screen initialisation added.

master
Sam Hunter 3 months ago
parent
commit
9dd94941ce
  1. 24
      edlog

24
edlog

@ -2,10 +2,8 @@
# edlog - an ed(1)/mail(1) inspired shlog reader/editor
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
readonly PROGNAME="${0##*/}"
readonly VERSION="1.3"
declare -i ST=0
declare -i PTR=0
declare -i SCR=$((LINES-1))
@ -16,14 +14,20 @@ readonly USERSHLOG="$HOME/.shlog"
readonly MSGIDPAT='[0-9]{4}'
if (( LINES == 0 )) ; then
cat <<-_error_
$PROGNAME encountered a configuration issue:
if command -v tput > /dev/null ; then
export COLUMNS="$(tput cols)"
export LINES="$(tput lines)"
SCR=$((LINES-1))
else
cat <<-_error_
$PROGNAME encountered a configuration issue:
Export your display variables with:
export COLUMNS LINES
Export your display variables with:
export COLUMNS LINES
_error_
exit 1
_error_
exit 1
fi
fi
help () {

Loading…
Cancel
Save