mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added python support for unknown irc clients and added konversation to that support.
This commit is contained in:
parent
4484a73801
commit
55c7fa0e3a
19
inxi
19
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.7.21
|
#### version: 1.7.22
|
||||||
#### Date: July 25 2011
|
#### Date: July 25 2011
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -2287,7 +2287,7 @@ get_start_client()
|
||||||
# from inside itself, as a script, the parent is konversation/xchat, not perl/bash etc
|
# from inside itself, as a script, the parent is konversation/xchat, not perl/bash etc
|
||||||
# note: perl can report as: perl5.10.0, so it needs wildcard handling
|
# note: perl can report as: perl5.10.0, so it needs wildcard handling
|
||||||
case $app_working_name in
|
case $app_working_name in
|
||||||
bash|dash|sh|perl*) # We want to know who wrapped it into the shell or perl.
|
bash|dash|sh|python*|perl*) # We want to know who wrapped it into the shell or perl.
|
||||||
pppid="$( ps -p $PPID -o ppid --no-headers | sed 's/ //g' )"
|
pppid="$( ps -p $PPID -o ppid --no-headers | sed 's/ //g' )"
|
||||||
if [[ -n $pppid && -f /proc/$pppid/exe ]];then
|
if [[ -n $pppid && -f /proc/$pppid/exe ]];then
|
||||||
irc_client_path="$( readlink /proc/$pppid/exe )"
|
irc_client_path="$( readlink /proc/$pppid/exe )"
|
||||||
|
@ -2511,7 +2511,20 @@ get_start_client()
|
||||||
IRC_CLIENT_VERSION=" $( konversation --version 2>/dev/null | gawk '/^Konversation/ {print $2}' )"
|
IRC_CLIENT_VERSION=" $( konversation --version 2>/dev/null | gawk '/^Konversation/ {print $2}' )"
|
||||||
B_CONSOLE_IRC='false'
|
B_CONSOLE_IRC='false'
|
||||||
else
|
else
|
||||||
IRC_CLIENT="Unknown Perl client"
|
IRC_CLIENT="Unknown $app_working_name client"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
python*)
|
||||||
|
# B_CONSOLE_IRC='true' # are there even any python type console irc clients? check.
|
||||||
|
if [[ -z $IRC_CLIENT_VERSION ]];then
|
||||||
|
# this is a hack to try to show konversation if inxi is running but started via /cmd
|
||||||
|
if [[ -n $( ps aux | grep -i 'konversation' | grep -v 'grep' ) && $B_RUNNING_IN_X == 'true' ]];then
|
||||||
|
IRC_CLIENT='Konversation'
|
||||||
|
IRC_CLIENT_VERSION=" $( konversation --version 2>/dev/null | gawk '/^Konversation/ {print $2}' )"
|
||||||
|
B_CONSOLE_IRC='false'
|
||||||
|
else
|
||||||
|
IRC_CLIENT="Unknown $app_working_name client"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue