You are not logged in.

#1 2018-02-20 22:09:58

usr/bin/foobar
Member
Registered: 2018-01-30
Posts: 11

ConkyMatic

A shell script I wrote that automatically extracts the 16 most common colors in the current wallpaper, generates a .conkyrc file with colors randomly chosen from that palette, and exports a set of color-matched weather icons.

With a single terminal command you can generate a Conky color theme change every time the wallpaper gets changed. And since the colors are randomly chosen (with some logic) you can run the script multiple times with the same wallpaper and get a different result each time.

YouTube Video

Screenshot

GitHub Repo

Last edited by usr/bin/foobar (2018-02-21 04:02:03)

Offline

#2 2018-02-21 01:49:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: ConkyMatic

Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-02-21 03:53:55

usr/bin/foobar
Member
Registered: 2018-01-30
Posts: 11

Re: ConkyMatic

Sorry, didn't know. By the way, the image was hosted at imgur, so it's zero load on your servers, but I'll update it.

Offline

#4 2018-02-21 04:02:15

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: ConkyMatic

It's not zero load for people with slow or limited internet connections, that is why it is a rule.

Offline

#5 2018-02-21 14:39:03

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: ConkyMatic

Thank you for the software! That's a great idea, and it looks beautiful. I think if you clean it up a bit more (for example, make a package to install it in "/usr/bin", and have it read "~/.config/conkymatic" by default...) then you should put it in the AUR. smile

...I came really close to installing it on my computer, until I realized my conky is black and white and pretty much goes with everything...

Offline

#6 2018-02-21 15:51:38

usr/bin/foobar
Member
Registered: 2018-01-30
Posts: 11

Re: ConkyMatic

Thanks. I might consider doing that if I can find a reliable way to get the path to the current wallpaper on a variety of desktops (and for that matter, identify what de is running). I only run xfce so my knowledge it somewhat limited.

Offline

#7 2018-02-21 19:49:42

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: ConkyMatic

I wouldn't be surprised if an application like this just expected it as a command line argument, for example:

conkymatic ~/Pictures/Simple-Swirls.png

Offline

#8 2018-02-22 05:16:24

usr/bin/foobar
Member
Registered: 2018-01-30
Posts: 11

Re: ConkyMatic

You could certainly do it that way, but many of us use tools like Variety to change wallpaper very frequently (or automatically), so having to specify a path would be cumbersome. It's far more graceful to have an app that gathers that info automatically, as the script does now (just on xfce, though). I've even set up the wallpaper change script that Variety uses to trigger ConkyMatic automatically, which means it just runs with no interaction. Everytime the wallpaper auto-changes, the Conky updates.

Offline

#9 2018-02-22 14:05:50

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: ConkyMatic

"conkymatic" must be run after the user sets a new wallpaper, either by hand or by a software hook. At that point, the user or the wallpaper setting software will know what image file is being used. For example, I use "feh" and I have a "set-background" script, so I'd be able to make this addition to it:

#!/usr/bin/bash
# Set the background wallpaper
feh --bg-max "$1"
conkymatic "$1"

I'm unfamiliar with "variety", but looking at the help, it looks like you'd be able to do something similar:

variety # Run the variety command to set a new random wallpaper
conkymatic $(variety --get) # Run conkymatic with the currently set wallpaper

Regardless, you could just add the option as a command line argument "conkymatic --file /path/to/wallpaper.png". smile

Offline

#10 2018-02-24 14:51:09

Spinnekop
Member
Registered: 2018-02-16
Posts: 25

Re: ConkyMatic

A couple of things.
The default conky has fanspeed but dislays frequency.
I can't get rid of two blank lines after the last entry. Doesn't matter where I put the palette!


Umuntu Ngumuntu Ngabantu
---------------------------------------
a person is a person through other people

Offline

#11 2018-02-24 15:52:10

usr/bin/foobar
Member
Registered: 2018-01-30
Posts: 11

Re: ConkyMatic

If you put a vertical offset with a negative value by itself on the last line it will let you reduce the height of the window.

${voffset -85}

Thanks for the info on the fan variable.

Offline

#12 2018-02-24 17:43:09

Spinnekop
Member
Registered: 2018-02-16
Posts: 25

Re: ConkyMatic

Awesome !!


Umuntu Ngumuntu Ngabantu
---------------------------------------
a person is a person through other people

Offline

#13 2018-02-27 17:03:22

usr/bin/foobar
Member
Registered: 2018-01-30
Posts: 11

Re: ConkyMatic

OK, I took drcouzelis' suggestion and added the ability to pass the path to the wallpaper as an argument to the script:

./conkymatic /path/to/wallpaper.jpg

If I get a bit of time I plan to also add a "feh" variable, that when set to true, will fetch the path out of the .fehbg config file.

UPDATE:

Turns out it was pretty easy to add feh support.

In the conkymatic.sh file you will now this config option:

AUTO_PATH_MODE="feh"

The script will then gather the path automatically from the feh config file.

Last edited by usr/bin/foobar (2018-02-27 21:40:04)

Offline

Board footer

Powered by FluxBB