config.def.h (4451B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* interval between updates (in ms) */ 4 const unsigned int interval = 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_remaining battery remaining HH:MM battery name (BAT0) 18 * NULL on OpenBSD/FreeBSD 19 * battery_state battery charging state battery name (BAT0) 20 * NULL on OpenBSD/FreeBSD 21 * cat read arbitrary file path 22 * cpu_freq cpu frequency in MHz NULL 23 * cpu_perc cpu usage in percent 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 * kanji japanese day of week kanji NULL 35 * kernel_release `uname -r` NULL 36 * keyboard_indicators caps/num lock indicators format string (c?n?) 37 * see keyboard_indicators.c 38 * keymap layout (variant) of current NULL 39 * keymap 40 * load_avg load average NULL 41 * netspeed_rx receive network speed interface name (wlan0) 42 * netspeed_tx transfer network speed interface name (wlan0) 43 * num_files number of files in a directory path 44 * (/home/foo/Inbox/cur) 45 * ram_free free memory in GB NULL 46 * ram_perc memory usage in percent NULL 47 * ram_total total memory size in GB NULL 48 * ram_used used memory in GB NULL 49 * run_command custom shell command command (echo foo) 50 * swap_free free swap in GB NULL 51 * swap_perc swap usage in percent NULL 52 * swap_total total swap size in GB NULL 53 * swap_used used swap in GB NULL 54 * temp temperature in degree celsius sensor file 55 * (/sys/class/thermal/...) 56 * NULL on OpenBSD 57 * thermal zone on FreeBSD 58 * (tz0, tz1, etc.) 59 * uid UID of current user NULL 60 * uptime system uptime NULL 61 * username username of current user NULL 62 * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer) 63 * NULL on OpenBSD/FreeBSD 64 * wifi_essid WiFi ESSID interface name (wlan0) 65 * wifi_perc WiFi signal in percent interface name (wlan0) 66 */ 67 static const struct arg args[] = { 68 /* function format argument */ 69 { ram_used, "|\uefc5 %s|", NULL }, 70 { cpu_perc, "\uf4bc %s%%|", NULL }, 71 { disk_free, "\uf0a0 %s|", "/" }, 72 //{ netspeed_rx, "\uf1eb %s|", "wlan0"}, 73 { temp, "%s C°\uef2b|", "/sys/class/thermal/thermal_zone0/temp" }, 74 { run_command, "%s% \uf028|", "wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{ print $2 }'"}, 75 { run_command, "%s% \uf130|", "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{ print $2 }'"}, 76 //{ battery_perc, "%s% \uf240|", "BAT1" }, 77 { datetime, "%s", "%r"}, 78 //{ kernel_release, "\uebc6 %s", }, 79 };