mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
first bug fix for full konvi support
This commit is contained in:
parent
1614e5f2ea
commit
9c2384389d
33
inxi
33
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.6.1-b1-t1
|
#### version: 0.6.2-b1-t1
|
||||||
#### Date: November 22 2008
|
#### Date: November 22 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
||||||
|
@ -65,6 +65,8 @@
|
||||||
#### The color variable ${C2} must always be followed by a space unless you know what
|
#### The color variable ${C2} must always be followed by a space unless you know what
|
||||||
#### character is going to be next for certain. Otherwise irc color codes can be accidentally
|
#### character is going to be next for certain. Otherwise irc color codes can be accidentally
|
||||||
#### activated or altered.
|
#### activated or altered.
|
||||||
|
####
|
||||||
|
#### For native script konversation support: ln -s <path to inxi> /usr/share/apps/konversation/scripts/inxi
|
||||||
########################################################################
|
########################################################################
|
||||||
#### TESTING FLAGS
|
#### TESTING FLAGS
|
||||||
#### inxi supports advanced testing triggers to do various things, using -! <arg>
|
#### inxi supports advanced testing triggers to do various things, using -! <arg>
|
||||||
|
@ -327,29 +329,30 @@ script_debugger()
|
||||||
#### -------------------------------------------------------------------
|
#### -------------------------------------------------------------------
|
||||||
|
|
||||||
# inxi speaks through here. When run by Konversation, uses DCOP
|
# inxi speaks through here. When run by Konversation, uses DCOP
|
||||||
# note, this is a huge bug trap, for now we're not using this at all except to
|
# for dcop to work, must use 'say' operator, AND colors must be evaluated by echo -e
|
||||||
# output basic stuff. At some point in the future we'll debug the dcop stuff,
|
# print_working_output prior to final output
|
||||||
# but that only works if inxi is being run as a konversation script to begin with
|
|
||||||
print_screen_output()
|
print_screen_output()
|
||||||
{
|
{
|
||||||
if [[ $DEBUG -gt 5 ]];then
|
if [[ $DEBUG -gt 5 ]];then
|
||||||
if [[ $KONVI -eq 1 ]];then
|
if [[ $KONVI -eq 1 ]];then
|
||||||
dcop "$DCPORT" "$DCOPOBJ" print_screen_output "$DCSERVER" "$DCTARGET" "konvi='$KONVI' saying : '$@'"
|
dcop "$DCPORT" "$DCOPOBJ" say "$DCSERVER" "$DCTARGET" "konvi='$KONVI' saying : '$@'"
|
||||||
else
|
else
|
||||||
echo "konvi='$KONVI' saying : '$@'"
|
echo "konvi='$KONVI' saying : '$@'"
|
||||||
fi
|
fi
|
||||||
#echo "konvi='$KONVI' saying : '$@'"
|
|
||||||
#((KONVI)) && dcop "$DCPORT" "$DCOPOBJ" print_screen_output "$DCSERVER" "$DCTARGET" "konvi='$KONVI' saying : '$@'" || echo "konvi='$KONVI' saying : '$@'"
|
|
||||||
fi
|
fi
|
||||||
#((KONVI)) && dcop $DCPORT Konversation print_screen_output $DCSERVER "$DCTARGET" "$1" || echo -ne "$1\n"
|
|
||||||
|
|
||||||
if [[ $KONVI -eq 1 ]];then
|
if [[ $KONVI -eq 1 ]];then
|
||||||
dcop "$DCPORT" "$DCOPOBJ" print_screen_output "$DCSERVER" "$DCTARGET" "$1"
|
dcop "$DCPORT" "$DCOPOBJ" say "$DCSERVER" "$DCTARGET" "$1"
|
||||||
else
|
else
|
||||||
echo -ne "$1\n"
|
echo -ne "$1\n"
|
||||||
fi
|
fi
|
||||||
#((KONVI)) && dcop "$DCPORT" "$DCOPOBJ" print_screen_output "$DCSERVER" "$DCTARGET" "$1" || echo -ne "$1\n"
|
}
|
||||||
# echo -ne "$1\n"
|
|
||||||
|
# args: $1 - string to evaluate. This is required for dcop colors output, if no echo -e
|
||||||
|
# is used, the colors fail to render. Always use this before you actually output the line.
|
||||||
|
print_working_output()
|
||||||
|
{
|
||||||
|
echo -e "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
## this handles all verbose line construction with indentation/line starter
|
## this handles all verbose line construction with indentation/line starter
|
||||||
|
@ -694,7 +697,8 @@ show_options()
|
||||||
print_screen_output " 3 - Also show hard disk names as detected."
|
print_screen_output " 3 - Also show hard disk names as detected."
|
||||||
print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot"
|
print_screen_output " 4 - Also show partition size/filled data for (if present):/, /home, /var/, /boot"
|
||||||
print_screen_output " 5 - For multicore systems, also show per core clock speeds; shows audio card."
|
print_screen_output " 5 - For multicore systems, also show per core clock speeds; shows audio card."
|
||||||
print_screen_output "-x Show extra data: bogomips on cpu. Only works with verbose or line output."
|
print_screen_output "-x Show extra data: bogomips on cpu; driver version (if available) for network/audio."
|
||||||
|
print_screen_output " Only works with verbose or line output."
|
||||||
print_screen_output ""
|
print_screen_output ""
|
||||||
print_screen_output "Additional Options:"
|
print_screen_output "Additional Options:"
|
||||||
print_screen_output "-h - this help menu."
|
print_screen_output "-h - this help menu."
|
||||||
|
@ -2118,10 +2122,11 @@ print_short_data()
|
||||||
if [[ $SHOW_IRC -gt 0 ]];then
|
if [[ $SHOW_IRC -gt 0 ]];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_NAME ${C2}v:$SCRIPT_VERSION_NUMBER${CN}"
|
short_data="${short_data} ${CN}:: ${C1}$SCRIPT_NAME${C2} $SCRIPT_VERSION_NUMBER${CN}"
|
||||||
if [[ $SCHEME -gt 0 ]];then
|
if [[ $SCHEME -gt 0 ]];then
|
||||||
short_data="${short_data} $NORMAL"
|
short_data="${short_data} $NORMAL"
|
||||||
fi
|
fi
|
||||||
|
short_data=$( print_working_output "$short_data" )
|
||||||
print_screen_output "$short_data"
|
print_screen_output "$short_data"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2494,7 +2499,7 @@ print_info_data()
|
||||||
if [[ $SHOW_IRC -gt 0 ]];then
|
if [[ $SHOW_IRC -gt 0 ]];then
|
||||||
info_data="${info_data} ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}"
|
info_data="${info_data} ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}"
|
||||||
fi
|
fi
|
||||||
info_data="${info_data} ${C1}$SCRIPT_NAME ${C2}v:$SCRIPT_VERSION_NUMBER${CN}"
|
info_data="${info_data} ${C1}$SCRIPT_NAME${C2} $SCRIPT_VERSION_NUMBER${CN}"
|
||||||
|
|
||||||
if [[ $SCHEME -gt 0 ]];then
|
if [[ $SCHEME -gt 0 ]];then
|
||||||
info_data="${info_data} ${NORMAL}"
|
info_data="${info_data} ${NORMAL}"
|
||||||
|
|
Loading…
Reference in a new issue