RinRi-D пре 3 година
родитељ
комит
32b6139ac0
26 измењених фајлова са 80 додато и 1 уклоњено
  1. BIN
      components/battery.o
  2. BIN
      components/cpu.o
  3. BIN
      components/datetime.o
  4. BIN
      components/disk.o
  5. BIN
      components/entropy.o
  6. BIN
      components/hostname.o
  7. BIN
      components/ip.o
  8. BIN
      components/kernel_release.o
  9. BIN
      components/keyboard_indicators.o
  10. BIN
      components/keymap.o
  11. BIN
      components/load_avg.o
  12. BIN
      components/netspeeds.o
  13. BIN
      components/num_files.o
  14. BIN
      components/ram.o
  15. BIN
      components/run_command.o
  16. BIN
      components/swap.o
  17. BIN
      components/temperature.o
  18. BIN
      components/uptime.o
  19. BIN
      components/user.o
  20. BIN
      components/volume.o
  21. BIN
      components/wifi.o
  22. +7
    -1
      config.def.h
  23. +73
    -0
      config.h
  24. BIN
      slstatus
  25. BIN
      slstatus.o
  26. BIN
      util.o

BIN
components/battery.o Прегледај датотеку



BIN
components/datetime.o Прегледај датотеку


BIN
components/disk.o Прегледај датотеку


BIN
components/entropy.o Прегледај датотеку


BIN
components/hostname.o Прегледај датотеку



BIN
components/kernel_release.o Прегледај датотеку


BIN
components/keyboard_indicators.o Прегледај датотеку


BIN
components/keymap.o Прегледај датотеку


BIN
components/load_avg.o Прегледај датотеку


BIN
components/netspeeds.o Прегледај датотеку


BIN
components/num_files.o Прегледај датотеку



BIN
components/run_command.o Прегледај датотеку


BIN
components/swap.o Прегледај датотеку


BIN
components/temperature.o Прегледај датотеку


BIN
components/uptime.o Прегледај датотеку


BIN
components/user.o Прегледај датотеку


BIN
components/volume.o Прегледај датотеку


BIN
components/wifi.o Прегледај датотеку


+ 7
- 1
config.def.h Прегледај датотеку

@@ -63,5 +63,11 @@ static const char unknown_str[] = "n/a";
*/
static const struct arg args[] = {
/* function format argument */
{ datetime, "%s", "%F %T" },
{ keymap, "%s ", "NULL"},
{ run_command, "V:%s ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },
{ battery_perc, "B:%s|", "BAT1"},
{ battery_state, "%s ", "BAT1"},
{ cpu_perc, "C:%s ", "NULL"},
{ ram_free, "R:%s ", "NULL"},
{ datetime, "%s", "%a %F %H:%M" },
};

+ 73
- 0
config.h Прегледај датотеку

@@ -0,0 +1,73 @@
/* 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_state battery charging state battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* battery_remaining battery remaining HH:MM battery name (BAT0)
* NULL on OpenBSD/FreeBSD
* cpu_perc cpu usage in percent NULL
* cpu_freq cpu frequency in MHz 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
* uptime system uptime NULL
* username username of current user NULL
* vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
* wifi_perc WiFi signal in percent interface name (wlan0)
* wifi_essid WiFi ESSID interface name (wlan0)
*/
static const struct arg args[] = {
/* function format argument */
{ keymap, "%s ", "NULL"},
{ run_command, "V:%s ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },
{ battery_perc, "B:%s|", "BAT1"},
{ battery_state, "%s ", "BAT1"},
{ cpu_perc, "C:%s ", "NULL"},
{ ram_free, "R:%s ", "NULL"},
{ datetime, "%s", "%a %F %H:%M" },
};




Loading…
Откажи
Сачувај