You are not logged in.

#1 2011-06-23 20:29:45

Nimbus
Member
From: Ivalice
Registered: 2011-03-30
Posts: 67

Few issues with conky.

Here's what I want to do, and I'm not sure if it's possible.

I would like my battery bar to change color depending on how much battery is left.

If Battery = 100%-60% Color = Green
If Battery = 60%-40% Color = Yellow
If Battery = 40%-20% Color = Orange
If Battery = Any lower than 20% Color = Red

Here's the line in question.

Battery: ${battery_percent BAT0}% (${battery_time BAT0}) ${alignr}${battery_bar 8,60 BAT0}

I haven't been able to find a way to do this yet, also I have this obnoxious gap down at the bottom of my conky config, under the Weather section. Here's a picture of the problematic config

tOTc5Zg

As you'll see there is a massive gap at the bottom that never seems to get cropped. I can add stuff down there, but it just pushes the gap further, it's kinda annoying. Ignore the second battery meter down there, not quite sure what it is doing there.

Here's my config, I'm hoping someone can help me with it.

My misbehaving config
# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check [url]http://conky.sf.net[/url] for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# [url]http://crunchbanglinux.org/forums/topic/59/my-conky-config/[/url]
#
# For help with conky, please see:
# [url]http://crunchbanglinux.org/forums/topic/2047/conky-help/[/url]
#
# Enjoy! :)
##############################################
#  Settings
##############################################
background yes
use_xft yes
xftfont cure:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent no #originally yes
own_window_type desktop
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 50
double_buffer yes
text_buffer_size 2048
minimum_size 180 200
maximum_width 200
draw_shades no
draw_outline yes #Old no
draw_borders yes
draw_graph_borders no
default_color FFFFFF #last one was 670802 #Oldest was f4f6f6
default_shade_color 475347
default_outline_color 000000
alignment top_left
gap_x 4
gap_y 60
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
##############################################
#  Output
##############################################
TEXT

S Y S T E M    I N F O
${hr}

Host:$alignr$nodename

Linux:${alignr}Arch $kernel

Uptime:$alignr$uptime

RAM:$alignr$mem/$memmax

Swap usage:$alignr$swap/$swapmax

${color ffffff}Disk usage ${color ff7263}(Root): ${color ffffff}$alignr${fs_used /}/${fs_size /}

${color ffffff}Disk usage ${color 74c2ff}(Home): ${color ffffff}$alignr${fs_used /home}/${fs_size /home} 

${color ffffff}Disk usage ${color fffca1}(Temp): ${color ffffff}$alignr${fs_used /tmp}/${fs_size /tmp}

CPU (1) usage:$alignr${cpu cpu0}% ${alignr}${cpubar 8,60 CPU0}

CPU (2) usage:$alignr${cpu cpu1}% ${alignr}${cpubar 8,60 CPU1}

Battery: ${battery_percent BAT0}% (${battery_time BAT0}) ${alignr}${battery_bar 8,60 BAT0}

T O P        P R O C E S S E S
${hr}
NAME $alignr PID    CPU
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6}
${top name 7} $alignr ${top pid 7} ${top cpu 7}
${top name 8} $alignr ${top pid 8} ${top cpu 8}
${top name 9} $alignr ${top pid 9} ${top cpu 9}
${top name 10} $alignr ${top pid 10} ${top cpu 10}

W E A T H E R  
${hr}

${voffset -5}${alignr 56}${font ConkyWeather:style=Bold:size=32}${execi 600 conkyForecast --location=CENSORED1 --imperial --datatype=WF}${font}

${voffset -50}${font Weather:size=32}y${font}  ${voffset -38}${font RadioSpace:size=28}${execi 600 conkyForecast --location=CENSORED1 --imperial --datatype=HT}${font}


${alignc 43}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=DW --startday=1 --shortweekday} ${alignc 8}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=DW --startday=2 --shortweekday} ${alignc -29}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=DW --startday=3 --shortweekday} ${alignc -64}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=DW --startday=4 --shortweekday}
${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
${font DejaVu Sans:size=7}${alignc 10}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -14}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -40}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 10}${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=CENSORED1 --imperial --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
${voffset 4}Location:${alignr}${execi 600 conkyForecast --location=CENSORED1 --imperial --datatype=CN}
Last Updated: ${alignr} ${execi 600 conkyForecast --location=CENSORED1 --imperial --hideunits --datatype=LU -m 0 }
Feels Like:${alignr}${execi 600 conkyForecast --location=CENSORED1 --imperial --datatype=LT}
Dew Point: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --imperial --datatype=DP}
Current Condition:${alignr}${execi 600 conkyForecast --location=CENSORED1 --datatype=CC}
Chance of Precip: ${alignr}${execi 600 conkyForecast  --location=CENSORED1 --imperial --startday=0 --datatype=PC}
Humidity: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --datatype=HM}
Wind: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --datatype=WS --imperial} - ${execi 600 conkyForecast --location=CENSORED1 --datatype=WD}
Pressure: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --hideunits --datatype=BR}
Visibility: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --datatype=VI --imperial}
Sunrise: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --datatype=SR}
Sunset: ${alignr}${execi 600 conkyForecast --location=CENSORED1 --datatype=SS}
Moon Phase:${alignr 8}${execi 600 conkyForecast --location=CENSORED1 --datatype=MP} ${font MoonPhases:size=8}${execi 600 conkyForecast --location=CENSORED1 --datatype=MF}${font}

..wow, code tags does make it look neater and cleaner. Thanks for the tip.

Last edited by Nimbus (2011-06-23 20:44:50)


Genius may have its limitations, but stupidity is not thus handicapped.
        -- Elbert Hubbard
OpenBox3 + KDE4.6 + Xfce4.8 User

Offline

#2 2011-06-23 20:32:50

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Few issues with conky.

Please use code tags instead of making threads long !!!


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-06-23 20:43:36

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Few issues with conky.

1. See if_match in the conky manual.
2. When conky calculates the space needed (height), it ignores voffsets. Try replacing a few newlines with `${goto 0}${voffset <line height>}`.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#4 2011-06-23 20:51:15

Nimbus
Member
From: Ivalice
Registered: 2011-03-30
Posts: 67

Re: Few issues with conky.

Stebalien wrote:

1. See if_match in the conky manual.
2. When conky calculates the space needed (height), it ignores voffsets. Try replacing a few newlines with `${goto 0}${voffset <line height>}`.

When you mean <line height> does that mean the line number in gedit when I'm editing it. I'm kinda confused here.


Genius may have its limitations, but stupidity is not thus handicapped.
        -- Elbert Hubbard
OpenBox3 + KDE4.6 + Xfce4.8 User

Offline

Board footer

Powered by FluxBB