Fix icon badge centering, remove uptime card, fix weather location, 3 tiles per row

This commit is contained in:
2026-07-27 12:24:20 -04:00
parent 9a2e352202
commit c3f8738f00
5 changed files with 25 additions and 27 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
LOCATION="Great+Falls,VA"
icon=$(omarchy-weather-icon 2>/dev/null)
weather=$(curl -fsS --max-time 4 "https://wttr.in/${LOCATION}?format=%l|%t|%w" 2>/dev/null | tr -d '\n')
if [[ -z $weather ]]; then
echo "Weather unavailable"
exit 1
fi
IFS='|' read -r place temperature wind <<< "$weather"
place=${place%%,*}
temperature=${temperature#+}
echo "$icon $place · Temp $temperature · Wind $wind"
-6
View File
@@ -396,12 +396,6 @@
opacity: 0.6;
}
.widget-hero-value {
font-size: 20px;
font-weight: bold;
color: @foreground;
}
.widget-stat-row {
padding: 2px 0;
}
+5 -19
View File
@@ -144,8 +144,6 @@ function Toggles() {
sh("omarchy-launch-bluetooth")
}}
/>
</box>
<box class="qs-tiles" spacing={8} homogeneous>
<Tile
icon={""}
label="Wallpaper"
@@ -154,6 +152,8 @@ function Toggles() {
sh("blob_wallpaper")
}}
/>
</box>
<box class="qs-tiles" spacing={8} homogeneous>
<Tile
icon={""}
label="Silence"
@@ -163,8 +163,6 @@ function Toggles() {
sh("makoctl mode -t do-not-disturb")
}}
/>
</box>
<box class="qs-tiles" spacing={8} homogeneous>
<Tile
icon={""}
label="Night Light"
@@ -175,6 +173,8 @@ function Toggles() {
}}
/>
<Tile icon={""} label="Record" onClicked={() => { closePanel(); sh("omarchy-capture-screenrecording") }} />
</box>
<box class="qs-tiles" spacing={8} homogeneous>
<Tile icon={""} label="Pick Color" onClicked={() => { closePanel(); sh("hyprpicker -a") }} />
</box>
</box>
@@ -318,19 +318,6 @@ function CalendarSection() {
)
}
const uptime = createPoll("", 60000, shell("uptime -p"), (stdout) =>
stdout.trim().replace(/^up /, ""),
)
function UptimeCard() {
return (
<box class="panel widget-card" vertical spacing={10}>
<CardHeader icon={""} title="Uptime" />
<label class="widget-hero-value" label={uptime} xalign={0} halign={Gtk.Align.START} wrap />
</box>
)
}
type Weather = { ok: boolean; icon: string; place: string; temp: string; wind: string }
function parseWeather(raw: string): Weather {
@@ -349,7 +336,7 @@ function parseWeather(raw: string): Weather {
const weather = createPoll<Weather>(
{ ok: false, icon: "", place: "Loading...", temp: "", wind: "" },
600000,
shell("omarchy-weather-status"),
shell("bash $HOME/.config/ags/lib/weather.sh"),
(stdout) => parseWeather(stdout.trim()),
)
@@ -375,7 +362,6 @@ function WeatherCard() {
function LeftPanel() {
return (
<box class="qs-side-panel" vertical spacing={12}>
<UptimeCard />
<WeatherCard />
</box>
)
+2 -2
View File
@@ -3,8 +3,8 @@ import { Gtk } from "ags/gtk3"
export function CardHeader({ icon, title }: { icon: any; title: any }) {
return (
<box class="widget-card-header" spacing={10}>
<box class="widget-icon-badge" halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER}>
<label label={icon} xalign={0.5} yalign={0.5} halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} />
<box class="widget-icon-badge">
<label label={icon} hexpand vexpand halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} />
</box>
<label class="widget-card-title" label={title} xalign={0} halign={Gtk.Align.START} hexpand />
</box>
+1
View File
@@ -140,6 +140,7 @@ check_file "$SCRIPT_DIR/ags/app.ts" "$HOME_DIR/.config/ags/app.ts" "ags/app.ts"
check_file "$SCRIPT_DIR/ags/style.css" "$HOME_DIR/.config/ags/style.css" "ags/style.css" || check_status=1
check_file "$SCRIPT_DIR/ags/lib/utils.ts" "$HOME_DIR/.config/ags/lib/utils.ts" "ags/lib/utils.ts" || check_status=1
check_file "$SCRIPT_DIR/ags/lib/claude-usage.sh" "$HOME_DIR/.config/ags/lib/claude-usage.sh" "ags/lib/claude-usage.sh" || check_status=1
check_file "$SCRIPT_DIR/ags/lib/weather.sh" "$HOME_DIR/.config/ags/lib/weather.sh" "ags/lib/weather.sh" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/ClaudeUsage.tsx" "$HOME_DIR/.config/ags/widget/ClaudeUsage.tsx" "ags/widget/ClaudeUsage.tsx" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/Media.tsx" "$HOME_DIR/.config/ags/widget/Media.tsx" "ags/widget/Media.tsx" || check_status=1
check_file "$SCRIPT_DIR/ags/widget/Notifications.tsx" "$HOME_DIR/.config/ags/widget/Notifications.tsx" "ags/widget/Notifications.tsx" || check_status=1