Fix icon badge centering, remove uptime card, fix weather location, 3 tiles per row
This commit is contained in:
Executable
+17
@@ -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"
|
||||||
@@ -396,12 +396,6 @@
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget-hero-value {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: @foreground;
|
|
||||||
}
|
|
||||||
|
|
||||||
.widget-stat-row {
|
.widget-stat-row {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,8 +144,6 @@ function Toggles() {
|
|||||||
sh("omarchy-launch-bluetooth")
|
sh("omarchy-launch-bluetooth")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</box>
|
|
||||||
<box class="qs-tiles" spacing={8} homogeneous>
|
|
||||||
<Tile
|
<Tile
|
||||||
icon={""}
|
icon={""}
|
||||||
label="Wallpaper"
|
label="Wallpaper"
|
||||||
@@ -154,6 +152,8 @@ function Toggles() {
|
|||||||
sh("blob_wallpaper")
|
sh("blob_wallpaper")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</box>
|
||||||
|
<box class="qs-tiles" spacing={8} homogeneous>
|
||||||
<Tile
|
<Tile
|
||||||
icon={""}
|
icon={""}
|
||||||
label="Silence"
|
label="Silence"
|
||||||
@@ -163,8 +163,6 @@ function Toggles() {
|
|||||||
sh("makoctl mode -t do-not-disturb")
|
sh("makoctl mode -t do-not-disturb")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</box>
|
|
||||||
<box class="qs-tiles" spacing={8} homogeneous>
|
|
||||||
<Tile
|
<Tile
|
||||||
icon={""}
|
icon={""}
|
||||||
label="Night Light"
|
label="Night Light"
|
||||||
@@ -175,6 +173,8 @@ function Toggles() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Tile icon={""} label="Record" onClicked={() => { closePanel(); sh("omarchy-capture-screenrecording") }} />
|
<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") }} />
|
<Tile icon={""} label="Pick Color" onClicked={() => { closePanel(); sh("hyprpicker -a") }} />
|
||||||
</box>
|
</box>
|
||||||
</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 }
|
type Weather = { ok: boolean; icon: string; place: string; temp: string; wind: string }
|
||||||
|
|
||||||
function parseWeather(raw: string): Weather {
|
function parseWeather(raw: string): Weather {
|
||||||
@@ -349,7 +336,7 @@ function parseWeather(raw: string): Weather {
|
|||||||
const weather = createPoll<Weather>(
|
const weather = createPoll<Weather>(
|
||||||
{ ok: false, icon: "", place: "Loading...", temp: "", wind: "" },
|
{ ok: false, icon: "", place: "Loading...", temp: "", wind: "" },
|
||||||
600000,
|
600000,
|
||||||
shell("omarchy-weather-status"),
|
shell("bash $HOME/.config/ags/lib/weather.sh"),
|
||||||
(stdout) => parseWeather(stdout.trim()),
|
(stdout) => parseWeather(stdout.trim()),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -375,7 +362,6 @@ function WeatherCard() {
|
|||||||
function LeftPanel() {
|
function LeftPanel() {
|
||||||
return (
|
return (
|
||||||
<box class="qs-side-panel" vertical spacing={12}>
|
<box class="qs-side-panel" vertical spacing={12}>
|
||||||
<UptimeCard />
|
|
||||||
<WeatherCard />
|
<WeatherCard />
|
||||||
</box>
|
</box>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { Gtk } from "ags/gtk3"
|
|||||||
export function CardHeader({ icon, title }: { icon: any; title: any }) {
|
export function CardHeader({ icon, title }: { icon: any; title: any }) {
|
||||||
return (
|
return (
|
||||||
<box class="widget-card-header" spacing={10}>
|
<box class="widget-card-header" spacing={10}>
|
||||||
<box class="widget-icon-badge" halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER}>
|
<box class="widget-icon-badge">
|
||||||
<label label={icon} xalign={0.5} yalign={0.5} halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} />
|
<label label={icon} hexpand vexpand halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} />
|
||||||
</box>
|
</box>
|
||||||
<label class="widget-card-title" label={title} xalign={0} halign={Gtk.Align.START} hexpand />
|
<label class="widget-card-title" label={title} xalign={0} halign={Gtk.Align.START} hexpand />
|
||||||
</box>
|
</box>
|
||||||
|
|||||||
@@ -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/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/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/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/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/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
|
check_file "$SCRIPT_DIR/ags/widget/Notifications.tsx" "$HOME_DIR/.config/ags/widget/Notifications.tsx" "ags/widget/Notifications.tsx" || check_status=1
|
||||||
|
|||||||
Reference in New Issue
Block a user