Changeset 1892


Ignore:
Timestamp:
Jun 9, 2016, 2:45:59 PM (3 years ago)
Author:
daduve
Message:

Adding new propierties to conky server

Location:
lliurex-conky/trunk/fuentes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lliurex-conky/trunk/fuentes/debian/changelog

    r1880 r1892  
     1lliurex-conky (0.62) xenial; urgency=high
     2
     3  * Adding new propierties to conky server
     4
     5 -- Daniel Duran Vecino <daduve@gmail.com>  Thu, 09 Jun 2016 14:45:16 +0200
     6
    17lliurex-conky (0.61) xenial; urgency=high
    28
  • lliurex-conky/trunk/fuentes/lliurex-conky.install-files/usr/share/lliurex-conky/conkyrc_admins

    r1598 r1892  
    22# conkyrc_admins
    33#
    4 # author : Daniel Durán
     4# author : Daniel Duran
    55# version : xenial
    66# license : Distributed under the terms of GNU GPL version 2 or later
     
    1111own_window_class Conky
    1212own_window_type desktop
    13 own_window_transparent yes
     13#own_window_transparent yes
    1414#own_window_colour grey
    1515own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    1616own_window_title LLIUREX_CONKY
    17 #own_window_argb_visual yes
    18 #own_window_argb_value 240
     17own_window_argb_visual yes
     18own_window_argb_value 150
    1919
    2020
     
    3030alignment top_right
    3131gap_x 10
    32 gap_y 130
     32gap_y 170
    3333
    3434cpu_avg_samples 5
     
    4545
    4646# Alpha of Xft font. Must be a value at or between 1 and 0 ###
    47 xftalpha 0.8
     47xftalpha 0.6
    4848# Force UTF8? requires XFT ###
    4949override_utf8_locale yes
     
    5353
    5454draw_outline no #### <<<<<<---------------- Amplifies text if yes
    55 #default_outline_color black
    56 default_outline_color 00FFFF
     55default_outline_color black
    5756
    5857uppercase no
     
    7473#color9 FF0000 #255   0   0     Red
    7574
    76 default_color 00ffff
    77 
    7875#####################################################  End Color Settings  ###
    7976###  Borders Section  ########################################################
     
    9289
    9390# Boolean value, if true, Conky will be forked to background when started.
    94 background no
     91background yes
    9592
    9693# Adds spaces around certain objects to stop them from moving other things
     
    122119##############################################  End Miscellaneous Section 
    123120
    124 default_color 00ffff
    125 xftfont DejaVu Sans Mono:size=10
     121
     122xftfont Debian bold:size=10
    126123###################
    127124####  TEMPLATES   ######
    128125###################
    129126
    130 template0 ${font AvantGardeLTMedium:bold:size=10}${color FF8C00}\1 ${hr 2}$color${font}${voffset 1}
     127
     128
    131129template1 USED \1: ${fs_used_perc \1}% ${alignr\ 80}${fs_bar\ \1}
    132130template2 ${\1 name \2}${alignr}${\1 \3 \2} %
    133131template3 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}\nDLS:${downspeed \1} kb/s\nULS:${upspeed \1} kb/s$endif
    134132template4 ${if_up \1}${template0 \2}\ndown $alignr ${downspeed \1}/s\nup $alignr ${upspeed \1}/s\ntotal down$alignr${totaldown \1}\ntotal up $alignr${totalup \1}$endif
    135 template5  MIRROR \1:${exec cat /tmp/mirror_version.txt | grep 'VERSION \1' | cut -d ":" -f2 | xargs}
    136 template6  MIRROR DUAL:${exec cat /tmp/mirror_version.txt | grep 'VERSION 32' | cut -d ":" -f2 | xargs}
     133template5 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}\nDLS:${downspeed \1} kb/s$endif
     134template6 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}\nULS:${upspeed \1} kb/s$endif
     135template7 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}$endif
     136template8  MIRROR \1:${exec cat /tmp/mirror_version.txt | grep 'VERSION \1' | cut -d ":" -f2 | xargs}
     137template9  MIRROR DUAL:${exec cat /tmp/mirror_version.txt | grep 'VERSION 32' | cut -d ":" -f2 | xargs} default_color white
     138template0 ${font AvantGardeLTMedium:bold:size=10}${color dodgerblue3}\1 ${hr 2}$color${font}${voffset 1}
     139TEXT
     140$color${font}${font AvantGardeLTMedium::size=38}$alignc${time %H:%M}$font$color${font AvantGardeLTMedium:size=15}
     141$alignc${time %a}, ${time %d %b %Y}$font$color
    137142
    138 
    139 TEXT
    140143${template0 DATOS}
    141144USUARIO: $LOGNAME
    142145EQUIPO: $nodename
    143 CLIENTE: ${if_match ${exec grep "server" /tmp/conky-test.txt -c}!=0}${if_empty ${exec echo $DISPLAY | cut -d ":" -f 1}}Servidor${else}Ligero${endif}${else}${if_match ${exec grep "client" /tmp/conky-test.txt -c}!=0}${if_empty ${exec cat /tmp/conky-test-fat.txt | grep true }}Pesado${else}Semiligero${endif}${else}Desktop${endif}${endif}
     146CLIENTE: ${if_match ${exec grep "server" /tmp/conky-test.txt -c}!=0}${if_empty ${exec echo $DISPLAY | cut -d ":" -f 1}}Servidor${else}Ligero${endif}${else}${if_match ${exec grep "client" /tmp/conky-test.txt -c}!=0}${if_empty ${exec cat /tmp/conky-test-fat.txt | grep true }}Pesado${else}Semiligero${endif}${else}Escritorio${endif}${endif}
    144147ARQUITECTURA: ${if_match ${exec grep "x86_64" /tmp/architecture.txt -c}!=0}64 Bits${else}32 Bits${endif}
    145 VERSION: ${exec /usr/bin/lliurex-version -n}
    146 ${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}
    147 ${if_match ${fs_used_perc /}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full}${else}${endif}
    148 # SYS
    149 ${template0 SYSTEM}
     148VERSIÓN: ${if_existing /usr/share/lliurex-cdd/version}${exec cat /usr/share/lliurex-cdd/version}${endif}
     149${template0 SISTEMA}
    150150Kernel $alignr $kernel
    151 Uptime $alignr $uptime
    152 
    153 # CPU
     151T. encendido $alignr $uptime
    154152${template0 CPU}
    155153${exec cat /proc/cpuinfo | grep 'model name' | cut -c 14-42 | uniq }
    156154$cpu % ${cpubar}
    157 ${cpugraph}
    158 # RAM
    159155${template0 RAM}
    160 RAM Usage: $mem/$memmax
     156Uso de RAM: $mem/$memmax
    161157$memperc% $membar
    162 SWAP Usage:$swap/$swapmax
     158Uso de SWAP:$swap/$swapmax
    163159$swapperc% ${swapbar}
    164 
    165 # NETWORK
    166 #IP: ${addrs eth0}
    167 ${template3 eth0 ETH0}${template3 wlan0 WLAN0}
    168 ${template3 eth1 ETH1}${template3 wlan1 WLAN1}
    169 ${template3 eth2 ETH2}${template3 wlan2 WLAN2}
    170 # HDD
    171 ${template0 HDD}
    172 ${template1 /}
    173 ${if_mounted /net${template1 /net}}${if_match ${fs_used_perc /net}>=95}${execi 100 /usr/share/lliurex-conky/hdd_full_net}${else}${endif}$endif
     160${template7 eth0 ETH0}${template7 wlan0 WLAN0}
     161${template7 eth1 ETH1}${template7 wlan0+1 WLAN0+1}
     162${template0 Disco Duro}
     163${if_mounted /}${template1 /}${if_match ${fs_used_perc /}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full}${else}${endif}$endif
     164${if_mounted /net}${template1 /net}${if_match ${fs_used_perc /net}>=91}${execi 1000 /usr/share/lliurex-conky/hdd_full_net}${else}${endif}$endif
  • lliurex-conky/trunk/fuentes/lliurex-conky.install-files/usr/share/lliurex-conky/conkyrc_admins_base

    r1598 r1892  
    22# conkyrc_admins
    33#
    4 # author : Daniel Durán
     4# author : Daniel Duran
    55# version : xenial
    66# license : Distributed under the terms of GNU GPL version 2 or later
     
    1111own_window_class Conky
    1212own_window_type desktop
    13 own_window_transparent yes
     13#own_window_transparent yes
    1414#own_window_colour grey
    1515own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    1616own_window_title LLIUREX_CONKY
    17 #own_window_argb_visual yes
    18 #own_window_argb_value 240
     17own_window_argb_visual yes
     18own_window_argb_value 150
    1919
    2020
     
    3030alignment top_right
    3131gap_x 10
    32 gap_y 130
     32gap_y 170
    3333
    3434cpu_avg_samples 5
     
    4545
    4646# Alpha of Xft font. Must be a value at or between 1 and 0 ###
    47 xftalpha 0.8
     47xftalpha 0.6
    4848# Force UTF8? requires XFT ###
    4949override_utf8_locale yes
     
    8989
    9090# Boolean value, if true, Conky will be forked to background when started.
    91 background no
     91background yes
    9292
    9393# Adds spaces around certain objects to stop them from moving other things
     
    120120
    121121
    122 xftfont DejaVu Sans Mono:size=10
     122xftfont Debian bold:size=10
    123123###################
    124124####  TEMPLATES   ######
    125125###################
     126
    126127
    127128
     
    130131template3 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}\nDLS:${downspeed \1} kb/s\nULS:${upspeed \1} kb/s$endif
    131132template4 ${if_up \1}${template0 \2}\ndown $alignr ${downspeed \1}/s\nup $alignr ${upspeed \1}/s\ntotal down$alignr${totaldown \1}\ntotal up $alignr${totalup \1}$endif
    132 template5  MIRROR \1:${exec cat /tmp/mirror_version.txt | grep 'VERSION \1' | cut -d ":" -f2 | xargs}
    133 template6  MIRROR DUAL:${exec cat /tmp/mirror_version.txt | grep 'VERSION 32' | cut -d ":" -f2 | xargs}
    134 
     133template5 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}\nDLS:${downspeed \1} kb/s$endif
     134template6 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}\nULS:${upspeed \1} kb/s$endif
     135template7 ${if_up \1}${template0 \2}\nIP  ${alignr 9} ${addrs \1}$endif
     136template8  MIRROR \1:${exec cat /tmp/mirror_version.txt | grep 'VERSION \1' | cut -d ":" -f2 | xargs}
     137template9  MIRROR DUAL:${exec cat /tmp/mirror_version.txt | grep 'VERSION 32' | cut -d ":" -f2 | xargs}
  • lliurex-conky/trunk/fuentes/lliurex-conky.install-files/usr/share/lliurex-conky/conkyrc_gui

    r1633 r1892  
    1111CONKYRC_USED=$FILE_PATH/conkyrc_used
    1212
    13 TEXT_COLOUR="black"
     13TEXT_COLOUR="white"
    1414READED=TRUE
    1515
     
    8787MSG_SEMILIGERO_PANEL=$(gettext "Semithin")
    8888MSG_DESKTOP_PANEL=$(gettext "Desktop")
    89 
     89MSG_COLOUR_QUESTION=$(gettext "Do you want to change colour fonts or use default mode?")
     90MSG_BOTON_COLOR_OK=$(gettext "DEFAULT")
     91MSG_BOTON_COLOR_CANCEL=$(gettext "CHANGE")
     92MSG_TIME=$(gettext "TIME")
     93MSG_TIME_DESC=$(gettext "You can show the time with this clock in the desktop")
     94MSG_DATE=$(gettext "DATE")
     95MSG_DATE_DESC=$(gettext "You can show the date in your desktop")
     96MSG_SHADE=$(gettext "TRANSPARENT")
     97MSG_SHADE_DESC=$(gettext "You eliminate the shadow in Conky desktop")
    9098
    9199
     
    228236        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" \
    229237                                $READED "USUARIO" "$MSG_USER" "$MSG_USER_DESC" \
     238                                TRUE "HORA" "$MSG_TIME" "$MSG_TIME_DESC" \
     239                                TRUE "DIA" "$MSG_DATE" "$MSG_DATE_DESC" \
    230240                                TRUE "EQUIPO" "$MSG_HOSTNAME" "$MSG_HOSTNAME_DESC" \
    231241                                TRUE "CLIENTE" "$MSG_CLIENT" "$MSG_CLIENT_TYPE" \
     
    238248                                TRUE "CPU_TYPE" "$MSG_CPU_TYPE" "$MSG_CPU_TYPE" \
    239249                                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" \
    241251                                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" \
    243253                                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" \
    245255                                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" \
    248258                                TRUE "HDD_USED" "$MSG_HDD_USED" "$MSG_HDD_USED_DESC" \
     259                                FALSE "SHADE" "$MSG_SHADE" "$MSG_SHADE_DESC" \
    249260                                --separator=":"`
    250261        cancelar $?
     
    335346
    336347function 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=DEFAULT
    338         if [[  $? =  0 ]]; then
     348        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
    339350                if [[ $SOY = "CLIENTE" ]]; then
    340351                        text_colour_client
     
    346357                        SELECTION_COLOUR="white"
    347358                else
    348                         SELECTION_COLOUR2="FF8C00"
    349                         SELECTION_COLOUR="black"
     359                        SELECTION_COLOUR2="dodgerblue3"
     360                        SELECTION_COLOUR="white"
    350361                fi
    351362               
     
    369380        #echo "">>$CONKYRC_USED
    370381       
     382       
    371383        ##DETERMINAMOS LOS COLORES DE LAS FUENTES
    372384        echo ' default_color '$SELECTION_COLOUR' ' >> $CONKYRC_USED
    373385        echo 'template0 ${font AvantGardeLTMedium:bold:size=10}${color '$SELECTION_COLOUR2'}\1 ${hr 2}$color${font}${voffset 1}' >>  $CONKYRC_USED
    374386       
     387        #FONDO TRANSPARENTE O NO
     388        if [[ $SELECTION == *SHADE* ]] ; then echo 'own_window_transparent yes' >> $CONKYRC_USED; echo '' >> $CONKYRC_USED; fi
     389       
    375390        ##COMIENZA LA CONFIGURACION
    376391        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
    377394               
    378395        ####DATOS INICIALES####
     
    383400        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
    384401        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
    387407        ####SYSTEMA####
    388         if [[ $SELECTION == *HDD_ALERT* ]] ; then echo "No blank added";else echo "">> $CONKYRC_USED;fi
    389408        if [[ $SELECTION == *KERNEL* ]] || [[ $SELECTION == *UPTIME* ]] ;  then echo '${template0 '$MSG_SYSTEM_PANEL'}' >> $CONKYRC_USED;fi
    390409        if [[ $SELECTION == *KERNEL* ]] ; then echo 'Kernel $alignr $kernel' >> $CONKYRC_USED;fi
    391410        if [[ $SELECTION == *UPTIME* ]] ; then echo ''$MSG_UPTIME_PANEL' $alignr $uptime' >> $CONKYRC_USED;fi
    392411        ####CPU####
    393         if [[ $SELECTION == *CPU* ]] ;  then echo "">> $CONKYRC_USED; echo '${template0 CPU}' >> $CONKYRC_USED;fi
     412        if [[ $SELECTION == *CPU* ]] ;  then echo '${template0 CPU}' >> $CONKYRC_USED;fi
    394413        if [[ $SELECTION == *CPU_TYPE* ]] ; then echo "\${exec cat /proc/cpuinfo | grep 'model name' | cut -c 14-42 | uniq }" >> $CONKYRC_USED;fi
    395414        if [[ $SELECTION == *CPU_BAR* ]] ; then echo '$cpu % ${cpubar}' >> $CONKYRC_USED;fi
    396415        if [[ $SELECTION == *CPU_GRAPH* ]] ; then
    397416                echo '${cpugraph}' >> $CONKYRC_USED;
    398         else
    399                 echo "">> $CONKYRC_USED
    400417        fi
    401418        ####RAM####
    402419        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;fi
    404         if [[ $SELECTION == *RAM_BAR* ]] ; then echo '$memperc% $membar' >> $CONKYRC_USED;fi
    405         if [[ $SELECTION == *SWAP_USAGE* ]] ; then echo ''$MSG_SWAP_USAGE_PANEL':$swap/$swapmax' >> $CONKYRC_USED;fi
    406         if [[ $SELECTION == *SWAP_BAR* ]] ; then echo '$swapperc% ${swapbar}' >> $CONKYRC_USED;fi
     420        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
    407424        ####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
    412459        fi
    413460        ####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
    418468        sed -i '1s/^/#modified_by_user\n/'  $CONKYRC_USED
    419469       
Note: See TracChangeset for help on using the changeset viewer.