config.h (2743B)
1 #include "blocks/battery.h" 2 #include "blocks/brightness.h" 3 #include "blocks/calendar.h" 4 #include "blocks/cpu.h" 5 #include "blocks/mem.h" 6 #include "blocks/pkgs.h" 7 #include "blocks/temp.h" 8 #include "blocks/time.h" 9 #include "blocks/volume.h" 10 11 /* DELIMITERENDCHAR must be less than 32. 12 * At max, DELIMITERENDCHAR - 1 number of clickable blocks are allowed. 13 * Raw characters larger than DELIMITERENDCHAR and smaller than ' ' in ASCII 14 character set can be used for signaling color change in status. 15 * The character corresponding to DELIMITERENDCHAR + 1 ('\x0b' when 16 DELIMITERENDCHAR is 10) will switch the active colorscheme to the first one 17 defined in colors array in dwm's config.h and so on. 18 * If you wish to change DELIMITERENDCHAR, don't forget to update its value in 19 dwm.c and color codes in util.h. */ 20 #define DELIMITERENDCHAR 10 21 22 static const char delimiter[] = { ' ', '|', ' ', DELIMITERENDCHAR }; 23 24 #include "block.h" 25 26 /* If interval of a block is set to 0, the block will only be updated once at 27 startup. 28 * If interval is set to a negative value, the block will never be updated in 29 the main loop. 30 * Set funcc to NULL if clickability is not required for the block. 31 * Set signal to 0 if both clickability and signaling are not required for the 32 block. 33 * Signal must be less than DELIMITERENDCHAR for clickable blocks. 34 * If multiple signals are pending, then the lowest numbered one will be 35 delivered first. */ 36 37 /* funcu - function responsible for updating status text of the block 38 (it should return the length of the text (including the terminating 39 null byte), if the text was updated and 0 otherwise) 40 * funcc - function responsible for handling clicks on the block */ 41 42 /* 1 interval = INTERVALs seconds, INTERVALn nanoseconds */ 43 #define INTERVALs 1 44 #define INTERVALn 0 45 46 static Block blocks[] = { 47 /* funcu funcc interval signal */ 48 /* { pkgsu, pkgsc, 600, 9}, */ 49 { tempu, tempc, 2, 6}, 50 { memu, memc, 2, 4}, 51 { cpuu, cpuc, 2, 3}, 52 { brightnessu, brightnessc, 600, 9}, 53 { volumeu, volumec, 600, 5}, 54 { batteryu, batteryc, 2, 8}, 55 { calendaru, calendarc, 600, 2}, 56 { timeu, timec, 1, 1}, 57 58 { NULL } /* just to mark the end of the array */ 59 };