Closed DanyGee closed 6 years ago
Try this ${if_match ${time %H} <= 06}${if_match ${time %H} >= 20} night config ${else} day config ${endif}${endif}
Try this ${if_match ${time %H} <= 06}${if_match ${time %H} >= 20} night config ${else} day config ${endif}${endif}
Didn't work after 00:00 - stopped showing config.
Sorry but that don't work properly I have alway no response or "day config" This line make better : ${if_match ${time %H} <=06}${else}${if_match ${time %H} >=20} night config ${else} day config ${endif}${endif}
${if_match ${time %H} <=06}${else}${if_match ${time %H} >=20} night config ${else} day config ${endif}${endif}
This code only shows day config. If I change the hour span to >=6 and <=20 - it shows nothing again. Tonight I'll test something like this:
${if_match ${time %H} >= 6}${if_match ${time %H} <= 19}
day config
${else}
${if_match ${time %H} >= 20}${if_match ${time %H} <= 5}
night config
${endif}${endif}${endif}${endif}
The 00:00 hour seems to cause problems here...
I test your last code, but that don't work well. I think it's not possible to chain more two if_match. But I think this code work :
${if_match ${time %H} <=06}
night config
${endif}\
${if_match ${time %H} >=20}
night config
${endif}\
${if_match ${time %H} >=07}
day config
${endif}\
${if_match ${time %H} ==00}
night config
${endif}
And I see what your code don't work there are ${if_match ${time %H} <= 19} (day config) and ${if_match ${time %H} <= 5}(night config) that is not possible.
sorry but my last code don't work in every cases. And I know why. There is an incoherence between ${if_match ${time %H} >=07}(day config) and ${if_match ${time %H} >=20} (night config). And I don't know how solve that...
Try this code, that work for me :
${if_match ${time %H} <= 06}night config ${else}${if_match ${time %H} >= 19}night config ${else}day config ${endif}${endif}
Try this code, that work for me : ${if_match ${time %H} <= 06}night config ${else}${if_match ${time %H} >= 19}night config ${else}day config ${endif}${endif}
Thx dbriba, this finally works as it should :+1:
I would like my conky configs (in one file) to launch according to time.
For time <= 06 AND time >=20 - config with colors for the night. else config with colors for the day.
For now I have something like this, but it does not seem to work:
Conky does show nothing in this case.
conky -v conky 1.10.1 compiled Wed Jan 6 17:11:44 UTC 2016 for Linux 3.19.0-43-generic x86_64
Compiled in features:
System config file: /etc/conky/conky.conf Package library path: /usr/lib/conky
General:
Internationalization support
Lua bindings:
Own window
Music detection:
XMMS2
Default values: