2020-07-03 21:04:11 +00:00
|
|
|
/* time interval in seconds to sleep before looking for updates in the main loop */
|
2020-07-08 17:30:19 +00:00
|
|
|
#define SLEEPINTERVAL 1
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-06 20:06:10 +00:00
|
|
|
#define PATH(name) "/home/ashish/.local/projects/dwmblocks/blocks/"name
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-13 19:56:52 +00:00
|
|
|
/* If interval of a block is set to 0, the block will only be updated once at startup.
|
2020-07-03 21:04:11 +00:00
|
|
|
* If interval is set to a negative value, the block will never be updated in the main loop.
|
|
|
|
* Set signal to 0 if signalling is not required for the block.
|
2020-07-13 19:56:52 +00:00
|
|
|
* Keep signal for clickable blocks less than 10.
|
|
|
|
* If multiple realtime signals are pending, then the lowest numbered signal is delivered first. */
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
/* pathu - path of the program whose output is to be used for status text
|
2020-07-18 14:25:50 +00:00
|
|
|
* pathc - path of the program to be executed on clicks */
|
2020-07-03 21:04:11 +00:00
|
|
|
static Block blocks[] = {
|
|
|
|
/* pathu pathc interval signal */
|
2020-07-08 17:30:19 +00:00
|
|
|
{ PATH("hotspot.sh"), PATH("hotspot_button.sh"), -1, 3},
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-13 19:56:52 +00:00
|
|
|
{ PATH("time.sh"), NULL, 30, 10},
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-08 17:30:19 +00:00
|
|
|
{ PATH("calendar.sh"), PATH("calendar_button.sh"), 60, 6},
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-08 17:30:19 +00:00
|
|
|
{ PATH("volume.sh"), PATH("volume_button.sh"), 0, 1},
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-08 17:30:19 +00:00
|
|
|
{ PATH("cpu_temp.sh"), PATH("cpu_temp_button.sh"), 1, 5},
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-07-08 19:40:31 +00:00
|
|
|
{ PATH("battery.sh"), PATH("battery_button.sh"), 30, 4},
|
2020-07-03 21:04:11 +00:00
|
|
|
|
|
|
|
{ NULL } /* just to mark the end of the array */
|
|
|
|
};
|
|
|
|
|
2020-07-09 20:18:53 +00:00
|
|
|
static const char *delim = " ";
|