diff --git a/Makefile b/Makefile index 945b5e3..8c70445 100755 --- a/Makefile +++ b/Makefile @@ -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" diff --git a/a.out b/a.out new file mode 100755 index 0000000..b241f3f Binary files /dev/null and b/a.out differ diff --git a/components/battery.o b/components/battery.o deleted file mode 100755 index 1c276df..0000000 Binary files a/components/battery.o and /dev/null differ diff --git a/components/cpu.c b/components/cpu.c index 9e28003..fac7902 100755 --- a/components/cpu.c +++ b/components/cpu.c @@ -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)); } diff --git a/components/cpu.o b/components/cpu.o deleted file mode 100755 index f67460c..0000000 Binary files a/components/cpu.o and /dev/null differ diff --git a/components/datetime.o b/components/datetime.o deleted file mode 100755 index 600a682..0000000 Binary files a/components/datetime.o and /dev/null differ diff --git a/components/disk.o b/components/disk.o deleted file mode 100755 index e95f557..0000000 Binary files a/components/disk.o and /dev/null differ diff --git a/components/entropy.o b/components/entropy.o deleted file mode 100755 index 1234758..0000000 Binary files a/components/entropy.o and /dev/null differ diff --git a/components/hostname.o b/components/hostname.o deleted file mode 100755 index 2bf3358..0000000 Binary files a/components/hostname.o and /dev/null differ diff --git a/components/ip.o b/components/ip.o deleted file mode 100755 index 6e4384a..0000000 Binary files a/components/ip.o and /dev/null differ diff --git a/components/kernel_release.o b/components/kernel_release.o deleted file mode 100755 index 81e8eb3..0000000 Binary files a/components/kernel_release.o and /dev/null differ diff --git a/components/keyboard_indicators.o b/components/keyboard_indicators.o deleted file mode 100755 index 8f33bc7..0000000 Binary files a/components/keyboard_indicators.o and /dev/null differ diff --git a/components/keymap.o b/components/keymap.o deleted file mode 100755 index 89ae293..0000000 Binary files a/components/keymap.o and /dev/null differ diff --git a/components/load_avg.o b/components/load_avg.o deleted file mode 100755 index 36b9f4c..0000000 Binary files a/components/load_avg.o and /dev/null differ diff --git a/components/netspeeds.o b/components/netspeeds.o deleted file mode 100755 index 1a98109..0000000 Binary files a/components/netspeeds.o and /dev/null differ diff --git a/components/num_files.o b/components/num_files.o deleted file mode 100755 index a8afcfb..0000000 Binary files a/components/num_files.o and /dev/null differ diff --git a/components/ram.o b/components/ram.o deleted file mode 100755 index 06c78df..0000000 Binary files a/components/ram.o and /dev/null differ diff --git a/components/run_command.o b/components/run_command.o deleted file mode 100755 index cff227f..0000000 Binary files a/components/run_command.o and /dev/null differ diff --git a/components/swap.o b/components/swap.o deleted file mode 100755 index f97e2ea..0000000 Binary files a/components/swap.o and /dev/null differ diff --git a/components/temperature.o b/components/temperature.o deleted file mode 100755 index 3b467c6..0000000 Binary files a/components/temperature.o and /dev/null differ diff --git a/components/uptime.o b/components/uptime.o deleted file mode 100755 index 8672ff1..0000000 Binary files a/components/uptime.o and /dev/null differ diff --git a/components/user.o b/components/user.o deleted file mode 100755 index 25b2f00..0000000 Binary files a/components/user.o and /dev/null differ diff --git a/components/volume.o b/components/volume.o deleted file mode 100755 index 91c8603..0000000 Binary files a/components/volume.o and /dev/null differ diff --git a/components/wifi.o b/components/wifi.o deleted file mode 100755 index 4c5b14b..0000000 Binary files a/components/wifi.o and /dev/null differ diff --git a/config.def.h b/config.def.h index d863570..c16fa0e 100755 --- a/config.def.h +++ b/config.def.h @@ -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"} }; diff --git a/config.h b/config.h index d863570..c16fa0e 100755 --- a/config.h +++ b/config.h @@ -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"} }; diff --git a/slstatus b/slstatus deleted file mode 100755 index 7256b9a..0000000 Binary files a/slstatus and /dev/null differ diff --git a/slstatus.o b/slstatus.o deleted file mode 100755 index 96a8a82..0000000 Binary files a/slstatus.o and /dev/null differ diff --git a/util.o b/util.o deleted file mode 100755 index 33ad01a..0000000 Binary files a/util.o and /dev/null differ