status

statusbar program for dwm
git clone anongit@rnpnr.xyz:status.git
Log | Files | Refs | Feed | README | LICENSE

config.def.h (1628B)


      1 #include "blocks/date.c"
      2 #include "blocks/linux/battery.c"
      3 //#include "blocks/linux/blight.c"
      4 //#include "blocks/linux/volume.c"
      5 //#include "blocks/mpd.c"
      6 //#include "blocks/script.c"
      7 
      8 /* update intervals: SEC+NANO gives sleep interval */
      9 /* SEC must be >= 0 and 0 <= NANO <= 999999999 */
     10 #define INTERVAL_SEC  1
     11 #define INTERVAL_NANO 0
     12 
     13 /* mpd_arg.host can be NULL to use the MPD_HOST env variable */
     14 // static enum mpd_tag_type tags[] = { MPD_TAG_TITLE, MPD_TAG_ARTIST };
     15 // static struct mpd_arg ma = { "localhost", "|", tags, 2 };
     16 
     17 /* alsa card and sink */
     18 /* card is found with 'aplay -L', default is probably correct */
     19 // static struct vol_arg va = { "default", "Speaker" };
     20 
     21 /* check battery.h for info */
     22 static struct bat_arg ba = { "BAT0", NULL, NULL, -1 };
     23 
     24 /* status block definitions
     25  *
     26  * function  description                    arg (ex)
     27  *
     28  * batinfo   battery percentage and status  (struct bat_arg *)
     29  * blight    backlight percentage           (char *) backlight name (intel_backlight)
     30  * date      date and time                  (char *) time fmt string (%R)
     31  * volume    ALSA volume percentage         (struct vol_arg *)
     32  * mpd_tag   reads tag from current song    (struct mpd_arg *)
     33  * script    run specified script           (char *) full script (echo foo | bar)
     34  *
     35  *
     36  * interval * INTERVAL above gives actual update interval, 0 only updates
     37  * at the start and when signaled, -1 only updates when signaled
     38  */
     39 struct Block blks[] = {
     40 /*	  fn         fmt        interval  signal  arg */
     41 	{ batinfo,   "[ %s ]",  30,       0,      &ba },
     42 	{ date,      "[ %s ]",  20,       0,      "%R" },
     43 	{ NULL },
     44 };