mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
cleaned up konvi code, function for perl/python detection.
This commit is contained in:
parent
55c7fa0e3a
commit
cf75791ea4
36
inxi
36
inxi
|
@ -2504,29 +2504,11 @@ get_start_client()
|
|||
esac
|
||||
done
|
||||
B_CONSOLE_IRC='true'
|
||||
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
|
||||
set_perl_python_konvi
|
||||
;;
|
||||
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
|
||||
set_perl_python_konvi
|
||||
;;
|
||||
# then unset, set unknown data
|
||||
*)
|
||||
|
@ -2569,6 +2551,20 @@ get_start_client()
|
|||
eval $LOGFE
|
||||
}
|
||||
|
||||
set_perl_python_konvi()
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
## try to infer the use of Konversation >= 1.2, which shows $PPID improperly
|
||||
## no known method of finding Kovni >= 1.2 as parent process, so we look to see if it is running,
|
||||
## and all other irc clients are not running.
|
||||
|
|
Loading…
Reference in a new issue