mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
trying to get tty of console irc client
This commit is contained in:
parent
d913ef930a
commit
d8e0a8653a
14
inxi
14
inxi
|
@ -2411,6 +2411,17 @@ get_audio_alsa_data()
|
|||
eval $LOGFE
|
||||
}
|
||||
|
||||
get_console_irc_tty()
|
||||
{
|
||||
eval $LOGFS
|
||||
local tty_number=''
|
||||
if [[ -n ${IRC_CLIENT} ]];then
|
||||
tty_number=$( ps aux | grep -is "${IRC_CLIENT}" | grep -v 'grep' | gawk '{print $7}' | sed 's/[^0-9]//g' )
|
||||
fi
|
||||
echo $tty_number
|
||||
eval $LOGFE
|
||||
}
|
||||
|
||||
## create A_CPU_CORE_DATA, currently with two values: integer core count; core string text
|
||||
## return value cpu core count string, this helps resolve the multi redundant lines of old style output
|
||||
get_cpu_core_count()
|
||||
|
@ -6346,6 +6357,9 @@ print_system_data()
|
|||
desktop_environment='N/A'
|
||||
fi
|
||||
else
|
||||
if [[ -z $tty_session && $B_CONSOLE_IRC == 'true' ]];then
|
||||
tty_session=$( get_console_irc_tty )
|
||||
fi
|
||||
if [[ -n $tty_session ]];then
|
||||
tty_session=" $tty_session"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue