You are not logged in.
WaltH wrote:Okay, I have my Google Calendar agenda inported into Conky. I need to play with the file to see if I can tweak the colors of the displayed information so they fit fit my overall Conky theme.
Would you mind sharing your code and perhaps a screenshot?
I'm sure other forum users would be interested
In fact, we have a whole thread for just for that:
https://forums.bunsenlabs.org/viewtopic.php?id=512Also, if you consider your problems to be resolved please add [SOLVED] to the thread title.
I'll be glad to share both. I'm not sure the problem is resolved on my end as yet. I haven't been able to experiment with trying to get the rss headlines to wrap. (I may give up on making them clickable, as that seems way over my head.)
I'm guessing the screenshot should go into the thread you linked, but here is the code from my .conkyrc:
conky.config = {
alignment = 'top_right',
background = false,
short_units = true,
pad_percents = 0,
cpu_avg_samples = 1,
net_avg_samples = 2,
out_to_console = false,
--#font = '8x12',
use_xft = true,
font = 'trebuchetms:bold:size=9',
xftalpha = 0.1,
override_utf8_locale = true,
text_buffer_size = 4352,
max_user_text = 32768,
own_window = true,
own_window_type = 'normal',
own_window_argb_visual = true,
own_window_argb_value = 255,
own_window_transparent = true,
own_window_class = 'conky-semi',
own_window_colour = '355656',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
imlib_cache_size = 2,
update_interval = 1,
total_run_times = 0,
double_buffer = true,
minimum_width = 300,
minimum_height = 1200,
maximum_width = 350,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
border_inner_margin = 5,
out_to_x = true,
out_to_console = false,
out_to_ncurses = false,
--# default_color = 'white',
--# default_shade_color = 'white',
--# default_outline_color = 'white',
color1 = '370808',
color2 = 'ffffff',
color3 = 'b62424',
color4 = 'ffbc6a',
color5 = 'a18585',
color6 = '801919',
color7 = '660000',
color8 = 'D43D1A',
color9 = '2B4F81',
stippled_borders = 0,
gap_x = 5, --# Left/Right
gap_y = 10, --# Top/Bottom
top_name_width = 15,
use_spacer = 'right',
no_buffers = true,
if_up_strictness = 'address',
uppercase = false,
temperature_unit = 'fahrenheit',
}
--## boinc (seti) dir
--## seti_dir /opt/seti
--## Possible variables to be used:
--##
--## Variable Arguments Description
--## acpiacadapter ACPI ac adapter state.
--## acpifan ACPI fan state
--## acpitemp ACPI temperature.
--## adt746xcpu CPU temperature from therm_adt746x
--## adt746xfan Fan speed from therm_adt746x
--## battery (num) Remaining capasity in ACPI or APM
--## battery. ACPI battery number can be
--## given as argument (default is BAT0).
--## buffers Amount of memory buffered
--## cached Amount of memory cached
--## color (color) Change drawing color to color
--## cpu CPU usage in percents
--## cpubar (height) Bar that shows CPU usage, height is
--## bar's height in pixels
--## downspeed net Download speed in kilobytes
--## downspeedf net Download speed in kilobytes with one
--## decimal
--## exec shell command Executes a shell command and displays
--## the output in torsmo. warning: this
--## takes a lot more resources than other
--## variables. I'd recommend coding wanted
--## behaviour in C and posting a patch :-).
--## execi interval, shell Same as exec but with specific interval.
--## command Interval can't be less than
--## update_interval in configuration.
--## fs_bar (height), (fs) Bar that shows how much space is used on
--## a file system. height is the height in
--## pixels. fs is any file on that file
--## system.
--## fs_free (fs) Free space on a file system available
--## for users.
--## fs_free_perc (fs) Free percentage of space on a file
--## system available for users.
--## fs_size (fs) File system size
--## fs_used (fs) File system used space
--## hr (height) Horizontal line, height is the height in
--## pixels
--## i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
--## may be omitted if you have only one I2C
--## device. type is either in (or vol)
--## meaning voltage, fan meaning fan or temp
--## meaning temperature. n is number of the
--## sensor. See /sys/bus/i2c/devices/ on
--## your local computer.
--## kernel Kernel version
--## loadavg (1), (2), (3) System load average, 1 is for past 1
--## minute, 2 for past 5 minutes and 3 for
--## past 15 minutes.
--## machine Machine, i686 for example
--## mails Mail count in mail spool. You can use
--## program like fetchmail to get mails from
--## some server using your favourite
--## protocol. See also new_mails.
--## mem Amount of memory in use
--## membar (height) Bar that shows amount of memory in use
--## memmax Total amount of memory
--## memperc Percentage of memory in use
--## new_mails Unread mail count in mail spool.
--## nodename Hostname
--## outlinecolor (color) Change outline color
--## pre_exec shell command Executes a shell command one time before
--## torsmo displays anything and puts output
--## as text.
--## processes Total processes (sleeping and running)
--## running_processes Running processes (not sleeping),
--## requires Linux 2.6
--## shadecolor (color) Change shading color
--## stippled_hr (space), Stippled (dashed) horizontal line
--## (height)
--## swapbar (height) Bar that shows amount of swap in use
--## swap Amount of swap in use
--## swapmax Total amount of swap
--## swapperc Percentage of swap in use
--## sysname System name, Linux for example
--## time (format) Local time, see man strftime to get more
--## information about format
--## totaldown net Total download, overflows at 4 GB on
--## Linux with 32-bit arch and there doesn't
--## seem to be a way to know how many times
--## it has already done that before torsmo
--## has started.
--## totalup net Total upload, this one too, may overflow
--## updates Number of updates (for debugging)
--## upspeed net Upload speed in kilobytes
--## upspeedf net Upload speed in kilobytes with one
--## decimal
--## uptime Uptime
--## uptime_short Uptime in a shorter format
--##
--## seti_prog Seti@home current progress
--## seti_progbar (height) Seti@home current progress bar
--## seti_credit Seti@hoome total user credit
--## antiX additives examples. Add below Text ##
--## Battery examples ##
--# ${color}battery: ${color}$acpiacadapter, ${battery_percent BAT1}%
--# ${color}battery:${color} ${battery}
--# ${color}ACPI Battery: ${color}$battery
--# ${battery_bar 11,0}
--## Wireless example ##
--# ${color}Wireless:
--# ${color}essid: ${wireless_essid wlan0}
--# ${color}IP:${color} ${addr wlan0}
--# ${color}speed: ${color} ${wireless_bitrate wlan0}
--# ${color}link strength: ${color} ${wireless_link_bar 7,50 wlan0}
--## stuff after 'TEXT' will be formatted on screen
conky.text = [[
${execi 600 bash /home/walt/1a_accuweather_conkyweather_font/1a}
${image /home/walt/Walt_Wallpapers/peppermint7_logo_small_250w.png -p 0}
${color4}${font GeosansLight:size=18}${time %I:%M %p}
${color4}${font GeosansLight:size=12}${time %A, %B %d, %Y}
${color2}${font GeosansLight:Bold:size=8}${exec disp=${DISPLAY#:}; disp=${disp%.[0-9]}; cat /home/walt/.desktop-session/desktop-code.$disp 2>/dev/null}
${color2}${execi 60 xdpyinfo | sed -n -r "s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"}
${color2}$kernel
${color2}Uptime: $uptime
${image /home/walt/1a_accuweather_conkyweather_font/Weather-Sun-icon2.png -p 0, 166}
${color1}${font Cantarell:Bold:size=11} Boise Weather ${hr 2}
${color2}${font conkyweather:Bold:size=24}${offset 10}${execi 600 sed -n '2p' /home/walt/1a_accuweather_conkyweather_font/curr_cond}${color4}${font Cantarell:Bold:size=9}${goto 75}${voffset -27}CURRENTLY: ${execpi 600 sed -n '4p' /home/walt/1a_accuweather_conkyweather_font/curr_cond}° F
${goto 75}${execpi 600 sed -n '3p' /home/walt/1a_accuweather_conkyweather_font/curr_cond|fold -w30}
${color2}${font conkyweather:Bold:size=24}${offset 10}${execi 600 sed -n '2p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}${color4}${font Cantarell:Bold:size=9}${goto 75}${voffset -27}${execpi 600 sed -n '1p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}: ${execpi 600 sed -n '4p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}/${execpi 600 sed -n '5p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}° F
${goto 75}${execpi 600 sed -n '3p' /home/walt/1a_accuweather_conkyweather_font/tod_ton|fold -w30}
${color2}${font conkyweather:Bold:size=24}${offset 10}${execi 600 sed -n '7p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}${color4}${font Cantarell:Bold:size=9}${goto 75}${voffset -27}${execpi 600 sed -n '6p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}: ${execpi 600 sed -n '9p' $HOME/1a_accuweather_conkyweather_font/tod_ton}/${execpi 600 sed -n '10p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}° F
${goto 75}${execpi 600 sed -n '8p' /home/walt/1a_accuweather_conkyweather_font/tod_ton|fold -w30}
${color2}${font conkyweather:Bold:size=24}${offset 10}${execi 600 sed -n '12p' /home/walt/1a_accuweather_conkyweather_font/tod_ton}${color4}${font Cantarell:Bold:size=9}${goto 75}${voffset -27}${execpi 600 sed -n '11p' $HOME/1a_accuweather_conkyweather_font/tod_ton}: ${execpi 600 sed -n '14p' $HOME/1a_accuweather_conkyweather_font/tod_ton}/${execpi 600 sed -n '15p' $HOME/1a_accuweather_conkyweather_font/tod_ton}° F
${goto 75}${execpi 600 sed -n '13p' $HOME/1a_accuweather_conkyweather_font/tod_ton|fold -w30}
${image /home/walt/1a_accuweather_conkyweather_font/computer-skills-icon.png -p 0,365}${color1}${font Cantarell:Bold:size=11} System ${hr 2}
${color1}${font Cantarell:Bold:size=10}CPU:${alignr}${color2}${font Cantarell:Bold:size=10}${offset -10}${cpu}${color2}% ${color1}${font Cantarell:Bold:size=10}CPU Temp:${alignr}${color2}${font Cantarell:Bold:size=10}${offset -10}${hwmon 1 temp 1}°F
${color1}${font Cantarell:Bold:size=10}Freq:${alignr}${color2}${font Cantarell:Bold:size=10}${alignr}${offset -15}${freq_g} ${color}${alignr}${offset -10}${cpubar cpu0 15, 160 5599cc 5599cc}
${color1}${font Cantarell:Bold:size=10}Disk:${alignr}${color2}${font Cantarell:Bold:size=10}${alignr}${offset -12}${diskio} ${color}${alignr}${offset -10}${diskiograph 15,160 5599cc 5599cc}
## ${if_up eth0}${color}eth0 up: $alignr${color2} ${upspeed eth0}
## ${color}$alignr${upspeedgraph eth0 20,170 5599cc 5599cc}
## ${color}eth0 down: $alignr${color2} ${downspeed eth0}
## ${color2}$alignr${downspeedgraph eth0 20,170 5599cc 5599cc}${endif}
${color1}${font Cantarell:Bold:size=10}${wireless_essid wlp3s0}$alignr${color2}${font Cantarell:Bold:size=10}${offset -10}${wireless_link_qual_perc wlp3s0}%
${color1}${font Cantarell:Bold:size=10}wlp3s0 up: $alignr${color2}${font Cantarell:Bold:size=10}${offset -10}${upspeed wlp3s0} ${color1}${font Cantarell:Bold:size=10}wlp3s0 down: $alignr${color2}${font Cantarell:Bold:size=10}${offset -10}${downspeed wlp3s0}
${color}${color1}${font Cantarell:Bold:size=10}${voffset 10}${offset 50}Used / Total${alignr}${offset -5}Used / Total
${color1}${voffset 2}RAM:${offset 20}${color2}$mem${color2}/${color2}$memmax${color1}${alignr}${offset -20}SWAP: ${offset 10}${color2}$swap${color2}/${color2}$swapmax
${color1}DISK:${offset 20}${color2}${fs_used /}${color2}/${color2}${fs_size /}${color1}${alignr}${offset -20}HOME:${offset 15}${color2}${fs_used /home}${color2}/${color2}${fs_size /home}
${image /home/walt/1a_accuweather_conkyweather_font/bbc.png -p 0,588}${color1}${font Cantarell:Bold:size=11} Headlines ${hr 2}
${color1}${font Cantarell:Bold:size=9}${voffset 10}${rss http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml 2 item_titles 5}
${image /usr/share/icons/Peppermix-7/32x32/apps/calendar.png -p 0,716}${color1}${font Cantarell:Bold:size=11} Calendar ${hr 2}
${voffset -10}${color4}${font Cantarell:Bold:size=9}${execpi 300 gcalcli --conky agenda}
]];
I've tried specifying colors for the information pulled from my Google calendar with no success. I think that needs to be changed in the gcalcli file in /usr/bin, which as currently installed is only editable by root, specifically in this section:
def SetConkyColors():
# XXX these colors should be configurable
CLR.conky = True
CLR_NRM.color = ""
CLR_BLK.color = "${color black}"
CLR_BRBLK.color = "${color black}"
CLR_RED.color = "${color red}"
CLR_BRRED.color = "${color red}"
CLR_GRN.color = "${color green}"
CLR_BRGRN.color = "${color green}"
CLR_YLW.color = "${color yellow}"
CLR_BRYLW.color = "${color yellow}"
CLR_BLU.color = "${color blue}"
CLR_BRBLU.color = "${color blue}"
CLR_MAG.color = "${color magenta}"
CLR_BRMAG.color = "${color magenta}"
CLR_CYN.color = "${color cyan}"
CLR_BRCYN.color = "${color cyan}"
CLR_WHT.color = "${color white}"
CLR_BRWHT.color = "${color white}"
What I don't know is whether I can use the same labels I use to define colors as in my .conkyrc file (e.g., color1, color2, etc.) or whether I need to specify the actual color code (e.g., '660000'). I haven't tried editing this as root just yet.
Offline
VinDSL wrote:WaltH wrote:Certainly not as fancy as some of the efforts I've seen here and on the old CrunchBang forums.
Looking great IMO, WaltH !
Thanks! It's coming along, but there is more I'd like to be able to do. I think the information is out there, but sometimes there is so much of it that it is like looking for a needle in a haystack.
Plus, my knowledge level is not advanced enough to always recognize when a piece of code or a piece of another .conkyrc file might be tweaked and made to work for my purposes. But I'll keep looking and reading and tweaking and seeing what I can do.
So, I've gone in a tweaked /usr/bin/gcalcli to reflect the colors in my .conkyrc file, and it now looks like this:
I still need to figure out how/if I can adjust the spacing in the gcalcli output so that all of the agenda entries line up. (Look at the second entry for Thursday to see what I mean.) Or maybe there is a way to have the date on one line and the entries of a new line below the date?
On that subject, I came across a different script for getting Google Calendar information into Conky called conkyGoogleCalendar. Does anyone know if this still works or is still being updated?
Last edited by WaltH (2016-08-23 18:22:09)
Offline
What I don't know is whether I can use the same labels I use to define colors as in my .conkyrc file (e.g., color1, color2, etc.) or whether I need to specify the actual color code (e.g., '660000').
Depending on your taste, it does not matter.
Offline
WaltH wrote:What I don't know is whether I can use the same labels I use to define colors as in my .conkyrc file (e.g., color1, color2, etc.) or whether I need to specify the actual color code (e.g., '660000').
Depending on your taste, it does not matter.
Thanks. I went in and modified the /usr/bin/gcalcli file to use the color1, color2, etc. syntax so that if I modify the colors in Conky, they should then modify in gcalcli.
Offline
I don't know whether to mark this as solved or not. I still can't quite do the two things I ask about in the original post, though I think now one of them is an impossibility (for me, anyway). The second thing (wrapping text from an rss feed so words aren't cut off) will require me to be able to understand the various scripts others have kindly shared and see if I can make something similar for my wants.
If I can figure out how to make one of these scripts work for me, then I can mark this as solved. Along those lines, in the bl-rss script, line 17 is shown as
bunsen_labs_url = "https://forums.bunsenlabs.org/extern.php?action=feed&type=atom"
I'm not sure how I should code my specific rss feed. I'm guessing it would look something like:
bunsen_labs_url = "http://feeds.bbci.co.uk/news/rss.xml?action=feed&type=atom"
Is that correct?
Last edited by WaltH (2016-08-23 19:51:09)
Offline
....Is that correct?
Try it and see
The BBC UK News Home page rss feed is
http://feeds.bbci.co.uk/news/rss.xml?edition=uk#
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
You can find the scripts here:
However, at present the script is nowhere near perfect as parsing output of these forums alone is a non-trivial task, given its international base, along with the fact that conky scripts in code tags nearly always break formatting. The scripts are setup to go into ~/bin and the conky goes into ~/.config/conky. At present this script is only setup to parse BunsenLabs atom feeds and would need modification to parse anything different. The script does have one dependency, feedparser which is available in the Debian repos. It is definitely not yet a complete solution, however. This is the line you would need to place with the link to your BBC feed:
bunsen_labs_url = "https://forums.bunsenlabs.org/extern.php?action=feed&type=atom"
EDIT: Don't change the variable name, just the url, so leave the bunsen_labs_url part alone or the program will break.
You can also do some basic color formatting with the variables color_1 and color_2, define horizontal rule thickness and also most important the number of posts to show. By default, I have set it up to to only show the first 255 characters of a post. It will clip any overflow. Also, in run-rss, where you see the 70, you can define your column width there, It may take some tinkering to get it to look right as we are going from pixels to characters (from conky into fmt). The width I specified in my .conkyrc should work in most cases. Occasionally, the conky window will get a bit wider.
If it breaks, you get to keep all the pieces :cool: As I said, it is a fairly rough draft and is definitely one of those programs I need to go back and do some more work on.
EDIT II: Changed post to reflect proper name of dependency on feedparser.
I was not able to get these scripts to work for me. I will certainly keep trying. Here are the corresponding lines from my .conkyrc:
${image /home/walt/1a_accuweather_conkyweather_font/bbc_news.png -p 0,588}${color1}${font Cantarell:Bold:size=11} Headlines ${hr 2}
${color1}${font Cantarell:Bold:size=9}${voffset 10}${execpi 600 /home/walt/Conky/run-rss}
Here is the run-rss script as I modified it:
#! /bin/bash
$HOME/home/walt/Conky/bl-rss | fmt -t -w 50
exit 0
And here is the section of the bl-rss script I modified to put in my feed:
bunsen_labs_url = "http://feeds.bbci.co.uk/news/rss.xml?action=feed&type=atom"
Does it matter where either the bl-rss or the run-rss script reside as long as the paths pointing to them are correct? I have the bl-rss and the run-rss scripts in /home/walt/Conky, but the run-rss script points to that location.
Offline
WaltH wrote:....Is that correct?
Try it and see
The BBC UK News Home page rss feed is
http://feeds.bbci.co.uk/news/rss.xml?edition=uk#
I tried it with the BBC News World rss feed from
http://feeds.bbci.co.uk/news/world/rss.xml
And I could not make the scripts from tknomanzr work, something I'm sure is down to user error on my part.
Offline
I've found the line I used for the BBC Sport newsfeed in an old conky - maybe it can help you with the command format:
rss http://feeds.bbci.co.uk/sport/rss.xml?output=rss 1 item_titles 6
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I've found the line I used for the BBC Sport newsfeed in an old conky - maybe it can help you with the command format:
rss http://feeds.bbci.co.uk/sport/rss.xml?output=rss 1 item_titles 6
That looks very similar to what I am currently pulling directly into Conky, which does work.
${rss http://feeds.bbci.co.uk/news/world/rss.xml 2 item_titles 5}
It's only a problem when the headline is longer than about 60 characters. (Is there a reason for the ?output=rss? That seems to be the only real difference.) Then the last word cuts off instead of wrapping to a new line. If I don't figure out how to make a long headline wrap to the next line I can likely live with it. I have nearly everything else I want in Conky, including my Google agenda. So I am a pretty happy camper.
Last edited by WaltH (2016-08-24 00:12:14)
Offline
I would parse the feed in a script -
$var1 = first 60 chars
$var2 = remaining chars
Then print $var1 and $var2
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Yes, that makes sense. Only I know next to nothing about scripting except for what I have been able to find and copy and tweak from other sources. I'll have to do some research and see if I can figure it out.
Last edited by WaltH (2016-08-24 01:06:53)
Offline
I would parse the feed in a script -
$var1 = first 60 chars
$var2 = remaining charsThen print $var1 and $var2
Perhaps I am thinking this through incorrectly, but it sounds as if I need one script to pull the rss feed into a temporary file and a second script (containing the suggested variables) to read the file and import the headlines into Conky. Or perhaps it is all once script? Right now, my head is swimming. I suddenly feel like I'm swimming across the English Channel. I can see the shore, but I'm afraid I'm going to drown before I get there.
Offline
I haven't investigated your specific requirement, but as an example here is how I dealt with displaying the BL forum feed in a conky:
The conky has...
${execi 10 $HOME/.config/conky/scripts/BL-rssfeed.sh}
and the script has...
#!/bin/bash
# extract text between "CDATA[" and "]]" (Post title text)
# cut first line with tail
# keep first 6 lines from result of tail
URL="https://forums.bunsenlabs.org/extern.php?action=feed&type=atom"
curl -s "$URL" | grep "<title" | grep -o -P '(?<=CDATA\[).*(?=\]\])'| tail -n +2 | head -n 6 | sed 's/^/${goto 300}/'
The script outputs 6 lines of the feed to be displayed by the conky; the first character of each line is at 300px.
You could do a 'while read line' and test for length. If >60, then split it and write the second section on a new line, else just print the line. (More elegant to add each line to an array, then finally loop through and echo each value ie formatted line)
${execi} displays the shell command output, so you could echo/printf a series of values
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I haven't investigated your specific requirement, but as an example here is how I dealt with displaying the BL forum feed in a conky:
The conky has...
${execi 10 $HOME/.config/conky/scripts/BL-rssfeed.sh}
and the script has...
#!/bin/bash # extract text between "CDATA[" and "]]" (Post title text) # cut first line with tail # keep first 6 lines from result of tail URL="https://forums.bunsenlabs.org/extern.php?action=feed&type=atom" curl -s "$URL" | grep "<title" | grep -o -P '(?<=CDATA\[).*(?=\]\])'| tail -n +2 | head -n 6 | sed 's/^/${goto 300}/'
The script outputs 6 lines of the feed to be displayed by the conky; the first character of each line is at 300px.
You could do a 'while read line' and test for length. If >60, then split it and write the second section on a new line, else just print the line. (More elegant to add each line to an array, then finally loop through and echo each value ie formatted line)
${execi} displays the shell command output, so you could echo/printf a series of values
Thanks for the efforts at assistance and education. Maybe it's because I'm old, tired, or just plain stupid, but this is sailing over my head at the moment. Perhaps I'll revisit this tomorrow to see if I can make better sense of everything. Sorry to be so dense.
Offline
I'm getting there!
http://i.imgur.com/shko5zYm.png
The problem with the agenda was not using a fixed-width font.
can be solved with injecting '${goto nnn}' variables into whatever your galcli spits out.
that way you can keep the formatting tabs, and use a variable width font.
if you post the part of the code that does the calendar, i might help with that.
Offline
I went in and modified the /usr/bin/gcalcli file to use the color1, color2, etc. syntax so that if I modify the colors in Conky, they should then modify in gcalcli.
this will not survive updates and is not recommended.
better way is to copy /usr/bin/calcli to $HOME/bin/calcli and edit that instead. without sudo. it should take precedence over /usr/bin/calcli even when called without the full path.
mind, you will still have to redo this everytime calcli changes and you want to include these changes in your own version. if it's a git repo, you might just fork it, i think git is designed specifically for these types of scenarios.
(but that goes way beyond the scope of this thread)
anyhow, the actual script would be nice to get a link to or paste it here.
see also the other thread.
how about keeping the work to one of these two threads?
Offline
how about keeping the work to one of these two threads?
Yes, please continue this discussion in this thread -- I have split the two calendar-related posts from the "Show your conky" thread and merged them here.
@OP: Sorry for the confusion.
It may be best to rename the thread to reflect the current problem in hand so that any solution can be found with a search engine.
Offline
WaltH wrote:I'm getting there!
http://i.imgur.com/shko5zYm.png
The problem with the agenda was not using a fixed-width font.can be solved with injecting '${goto nnn}' variables into whatever your galcli spits out.
that way you can keep the formatting tabs, and use a variable width font.
if you post the part of the code that does the calendar, i might help with that.
If you mean the part of my .conkyrc that calls the calendar, here it is:
${image /usr/share/icons/Peppermix-7/32x32/apps/calendar.png -p 0,663}${color1}${font Cantarell:Bold:size=11} Calendar ${hr 2}
${voffset -5}${color3}${font liberationmono:Bold:size=8}${execpi 300 gcalcli --conky agenda}
]];
The color3 is one of my user defined colors in my Conky, and it works for the dates. And two of my defined colors in gcalcli work (I think) for displaying the agenda information, just not for the calendars they are assigned to. Here is where I have the color information in gcalcli:
def SetConkyColors():
# XXX these colors should be configurable
CLR.conky = True
CLR_NRM.color = ""
CLR_BLK.color = "${color5}"
CLR_BRBLK.color = "${color black}"
CLR_RED.color = "${color1}"
CLR_BRRED.color = "${color red}"
CLR_GRN.color = "${color3}"
CLR_BRGRN.color = "${color green}"
CLR_YLW.color = "${color4}"
CLR_BRYLW.color = "${color yellow}"
CLR_BLU.color = "${color9}"
CLR_BRBLU.color = "${color blue}"
CLR_MAG.color = "${color8}"
CLR_BRMAG.color = "${color magenta}"
CLR_CYN.color = "${color6}"
CLR_BRCYN.color = "${color cyan}"
CLR_WHT.color = "${color2}"
CLR_BRWHT.color = "${color white}"
'--calendar = "Calendar Name"#red'
'--calendar = "Calendar"#blue'
'--calendar = "Another Calendar"#white'
'--calendar = "mywife@gmail.com"#black'
The four calendars at the end (not the real calendar names) are coded that way at the suggestion of the developers of gcalcli, but I don't know if the information is in the right spot. It doesn't seem to work, whereas redefining the colors originally listed in SetConkyColors section works to some degree. Let me know if you need to see anything else. Thanks.
Offline