Forum › Forums › antiX-development › Graphics › Conky Mods
Tagged: Conky
- This topic has 36 replies, 7 voices, and was last updated Jun 1-11:08 pm by BobC.
-
AuthorPosts
-
March 5, 2018 at 7:10 am #7304Member
sleekmason
::${execi 2 xset q | grep Caps | fold -s -w25 > /tmp/Caps.txt}\ ${execpi 2 sed -n '1p' /tmp/Caps.txt} ${goto 10}${execpi 2 sed -n '2p' /tmp/Caps.txt} ${goto 14}${execpi 2 sed -n '3p' /tmp/Caps.txt}This Works! So, the question I have is how is this different in terms of resources considering Conky still has to make the call every two seconds regardless?
March 5, 2018 at 7:39 am #7305Member
sleekmason
::And one more tidbit thats pretty cool.
A “todo” list
make a new text file in ~/home named todo.Write your list starting on the second line.
–
–
Add:
${color2}${font DejaVu Sans:size=9}TODO: $alignr${execi 320 cat ~/todo}
To your conkyrc**NOTE If your conky is getting cut off, try adding:
${voffset 800}
to the bottom of your conky.- This reply was modified 5 years, 2 months ago by sleekmason.
Attachments:
March 6, 2018 at 11:00 pm #7450Member
ile
::hello sleekmason
key Num state.
It was not Dave at antix. found the key state conky that I was seeking. Started with code from a previous version of conky. jedi of vsido passed this along:# by Crinos512 echo "\${font xirod:Bold:size=6}NUM: \${exec xset q | grep Num |awk '{print " "\$8}'} \${font}" echo "\${font xirod:Bold:size=6}CAPS: \${exec xset q | grep Caps |awk '{print " "\$4}'} \${font}"and some leading me toward learning, PackRat and jedi persuaded the practice into this possibilty:
${color}key ${color7}state active ${color7}NumLock ${exec xset q | awk '/Caps/ {print $8}'} ${color7}Caps Lock ${exec xset q | awk '/Caps/ {print $4}'}appears in conky like this:

