Break long lines (en)

From Conky PitStop

Revision as of 20:29, 11 August 2011 by Wlourf (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Break long lines

 Language   English   Français   


With some conkys - a single line across the screen - that one line can get really long and you loose track of things as your text editor keeps scrolling to the right. Editing it can make it a bit difficult as well.

TEXT
Pkg ${texeci 3600 ~/.arp_setups/bin/list-upgrade.sh} up ${goto 150}BAT ${battery_bar 8,40 BAT0} $battery ${goto 380}hdd:${ibm_temps 2}  cpu:${ibm_temps 0}  gpu:${ibm_temps 3}${goto 570}vol ${if_match "$ibm_volume" == "mute"}mute${else}${ibm_volume}/14${endif} - pcm ${mixer PCM}%${goto 760}R/W ${diskiograph 8,40} $diskio/s${goto 920}HDD ${fs_bar 8,40 /} ${fs_used_perc /}%${goto 1028}${if_up eth0} DL ${downspeedgraph 8,40 eth0} ${downspeed eth0}/s${goto 1180}UP ${upspeedgraph 8,40 eth0} ${upspeed eth0}/s${goto 1320}gMail ${texeci 120 python ~/bin/gmail.py}${else}  no connection${endif}${goto 1400}CPU ${cpugraph 8,40} $cpu% > ${top name 1}${goto 1600}RAM ${membar 8,40} $memperc% > ${top_mem name 1}${goto 1818}LOAD $loadavg${alignr 1}${time %a %d %b  %I:%M}

Now you can put each conky command on seperate line after TEXT but have it display as a single line.

arpinux on the #! French forums shows a perfect example of how you can with the backslash (\)

[== conkyrc ==]
background yes
use_xft yes
xftfont Terminus:pixelsize=9
xftalpha 0.8
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent no
own_window_colour 161616
own_window_type override
own_window_title Infos System
own_window_hints undecorated,below,sticky
double_buffer yes
minimum_size 2048 0
maximum_width 2048
draw_shades no
draw_outline no
draw_borders no
border_inner_margin 0
border_width 1
draw_graph_borders yes
default_color grey40
default_shade_color black
default_outline_color white
alignment tr
gap_x 0
gap_y 0
no_buffers yes
uppercase no
text_buffer_size 1024
cpu_avg_samples 2
show_graph_scale no
show_graph_range no
short_units yes
override_utf8_locale yes
use_spacer none
if_up_strictness address
##############################################
#  Output
##############################################
TEXT
Pkg ${texeci 3600 ~/.arp_setups/bin/list-upgrade.sh} up\
${goto 150}BAT ${battery_bar 8,40 BAT0} $battery\
${goto 380}hdd:${ibm_temps 2}  \
cpu:${ibm_temps 0}  \
gpu:${ibm_temps 3}\
${goto 570}vol ${if_match "$ibm_volume" == "mute"}mute${else}${ibm_volume}/14${endif} - pcm ${mixer PCM}%\
${goto 760}R/W ${diskiograph 8,40} $diskio/s\
${goto 920}HDD ${fs_bar 8,40 /} ${fs_used_perc /}%\
${goto 1028}${if_up eth0} DL ${downspeedgraph 8,40 eth0} ${downspeed eth0}/s\
${goto 1180}UP ${upspeedgraph 8,40 eth0} ${upspeed eth0}/s\
${goto 1320}gMail ${texeci 120 python ~/bin/gmail.py}${else}  no connection${endif}\
${goto 1400}CPU ${cpugraph 8,40} $cpu% > ${top name 1}\
${goto 1600}RAM ${membar 8,40} $memperc% > ${top_mem name 1}\
${goto 1818}LOAD $loadavg\
${alignr 1}${time %a %d %b  %I:%M}

Take a look:

Arpinux banner.png

15 lines after TEXT displayed as one. Nice work arpinux.

And then another #! French forums user, Fenouille84, says we can use "#" as well.

TEXT
Pkg ${texeci 3600 ~/.arp_setups/bin/list-upgrade.sh} up#
${goto 150}BAT ${battery_bar 8,40 BAT0} $battery#
${goto 380}hdd:${ibm_temps 2}  #
cpu:${ibm_temps 0}  #
gpu:${ibm_temps 3}#
${goto 570}vol ${if_match "$ibm_volume" == "mute"}mute${else}${ibm_volume}/14${endif} - pcm ${mixer PCM}%#
${goto 760}R/W ${diskiograph 8,40} $diskio/s#
${goto 920}HDD ${fs_bar 8,40 /} ${fs_used_perc /}%#
${goto 1028}${if_up eth0} DL ${downspeedgraph 8,40 eth0} ${downspeed eth0}/s#
${goto 1180}UP ${upspeedgraph 8,40 eth0} ${upspeed eth0}/s#
${goto 1320}gMail ${texeci 120 python ~/bin/gmail.py}${else}  no connection${endif}#
${goto 1400}CPU ${cpugraph 8,40} $cpu% > ${top name 1}#
${goto 1600}RAM ${membar 8,40} $memperc% > ${top_mem name 1}#
${goto 1818}LOAD $loadavg#
${alignr 1}${time %a %d %b  %I:%M}

Nice stuff guys. One line conkys made easier!

Personal tools
Namespaces
Variants
Actions
Navigation
English
Français
Toolbox