1

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?

  • Lua/Conky (I think it's not bad)
  • Shell/Dzen2 (Performance are not amazing last time i tried that)
  • A full program in C++ (A little overkill, and conky is generic)
4

3 に答える 3

1

私は dzen について知りませんし、zsh も使用しませんが、lemonbar を使用し、これを使用して、特別な UTF-8 文字を conky 経由で私のlemonbar に渡します。

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

おそらく、これにより、スクリプト内から変数を解析する方法がわかります。

于 2016-04-10T22:57:01.173 に答える
1

conky で ${execp my-dzen-help.sh getcolors } を使用するのはどうですか?

#my-dzen-help.sh

getcolors(){
printf '^fg($$COLOR_TEST)'; # or what ....
}
于 2016-05-17T20:24:03.883 に答える
0

少し考えた後、私は結論に達しました: conky/dzen2 のようないくつかのツールをゼロから作成します。このように、私はウェイランドの準備ができて、より使いやすいものを用意します.

だから私はそれを作るために少し時間を取ろうとします.最も重要な部分はglfw/openglで「dzen2」になります.

-

しかし、誰かが元の質問に対する答えを見つけたとしても、私はまだ興味があります!

于 2016-02-11T22:55:24.870 に答える