summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--arch/eww/.config/eww/eww.scss23
-rw-r--r--arch/eww/.config/eww/eww.yuck69
-rwxr-xr-xarch/eww/.config/eww/scripts/battery-notify21
-rwxr-xr-xarch/eww/.config/eww/scripts/weather-fetch26
-rwxr-xr-xarch/eww/.config/eww/scripts/weather-notify24
-rw-r--r--arch/hyprland/.config/hypr/hyprland.conf8
7 files changed, 146 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
index 2a81228..b8469ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
arch/spicetify/.config/spicetify/Themes/wallust/color.ini
arch/mako/.config/mako/config
+.weather-location
diff --git a/arch/eww/.config/eww/eww.scss b/arch/eww/.config/eww/eww.scss
index 5a294d4..bec3ed1 100644
--- a/arch/eww/.config/eww/eww.scss
+++ b/arch/eww/.config/eww/eww.scss
@@ -7,12 +7,13 @@ $surface: #313244;
$muted: #6c7086;
$warn: #f38ba8;
-@import "/home/blake/.cache/wallust/eww-colors";
+@import "~/.cache/wallust/eww-colors";
* {
- font-family: "JetBrainsMono Nerd Font";
- font-size: 12px;
- all: unset;
+ all: unset;
+ font-family: "JetBrainsMono Nerd Font Propo";
+ font-size: 12px;
+ background-color: transparent;
}
.bar {
@@ -102,11 +103,19 @@ $warn: #f38ba8;
}
.power-btn {
- color: $muted;
- padding: 0 4px;
- margin-left: 2px;
+ color: $muted;
+ padding: 0 4px;
+ margin-left: 2px;
+ background-color: transparent;
+ background: transparent;
}
.power-btn:hover {
color: $warn;
}
+
+/* Battery icon states */
+.bat { font-size: 1.1rem; }
+.bat-normal { color: #f5c542; } /* yellow */
+.bat-low { color: #e85555; } /* red */
+.bat-charging { color: #7ddc9f; } /* light green */
diff --git a/arch/eww/.config/eww/eww.yuck b/arch/eww/.config/eww/eww.yuck
index 2b152d9..832af3d 100644
--- a/arch/eww/.config/eww/eww.yuck
+++ b/arch/eww/.config/eww/eww.yuck
@@ -13,12 +13,6 @@
(defpoll player-song :interval "2s"
`playerctl -a metadata --format "{{status}}||{{ artist }} - {{ title }}" 2>/dev/null | grep "^Playing||" | head -1 | sed 's/^Playing||//' || playerctl metadata --format "{{ artist }} - {{ title }}" 2>/dev/null || echo ""`)
-(defpoll battery-level :interval "30s" :initial "100"
- `cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "100"`)
-
-(defpoll battery-status :interval "10s" :initial "Unknown"
- `cat /sys/class/power_supply/BAT0/status 2>/dev/null || echo "Unknown"`)
-
(defpoll cpu :interval "3s"
`scripts/cpu`)
@@ -41,6 +35,18 @@
(defpoll netspeed :interval "3s"
`scripts/netspeed`)
+(defpoll battery-level :interval "30s"
+ :initial 100
+ "cat /sys/class/power_supply/BAT0/capacity")
+
+(defpoll battery-charging :interval "10s"
+ :initial "false"
+ "cat /sys/class/power_supply/BAT0/status | grep -q 'Charging' && echo true || echo false")
+
+(defpoll weather-display :interval "30m"
+ :initial "+...°F"
+ "scripts/weather-fetch")
+
;; ── Left: Date + Music ───────────────────────────────────────────────
(defwidget music []
@@ -57,6 +63,7 @@
(box :class "left" :space-evenly false :spacing 8
(label :class "clock" :text clock)
(label :class "date" :text date-str)
+ (weather-stat)
(music)))
;; ── Right: Stats ───────────────────────────────────────────────────────────
@@ -66,42 +73,74 @@
:onscroll "[ '{}' = 'up' ] && hyprctl hyprsunset gamma +5 || hyprctl hyprsunset gamma -5"
:onclick "toggle-screen-temp"
(box :class "stat" :space-evenly false :spacing 3
- (label :class "stat-label" :text "bright")
+ (label :class "stat-label" :text "")
(label :class "stat-val" :text "${brightness}%"))))
(defwidget audio-stat []
(eventbox
:onscroll "[ '{}' = 'up' ] && pamixer --increase 5 || pamixer --decrease 5"
(box :class "stat" :space-evenly false :spacing 3
- (label :class "stat-label" :text "audio")
+ (label :class "stat-label" :text "")
(label :class "stat-val" :text "${volume}%"))))
(defwidget wifi-stat []
(eventbox
:onclick "ghostty -e nmtui &"
(box :class "stat" :space-evenly false :spacing 3
- (label :class "stat-label" :text "wifi")
+ (label :class "stat-label" :text "󰖩")
(label :class "stat-val" :text wifi-iface))))
(defwidget cpu-stat []
(eventbox
:onclick "ghostty -e btop &"
(box :class "stat" :space-evenly false :spacing 3
- (label :class "stat-label" :text "cpu")
+ (label :class "stat-label" :text "")
(label :class "stat-val" :text "${cpu}%"))))
+(defwidget battery-stat []
+ (eventbox
+ :onclick "scripts/battery-notify &"
+ (label
+ :class {battery-charging == "true" ? "bat bat-charging" :
+ battery-level < 20 ? "bat bat-low" : "bat bat-normal"}
+ :text {battery-level >= 100 ? "" :
+ battery-charging == "true" ?
+ (battery-level >= 90 ? "󰂋" :
+ battery-level >= 80 ? "󰢞" :
+ battery-level >= 70 ? "󰂊" :
+ battery-level >= 60 ? "󰂉" :
+ battery-level >= 50 ? "󰢝" :
+ battery-level >= 40 ? "󰂈" :
+ battery-level >= 30 ? "󰂇" :
+ battery-level >= 20 ? "󰂆" :
+ battery-level >= 10 ? "󰢜" : "󰢟") :
+ (battery-level >= 90 ? "󰂂" :
+ battery-level >= 80 ? "󰂁" :
+ battery-level >= 70 ? "󰂀" :
+ battery-level >= 60 ? "󰁿" :
+ battery-level >= 50 ? "󰁾" :
+ battery-level >= 40 ? "󰁽" :
+ battery-level >= 30 ? "󰁼" :
+ battery-level >= 20 ? "󰁻" :
+ battery-level >= 10 ? "󰁺" : "󰂎")})))
+
+(defwidget weather-stat []
+ (eventbox
+ :onclick "scripts/weather-notify &"
+ (label :class "stat-val weather" :text weather-display)))
+
(defwidget right-section []
(box :class "right" :halign "end" :space-evenly false :spacing 8
(bright-stat)
(audio-stat)
(label :class "stat-val net" :text netspeed)
(wifi-stat)
- (stat :lbl "bat" :value "${battery-level}%"
- :class {battery-level < 20 ? "warn" : ""})
- (stat :lbl "strg" :value "${disk}%")
- (stat :lbl "ram" :value "${ram}%")
+ (stat :lbl "󰋊" :value "${disk}%")
+ (stat :lbl "" :value "${ram}%")
(cpu-stat)
- (button :class "power-btn" :onclick "scripts/powermenu &" "pwr")))
+ (battery-stat)
+ (eventbox :class "power-btn" :onclick "scripts/powermenu &"
+ (label :text "⏻"))))
;; Plain stat (non-interactive) ─────────────────────────────────────────────
diff --git a/arch/eww/.config/eww/scripts/battery-notify b/arch/eww/.config/eww/scripts/battery-notify
new file mode 100755
index 0000000..7bb9a26
--- /dev/null
+++ b/arch/eww/.config/eww/scripts/battery-notify
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# scripts/battery-notify
+
+BAT=/sys/class/power_supply/BAT0
+
+level=$(cat $BAT/capacity)
+status=$(cat $BAT/status)
+
+# estimate time remaining via upower
+time_str=$(upower -i $(upower -e | grep BAT) 2>/dev/null \
+ | awk '/time to (full|empty)/ { print $4, $5 }')
+
+if [[ -n "$time_str" ]]; then
+ body="$status · ${level}%\n⏱ $time_str"
+else
+ body="$status · ${level}%"
+fi
+
+notify-send --urgency=low --expire-time=4000 \
+ --icon=battery \
+ "Battery" "$body"
diff --git a/arch/eww/.config/eww/scripts/weather-fetch b/arch/eww/.config/eww/scripts/weather-fetch
new file mode 100755
index 0000000..257dee4
--- /dev/null
+++ b/arch/eww/.config/eww/scripts/weather-fetch
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+# scripts/weather-fetch
+
+loc_file="$HOME/.config/eww/.weather-location"
+loc=$(cat "$loc_file" 2>/dev/null | xargs | sed 's/ /%20/g')
+url="wttr.in/${loc}?format=j1" # empty loc → wttr.in/?format=j1 → IP fallback
+
+data=$(curl -sf "$url")
+[[ -z "$data" ]] && echo "?°F" && exit 1
+
+temp=$(echo "$data" | jq -r '.current_condition[0].temp_F')
+code=$(echo "$data" | jq -r '.current_condition[0].weatherCode')
+
+case "$code" in
+ 113) icon="󰖙" ;;
+ 116) icon="󰖕" ;;
+ 119|122) icon="󰖐" ;;
+ 143|248|260) icon="󰖑" ;;
+ 200|386|389|392|395) icon="󰖓" ;;
+ 227|230|323|326|329|332|335|338|368|371) icon="󰖘" ;;
+ 182|185|281|284|311|314|317|320|350|362|365|374|377) icon="󰖒" ;;
+ *) icon="󰖗" ;;
+esac
+
+sign=$([ "$temp" -ge 0 ] && echo "+" || echo "")
+echo "${sign}${temp}°F ${icon}"
diff --git a/arch/eww/.config/eww/scripts/weather-notify b/arch/eww/.config/eww/scripts/weather-notify
new file mode 100755
index 0000000..ab78acb
--- /dev/null
+++ b/arch/eww/.config/eww/scripts/weather-notify
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# scripts/weather-notify
+
+loc_file="$HOME/.config/eww/.weather-location"
+loc=$(cat "$loc_file" 2>/dev/null | xargs | sed 's/ /%20/g')
+url="wttr.in/${loc}?format=j1"
+
+data=$(curl -sf "$url")
+[[ -z "$data" ]] && notify-send "Weather" "Could not fetch weather data." && exit 1
+
+temp=$(echo "$data" | jq -r '.current_condition[0].temp_F')
+feels=$(echo "$data" | jq -r '.current_condition[0].FeelsLikeF')
+desc=$(echo "$data" | jq -r '.current_condition[0].weatherDesc[0].value')
+high=$(echo "$data" | jq -r '.weather[0].maxtempF')
+low=$(echo "$data" | jq -r '.weather[0].mintempF')
+
+sign() { [ "$1" -ge 0 ] && echo "+" || echo ""; }
+
+line1="$(sign $temp)${temp}°F, ${desc}"
+line2="Feels $(sign $feels)${feels}° · ↑$(sign $high)${high} ↓$(sign $low)${low}"
+
+notify-send --urgency=low --expire-time=5000 \
+ --icon=weather-clear \
+ "Weather" "${line1}\n${line2}"
diff --git a/arch/hyprland/.config/hypr/hyprland.conf b/arch/hyprland/.config/hypr/hyprland.conf
index 944d540..ac541da 100644
--- a/arch/hyprland/.config/hypr/hyprland.conf
+++ b/arch/hyprland/.config/hypr/hyprland.conf
@@ -71,10 +71,10 @@ decoration {
animations {
enabled = true
bezier = myBezier, 0.35, 0.97, 0.35, 0.97
- animation = windows, 1, 1, myBezier
- animation = windowsOut, 1, 2, default, popin 80%
- animation = fade, 1, 2, default
- animation = workspaces, 1, 2, default
+ animation = windows, 0, 1, myBezier
+ animation = windowsOut, 0, 2, default, popin 80%
+ animation = fade, 0, 2, default
+ animation = workspaces, 0, 2, default
}
exec-once = awww-daemon