Mathieu Van Nevel
Mathieu Van Nevel

Reputation: 1486

Conky/Dzen2 and variables from shell

I'm trying to make some dzen2 stuff, but i have some hard time on one point. I want to eval color variable between conky and dzen2.

Something like that:

Colors :

#!/bin/zsh

#################################
## Colors for Dzen2 status bar ##
#################################

##
## TEST Colors
##
COLOR_TEST='#000000'

Conkyrc :

#################################
## Conky for Dzen2 Status Bar  ##
#################################

background no
out_to_console yes
out_to_x no
override_utf8_locale yes
update_interval 1
total_run_times 0

TEXT
##
##  TEST
##
  ^fg($$COLOR_TEST)

Script:

#!/bin/zsh

. ./colors
conky -c conkyrc | dzen2 -p

I tried eval/echo on conky, but nothing sucessfull. If somebody have an idea, it will be really nice.

Thanks anyway

Have a good day


EDIT:

If we can't find a solution about the main question, what's the best idea?

Upvotes: 1

Views: 1008

Answers (3)

kapad
kapad

Reputation: 48

How about to use ${execp my-dzen-help.sh getcolors }, in conky ?

#my-dzen-help.sh

getcolors(){
printf '^fg($$COLOR_TEST)'; # or what ....
}

Upvotes: 1

kapad
kapad

Reputation: 48

i dont know about dzen, and i dont use zsh, but i use lemonbar, and i use this, to pass some special UTF-8 chars, to my lemonbar through conky :

${exec /bin/bash -c 'echo -en "%{T3}\\uf012%{T-}"'}

maybe this, gives you an idea, how to parse-out, variables, from inside a script.

Upvotes: 1

Mathieu Van Nevel
Mathieu Van Nevel

Reputation: 1486

After some thinking i come to a conclusion : create some tools like conky/dzen2 from scratch. Like this i'll have something ready for wayland and more easy to use.

So i'll try to get some time to make it, the most important part will be "dzen2" with glfw/opengl.

-

But if somebody find an answer for the original question, i'm still curious !

Upvotes: 0

Related Questions