0

As in how can I get the *.foreground color value obtained with xrdb -query assigned to a variable in the script.

I'm trying to get both background and foreground colors into two variables that will be passed to another program as parameters.

0

Figured it out, kinda. When using pywal we can import the colours from its cache, like this:

#!/bin/sh
. "${HOME}/.cache/wal/colors.sh"
fg=$color7
bg=$color2
...

The catch is that this obviously won't work if wal's cache doesn't exist. But then one just need to reset the wallpaper with pywal to get the cache rebuilt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.