From 1c58ccb7855719483490abe1982afa12b0488f24 Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Fri, 15 May 2026 22:36:21 -0400 Subject: refactor and battery notifier --- scripts/sysinfo | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 scripts/sysinfo (limited to 'scripts/sysinfo') diff --git a/scripts/sysinfo b/scripts/sysinfo deleted file mode 100755 index 5cb2d07..0000000 --- a/scripts/sysinfo +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -get_message() { - - # Date - echo "Date: $(date +"%a %b %d")" - echo "Time: $(date +"%I:%M:%S")" - - # Volume - echo "$(wpctl get-volume @DEFAULT_SINK@ | awk -F' ' '{ printf "%s %s%% %s", $1, ($2 * 100), $3; }')" - - # Brightness - echo "Brightness: $(brightnessctl -m | cut -d, -f 4)" - - # Battery - echo "$(cat /sys/class/power_supply/BAT0/status): $(cat /sys/class/power_supply/BAT0/capacity)%" - - # Network Info - net_device=$(ip a | grep "state UP" | awk -F': ' '{ printf($2) }') - case "${net_device}" in - wlan*) - connected_network=$(iwctl station ${net_device} show | grep 'Connected network' \ - | awk -F' ' '{ printf($3) }') - ;; - eth*) - ;; - esac - echo "${net_device}: ${connected_network}" -} - -message=$(get_message) - -if [ "$TERM" = "linux" ]; then - notify-send "System Info" "$message" -else - echo "$message" -fi -- cgit v1.2.3