Changeset 1892 for lliurex-conky/trunk/fuentes/lliurex-conky.install-files/usr/share/lliurex-conky/conkyrc_gui
- Timestamp:
- Jun 9, 2016, 2:45:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-conky/trunk/fuentes/lliurex-conky.install-files/usr/share/lliurex-conky/conkyrc_gui
r1633 r1892 11 11 CONKYRC_USED=$FILE_PATH/conkyrc_used 12 12 13 TEXT_COLOUR=" black"13 TEXT_COLOUR="white" 14 14 READED=TRUE 15 15 … … 87 87 MSG_SEMILIGERO_PANEL=$(gettext "Semithin") 88 88 MSG_DESKTOP_PANEL=$(gettext "Desktop") 89 89 MSG_COLOUR_QUESTION=$(gettext "Do you want to change colour fonts or use default mode?") 90 MSG_BOTON_COLOR_OK=$(gettext "DEFAULT") 91 MSG_BOTON_COLOR_CANCEL=$(gettext "CHANGE") 92 MSG_TIME=$(gettext "TIME") 93 MSG_TIME_DESC=$(gettext "You can show the time with this clock in the desktop") 94 MSG_DATE=$(gettext "DATE") 95 MSG_DATE_DESC=$(gettext "You can show the date in your desktop") 96 MSG_SHADE=$(gettext "TRANSPARENT") 97 MSG_SHADE_DESC=$(gettext "You eliminate the shadow in Conky desktop") 90 98 91 99 … … 228 236 SELECTION=`zenity --title "$MSG_TITLE" --list --width 850 --height=620 --text "$MSG_TITPARAM" --checklist --column "$MSG_SELECCIONA" --hide-column=2 --column "SELECCIONA" --column "$MSG_PARAMETRO" --column "$MSG_DESCRIPCION" \ 229 237 $READED "USUARIO" "$MSG_USER" "$MSG_USER_DESC" \ 238 TRUE "HORA" "$MSG_TIME" "$MSG_TIME_DESC" \ 239 TRUE "DIA" "$MSG_DATE" "$MSG_DATE_DESC" \ 230 240 TRUE "EQUIPO" "$MSG_HOSTNAME" "$MSG_HOSTNAME_DESC" \ 231 241 TRUE "CLIENTE" "$MSG_CLIENT" "$MSG_CLIENT_TYPE" \ … … 238 248 TRUE "CPU_TYPE" "$MSG_CPU_TYPE" "$MSG_CPU_TYPE" \ 239 249 TRUE "CPU_BAR" "$MSG_CPU_BAR" "$MSG_CPU_BAR_DESC" \ 240 TRUE "CPU_GRAPH" "$MSG_CPU_GRAPH" "$MSG_CPU_GRAPH_DESC" \250 FALSE "CPU_GRAPH" "$MSG_CPU_GRAPH" "$MSG_CPU_GRAPH_DESC" \ 241 251 TRUE "RAM_USAGE" "$MSG_RAM_USAGE" "$MSG_RAM_USAGE_DESC" \ 242 TRUE "RAM_BAR" "$MSG_RAM_BAR" "$MSG_RAM_BAR_DESC" \252 FALSE "RAM_BAR" "$MSG_RAM_BAR" "$MSG_RAM_BAR_DESC" \ 243 253 TRUE "SWAP_USAGE" "$MSG_SWAP_USAGE" "$MSG_SWAP_USAGE_DESC" \ 244 TRUE "SWAP_BAR" "$MSG_SWAP_BAR" "$MSG_SWAP_BAR_DESC" \254 FALSE "SWAP_BAR" "$MSG_SWAP_BAR" "$MSG_SWAP_BAR_DESC" \ 245 255 TRUE "IP_ADDRESS" "$MSG_NET_ADDRESS" "$MSG_NET_ADDRESS_DESC" \ 246 TRUE "NET_DOWNLOAD" "$MSG_NET_DOWNLOAD" "$MSG_NET_DOWNLOAD_DESC" \247 TRUE "NET_UPLOAD" "$MSG_NET_UPLOAD" "$MSG_NET_UPLOAD_DESC" \256 FALSE "NET_DOWNLOAD" "$MSG_NET_DOWNLOAD" "$MSG_NET_DOWNLOAD_DESC" \ 257 FALSE "NET_UPLOAD" "$MSG_NET_UPLOAD" "$MSG_NET_UPLOAD_DESC" \ 248 258 TRUE "HDD_USED" "$MSG_HDD_USED" "$MSG_HDD_USED_DESC" \ 259 FALSE "SHADE" "$MSG_SHADE" "$MSG_SHADE_DESC" \ 249 260 --separator=":"` 250 261 cancelar $? … … 335 346 336 347 function change_colour { 337 zenity --title "$MSG_TITLE" --question --text " Do you want to change colour fonts or use default mode?" --ok-label=CHANGE --cancel-label=DEFAULT338 if [[ $? = 0 ]]; then348 zenity --title "$MSG_TITLE" --question --text "$MSG_COLOUR_QUESTION" --ok-label=$MSG_BOTON_COLOR_OK --cancel-label=$MSG_BOTON_COLOR_CANCEL 349 if [[ $? != 0 ]]; then 339 350 if [[ $SOY = "CLIENTE" ]]; then 340 351 text_colour_client … … 346 357 SELECTION_COLOUR="white" 347 358 else 348 SELECTION_COLOUR2=" FF8C00"349 SELECTION_COLOUR=" black"359 SELECTION_COLOUR2="dodgerblue3" 360 SELECTION_COLOUR="white" 350 361 fi 351 362 … … 369 380 #echo "">>$CONKYRC_USED 370 381 382 371 383 ##DETERMINAMOS LOS COLORES DE LAS FUENTES 372 384 echo ' default_color '$SELECTION_COLOUR' ' >> $CONKYRC_USED 373 385 echo 'template0 ${font AvantGardeLTMedium:bold:size=10}${color '$SELECTION_COLOUR2'}\1 ${hr 2}$color${font}${voffset 1}' >> $CONKYRC_USED 374 386 387 #FONDO TRANSPARENTE O NO 388 if [[ $SELECTION == *SHADE* ]] ; then echo 'own_window_transparent yes' >> $CONKYRC_USED; echo '' >> $CONKYRC_USED; fi 389 375 390 ##COMIENZA LA CONFIGURACION 376 391 echo "TEXT" >> $CONKYRC_USED 392 if [[ $SELECTION == *HORA* ]] ; then echo '$color${font}${font AvantGardeLTMedium::size=38}$alignc${time %H:%M}$font$color${font AvantGardeLTMedium:size=15}' >> $CONKYRC_USED;fi 393 if [[ $SELECTION == *DIA* ]] ; then echo '$alignc${time %a}, ${time %d %b %Y}$font$color' >> $CONKYRC_USED; echo '' >> $CONKYRC_USED; fi 377 394 378 395 ####DATOS INICIALES#### … … 383 400 if [[ $SELECTION == *ARQUITECTURA* ]] ; then echo ''$MSG_ARCHITECTURE': ${if_match ${exec grep "x86_64" /tmp/architecture.txt -c}!=0}64 Bits${else}32 Bits${endif}' >> $CONKYRC_USED;fi 384 401 if [[ $SELECTION == *VERSION* ]] ; then echo ''$MSG_VERSION': ${if_existing /usr/share/lliurex-cdd/version}${exec cat /usr/share/lliurex-cdd/version}${endif}' >> $CONKYRC_USED;fi 385 if [[ $SELECTION == *MIRROR_VERSION* ]] ; then echo '${if_existing /tmp/mirror_version.txt}${if_match ${exec grep "VERSION 32" /tmp/mirror_version.txt -c}!=0}${if_match ${exec grep "VERSION 64" /tmp/mirror_version.txt -c}!=0}${template6}${else}${template5 32}${endif}${else}${if_match ${exec grep "VERSION 64" /tmp/mirror_version.txt -c}!=0}${template5 64}${endif}${endif}${endif}' >> $CONKYRC_USED;fi 386 if [[ $SELECTION == *HDD_ALERT* ]] ; then echo '${if_match ${fs_used_perc /}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full}${else}${endif}' >> $CONKYRC_USED;fi 402 if [[ $SELECTION == *MIRROR_VERSION* ]] ; then 403 if ( rgrep 32 /tmp/mirror.txt ) || ( rgrep 64 /tmp/mirror.txt) ; then 404 echo '${if_existing /tmp/mirror_version.txt}${if_match ${exec grep "VERSION 32" /tmp/mirror_version.txt -c}!=0}${if_match ${exec grep "VERSION 64" /tmp/mirror_version.txt -c}!=0}${template9}${else}${template8 32}${endif}${else}${if_match ${exec grep "VERSION 64" /tmp/mirror_version.txt -c}!=0}${template8 64}${endif}${endif}${endif}' >> $CONKYRC_USED 405 fi 406 fi 387 407 ####SYSTEMA#### 388 if [[ $SELECTION == *HDD_ALERT* ]] ; then echo "No blank added";else echo "">> $CONKYRC_USED;fi389 408 if [[ $SELECTION == *KERNEL* ]] || [[ $SELECTION == *UPTIME* ]] ; then echo '${template0 '$MSG_SYSTEM_PANEL'}' >> $CONKYRC_USED;fi 390 409 if [[ $SELECTION == *KERNEL* ]] ; then echo 'Kernel $alignr $kernel' >> $CONKYRC_USED;fi 391 410 if [[ $SELECTION == *UPTIME* ]] ; then echo ''$MSG_UPTIME_PANEL' $alignr $uptime' >> $CONKYRC_USED;fi 392 411 ####CPU#### 393 if [[ $SELECTION == *CPU* ]] ; then echo "">> $CONKYRC_USED; echo'${template0 CPU}' >> $CONKYRC_USED;fi412 if [[ $SELECTION == *CPU* ]] ; then echo '${template0 CPU}' >> $CONKYRC_USED;fi 394 413 if [[ $SELECTION == *CPU_TYPE* ]] ; then echo "\${exec cat /proc/cpuinfo | grep 'model name' | cut -c 14-42 | uniq }" >> $CONKYRC_USED;fi 395 414 if [[ $SELECTION == *CPU_BAR* ]] ; then echo '$cpu % ${cpubar}' >> $CONKYRC_USED;fi 396 415 if [[ $SELECTION == *CPU_GRAPH* ]] ; then 397 416 echo '${cpugraph}' >> $CONKYRC_USED; 398 else399 echo "">> $CONKYRC_USED400 417 fi 401 418 ####RAM#### 402 419 if [[ $SELECTION == *RAM* ]] || [[ $SELECTION == *SWAP* ]] ; then echo '${template0 RAM}' >> $CONKYRC_USED;fi 403 if [[ $SELECTION == *RAM_USAGE* ]] ; then echo ''$MSG_RAM_USAGE_PANEL': $mem /$memmax' >> $CONKYRC_USED;fi404 if [[ $SELECTION == *RAM_BAR* ]] ; then echo '$mem perc% $membar' >> $CONKYRC_USED;fi405 if [[ $SELECTION == *SWAP_USAGE* ]] ; then echo ''$MSG_SWAP_USAGE_PANEL': $swap/$swapmax' >> $CONKYRC_USED;fi406 if [[ $SELECTION == *SWAP_BAR* ]] ; then echo '$ swapperc% ${swapbar}' >> $CONKYRC_USED;fi420 if [[ $SELECTION == *RAM_USAGE* ]] ; then echo ''$MSG_RAM_USAGE_PANEL': $memperc% $alignr $memmax' >> $CONKYRC_USED;fi 421 if [[ $SELECTION == *RAM_BAR* ]] ; then echo '$membar' >> $CONKYRC_USED;fi 422 if [[ $SELECTION == *SWAP_USAGE* ]] ; then echo ''$MSG_SWAP_USAGE_PANEL': $swapperc% $alignr $swapmax' >> $CONKYRC_USED;fi 423 if [[ $SELECTION == *SWAP_BAR* ]] ; then echo '${swapbar}' >> $CONKYRC_USED;fi 407 424 ####NETWORK#### 408 if [[ $SELECTION == *IP_ADDRESS* ]] && [[ $SELECTION == *NET_DOWNLOAD* ]] && [[ $SELECTION == *NET_UPLOAD* ]] ; then echo '${template3 eth0 ETH0}${template3 wlan0 WLAN0}' >> $CONKYRC_USED; echo '${template3 eth1 ETH1}${template3 wlan1 WLAN1}' >> $CONKYRC_USED; echo '${template3 eth2 ETH2}${template3 wlan2 WLAN2}' >> $CONKYRC_USED; 409 elif [[ $SELECTION == *NET_DOWNLOAD* ]] ; then echo '${template5 eth0 ETH0}${template5 wlan0 WLAN0}' >> $CONKYRC_USED; echo '${template5 eth1 ETH1}${template5 wlan1 WLAN1}' >> $CONKYRC_USED; echo '${template5 eth2 ETH2}${template5 wlan2 WLAN2}' >> $CONKYRC_USED; 410 elif [[ $SELECTION == *NET_UPLOAD* ]] ; then echo '${template6 eth0 ETH0}${template6 wlan0 WLAN0}' >> $CONKYRC_USED; echo '${template6 eth1 ETH1}${template6 wlan1 WLAN1}' >> $CONKYRC_USED; echo '${template6 eth2 ETH2}${template6 wlan2 WLAN2}' >> $CONKYRC_USED; 411 elif [[ $SELECTION == *IP_ADDRESS* ]] ; then echo '${template7 eth0 ETH0}${template7 wlan0 WLAN0}' >> $CONKYRC_USED; echo '${template7 eth1 ETH1}${template7 wlan1 WLAN1}' >> $CONKYRC_USED; echo '${template7 eth2 ETH2}${template7 wlan2 WLAN2}' >> $CONKYRC_USED; 425 if [[ $SELECTION == *IP_ADDRESS* ]] && [[ $SELECTION == *NET_DOWNLOAD* ]] && [[ $SELECTION == *NET_UPLOAD* ]] ; then 426 index=0 427 for i in $( ifconfig | grep 'Ethernet' | awk '{print $1}' ); 428 do 429 NET_TITLE=$( echo "$i" | tr '[:lower:]' '[:upper:]' ) 430 echo '${template3 '$i' '$NET_TITLE'}${template3 wlan'$index' WLAN'$index'}' >> $CONKYRC_USED; 431 index=$index+1 432 done 433 434 elif [[ $SELECTION == *NET_DOWNLOAD* ]] ; then 435 index=0 436 for i in $( ifconfig | grep 'Ethernet' | awk '{print $1}' ); 437 do 438 NET_TITLE=$( echo "$i" | tr '[:lower:]' '[:upper:]' ) 439 echo '${template5 '$i' '$NET_TITLE'}${template5 wlan'$index' WLAN'$index'}' >> $CONKYRC_USED; 440 index=$index+1 441 done 442 443 elif [[ $SELECTION == *NET_UPLOAD* ]] ; then 444 index=0 445 for i in $( ifconfig | grep 'Ethernet' | awk '{print $1}' ); 446 do 447 NET_TITLE=$( echo "$i" | tr '[:lower:]' '[:upper:]' ) 448 echo '${template6 '$i' '$NET_TITLE'}${template6 wlan'$index' WLAN'$index'}' >> $CONKYRC_USED; 449 index=$index+1 450 done 451 elif [[ $SELECTION == *IP_ADDRESS* ]] ; then 452 index=0 453 for i in $( ifconfig | grep 'Ethernet' | awk '{print $1}' ); 454 do 455 NET_TITLE=$( echo "$i" | tr '[:lower:]' '[:upper:]' ) 456 echo '${template7 '$i' '$NET_TITLE'}${template7 wlan'$index' WLAN'$index'}' >> $CONKYRC_USED; 457 index=$index+1 458 done 412 459 fi 413 460 ####HDD#### 414 if [[ $SELECTION == *HDD* ]] ; then echo '${template0 '$MSG_HDD_PANEL'}' >> $CONKYRC_USED;fi 415 if [[ $SELECTION == *CPU_TYPE* ]] ; then echo '${template1 /}' >> $CONKYRC_USED; echo '${if_mounted /net${template1 /net}}$endif' >> $CONKYRC_USED;fi 416 417 #####LINEA QUE ME SIRVE PARA INDICAR QUE FUE MODIFICADO POR EL USUARIO, SE AÑADE AL INICIO DEL FICHERO 461 462 if [[ $SELECTION == *HDD* ]] && [[ $SELECTION == *HDD_ALERT* ]] ; then echo '${template0 '$MSG_HDD_PANEL'}' >> $CONKYRC_USED; echo '${if_mounted /}${template1 /}${if_match ${fs_used_perc /}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full}${else}${endif}$endif' >> $CONKYRC_USED; echo '${if_mounted /net}${template1 /net}${if_match ${fs_used_perc /net}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full_net}${else}${endif}$endif' >> $CONKYRC_USED;fi 463 464 if [[ $SELECTION == *HDD* ]] && [[ $SELECTION != *HDD_ALERT* ]] ; then echo '${template0 '$MSG_HDD_PANEL'}' >> $CONKYRC_USED; echo '${if_mounted /}${template1 /}$endif' >> $CONKYRC_USED; echo '${if_mounted /net}${template1 /net}$endif' >> $CONKYRC_USED; fi 465 466 if [[ $SELECTION != *HDD* ]] && [[ $SELECTION == *HDD_ALERT* ]] ; then echo '${if_mounted /}${if_match ${fs_used_perc /}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full}${else}${endif}$endif' >> $CONKYRC_USED; echo '${if_mounted /net}${if_match ${fs_used_perc /net}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full_net}${else}${endif}$endif' >> $CONKYRC_USED;fi 467 #####LINEA QUE ME SIRVE PARA INDICAR QUE FUE MODIFICADO POR EL USUARIO, SE ANYADE AL INICIO DEL FICHERO 418 468 sed -i '1s/^/#modified_by_user\n/' $CONKYRC_USED 419 469
Note: See TracChangeset
for help on using the changeset viewer.