Browse Source

2023-08-02

master
RinRi 9 months ago
parent
commit
ee935920b4
29 changed files with 30 additions and 19 deletions
  1. +9
    -0
      Makefile
  2. BIN
      a.out
  3. BIN
      components/battery.o
  4. +1
    -1
      components/cpu.c
  5. BIN
      components/cpu.o
  6. BIN
      components/datetime.o
  7. BIN
      components/disk.o
  8. BIN
      components/entropy.o
  9. BIN
      components/hostname.o
  10. BIN
      components/ip.o
  11. BIN
      components/kernel_release.o
  12. BIN
      components/keyboard_indicators.o
  13. BIN
      components/keymap.o
  14. BIN
      components/load_avg.o
  15. BIN
      components/netspeeds.o
  16. BIN
      components/num_files.o
  17. BIN
      components/ram.o
  18. BIN
      components/run_command.o
  19. BIN
      components/swap.o
  20. BIN
      components/temperature.o
  21. BIN
      components/uptime.o
  22. BIN
      components/user.o
  23. BIN
      components/volume.o
  24. BIN
      components/wifi.o
  25. +10
    -9
      config.def.h
  26. +10
    -9
      config.h
  27. BIN
      slstatus
  28. BIN
      slstatus.o
  29. BIN
      util.o

+ 9
- 0
Makefile View File

@@ -62,6 +62,15 @@ install: all
cp -f slstatus.1 "$(DESTDIR)$(MANPREFIX)/man1"
chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/slstatus.1"

reinstall: all
mkdir -p "$(DESTDIR)$(PREFIX)/bin"
cp -f slstatus "$(DESTDIR)$(PREFIX)/bin"
chmod 755 "$(DESTDIR)$(PREFIX)/bin/slstatus"
mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
cp -f slstatus.1 "$(DESTDIR)$(MANPREFIX)/man1"
chmod 644 "$(DESTDIR)$(MANPREFIX)/man1/slstatus.1"
killall slstatus

uninstall:
rm -f "$(DESTDIR)$(PREFIX)/bin/slstatus"
rm -f "$(DESTDIR)$(MANPREFIX)/man1/slstatus.1"

BIN
a.out View File


BIN
components/battery.o View File


+ 1
- 1
components/cpu.c View File

@@ -44,7 +44,7 @@
return NULL;
}

return bprintf("%d", (int)(100 *
return bprintf("%03d", (int)(100 *
((b[0] + b[1] + b[2] + b[5] + b[6]) -
(a[0] + a[1] + a[2] + a[5] + a[6])) / sum));
}


BIN
components/cpu.o View File


BIN
components/datetime.o View File


BIN
components/disk.o View File


BIN
components/entropy.o View File


BIN
components/hostname.o View File


BIN
components/ip.o View File


BIN
components/kernel_release.o View File


BIN
components/keyboard_indicators.o View File


BIN
components/keymap.o View File


BIN
components/load_avg.o View File


BIN
components/netspeeds.o View File


BIN
components/num_files.o View File


BIN
components/ram.o View File


BIN
components/run_command.o View File


BIN
components/swap.o View File


BIN
components/temperature.o View File


BIN
components/uptime.o View File


BIN
components/user.o View File


BIN
components/volume.o View File


BIN
components/wifi.o View File


+ 10
- 9
config.def.h View File

@@ -63,14 +63,15 @@ static const char unknown_str[] = "n/a";
*/
static const struct arg args[] = {
/* function format argument */
{ keymap, "[%s] ", "NULL"},
{ username, ":%s@", "NULL"},
{ username, "^c#fbdf90^^b#1e1e2e^ :%s@", "NULL"},
{ hostname, "%s ", "NULL"},
{ run_command, ":%s ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },
{ battery_perc, ":%s|", "BAT1"},
{ battery_state, "%s ", "BAT1"},
{ run_command, ":%s ", "/home/rinri/scripts/status/brightness.sh"},
{ cpu_perc, ":%02s ", "NULL"},
{ ram_free, ":%s ", "NULL"},
{ datetime, "%s", "%a %F %H:%M" },
{ run_command, "^c#81d4ee^^b#1e1e2e^ %s | ", "~/scripts/mute.sh"},
{ run_command, ":%s ", "pactl get-sink-volume @DEFAULT_SINK@ | grep -o \"[0-9]*%\" | head -1" },
{ run_command, "%s", "~/scripts/status/battery.sh"},
{ battery_perc, ":%s|", "BAT1"},
{ battery_state, "%s ^b#1e1e2e^", "BAT1"},
{ run_command, "^c#d990cd^ :%s ", "~/scripts/status/brightness.sh"},
{ cpu_perc, "^c#fbdf90^ :%s ", "NULL"},
{ ram_free, "^c#81d4ee^ :%s ", "NULL"},
{ run_command, "%s^d^ ", "~/scripts/status/date.sh"}
};

+ 10
- 9
config.h View File

@@ -63,14 +63,15 @@ static const char unknown_str[] = "n/a";
*/
static const struct arg args[] = {
/* function format argument */
{ keymap, "[%s] ", "NULL"},
{ username, ":%s@", "NULL"},
{ username, "^c#fbdf90^^b#1e1e2e^ :%s@", "NULL"},
{ hostname, "%s ", "NULL"},
{ run_command, ":%s ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },
{ battery_perc, ":%s|", "BAT1"},
{ battery_state, "%s ", "BAT1"},
{ run_command, ":%s ", "/home/rinri/scripts/status/brightness.sh"},
{ cpu_perc, ":%02s ", "NULL"},
{ ram_free, ":%s ", "NULL"},
{ datetime, "%s", "%a %F %H:%M" },
{ run_command, "^c#81d4ee^^b#1e1e2e^ %s | ", "~/scripts/mute.sh"},
{ run_command, ":%s ", "pactl get-sink-volume @DEFAULT_SINK@ | grep -o \"[0-9]*%\" | head -1" },
{ run_command, "%s", "~/scripts/status/battery.sh"},
{ battery_perc, ":%s|", "BAT1"},
{ battery_state, "%s ^b#1e1e2e^", "BAT1"},
{ run_command, "^c#d990cd^ :%s ", "~/scripts/status/brightness.sh"},
{ cpu_perc, "^c#fbdf90^ :%s ", "NULL"},
{ ram_free, "^c#81d4ee^ :%s ", "NULL"},
{ run_command, "%s^d^ ", "~/scripts/status/date.sh"}
};

BIN
slstatus View File


BIN
slstatus.o View File


BIN
util.o View File


Loading…
Cancel
Save