diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-09-13 15:57:40 +0530 |
---|---|---|
committer | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-09-13 15:57:40 +0530 |
commit | 909ea55d0a58f8e07e3416209d9b04937eaaaff1 (patch) | |
tree | 4cefb9f65ef1669ff47bdd3d49c56417e31dcf59 | |
parent | 1f51787c1cf3766816062f1142cfda95e7b44bcc (diff) |
sway: status: adding prague time
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
-rwxr-xr-x | .config/sway/status.sh | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/.config/sway/status.sh b/.config/sway/status.sh index c15f498..b501145 100755 --- a/.config/sway/status.sh +++ b/.config/sway/status.sh @@ -6,6 +6,7 @@ # like 2018-10-06 and the time (e.g., 14:01). Check `man date` on how to format # time and date. date_formatted=$(date "+%a %F %I:%M") +date_prague=$(TZ=Europe/Prague date "+%a %F %I:%M") # "upower --enumerate | grep 'BAT'" gets the battery name (e.g., # "/org/freedesktop/UPower/devices/battery_BAT0") from all power devices. @@ -20,19 +21,6 @@ grep 'BAT') |\ egrep "state|percentage" |\ awk '{print $2}') -# "amixer -M" gets the mapped volume for evaluating the percentage which -# is more natural to the human ear according to "man amixer". -# Column number 4 contains the current volume percentage in brackets, e.g., -# "[36%]". Column number 6 is "[off]" or "[on]" depending on whether sound -# is muted or not. -# "tr -d []" removes brackets around the volume. -# Adapted from https://bbs.archlinux.org/viewtopic.php?id=89648 -audio_volume=$(amixer -M get Master |\ -awk '/Mono.+/ {print $6=="[off]" ?\ -$4" 🔇": \ -$4" 🔉"}' |\ -tr -d []) - # Network ip_addr=$(ip route get 1.1.1.1 | head -1 | cut -d' ' -f7) network=$(ip route get 1.1.1.1 | grep -Po '(?<=dev\s)\w+' | cut -f1 -d ' ') @@ -44,8 +32,4 @@ ping=$(ping -c 1 www.google.es | tail -1| awk '{print $4}' | cut -d '/' -f 2 | c cpu_temp=$(sensors | grep -oP 'Package.*?\+\K[0-9.]+') # Additional emojis and characters for the status bar: -# Electricity: ⚡ ↯ ⭍ 🔌 -# Audio: 🔈 🔊 🎧 🎶 🎵 🎤 -# Separators: \| ❘ ❙ ❚ -# Misc: 🐧 💎 💻 💡 ⭐ 📁 ↑ ↓ ✉ ✅ ❎ -echo $network $ip_addr \| $cpu_temp \| $battery_info 🔋 \| $date_formatted +echo $network $ip_addr \| $cpu_temp \| $battery_info \| PRG: $date_prague \| $date_formatted |