You are not logged in.
Pages: 1
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.
Last edited by usr/bin/foobar (2018-02-21 04:02:03)
Offline
Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code
Offline
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
It's not zero load for people with slow or limited internet connections, that is why it is a rule.
Offline
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.
...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
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
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
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
"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".
Offline
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
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
Awesome !!
Umuntu Ngumuntu Ngabantu
---------------------------------------
a person is a person through other people
Offline
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
Pages: 1