--[[ Conky progettato per visualizzare informazioni relative alle periferiche connesse alle porte USB.
conky -c /mnt/Dati/conky2024/conkyEsaminaUSB02 &
Informazioni utili:
http://conky.sourceforge.net/config_settings.html
https://ubuntuforums.org/showthread.php?t=281865&page=2346
http://www.ubaweb.it/miniguide/conky.php
https://wiki.manjaro.org/index.php?title=Basic_Tips_for_conky
https://wiki.archlinux.org/index.php/Conky_(Italiano)
https://zirconet.wordpress.com/2017/02/10/tutorial-linux-alla-scoperta-di-conky-configurazione-delle-opzioni-generali/
]]
conky.config = {
-- ------------------------- Windows Settings
own_window = true,
own_window_transparent = no,
own_window_argb_visual = true,
own_window_argb_value = 255,
own_window_colour = 'black',
own_window_type = 'normal',
own_window_hints = 'undecorated,skip_pager,below', -- sticky,skip_taskbar,
double_buffer = true,
background = true,
-- ------------------------- Position
alignment = 'top_left',
minimum_width = 270,
minimum_height = 200,
gap_x = 210,
gap_y = 125,
-- ------------------------- Font
draw_shades = false,
draw_outline = false,
draw_borders = true,
draw_graph_borders = true,
default_bar_height = 3,
default_graph_height = 20,
use_spacer = 'right',
use_xft = true,
override_utf8_locale = true,
font = 'DejaVu Sans Mono:size=8',
--------------------------- Other
update_interval = 1,
----- text
default_color = 'yellow',
----- headers
color0 = 'white',
};
conky.text = [[
${color orange}Output del comando ${color red}lspci | awk '$2 == "USB" {system("lspci -ks " $1)}'
${color0}${exec lspci | awk '$2 == "USB" {system("lspci -ks " $1)}'}
${color orange}Output del comando ${color red}dmesg|grep found|grep idVendor|tail -1
${color0}${exec dmesg|grep found|grep idVendor|tail -1}
${color orange}Dati periferica USB summenzionata ${color red}(se tutt'ora connessa al PC)
${color0}${exec A0=`dmesg|grep found|grep idVendor|tail -1`; C1=`echo "$A0" | awk '{ sub(", idProduct=",":"); print; }'`
c0=`echo $C1 | awk -F'r=' '{print $2}' | awk -F', ' '{print $1}'`; lsusb -vd "$c0"|head -17}
${color0}${exec A0=`dmesg|grep found|grep idVendor|tail -1`; echo $A0; B0=`echo $A0 | awk -F'b ' '{print $2}' | awk -F':' '{print $1}'`
lsusb -tvv |grep $B0 -B2}
${color orange}Output del comando ${color red} cat /etc/issue ${color0}${exec cat /etc/issue}
${color orange}$sysname Kernel: ${color0}$kernel on $machine
${color orange}Output del comando ${color red} uptime
${color0}${exec uptime}
]]