feat: major update to all configs

- move older config to archive

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2026-03-26 12:07:53 +05:30
committed by Morumotto
parent 4555248b72
commit c2786c7f96
67 changed files with 881 additions and 772 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
COUNT=$(dunstctl count waiting)
status=""
class=""
tooltip="Notifications are "
if dunstctl is-paused | grep -q "false" ; then
status="NOT"
tooltip+="active"
else
status="DND"
class="dnd"
tooltip+="paused"
fi
if [ "$COUNT" != 0 ]; then status+=":$COUNT"; fi
printf '{"text":"%s","tooltip":"%s","class":"%s"}' "$status" "$tooltip" "$class" | jq --unbuffered --compact-output
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# get_weather.sh
for i in {1..5}
do
text=$(curl -s "https://wttr.in/$1?format=1")
if [[ $? == 0 ]]
then
text=$(echo "$text" | sed -E "s/\s+/ /g")
tooltip=$(curl -s "https://wttr.in/$1?format=4")
if [[ $? == 0 ]]
then
tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g")
echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
exit
fi
fi
sleep 2
done
echo "{\"text\":\"error\", \"tooltip\":\"error\"}"
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
output=$(wakatime --today)
# Extract hours and minutes using awk and sum the total
total_minutes=$(echo "$output" | awk -F' ' '
{
for (i=1; i<=NF; i++) {
if ($i == "hrs" || $i == "hr") total += $(i-1) * 60;
if ($i == "mins" || $i == "min") total += $(i-1);
}
} END {print total}')
# Calculate total hours and remaining minutes
total_hours=$((total_minutes / 60))
remaining_minutes=$((total_minutes % 60))
# Print the results
printf '{"text":"%02dh %02dm","tooltip":"%s","class":"wakatime"}' $total_hours $remaining_minutes "$output" | jq --unbuffered --compact-output