Changing time display to status.sh, added example items

This commit is contained in:
Siina Mashek 2023-12-23 00:21:55 +02:00
parent 62919e4d4b
commit 081c0289c1
2 changed files with 16 additions and 1 deletions

View File

@ -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

15
config/sway/status.sh Executable file
View File

@ -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