slstatus.h (2981B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* interval between updates (in ms) */ 4 static const 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 14 * 15 * battery_perc battery percentage battery name 16 * battery_power battery power usage battery name 17 * battery_state battery charging state battery name 18 * cpu_perc cpu usage in percent NULL 19 * cpu_freq cpu frequency in MHz NULL 20 * datetime date and time format string 21 * disk_free free disk space in GB mountpoint path 22 * disk_perc disk usage in percent mountpoint path 23 * disk_total total disk space in GB mountpoint path 24 * disk_used used disk space in GB mountpoint path 25 * entropy available entropy NULL 26 * gid GID of current user NULL 27 * hostname hostname NULL 28 * ipv4 IPv4 address interface name 29 * ipv6 IPv6 address interface name 30 * kernel_release `uname -r` NULL 31 * keyboard_indicators caps/num lock indicators NULL 32 * load_avg load average NULL 33 * num_files number of files in a directory path 34 * ram_free free memory in GB NULL 35 * ram_perc memory usage in percent NULL 36 * ram_total total memory size in GB NULL 37 * ram_used used memory in GB NULL 38 * run_command custom shell command command 39 * swap_free free swap in GB NULL 40 * swap_perc swap usage in percent NULL 41 * swap_total total swap size in GB NULL 42 * swap_used used swap in GB NULL 43 * temp temperature in degree celsius sensor file 44 * uid UID of current user NULL 45 * uptime system uptime NULL 46 * username username of current user NULL 47 * vol_perc OSS/ALSA volume in percent "/dev/mixer" 48 * wifi_perc WiFi signal in percent interface name 49 * wifi_essid WiFi ESSID interface name 50 */ 51 static const struct arg args[] = { 52 /* function format argument */ 53 /* { keyboard_indicators, " %s ", NULL }, */ 54 { cpu_perc, "%2s%% ", NULL }, 55 { ram_perc, "%2s%% ", NULL }, 56 /* { vol_perc, "%2s%% ", "/dev/mixer" }, */ 57 /* { wifi_perc, "%2s%% ", NULL }, */ 58 { battery_perc, "%2s%% ", "BAT0" }, 59 { datetime, "%s", "%b %d %I:%M" }, 60 };