3a66ee3b6237b68563cc00be6268de9c7ec0daa9
[dotfiles.git] / config.h / slstatus / config.h
1 /* See LICENSE file for copyright and license details. */
2
3 /* interval between updates (in ms) */
4 const unsigned int interval = 30*1000;
5
6 /* text to show if no value can be retrieved */
7 static const char unknown_str[] = "n/a";
8
9 /* maximum output string length */
10 #define MAXLEN 2048
11
12 /*
13 * function description argument (example)
14 *
15 * battery_perc battery percentage battery name (BAT0)
16 * NULL on OpenBSD/FreeBSD
17 * battery_state battery charging state battery name (BAT0)
18 * NULL on OpenBSD/FreeBSD
19 * battery_remaining battery remaining HH:MM battery name (BAT0)
20 * NULL on OpenBSD/FreeBSD
21 * cpu_perc cpu usage in percent NULL
22 * cpu_freq cpu frequency in MHz NULL
23 * datetime date and time format string (%F %T)
24 * disk_free free disk space in GB mountpoint path (/)
25 * disk_perc disk usage in percent mountpoint path (/)
26 * disk_total total disk space in GB mountpoint path (/")
27 * disk_used used disk space in GB mountpoint path (/)
28 * entropy available entropy NULL
29 * gid GID of current user NULL
30 * hostname hostname NULL
31 * ipv4 IPv4 address interface name (eth0)
32 * ipv6 IPv6 address interface name (eth0)
33 * kernel_release `uname -r` NULL
34 * keyboard_indicators caps/num lock indicators format string (c?n?)
35 * see keyboard_indicators.c
36 * keymap layout (variant) of current NULL
37 * keymap
38 * load_avg load average NULL
39 * netspeed_rx receive network speed interface name (wlan0)
40 * netspeed_tx transfer network speed interface name (wlan0)
41 * num_files number of files in a directory path
42 * (/home/foo/Inbox/cur)
43 * ram_free free memory in GB NULL
44 * ram_perc memory usage in percent NULL
45 * ram_total total memory size in GB NULL
46 * ram_used used memory in GB NULL
47 * run_command custom shell command command (echo foo)
48 * swap_free free swap in GB NULL
49 * swap_perc swap usage in percent NULL
50 * swap_total total swap size in GB NULL
51 * swap_used used swap in GB NULL
52 * temp temperature in degree celsius sensor file
53 * (/sys/class/thermal/...)
54 * NULL on OpenBSD
55 * thermal zone on FreeBSD
56 * (tz0, tz1, etc.)
57 * uid UID of current user NULL
58 * uptime system uptime NULL
59 * username username of current user NULL
60 * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
61 * wifi_perc WiFi signal in percent interface name (wlan0)
62 * wifi_essid WiFi ESSID interface name (wlan0)
63 */
64 static const struct arg args[] = {
65 /* function format argument */
66 { temp, "🌡 %s°C | ",
67 "/sys/class/thermal/thermal_zone1/temp"},
68 { num_files, "✉ %s | ",
69 "/home/mrl/.local/share/offlineimap/mail/INBOX/new" },
70 { keymap, "%s | ", NULL },
71 { ipv4, "E %s | ", "enp0s31f6" },
72 #ifdef LAPTOP
73 { wifi_essid, "W %s ", "wlp1s0" },
74 { ipv4, "(%s) | ", "wlp1s0" },
75 { battery_perc, "âš¡%s%%", "BAT0"},
76 { battery_state, "(%s) | ", "BAT0"},
77 #else
78 { disk_free, "/mnt/data: %s/", "/mnt/data" },
79 { disk_total, "%s | ", "/mnt/data" },
80 #endif
81 { disk_free, "/: %s/", "/" },
82 { disk_total, "%s | ", "/" },
83 { datetime, "%s", "%Y-%m-%d %H:%M" },
84 };