dots/.config/sway/bar.sh
2025-01-27 14:29:24 -08:00

31 lines
756 B
Bash
Executable file

#! /bin/sh
while true
do
# Battery
batstat=$(cat /sys/class/power_supply/BAT0/status)
bat=$(upower --show-info $(upower --enumerate | grep 'BAT') | egrep "state|percentage" | awk '{print $2}')
#
# Song Info
# song=$(mpc -f "%artist%: %title%" | head -n 1)
# Volume
vol=$(pamixer --get-volume)
# make if statement that creates a variable to display audio status
#🔇 Muted
#🔈 0
#🔉 <50
#🔊 >50
# Time
date=$(date +'%A, %b %d')
time=$(date +'%I:%M:%S %p')
echo "$bat $batstat · $vol% · $date $time "
sleep 1
# Electricity: ⚡ ↯ ⭍ 🔌
# Audio: 🔈 🔊 🎧 🎶 🎵 🎤
# Separators: \| ❘ ❙ ❚
# Misc: 🐧 💎 💻 💡 ⭐ 📁 ↑ ↓ ✉ ✅ ❎
done