some plays, some updates

This commit is contained in:
2026-01-11 06:05:48 +03:00
parent b7f0075276
commit 2eb01e9603
19 changed files with 262 additions and 622 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
############ Variables ############
enable_battery=false
battery_charging=false
####### Check availability ########
for battery in /sys/class/power_supply/*BAT*; do
if [[ -f "$battery/uevent" ]]; then
enable_battery=true
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
battery_charging=true
fi
break
fi
done
############# Output #############
if [[ $enable_battery == true ]]; then
if [[ $battery_charging == true ]]; then
echo -n "(+) "
fi
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"%
if [[ $battery_charging == false ]]; then
echo -n " remaining"
fi
fi
echo ''
+9
View File
@@ -0,0 +1,9 @@
# check if playerctl status is playing ond output song info
status=$(playerctl status 2>/dev/null)
if [ "$status" = "Playing" ]; then
# song_info=$(playerctl metadata --format '\u266A {{ artist }} - {{ title }}' 2>/dev/null)
song_info=$(printf "\u266A %s - %s" "$(playerctl metadata artist 2>/dev/null)" "$(playerctl metadata title 2>/dev/null)")
echo "$song_info"
else
echo ""
fi
+1
View File
@@ -0,0 +1 @@
echo "<b>Feels like<big> $(curl -s 'wttr.in/Ramenki?format=%t' | tr -d '+') </big></b>"