From 0e7910549d12131f630eae76d06c130b6876af63 Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Mon, 23 Dec 2024 11:15:18 +1030 Subject: [PATCH] feat: replace status with dwmblocks --- .local/bin/dwm-autostart | 2 +- .local/bin/git-fucked | 3 +++ .local/bin/status-battery | 3 +++ .local/bin/status-datetime | 3 +++ .local/bin/status-disk-usage | 3 +++ .local/bin/status-docker | 3 +++ .local/bin/status-internet | 3 +++ .local/bin/status-memory | 3 +++ .local/bin/status-pkgs | 7 +++++++ .local/bin/status-temperature | 3 +++ 10 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 .local/bin/git-fucked create mode 100755 .local/bin/status-battery create mode 100755 .local/bin/status-datetime create mode 100755 .local/bin/status-disk-usage create mode 100755 .local/bin/status-docker create mode 100755 .local/bin/status-internet create mode 100755 .local/bin/status-memory create mode 100755 .local/bin/status-pkgs create mode 100755 .local/bin/status-temperature diff --git a/.local/bin/dwm-autostart b/.local/bin/dwm-autostart index a981bf9..8ce3167 100755 --- a/.local/bin/dwm-autostart +++ b/.local/bin/dwm-autostart @@ -7,4 +7,4 @@ xsetroot -solid "#1A1A22" # ~/.local/bin/setbg # nohup /usr/lib/kdeconnectd >/dev/null 2>&1 & -~/.local/bin/dwm-sss & +dwmblocks & diff --git a/.local/bin/git-fucked b/.local/bin/git-fucked new file mode 100755 index 0000000..2e20231 --- /dev/null +++ b/.local/bin/git-fucked @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "You fucking bozo" diff --git a/.local/bin/status-battery b/.local/bin/status-battery new file mode 100755 index 0000000..ff6bcb9 --- /dev/null +++ b/.local/bin/status-battery @@ -0,0 +1,3 @@ +#!/bin/bash + +echo $(cat /sys/class/power_supply/BAT1/capacity)% diff --git a/.local/bin/status-datetime b/.local/bin/status-datetime new file mode 100755 index 0000000..b610050 --- /dev/null +++ b/.local/bin/status-datetime @@ -0,0 +1,3 @@ +#!/bin/bash + +date '+%a %b %d, %H:%M' diff --git a/.local/bin/status-disk-usage b/.local/bin/status-disk-usage new file mode 100755 index 0000000..01097f0 --- /dev/null +++ b/.local/bin/status-disk-usage @@ -0,0 +1,3 @@ +#!/bin/bash + +df -h / | tail -n 1 | awk '{ print $4 }' diff --git a/.local/bin/status-docker b/.local/bin/status-docker new file mode 100755 index 0000000..3ee6b76 --- /dev/null +++ b/.local/bin/status-docker @@ -0,0 +1,3 @@ +#!/bin/bash + +docker ps -q | wc -l diff --git a/.local/bin/status-internet b/.local/bin/status-internet new file mode 100755 index 0000000..efeb2ef --- /dev/null +++ b/.local/bin/status-internet @@ -0,0 +1,3 @@ +#!/bin/bash + +cat /sys/class/net/wlp170s0/operstate diff --git a/.local/bin/status-memory b/.local/bin/status-memory new file mode 100755 index 0000000..a2f3079 --- /dev/null +++ b/.local/bin/status-memory @@ -0,0 +1,3 @@ +#!/bin/bash + +free -h | awk '/^Mem/ { print $3""$2 }' | sed s/i//g diff --git a/.local/bin/status-pkgs b/.local/bin/status-pkgs new file mode 100755 index 0000000..aac9ea9 --- /dev/null +++ b/.local/bin/status-pkgs @@ -0,0 +1,7 @@ +#!/bin/bash + + +UPDATE_PKGS=$(pacman -Qu | grep -v "\[ignored\]" | wc -l) +ALL_PKGS=$(pacman -Q | wc -l) + +echo "${UPDATE_PKGS}/${ALL_PKGS}" diff --git a/.local/bin/status-temperature b/.local/bin/status-temperature new file mode 100755 index 0000000..f4b63d5 --- /dev/null +++ b/.local/bin/status-temperature @@ -0,0 +1,3 @@ +#!/bin/bash + +echo $(cat /sys/class/thermal/thermal_zone0/temp | cut -b -2)°C