Conky Mods

Forum Forums antiX-development Graphics Conky Mods

Tagged: 

  • This topic has 36 replies, 7 voices, and was last updated Jun 1-11:08 pm by BobC.
Viewing 15 posts - 1 through 15 (of 37 total)
  • Author
    Posts
  • #6933
    Member
    sleekmasonsleekmason

    Have you heard of fortunes?

    You can add a “fortunes” message at the bottom of your conky with one line.
    As Root:
    apt-get install fortunes

    Use the control panel to access the existing conkyrc. This file is located and can be accessed in~/home directory as a hidden file (.file)

    Add this line to the end of the configuration. You can leave a space between your new line and the old, and that will translate on your conky as the same, ie, a space between the items:
    $alignr${execi 3114 fortune -s | fold -s -w25}
    Save and exit. The results should be instant.

    This will place a fortune below your existing conky (see screenshot), minimized to fit conky, and will word wrap if necessary.

    To change the time between fortunes, modify the ‘3114’ number to whatever you wish. The number represents seconds. 300 second = 5 minutes. change it to whatever you want!

    As a bonus, If you are using any of my other stuff, (newsbeuter in software, the deepcyan gtk theme here in graphics, and/or sleek-flux/sleek-antix fluxbox style), You may wish to change the colors to match a bit;)

    The color I am using is 85ECEA
    change:
    color2
    color3
    color8
    default_color

    These start around line 214 in the .conkyrc

    If you have cool mods or ideas, please post here!

    Attachments:
    #6935
    Member
    Avatarskidoo

    ( posting a couple bookmarked links b/c I don’t have any remarkable self-made conky mods )

    LOTS of ideas in this 81pp topic at BunsenLabs forum:
    Topic: » Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

    and the BunsenLabs “Tutorials” subforum showcases several conky mod ideashttps://forums.bunsenlabs.org/viewforum.php?id=9

    Here’s an interesting fortunes datafile: https://github.com/KERNELULTRAS/kernel-fortune/blob/master/fortunes

    #6947
    Member
    ileile

    hello sleekmason
    you are creating some terrific documentation.
    I see that Stevo[mx] recently devoted some time to a keystate indicator;
    here is a conky one that is crude; not yet cool; an idea:

    ${color8}key state
    ${alignc}${color}${execi 02 xset q | grep Caps | fold -s -w27}

    gives this: status changes when the coinciding key is pressed.

    Attachments:
    #6999
    Member
    sleekmasonsleekmason

    It flys by so fast! aurrggghh!!! This is me trying to see which kernel at boot. After finding out how easy it is to build a new kernel LINK: kernels-make-your-own , I thought of Conky.


    You could just open a terminal and type uname -r to get the kernel revision info, or you could put a line in Conky to tell you at a glance.

    ${color3}${alignc} $kernel



    Mines placed right after the “uptime” line as shown.

    Looks like it cut off the top of the first image.

    • This reply was modified 3 years, 1 month ago by sleekmason.
    • This reply was modified 3 years, 1 month ago by sleekmason.
    #7070
    Member
    sleekmasonsleekmason

    Howdy ile!

    I was checking out your xset conky. Man! if only I could get it to line up! I tried using offset:

    ${alignr}${color}${offset -5}${execi 02 xset q | grep Caps | fold -s -w25}


    But, that didn’t work. Man xset only has the q option (settings), not allowing to remove the totality of it. There are 7-8 items if you remove the grep Caps bit.
    I don’t really understand why the “grep Caps” changes it to only those three items.


    Anyway, messing around with the offset number pulls the whole thing through the line. I never could get all three to align, but it can come damn close! and… usable?

    #7090
    Member
    ileile

    hello sleekmason
    I better be careful to say that I am a perpetual novice with pc; I am learning from you. Such as learning the word wrap from your post a few days ago. Probably You would say the surface of conky has not been yet scratched by me.
    This keystate thing was seen an elegant version ,,, somewhere ,,, could have been Dave at antix,, cannot find it again. there is fifty-thousand conky pictures and only recent ones now apply as examples. Upon encountering a keyboard indicator from 2013 I passed it hoping for a recent example; now cannot find even the 2013 one i did see.
    I got an inkling of the sophistication of monitoring the key And led states. translate the data into yes or no / print out on or off. (even found tables with variables of pressing other keys same time influences key state monitoring.(like on a mac the shift key on or off changes readings. it cannot compute :wink:) ) I steered toward this xset that gave immediate result. function. without your wordwarp it showed only the caps indicator. I was glad to have learned a bit.
    Usability I would use it here in a crunch for a notebook that has no led for keystate. As a constant need the [applet?]monitor in taskbar or notification would satisfy desirably. +Trade for a monitor written by an expert anytime. Is hitting the terminal every two seconds really a good thing? only if you really need it? or is it no big deal?
    Experimenting with xset in terminal offered deductions. I tried to cease and accept function prior to becoming inductive. same with trying those variables in conky that you mention trialing. including having them indicate “on” does not move it.
    so yes I was anxious to post an unremarkable monitor wherein the output is text from the terminal that i cannot coerce the formatting. Do not need the scroll lock state. but there it is. not even dang close; visible was good enough, thanks to your example. hoping someone would present a better way. Conky seems to need to be elegant these days.
    Thanks for messing with it.

    #7097
    Moderator
    AvatarBobC

    On an old machine, stretched to perform for lack of CPU speed, that has keyboard LED’s anyway, I’d say it matters, and it’s probably a nice thing to have that you can’t afford, LOL.

    On my slower machines, I set Conky to run every 10 seconds, vs 2 seconds on the faster ones.

    #7109
    AvatarAnonymous

    Surely there are other possibilities…

    I first write the output of fold to a text file and read the value for Conky from there.
    With it you can then work with the variable ${goto} to get the output arranged among each other

    key state
    ${execi 2 xset q | grep Caps | fold -s -w25 > ~/S11/TEST/Caps.txt}\
    ${execpi 2 sed -n '1p' $HOME/S11/TEST/Caps.txt}
    ${goto 15}${execpi 2 sed -n '2p' $HOME/S11/TEST/Caps.txt}
    ${goto 25}${execpi 2 sed -n '3p' $HOME/S11/TEST/Caps.txt}
    
    #7149
    Member
    sleekmasonsleekmason

    Howdy male!

    That works! I’m going to change the directory slightly and explain for others if thats okay.

    For those wanting this, make a new directory in ~/
    Open a terminal and:
    mkdir .conkycaps


    Next, add this to your conky –. save, and it should work!

    ${execi 2 xset q | grep Caps | fold -s -w25 > ~/.conkycaps/Caps.txt}\
    ${execpi 2 sed -n '1p' $HOME/.conkycaps/Caps.txt}
    ${goto 10}${execpi 2 sed -n '2p' $HOME/.conkycaps/Caps.txt}
    ${goto 14}${execpi 2 sed -n '3p' $HOME/.conkycaps/Caps.txt}
    • This reply was modified 3 years, 1 month ago by sleekmason.
    #7150
    Member
    sleekmasonsleekmason

    Here is a different battery monitor that may save a bit on ram:

    Battery level: ${alignr}$battery_percent %

    and a battery bar to go with if you like:

    $battery_bar 15 100

    #7242
    Member
    sleekmasonsleekmason

    I’ve been looking into conky more and more! The options seem limitless.
    Below are all the changes Iv’e made to the existing ~/.conkyrc. (See Screenshot!).

    Personally, I think it is much more usable now with more info. I cleaned up the code a bit too. Everything uses color2, and so the color can be changed with just the one code change.

    I also changed in mine up above the TEXT line:

    # Update interval in seconds
    update_interval 2

    From one second.

    At the bottom of this post is an addition you may want that gives the top (no pun intended) 5 processes for both cpu and memory. Could be useful to some.


    Anyway, if you would like to try my version, make a back up first in case you decide it was a bad idea;) You may also want to install fortunes, and fortune-mod if you like the cookie at the bottom.
    In a terminal:
    cp ~/.conkyrc .conkyrc.bak


    Then open up ~/.conkyrc with your favorite editor and change everything under “TEXT” with the below. –> Save.

    ${color2}${alignc}${font DejaVu Sans:size=14}${offset -11}antiX${color2}  |  ${color2}${font DejaVu Sans:size=14}${time %I:%M}
    ${color2}${font DejaVu Sans:size=10}Uptime: $alignr $uptime
    $hr
    ${color2}${font DejaVu Sans:size=9}Repo: $alignr${execi 1000  cat /etc/debian_version}
    ${color}${font DejaVu Sans:size=9}Kernel: $alignr $kernel
    
    ${color2}${font DejaVu Sans:size=9}Total Processes:                $color $processes
    ${color}Automount: ${alignr}${color2}${execi 60 grep -q "^automount=TRUE" $HOME/.desktop-session/automount.conf 2>/dev/null && echo "enabled" || echo "disabled"}
    
    ${color}Freq:${color2}${alignr}${freq}
    ${color}Cpu:${alignr}${color2}${cpu}${color}%
    ${cpubar 4}
    
    ${color}Ram:${alignr}$mem ${color2}  /${color} $memmax
    ${membar 4} 
    ${color}Swap:${alignr}$swap ${color2} /${color} $swapmax
    ${swapbar 4}
     
    Root: $alignr ${fs_used /} / ${fs_size /}
    ${fs_bar 4 /}
    Home: $alignr ${fs_used /home} / ${fs_size /home}
    ${fs_bar 4 /home}
    ${if_up eth1}${color}Eth0 Up: $alignr${color2} ${upspeed eth0}
    ${color}$alignr${upspeedgraph   eth0 24,178 5599cc 5599cc}
    ${color}Eth0 Down: $alignr${color2} ${downspeed eth0}
    ${color2}$alignr${downspeedgraph eth0 24,178  5599cc 5599cc}${endif}${if_up eth1}
    ${color}eth1 up: $alignr${color2} ${upspeed eth1}
    ${color}$alignr${upspeedgraph   eth1 30,170 5599cc 5599cc}
    ${color}eth1 down: $alignr${color2} ${downspeed eth1}
    ${color2}$alignr${downspeedgraph eth1 30,170  5599cc 5599cc}${endif}${if_up wlan0}
    ${color}Wlan0 Up: $alignr${color2} ${upspeed wlan0}
    ${color2}$alignr${upspeedgraph   wlan0 24,178 5599cc 5599cc}
    ${color}Wlan0 Down: $alignr${color2} ${downspeed wlan0}
    ${color2}$alignr${downspeedgraph wlan0 24,178 5599cc 5599cc}${endif}${if_up wlan1}
    ${color}wlan1 up: $alignr${color2} ${upspeed wlan1}
    ${color2}$alignr${upspeedgraph   wlan1 24,170 5599cc 5599cc}
    ${color}wlan1 down: $alignr${color2} ${downspeed wlan1}
    ${color2}$alignr${downspeedgraph wlan1 24,170 5599cc 5599cc}${endif}
    Battery Level: ${alignr}$battery_percent%
    ${battery_bar 4}
    
    $alignr${execi 3114 fortune -s | fold -s -w25}
    ${voffset 800} 

    This is an addition if you like that will show top processes:

    ${color2}%CPU
    $alignr${color2}${offset 11}${top name 1}${top cpu 1}   
    $alignr${color2}${offset 11}${top name 2}${top cpu 2}   
    $alignr${color2}${offset 11}${top name 3}${top cpu 3}   
    $alignr${color2}${offset 11}${top name 4}${top cpu 4}   
    $alignr${color2}${offset 11}${top name 5}${top cpu 5}   
          
    ${color2}%Memory 
    $alignr${color2} ${top name 1}${top mem 1}
    $alignr${color2} ${top name 2}${top mem 2}
    $alignr${color2} ${top name 3}${top mem 3}
    $alignr${color2} ${top name 4}${top mem 4}
    $alignr${color2} ${top name 5}${top mem 5}

    I had to use offsets on mine. And that goes for all of these I post. Conky is fickle. Sometimes adjustments to the offsets don’t translate well.

    I might try to get an easy weather report in there too. Maybe just temp and condition.

    • This reply was modified 3 years, 1 month ago by sleekmason. Reason: changed the color items in the last code
    Attachments:
    #7277
    Member
    Avatarskidoo

    ${execi 2 xset q | grep Caps | fold -s -w25 > ~/S11/TEST/Caps.txt}\

    would be preferable to generate the output file under /tmp in order to avoid continually hitting the disk every xx seconds, yes?

    #7281
    Member
    sleekmasonsleekmason

    would be preferable to generate the output file under /tmp in order to avoid continually hitting the disk every xx seconds, yes?

    Not sure what you mean . . the execi 2 part of the command instructs conky to run the command every two seconds to ascertain the status.
    Maybe I don’t quite understand something I should . . Does the /TEST have more significance than just a path? i.e. path to /tmp?

    • This reply was modified 3 years, 1 month ago by sleekmason.
    #7290
    Member
    Avatarskidoo

    Regardless of path, the output file “Caps.txt” is being rewritten every 2 seconds. I was just suggesting: write to a file pathed under /tmp (tmpfs) instead, to avoid writing to physical disk.

    #7298
    Member
    sleekmasonsleekmason

    Regardless of path, the output file “Caps.txt” is being rewritten every 2 seconds. I was just suggesting: write to a file pathed under /tmp (tmpfs) instead, to avoid writing to physical disk.

    Well hell, that does make sense on the surface of it. I’ve personally never tried it but I will. How does this work? Since nothing stays in /tmp on reboot . . symlink? Yeah, well google is only kinda my friend but I’m gonna go ask anyway;)

Viewing 15 posts - 1 through 15 (of 37 total)
  • You must be logged in to reply to this topic.