Update of /cvsroot/lastbash/lastbash
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7405
Modified Files:
lastbash
Log Message:
Renamed the INFO_* variables to HISTORY_*
Index: lastbash
===================================================================
RCS file: /cvsroot/lastbash/lastbash/lastbash,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- lastbash 30 Nov 2006 21:08:25 -0000 1.67
+++ lastbash 30 Nov 2006 21:12:30 -0000 1.68
@@ -26,7 +26,7 @@
DEBUG="n"
USE_PLAYER="y"
HISTORY_SCROLL_DOWN="y"
-INFO_FIELD_UNITS=(2 2 3)
+HISTORY_FIELD_UNITS=(2 2 3)
REFRESH_INTERVAL="30"
PLAYER="auto" # $PLAYERS, auto
AUTO_PLAY="y"
@@ -146,11 +146,11 @@
debug "No missing programs."
fi
- # Check the info line proportions are right
- if [ "${INFO_FIELD_UNITS[0]}" == "0" ] || [ "${INFO_FIELD_UNITS[2]}" == "0" ]
+ # Check the history fields proportions are right
+ if [ "${HISTORY_FIELD_UNITS[0]}" == "0" ] || [ "${HISTORY_FIELD_UNITS[2]}" == "0" ]
then
# Restore the defaults
- INFO_FIELD_UNITS=(2 2 3)
+ HISTORY_FIELD_UNITS=(2 2 3)
fi
# Check and fix the refresh interval
@@ -605,25 +605,25 @@
TSCROLL_LAST=$(( T_LASTLINE - 2 ))
TSCROLL_CURRENT=${TSCROLL_FIRST}
- # Set the info line field sizes
+ # Set the history line field sizes
# The fixed-size fields are the following
# - the love/ban indicator: 1 char
# - the track duration: 6 chars
# Plus: 1 char at start and end of line
# Plus: 2 chars between fields (this is computed)
# Find the total relative units
- local UNITS_TOTAL=$(( ${INFO_FIELD_UNITS[0]} + ${INFO_FIELD_UNITS[1]} + ${INFO_FIELD_UNITS[2]} ))
+ local UNITS_TOTAL=$(( ${HISTORY_FIELD_UNITS[0]} + ${HISTORY_FIELD_UNITS[1]} + ${HISTORY_FIELD_UNITS[2]} ))
# Find the variable line length
local VAR_LINE=$(( ${T_COLUMNS} - 13 ))
- [ "${INFO_FIELD_UNITS[0]}" != "0" ] && VAR_LINE=$(( ${VAR_LINE} - 2 ))
- [ "${INFO_FIELD_UNITS[1]}" != "0" ] && VAR_LINE=$(( ${VAR_LINE} - 2 ))
+ [ "${HISTORY_FIELD_UNITS[0]}" != "0" ] && VAR_LINE=$(( ${VAR_LINE} - 2 ))
+ [ "${HISTORY_FIELD_UNITS[1]}" != "0" ] && VAR_LINE=$(( ${VAR_LINE} - 2 ))
# Find the unit length
local UNIT=$(( ${VAR_LINE} / ${UNITS_TOTAL} ))
# Compute the sizes
- INFO_FIELD_SIZE[0]=$(( ${UNIT} * ${INFO_FIELD_UNITS[0]} ))
- INFO_FIELD_SIZE[1]=$(( ${UNIT} * ${INFO_FIELD_UNITS[1]} ))
- INFO_FIELD_SIZE[2]=$(( ${VAR_LINE} - ${INFO_FIELD_SIZE[0]} - ${INFO_FIELD_SIZE[1]} ))
- INFO_FIELD_SIZE[3]="6"
+ HISTORY_FIELD_SIZE[0]=$(( ${UNIT} * ${HISTORY_FIELD_UNITS[0]} ))
+ HISTORY_FIELD_SIZE[1]=$(( ${UNIT} * ${HISTORY_FIELD_UNITS[1]} ))
+ HISTORY_FIELD_SIZE[2]=$(( ${VAR_LINE} - ${HISTORY_FIELD_SIZE[0]} - ${HISTORY_FIELD_SIZE[1]} ))
+ HISTORY_FIELD_SIZE[3]="6"
# Compute the current max line length
TCURRENT_MAX=$(( ${T_COLUMNS} - 13 ))
@@ -666,28 +666,28 @@
LINE=" ${LBL_ARTIST:0:1}"
# Add the artist, if the field units are not null
- if [ "${INFO_FIELD_UNITS[0]}" != "0" ]
+ if [ "${HISTORY_FIELD_UNITS[0]}" != "0" ]
then
- S="${INFO_FIELD_SIZE[0]}"
+ S="${HISTORY_FIELD_SIZE[0]}"
printf -v FIELD " %-${S}s" "${LBL_ARTIST:0:$S}"
LINE="${LINE}${FIELD}"
fi
# Add the album, if the field units are not null
- if [ "${INFO_FIELD_UNITS[1]}" != "0" ]
+ if [ "${HISTORY_FIELD_UNITS[1]}" != "0" ]
then
- S="${INFO_FIELD_SIZE[1]}"
+ S="${HISTORY_FIELD_SIZE[1]}"
printf -v FIELD " %-${S}s" "${LBL_ALBUM:0:$S}"
LINE="${LINE}${FIELD}"
fi
# Add the track title
- S="${INFO_FIELD_SIZE[2]}"
+ S="${HISTORY_FIELD_SIZE[2]}"
printf -v FIELD " %-${S}s" "${LBL_TRACK:0:$S}"
LINE="${LINE}${FIELD}"
# Add the track duration
- S="${INFO_FIELD_SIZE[3]}"
+ S="${HISTORY_FIELD_SIZE[3]}"
printf -v FIELD " %${S}s " "${LBL_LENGTH:0:$S}"
LINE="${LINE}${FIELD}"
@@ -818,7 +818,7 @@
fi
fi
- # Display the info line
+ # Display the history line
tui_history_line
# Increment the current line number
@@ -846,23 +846,23 @@
fi
# Add the artist, if the field units are not null
- if [ "${INFO_FIELD_UNITS[0]}" != "0" ]
+ if [ "${HISTORY_FIELD_UNITS[0]}" != "0" ]
then
- S="${INFO_FIELD_SIZE[0]}"
+ S="${HISTORY_FIELD_SIZE[0]}"
printf -v FIELD " %-${S}s" "${PREV_ARTIST:0:$S}"
LINE="${LINE}${FIELD}"
fi
# Add the album, if the field units are not null
- if [ "${INFO_FIELD_UNITS[1]}" != "0" ]
+ if [ "${HISTORY_FIELD_UNITS[1]}" != "0" ]
then
- S="${INFO_FIELD_SIZE[1]}"
+ S="${HISTORY_FIELD_SIZE[1]}"
printf -v FIELD " %-${S}s" "${PREV_ALBUM:0:$S}"
LINE="${LINE}${FIELD}"
fi
# Add the track title
- S="${INFO_FIELD_SIZE[2]}"
+ S="${HISTORY_FIELD_SIZE[2]}"
printf -v FIELD " %-${S}s" "${PREV_TRACK:0:$S}"
LINE="${LINE}${FIELD}"
|