Thinking this is a simple way to structure an example; can envision formatting output to conky from a single exec. And it came with helpful reference to alternate methods still to be dissected in commands grep sed cut and? more to learn.March 7, 2018 at 9:19 am #7462Member
ile
::hello sleekmason nd everyone
Wish to thank you all antix forum for the “more to learn” includes getting past the focus of that working method and discovering the import / export to temp presented here.
Not knowing best practice in the big picture of application to something besides conky; I don’t yet know the difference between mild, practicable, or overkill to choose a method.
I do wish to thank you all for being helpful with offering your participation with this key state idea in the conky platform and for your instruction about big linux.March 8, 2018 at 11:12 pm #7514Member
ile
::hello sleekmason and everyone
the standard: stuff shuffled antix conky .
added: kernel, wlan0 ssid and strength, keyboard indicator
.[ Just finished kernel change from 4.10.5 TO 4.9.83 ]
the resolution represents two displays that overlap. 1280X800 and 1152X864.Attachments:
March 9, 2018 at 3:27 am #7516Member
sleekmason
::Howdy ile!
Looking good! The single line solutions to parse caps and scroll lock are outstanding!
Did you see this post earlier? https://www.antixforum.com/forums/topic/conky-mods/#post-7242
–
In the screenshot check out the bars for mem and swap:)
–
–${color}Ram:${alignr}$mem ${color2} /${color} $memmax ${membar 4} ${color}Swap:${alignr}$swap ${color2} /${color} $swapmax ${swapbar 4}–
–
Also, I noticed the antiX url . . reminder? or maybe “current site browsed”?March 9, 2018 at 10:16 am #7530Member
ile
::hello sleekmason
the antix forum location
not a monitor; text; promotional;
plus it is a holdover “reminder” yes from when the forum location changed.March 9, 2018 at 8:57 pm #7545ModeratorBobC
::Ok, My conky has been cobbled together over the years. Its not perfect by any stretch, as I don’t actually know much linux stuff, just learning as I go. A good example being that /tmp doesn’t need to write to the disk. So here is a pic of it in its current form, and the conky code itself. I’ll put the scripts it runs in a tar file…
PS: something that I realized, my xbattbar is modified to be able to output a file for the script called by conky to grab the latest value from, and the maintainer never never replied, so I need to come up with a way to distribute that for the battery section to work well. I’m also changing the scripts to use files in /tmp when files are used.
I tried to fix the image so you can see the whole thing, but it posted a 2nd picture instead of replacing the first one. Oh well, if anyone knows how, delete both and I’ll try again with an even smaller one….
I added the tar file. You need to have xget, curl and xbattbar, as well as conky installed for this to work. My xbattbar programs (source included) are compiled on an _x64 system, but I don’t know if that matters. Someone like Dave or Skidoo that know what they are doing should look at my code before you guys try to run it, as like I said, I am no linux guru, and can barely tread water. That means I tried, but no warranty 🙂 Ok, the website won’t allow a .tgz file, so I have renamed it to .zip to try that. If that works, you will need to rename it back to .tgz to unextract and install it.
Sorry, I would remove the pics and try smaller ones, but can’t figure out how…
# Update interval in seconds update_interval 5 text_buffer_size 6000 max_specials 600 # set to yes if you want Conky to be forked in the background background yes short_units yes cpu_avg_samples 2 net_avg_samples 2 out_to_console no # X font when Xft is disabled, you can pick one with program xfontsel #font 7x12 #font 6x10 #font 7x13 font 8x12 #font 7x12 #font *mintsmild.se* #font -*-*-*-*-*-*-34-*-*-*-*-*-*-* #font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1 # Use Xft? use_xft yes # Xft font when Xft is enabled xftfont Sans:size=10 # Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops) own_window yes own_window_type desktop own_window_transparent yes own_window_hints undecorated,sticky,skip_taskbar # Text alpha when using Xft xftalpha 0.8 #on_bottom no # mail spool #mail_spool $MAIL # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # Minimum size of text area minimum_size 445 869 maximum_width 545 # Gap between borders of screen and text # x = distance from right edge # y = distance from top edge gap_x 15 gap_y 1 # Draw shades? draw_shades no # Draw outlines? draw_outline no # Draw borders around text draw_borders no # Stippled borders? stippled_borders 0 # border margins #border_margin 10 # border width border_width 2 # color scheme color0 black color1 red color2 green color3 yellow color4 blue color5 magenta color6 cyan color7 white # hot pink #color8 #FF078B # flourecent orange #color9 #FF9C07 # Default colors and also border colors default_color white default_shade_color white default_outline_color white # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Add spaces to keep things from moving about? This only affects certain objects. use_spacer right # Subtract file system buffers from used memory? no_buffers yes # set to yes if you want all text to be in uppercase uppercase no # boinc (seti) dir # seti_dir /opt/seti # stuff after 'TEXT' will be formatted on screen TEXT ${font Sans:size=16}${color #FF078B}${nodename} ${font Sans:size=10}${color2}Op/Sys: ${color}${head /etc/antix-version 1}\ ${color2}Kernel: ${color}$sysname $kernel \ ${color2}Batt: ${color}${battery_short BAT0}-${execi 10 conky-battery.sh}\ ${if_match "${battery_short BAT0}" >= "D"}${if_match "${battery_short BAT0}" < "E"}${if_match ${battery_percent BAT0} <= 33}\ ${if_match ${battery_percent BAT0} >= 1}${execi 10 lowbattery}${endif}${endif}${endif}${endif} ${color2}CpuAvg: ${color}${freq_g}Ghz ${machine} - ${color}${cpu}% ${color2}Temp: ${color}${acpitemp}'C\ ${color2} Automount: ${color}${execi 120 grep -q "^automount=TRUE" $HOME/.desktop-session/automount.conf 2>/dev/null && echo "On" || echo "Off"} \ ${color2}Display: ${color}${execi 120 xdpyinfo | sed -n -r "s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"} ${color2} Cpu 1: ${color}${cpu cpu1}% \ ${if_match ${cpu cpu1} <= 50}\ ${color green}${cpubar cpu1 9}\ ${else}\ ${if_match ${cpu cpu1} <= 80}\ ${color orange}${cpubar cpu1 9}\ ${else}\ ${color red}${cpubar cpu1 9}\ ${endif}\ ${endif} ${color2} Cpu 2: ${color}${cpu cpu2}% \ ${if_match ${cpu cpu2} <= 50}\ ${color green}${cpubar cpu2 9}\ ${else}\ ${if_match ${cpu cpu2} <= 80}\ ${color orange}${cpubar cpu2 9}\ ${else}\ ${color red}${cpubar cpu2 9}\ ${endif}\ ${endif} ${color2}Ram : ${color}$mem${color}/${color}$memmax ${color}- $memperc% \ ${if_match ${memperc} <= 50}\ ${color green}${membar 9}\ ${else}\ ${if_match ${memperc} <= 80}\ ${color orange}${membar 9}\ ${else}\ ${color red}${membar 9}\ ${endif}\ ${endif} ${color2}Home:/home:${color} ${fs_free /home}Free ${color}= ${fs_free_perc /home}% \ ${if_match ${fs_free_perc /home} < 10}\ ${color red}${fs_bar 9 /home}\ ${if_match ${fs_free_perc /home} < 3}${execi 60 lowspace /home}${endif}\ ${else}\ ${if_match ${fs_free_perc /home} < 20}\ ${color orange}${fs_bar 9 /home}\ ${else}\ ${color green}${fs_bar 9 /home}\ ${endif}\ ${endif} ${if_match ${acpitemp} > 77}${execi 60 hightemp}${endif}\ ${color2}eth0 IP: ${color}${addr eth0} ${color2}WiFi wlan0: ${color}${wireless_essid wlan0} ${color2}IP:${color} ${addr wlan0} ${color2}spd: ${color} ${wireless_bitrate wlan0} ${color2}strength: ${color3} ${wireless_link_bar 9 wlan0} ${color2}Processes: ${color}$processes ${color2}Running: ${color}$running_processes ${color2}Uptime: ${color}$uptime ${color2} ${color3}CPU% MEM% PID Program ${color}${top cpu 1} ${top mem 1} ${top pid 1} ${top name 1} ${color}${top cpu 2} ${top mem 2} ${top pid 2} ${top name 2} ${color}${top cpu 3} ${top mem 3} ${top pid 3} ${top name 3} ${color}${top cpu 4} ${top mem 4} ${top pid 4} ${top name 4} ${color}${top cpu 5} ${top mem 5} ${top pid 5} ${top name 5} ${color3}${execi 120 conky-rssheader.sh ": Headlines, Current Weather and 7 Day Forecast"} ${color}${execi 120 conky-rss.sh http://abcnews.go.com/abcnews/topstories 10 2} # Parameter KORD is National Weather Service code for OHare Airport based on http://w1.weather.gov/xml/current_obs/KORD # codes found at https://forecast.weather.gov/stations.php?foo=0 ${font Sans:size=10}${color3}${execi 300 getweatherc.sh KORD} # Parameter il/ilz014.txt is National Weather Service directory and filename for Chicago zone area based on http://tgftp.nws.noaa.gov/data/forecasts/zone/il/ilz014.txt # codes found at http://www.nws.noaa.gov/mirs/public/prods/maps/pfzones_list.htm ${font Sans:size=8}${color}${execi 300 getweather7d.sh il/ilz014.txt} ${font courier:bold:size=15}${color3} ${time %a} ${time %b} ${time %d} ${time %Y} ${color3}${font courier:bold:size=13}${execpi 1200 DJS=<code>date +%_d</code>; cal | sed '1d' | sed -e 's/[\x5F]//g' | sed -e 's/[\x08]//g' | sed '2s/^/\${color}/' | sed 's/^/ /g' | sed s/"\(^\|[^0-9]\)$DJS"'\b'/'\1${color2}'"$DJS"'$color'/}- This reply was modified 5 years, 2 months ago by BobC.
- This reply was modified 5 years, 2 months ago by BobC.
- This reply was modified 5 years, 2 months ago by BobC.
March 10, 2018 at 6:50 pm #7618Member
sleekmason
::That weather is an easy add! Thank you!
For those that just want the weather, take the getweatherc.sh from Bob’s /usr/local/bin, put it in yours, and change the permissions to make it executable.
Add this line to your conkyrc:
–
${color2}${execi 300 getweatherc.sh KORD | fold -s -w29}
–
You will need to change KORD to your own airport weather code. Not sure the codes are only for airports. Mine was. The directions are in Bob’s Conky.
–
I changed the above conkyrc code to match the existing antiX conky style, and added a fold in order to have it all fit. Don’t know if less info can be displayed . . My airport had less info than KORD did:) Nice addition.-
–
–
***FYI, If you comment line 45, and uncomment line 46 of getweatherc.sh, the result will be better readability#locationx=$(from_xml "location") location="$(echo "$locationx" | cut -f1 -d",")"- This reply was modified 5 years, 2 months ago by sleekmason.
- This reply was modified 5 years, 2 months ago by sleekmason.
- This reply was modified 5 years, 2 months ago by sleekmason.
Attachments:
March 10, 2018 at 10:24 pm #7626Member
sleekmason
::The neat one is the 7 day forecast. See how I shrunk it to fit?
Yah, I like that one as well but ran out of room! Tomorrow I’m going to separate a few items out and make two or three separate windows.
I probably went through 10 downloads scouring the internet for a conky weather that would work. Thank you:)
March 10, 2018 at 11:07 pm #7627ModeratorBobC
::At line 67/68 its pretty well marked in getweather7d.sh. Change the width from 80 to 29 and the number of line to the maximum you can fit. You can probably squeeze in today and tomorrow, anyway. They could probably be passed from the conky as a parameter, or just strung along in the conky code like you did with the current conditions
# wrap text for 80 char wide display, limit to 23 lines of output fold -s -w 80 /tmp/getweather7d.tmp90.txt | sed -e '23,$d' > /tmp/getweather7d.tmp99.txt ^^ ^^May 2, 2018 at 2:18 pm #9855Member
sleekmason
::Created a super easy conky weather in text format. No icons, fonts, or anything else to mess with but a single file to change location, and an addition to your .conkyrc.
–
Based off of accuweather rss-1 from here: https://forums.bunsenlabs.org/viewtopic.php?id=189
–
This weather script gives the current condition plus 2 days forecast. Updates every 10 minutes.
–
–
–
The file to place in your /home folder from the sleekweather.zip is .weather, a hidden file, so when you don’t see it, enable hidden files.
–
Info: Inside .weather you will find the file “1d” Two additional files are created when calling “1d”, “weather_raw” and “weather”.
Conky will read from ~/.weather/weather.
–
–
–
Steps:
1. Move .weather to $HOME (i.e. /home/sleek/.weather)
–
2. Open the file “1d” inside .weather and change your zipcode where indicated. If in locations other than USA, please refer to the link above for directions.
–
3. Open your .conkyrc file using either the antiX control center or your favorite text editor.
–
Copy this to the bottom of your conky and save:${color2}${execi 600 $HOME/.weather/1d} ${color2}${execi 600 cat $HOME/.weather/weather | fold -s -w29}–
Would love to have the more elegant method for calling the script with conky . . .(one liner?), and any other code changes others may suggest.Thats it! Just another weather option.
May 2, 2018 at 3:18 pm #9859Moderator
Brian Masinick
::You guys are GREAT! For as many years as I’ve been doing this stuff, Conky is one tool that, if I have experimented with it at all, it has been very limited. On antiX, any changes I’ve done have been limited to whatever you can select or modify in a menu.
That said, once you understand the configuration language, you are all set, and it definitely looks like you guys have conquered this.
Congratulations! 🙂--
Brian MasinickMay 3, 2018 at 8:07 pm #9878Member
ohh
::sleekmason,
Thanks for the link to bunsens lab, here is a work in progress, using some of Teo’s codecheers,
ohhAttachments:
Every matter requires prior knowledge.
- Du Mu
The Art of WarMay 3, 2018 at 9:47 pm #9880Member
sleekmason
::Howdy ohh,
–
When you get it where you want it will you post a copy? Looks pretty cool! For some reason, I can never get all the goods to work right for me and wind up just going back to text to keep it simple. <– That’s with the weather . . haven’t even touched the moon stuff:) -
AuthorPosts
- You must be logged in to reply to this topic.






