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