Xinqi Bao's Git
5576936c7406cc71b72429d43053f94094186d5c
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_free (disk usage in percent) [argument: mountpoint]
19 - disk_perc (disk usage in percent) [argument: mountpoint]
20 - disk_total (disk usage in percent) [argument: mountpoint]
21 - disk_used (disk usage in percent) [argument: mountpoint]
22 - entropy (available entropy) [argument: NULL]
23 - gid (gid of current user) [argument: NULL]
24 - hostname [argument: NULL]
25 - ip (ip address) [argument: interface]
26 - ram_free (ram usage in percent) [argument: NULL]
27 - ram_perc (ram usage in percent) [argument: NULL]
28 - ram_total (ram usage in percent) [argument: NULL]
29 - ram_used (ram usage in percent) [argument: NULL]
30 - run_command (run custom shell command) [argument: command]
31 - temp (temperature in degrees) [argument: temperature file]
32 - uid (uid of current user) [argument: NULL]
33 - username (username of current user) [argument: NULL]
34 - vol_perc (alsa volume and mute status in percent) [argument: soundcard]
35 - wifi_perc (wifi signal in percent) [argument: wifi card interface name]
36 - wifi_essid (wifi essid) [argument: wifi card interface name] */
37 static const struct arg args
[] = {
38 /* function format argument */
39 { wifi_perc
, "wifi %4s | ", "wlp3s0" },
40 { battery_perc
, "bat %4s | ", "BAT0" },
41 { cpu_perc
, "cpu %4s ", NULL
},
42 { temp
, "%3s | ", "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" },
43 { ram_perc
, "ram %3s | ", NULL
},
44 { vol_perc
, "vol %4s | ", "default" },
45 { disk_perc
, "ssd %3s | ", "/" },
46 { datetime
, "%s", "%y-%m-%d %H:%M:%S" },