sob

Simple output bar
git clone https://git.sinitax.com/codemadness/sob
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 611985a88db127b299c44e334577c447457d4fd3
parent 5155d5feca8a8c6b6045a8ec392d3fc300eac23f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 24 Oct 2014 22:35:29 +0000

scripts/history: dont use histfile var (history for shells)

Diffstat:
Mscripts/history | 21++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/scripts/history b/scripts/history @@ -1,15 +1,22 @@ #!/bin/sh -file="$HISTFILE" +file="$HISTORYFILE" test -f "$file" || exit 1 -#if test x"$DISPLAY" = x""; then -# line=$(tail -n 100 "$file" | slmenu -l 20) -#else -# line=$(tail -n 100 "$file" | dmenu -l 20) -#fi +xmenu() { + dmenu -l 20 -p 'History: ' +} -line=$(tail -n 100 "$file" | dmenu -l 20) +climenu() { + slmenu -l 20 -p 'History: ' +} + +if test x"$DISPLAY" = x""; then + clear >&2 + line=$(tail -n 100 "$file" | climenu) +else + line=$(tail -n 100 "$file" | xmenu) +fi if test x"$line" != x""; then printf '%s' "$line"