Xinqi Bao's Git
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 - entropy (available entropy) [argument: NULL]
20 - ip (ip address) [argument: interface]
21 - ram_perc (ram usage in percent) [argument: NULL]
22 - temp (temperature in degrees) [argument: temperature file]
23 - vol_perc (alsa volume and mute status in percent) [argument: soundcard]
24 - wifi_perc (wifi signal in percent) [argument: wifi card interface name] */
25 static const struct arg args
[] = {
26 /* function format argument */
27 { wifi_perc
, "wifi %4s | ", "wlp3s0" },
28 { battery_perc
, "bat %4s | ", "BAT0" },
29 { cpu_perc
, "cpu %4s ", NULL
},
30 { temp
, "%3s | ", "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" },
31 { ram_perc
, "ram %3s | ", NULL
},
32 { vol_perc
, "vol %4s | ", "default" },
33 { disk_perc
, "ssd %3s | ", "/" },
34 { datetime
, "%s", "%y-%m-%d %H:%M:%S" },