mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
fixed hdd used spacing, made script name / v number have right color scheme too
This commit is contained in:
parent
0252ad7ade
commit
7085e1d702
9
inxi
9
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.1.48
|
#### version: 0.1.49
|
||||||
#### Date: October 29 2008
|
#### Date: October 29 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||||
|
@ -96,7 +96,6 @@ SCRIPT_NAME="inxi"
|
||||||
SCRIPT_PATH=$( dirname $0 )
|
SCRIPT_PATH=$( dirname $0 )
|
||||||
SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3}' )
|
SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3}' )
|
||||||
SCRIPT_DATE=$( grep -im 1 'date:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3 " " $4 ", " $5}' )
|
SCRIPT_DATE=$( grep -im 1 'date:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3 " " $4 ", " $5}' )
|
||||||
SCRIPT_VERSION="$SCRIPT_NAME v:$SCRIPT_VERSION_NUMBER"
|
|
||||||
KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data)
|
KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data)
|
||||||
|
|
||||||
## Script Localization
|
## Script Localization
|
||||||
|
@ -1064,7 +1063,7 @@ get_hard_drive_data()
|
||||||
/^Filesystem/ { p++ }
|
/^Filesystem/ { p++ }
|
||||||
END { print c }
|
END { print c }
|
||||||
' )
|
' )
|
||||||
HDDUSG="$((HDDUSG*100/HDD))%used"
|
HDDUSG="$((HDDUSG*100/HDD))% used"
|
||||||
HDD="$(($HDD*1024/1000**3))GB"
|
HDD="$(($HDD*1024/1000**3))GB"
|
||||||
else
|
else
|
||||||
unset HDDUSG
|
unset HDDUSG
|
||||||
|
@ -1318,7 +1317,7 @@ print_short_data()
|
||||||
then
|
then
|
||||||
short_data="${short_data} ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]"
|
short_data="${short_data} ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]"
|
||||||
fi
|
fi
|
||||||
short_data="${short_data} ${CN}:: ${C1}${SCRIPT_VERSION}${CN}"
|
short_data="${short_data} ${CN}:: ${C1}$SCRIPT_NAME ${C2}v:$SCRIPT_VERSION_NUMBER${CN}"
|
||||||
if [ "$SCHEME" -gt 0 ]
|
if [ "$SCHEME" -gt 0 ]
|
||||||
then
|
then
|
||||||
short_data="${short_data} $NORMAL"
|
short_data="${short_data} $NORMAL"
|
||||||
|
@ -1343,7 +1342,7 @@ print_system_data()
|
||||||
then
|
then
|
||||||
system_data="${system_data} ${CN}| ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}"
|
system_data="${system_data} ${CN}| ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}"
|
||||||
fi
|
fi
|
||||||
system_data="${system_data} ${CN}| ${C1}${SCRIPT_VERSION}"
|
system_data="${system_data} ${CN}| ${C1}$SCRIPT_NAME ${C2}v:$SCRIPT_VERSION_NUMBER${CN}"
|
||||||
|
|
||||||
if [ "$SCHEME" -gt 0 ]
|
if [ "$SCHEME" -gt 0 ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue