diff --git a/inxi b/inxi index 46d860a..6c57d18 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.4.9 -#### Date: April 9 2010 +#### version: 1.4.10 +#### Date: June 10 2010 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -203,6 +203,8 @@ B_ALLOW_UPDATE='true' B_CPU_FLAGS_FULL='false' # test for dbus irc client B_DBUS_CLIENT='false' +# kde dcop +B_DCOP='false' # Debug flood override: make 'true' to allow long debug output B_DEBUG_FLOOD='false' # show extra output data @@ -211,6 +213,8 @@ B_EXTRA_DATA='false' B_HANDLE_CORRUPT_DATA='false' B_LOG_COLORS='false' B_LOG_FULL_DATA='false' +# kde qdbus +B_QDBUS='false' B_ROOT='false' # Running in a shell? Defaults to false, and is determined later. B_RUNNING_IN_SHELL='false' @@ -619,6 +623,13 @@ check_script_suggested_apps() else script_debugger "Suggestion: update to Bash v3.1 for optimal inxi output" fi + # now setting qdbus/dcop for first run, some systems can have both by the way + if [[ -n $( type -p qdbus ) ]];then + B_QDBUS='true' + fi + if [[ -n $( type -p dcop ) ]];then + B_DCOP='true' + fi eval $LOGFE } @@ -969,12 +980,12 @@ print_screen_output() fi fi - if [[ $KONVI -eq 1 ]]; then ## dcop Konversation (<= 1.1 (qt3)) + if [[ $KONVI -eq 1 && $B_DCOP == 'true' ]]; then ## dcop Konversation (<= 1.1 (qt3)) # konvi doesn't seem to like \n characters, it just prints them literally $print_data="$( tr '\n' ' ' <<< "$print_data" )" dcop "$DCPORT" "$DCOPOBJ" say "$DCSERVER" "$DCTARGET" "$print_data" - elif [[ $KONVI -eq 3 ]]; then ## dbus Konversation (> 1.2 (qt4)) + elif [[ $KONVI -eq 3 && $B_QDBUS == 'true' ]]; then ## dbus Konversation (> 1.2 (qt4)) qdbus org.kde.konversation /irc say "$DCSERVER" "$DCTARGET" "$print_data" # elif [[ $IRC_CLIENT == 'X-Chat' ]]; then @@ -1626,8 +1637,10 @@ is_this_qt4_konvi() local konvi_qt4_client='' konvi_dbus_exist='' konvi_pid='' konvi_home_dir='' local konvi='' konvi_qt4_ver='' b_is_qt4='' - # fringe cases can throw error, always if untested app, use 2>/dev/null - konvi_dbus_exist=$( qdbus 2>/dev/null | grep "org.kde.konversation" ) + # fringe cases can throw error, always if untested app, use 2>/dev/null after testing if present + if [[ $B_QDBUS == 'true' ]];then + konvi_dbus_exist=$( qdbus 2>/dev/null | grep "org.kde.konversation" ) + fi if [[ -n $konvi_dbus_exist && -e /usr/share/kde4/apps/konversation ]]; then konvi_pid=$( ps -A | grep -i 'konversation' ) @@ -3006,7 +3019,7 @@ get_partition_data() eval $LOGFS #local excluded_file_types='--exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660' # df doesn't seem to work in script with variables like at the command line - local main_partition_data="$( df -h -T --exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660 )" + local main_partition_data="$( df -h -T --exclude-type=aufs --exclude-type=squashfs --exclude-type=unionfs --exclude-type=tmpfs --exclude-type=iso9660 )" local swap_data="$( swapon -s )" log_function_data 'raw' "main_partition_data:\n$main_partition_data\n\nswap_data:\n$swap_data"