From b755d014bf5fcf0e1c41df811ffd0f7eb59dace5 Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Thu, 10 Jul 2025 15:44:51 +0200 Subject: my slstatus --- components/battery.o | Bin 0 -> 5208 bytes components/cat.o | Bin 0 -> 2128 bytes components/cpu.o | Bin 0 -> 3136 bytes components/datetime.o | Bin 0 -> 1936 bytes components/disk.o | Bin 0 -> 3144 bytes components/entropy.o | Bin 0 -> 1792 bytes components/hostname.o | Bin 0 -> 1648 bytes components/ip.o | Bin 0 -> 3136 bytes components/kernel_release.o | Bin 0 -> 1840 bytes components/keyboard_indicators.o | Bin 0 -> 2416 bytes components/keymap.o | Bin 0 -> 4056 bytes components/load_avg.o | Bin 0 -> 1872 bytes components/netspeeds.o | Bin 0 -> 2792 bytes components/num_files.o | Bin 0 -> 2160 bytes components/ram.o | Bin 0 -> 3104 bytes components/run_command.o | Bin 0 -> 2144 bytes components/swap.o | Bin 0 -> 3944 bytes components/temperature.o | Bin 0 -> 1712 bytes components/uptime.o | Bin 0 -> 1992 bytes components/user.o | Bin 0 -> 2200 bytes components/volume.o | Bin 0 -> 3616 bytes components/wifi.o | Bin 0 -> 6056 bytes config.def.h | 8 ++++- config.h | 76 +++++++++++++++++++++++++++++++++++++++ slstatus | Bin 0 -> 35440 bytes slstatus.o | Bin 0 -> 6624 bytes util.o | Bin 0 -> 5576 bytes 27 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 components/battery.o create mode 100644 components/cat.o create mode 100644 components/cpu.o create mode 100644 components/datetime.o create mode 100644 components/disk.o create mode 100644 components/entropy.o create mode 100644 components/hostname.o create mode 100644 components/ip.o create mode 100644 components/kernel_release.o create mode 100644 components/keyboard_indicators.o create mode 100644 components/keymap.o create mode 100644 components/load_avg.o create mode 100644 components/netspeeds.o create mode 100644 components/num_files.o create mode 100644 components/ram.o create mode 100644 components/run_command.o create mode 100644 components/swap.o create mode 100644 components/temperature.o create mode 100644 components/uptime.o create mode 100644 components/user.o create mode 100644 components/volume.o create mode 100644 components/wifi.o create mode 100644 config.h create mode 100755 slstatus create mode 100644 slstatus.o create mode 100644 util.o diff --git a/components/battery.o b/components/battery.o new file mode 100644 index 0000000..4c2b155 Binary files /dev/null and b/components/battery.o differ diff --git a/components/cat.o b/components/cat.o new file mode 100644 index 0000000..94db1dd Binary files /dev/null and b/components/cat.o differ diff --git a/components/cpu.o b/components/cpu.o new file mode 100644 index 0000000..481a63d Binary files /dev/null and b/components/cpu.o differ diff --git a/components/datetime.o b/components/datetime.o new file mode 100644 index 0000000..60a868c Binary files /dev/null and b/components/datetime.o differ diff --git a/components/disk.o b/components/disk.o new file mode 100644 index 0000000..04a769c Binary files /dev/null and b/components/disk.o differ diff --git a/components/entropy.o b/components/entropy.o new file mode 100644 index 0000000..c2aef19 Binary files /dev/null and b/components/entropy.o differ diff --git a/components/hostname.o b/components/hostname.o new file mode 100644 index 0000000..523779f Binary files /dev/null and b/components/hostname.o differ diff --git a/components/ip.o b/components/ip.o new file mode 100644 index 0000000..5658e44 Binary files /dev/null and b/components/ip.o differ diff --git a/components/kernel_release.o b/components/kernel_release.o new file mode 100644 index 0000000..00e4c4e Binary files /dev/null and b/components/kernel_release.o differ diff --git a/components/keyboard_indicators.o b/components/keyboard_indicators.o new file mode 100644 index 0000000..55b9329 Binary files /dev/null and b/components/keyboard_indicators.o differ diff --git a/components/keymap.o b/components/keymap.o new file mode 100644 index 0000000..6aad0d1 Binary files /dev/null and b/components/keymap.o differ diff --git a/components/load_avg.o b/components/load_avg.o new file mode 100644 index 0000000..3e8d272 Binary files /dev/null and b/components/load_avg.o differ diff --git a/components/netspeeds.o b/components/netspeeds.o new file mode 100644 index 0000000..921665f Binary files /dev/null and b/components/netspeeds.o differ diff --git a/components/num_files.o b/components/num_files.o new file mode 100644 index 0000000..94a0e80 Binary files /dev/null and b/components/num_files.o differ diff --git a/components/ram.o b/components/ram.o new file mode 100644 index 0000000..a55d136 Binary files /dev/null and b/components/ram.o differ diff --git a/components/run_command.o b/components/run_command.o new file mode 100644 index 0000000..f1dd012 Binary files /dev/null and b/components/run_command.o differ diff --git a/components/swap.o b/components/swap.o new file mode 100644 index 0000000..7b4e89d Binary files /dev/null and b/components/swap.o differ diff --git a/components/temperature.o b/components/temperature.o new file mode 100644 index 0000000..4568dea Binary files /dev/null and b/components/temperature.o differ diff --git a/components/uptime.o b/components/uptime.o new file mode 100644 index 0000000..e747068 Binary files /dev/null and b/components/uptime.o differ diff --git a/components/user.o b/components/user.o new file mode 100644 index 0000000..d230f86 Binary files /dev/null and b/components/user.o differ diff --git a/components/volume.o b/components/volume.o new file mode 100644 index 0000000..7d5c332 Binary files /dev/null and b/components/volume.o differ diff --git a/components/wifi.o b/components/wifi.o new file mode 100644 index 0000000..8a4bf8e Binary files /dev/null and b/components/wifi.o differ diff --git a/config.def.h b/config.def.h index 100093e..06515a1 100644 --- a/config.def.h +++ b/config.def.h @@ -66,5 +66,11 @@ static const char unknown_str[] = "n/a"; */ static const struct arg args[] = { /* function format argument */ - { datetime, "%s", "%F %T" }, + { username, "%s ", "%s" }, + { cpu_perc, "CPU: %s, ", "/" }, + { wifi_essid, "%s: ", "wlp3s0"}, + { wifi_perc, "%s, ", "wlp3s0"}, + { ram_perc, "RAM: %s, ", NULL }, + { battery_perc, "Power: %s, ", "BAT1" }, + { datetime, "%s", "%F %T" }, }; diff --git a/config.h b/config.h new file mode 100644 index 0000000..06515a1 --- /dev/null +++ b/config.h @@ -0,0 +1,76 @@ +/* See LICENSE file for copyright and license details. */ + +/* interval between updates (in ms) */ +const unsigned int interval = 1000; + +/* text to show if no value can be retrieved */ +static const char unknown_str[] = "n/a"; + +/* maximum output string length */ +#define MAXLEN 2048 + +/* + * function description argument (example) + * + * battery_perc battery percentage battery name (BAT0) + * NULL on OpenBSD/FreeBSD + * battery_remaining battery remaining HH:MM battery name (BAT0) + * NULL on OpenBSD/FreeBSD + * battery_state battery charging state battery name (BAT0) + * NULL on OpenBSD/FreeBSD + * cat read arbitrary file path + * cpu_freq cpu frequency in MHz NULL + * cpu_perc cpu usage in percent NULL + * datetime date and time format string (%F %T) + * disk_free free disk space in GB mountpoint path (/) + * disk_perc disk usage in percent mountpoint path (/) + * disk_total total disk space in GB mountpoint path (/) + * disk_used used disk space in GB mountpoint path (/) + * entropy available entropy NULL + * gid GID of current user NULL + * hostname hostname NULL + * ipv4 IPv4 address interface name (eth0) + * ipv6 IPv6 address interface name (eth0) + * kernel_release `uname -r` NULL + * keyboard_indicators caps/num lock indicators format string (c?n?) + * see keyboard_indicators.c + * keymap layout (variant) of current NULL + * keymap + * load_avg load average NULL + * netspeed_rx receive network speed interface name (wlan0) + * netspeed_tx transfer network speed interface name (wlan0) + * num_files number of files in a directory path + * (/home/foo/Inbox/cur) + * ram_free free memory in GB NULL + * ram_perc memory usage in percent NULL + * ram_total total memory size in GB NULL + * ram_used used memory in GB NULL + * run_command custom shell command command (echo foo) + * swap_free free swap in GB NULL + * swap_perc swap usage in percent NULL + * swap_total total swap size in GB NULL + * swap_used used swap in GB NULL + * temp temperature in degree celsius sensor file + * (/sys/class/thermal/...) + * NULL on OpenBSD + * thermal zone on FreeBSD + * (tz0, tz1, etc.) + * uid UID of current user NULL + * up interface is running interface name (eth0) + * uptime system uptime NULL + * username username of current user NULL + * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer) + * NULL on OpenBSD/FreeBSD + * wifi_essid WiFi ESSID interface name (wlan0) + * wifi_perc WiFi signal in percent interface name (wlan0) + */ +static const struct arg args[] = { + /* function format argument */ + { username, "%s ", "%s" }, + { cpu_perc, "CPU: %s, ", "/" }, + { wifi_essid, "%s: ", "wlp3s0"}, + { wifi_perc, "%s, ", "wlp3s0"}, + { ram_perc, "RAM: %s, ", NULL }, + { battery_perc, "Power: %s, ", "BAT1" }, + { datetime, "%s", "%F %T" }, +}; diff --git a/slstatus b/slstatus new file mode 100755 index 0000000..ce684cf Binary files /dev/null and b/slstatus differ diff --git a/slstatus.o b/slstatus.o new file mode 100644 index 0000000..af6b285 Binary files /dev/null and b/slstatus.o differ diff --git a/util.o b/util.o new file mode 100644 index 0000000..6e91276 Binary files /dev/null and b/util.o differ -- cgit v1.2.3