2020-08-22 17:43:56 +00:00
|
|
|
#define PATH(name) "/home/ashish/.local/projects/dwmblocks/blocks/"name
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-12-27 16:08:58 +00:00
|
|
|
/* DELIMITERENDCHAR must be less than 32.
|
|
|
|
* At max, DELIMITERENDCHAR - 1 number of clickable blocks will be allowed.
|
2020-12-27 15:29:38 +00:00
|
|
|
* Raw characters larger than DELIMITERENDCHAR and smaller than ' ' in ASCII
|
|
|
|
character set can be used for signaling color change in status.
|
|
|
|
* The character corresponding to DELIMITERENDCHAR + 1 ('\x0b' when
|
|
|
|
DELIMITERENDCHAR is 10) will switch the active colorscheme to the first one
|
2020-12-27 16:08:58 +00:00
|
|
|
defined in colors array in dwm's config.h and so on.
|
2020-12-27 16:12:54 +00:00
|
|
|
* If you wish to change DELIMITERENDCHAR, don't forget to update its value in
|
|
|
|
dwm.c and color codes in your pathu programs. */
|
2020-12-27 15:29:38 +00:00
|
|
|
#define DELIMITERENDCHAR 10
|
|
|
|
|
|
|
|
/* If interval of a block is set to 0, the block will only be updated once at
|
|
|
|
startup.
|
|
|
|
* If interval is set to a negative value, the block will never be updated in
|
|
|
|
the main loop.
|
2020-09-30 19:04:44 +00:00
|
|
|
* Set pathc to NULL if clickability is not required for the block.
|
2020-12-27 15:29:38 +00:00
|
|
|
* Set signal to 0 if both clickability and signaling are not required for the
|
|
|
|
block.
|
|
|
|
* Signal must be less than DELIMITERENDCHAR for clickable blocks.
|
|
|
|
* If multiple signals are pending, then the lowest numbered one will be
|
|
|
|
delivered first. */
|
2020-07-03 21:04:11 +00:00
|
|
|
|
2020-12-27 15:29:38 +00:00
|
|
|
/* pathu - path of the program whose output is used as status text of the block
|
|
|
|
(output of the program should end in a null or newline character)
|
|
|
|
* pathc - path of the program used for handling clicks on the block */
|
2020-12-04 06:49:12 +00:00
|
|
|
|
|
|
|
/* 1 interval = INTERVALs seconds, INTERVALn nanoseconds */
|
|
|
|
#define INTERVALs 1
|
|
|
|
#define INTERVALn 0
|
|
|
|
|
2020-07-03 21:04:11 +00:00
|
|
|
static Block blocks[] = {
|
2020-12-27 15:29:38 +00:00
|
|
|
/* pathu pathc interval signal */
|
|
|
|
{ PATH("calendar.sh"), NULL, 30, 1},
|
|
|
|
{ PATH("volume.sh"), PATH("volume_button.sh"), 0, 2},
|
|
|
|
{ PATH("cpu_temp.sh"), PATH("cpu_temp_button.sh"), 1, 4},
|
|
|
|
{ PATH("battery.sh"), PATH("battery_button.sh"), 30, 3},
|
2020-07-03 21:04:11 +00:00
|
|
|
{ NULL } /* just to mark the end of the array */
|
|
|
|
};
|
|
|
|
|
2020-12-04 21:37:20 +00:00
|
|
|
/* default delimiter string */
|
|
|
|
#define DELIMITER " "
|