diff --git a/config/sway/config b/config/sway/config index c28e019..5676772 100644 --- a/config/sway/config +++ b/config/sway/config @@ -4,7 +4,7 @@ output HDMI-A-1 resolution 1920x1080@72.038hz pos 1920 0 transform 90 bar { position top - status_command while date +'%H.%M.%S %d.%m.%Y'; do sleep 1; done + status_command while ~/.config/sway/status.sh; do sleep 1; done colors { statusline #ffffff background #323232 diff --git a/config/sway/status.sh b/config/sway/status.sh new file mode 100755 index 0000000..88e9159 --- /dev/null +++ b/config/sway/status.sh @@ -0,0 +1,15 @@ +#/bin/sh +#UPTIME=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5) +UPTIME=$(uptime -p) + +DATE=$(date +'%H.%M.%S %d.%m.%Y') + +# Returns the battery status: "Full", "Discharging", or "Charging". +#BATTERY=$(cat /sys/class/power_supply/BAT0/status) + +CPU=$(cat /proc/loadavg | cut -d ' ' -f1,2,3) + +# Emojis and characters for the status bar +# 💎 💻 💡 🔌 ⚡ 📁 \| +#echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted +echo $UPTIME \| load: $CPU \| $DATE