diff --git a/inxi b/inxi index de3de16..e18bb6d 100755 --- a/inxi +++ b/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