Xinqi Bao's Git
38af2b911e72f24265b321df2d5f2490d5167a6e
   1 /* See LICENSE file for copyright and license details. */ 
   4 static const char channel
[]   = "Master"; 
   7 static const char batterypath
[] = "/sys/class/power_supply/"; 
   8 static const char batterynow
[]  = "energy_now"; 
   9 static const char batteryfull
[] = "energy_full_design"; 
  11 /* bar update interval in seconds (smallest value = 1) */ 
  12 static unsigned int update_interval 
= 1; 
  15 - battery_perc (battery percentage) [argument: battery name] 
  16 - cpu_perc (cpu usage in percent) [argument: NULL] 
  17 - datetime (date and time) [argument: format] 
  18 - disk_perc (disk usage in percent) [argument: mountpoint] 
  19 - ram_perc (ram usage in percent) [argument: NULL] 
  20 - temp (temperature in degrees) [argument: temperature file] 
  21 - vol_perc (alsa volume and mute status in percent) [argument: soundcard] 
  22 - wifi_perc (wifi signal in percent) [argument: wifi card interface name] */ 
  23 static const struct arg args
[] = { 
  24     /* function     format          argument */ 
  25     { wifi_perc
,    "wifi %4s | ",  "wlp3s0" }, 
  26     { battery_perc
, "bat %4s | ",   "BAT0" }, 
  27     { cpu_perc
,     "cpu %4s ",     NULL 
}, 
  28     { temp
,         "%3s | ",       "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" }, 
  29     { ram_perc
,     "ram %3s | ",   NULL 
}, 
  30     { vol_perc
,     "vol %4s | ",   "default" }, 
  31     { disk_perc
,    "ssd %3s | ",   "/" }, 
  32     { datetime
,     "%s",           "%y-%m-%d %H:%M:%S" },