Xinqi Bao's Git
5fb52b318db8ae93da5d584f7119995a2caf6be3
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;
14 /* text to show if no value can be retrieved */
15 static const char unknowntext
[] = "n/a";
18 - battery_perc (battery percentage) [argument: battery name]
19 - cpu_perc (cpu usage in percent) [argument: NULL]
20 - datetime (date and time) [argument: format]
21 - disk_free (disk usage in percent) [argument: mountpoint]
22 - disk_perc (disk usage in percent) [argument: mountpoint]
23 - disk_total (disk usage in percent) [argument: mountpoint]
24 - disk_used (disk usage in percent) [argument: mountpoint]
25 - entropy (available entropy) [argument: NULL]
26 - gid (gid of current user) [argument: NULL]
27 - hostname [argument: NULL]
28 - ip (ip address) [argument: interface]
29 - load_avg (load average) [argument: NULL]
30 - ram_free (ram usage in percent) [argument: NULL]
31 - ram_perc (ram usage in percent) [argument: NULL]
32 - ram_total (ram usage in percent) [argument: NULL]
33 - ram_used (ram usage in percent) [argument: NULL]
34 - run_command (run custom shell command) [argument: command]
35 - temp (temperature in degrees) [argument: temperature file]
36 - uid (uid of current user) [argument: NULL]
37 - uptime (uptime) [argument: NULL]
38 - username (username of current user) [argument: NULL]
39 - vol_perc (alsa volume and mute status in percent) [argument: soundcard]
40 - wifi_perc (wifi signal in percent) [argument: wifi card interface name]
41 - wifi_essid (wifi essid) [argument: wifi card interface name] */
42 static const struct arg args
[] = {
43 /* function format argument */
44 { wifi_perc
, "wifi %4s | ", "wlp3s0" },
45 { battery_perc
, "bat %4s | ", "BAT0" },
46 { cpu_perc
, "cpu %4s ", NULL
},
47 { temp
, "%3s | ", "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input" },
48 { ram_perc
, "ram %3s | ", NULL
},
49 { vol_perc
, "vol %4s | ", "default" },
50 { disk_perc
, "ssd %3s | ", "/" },
51 { datetime
, "%s", "%y-%m-%d %H:%M:%S" },