diff --git a/ags/lib/weather.sh b/ags/lib/weather.sh new file mode 100755 index 0000000..5ccb23d --- /dev/null +++ b/ags/lib/weather.sh @@ -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" diff --git a/ags/style.css b/ags/style.css index b907c79..9668486 100644 --- a/ags/style.css +++ b/ags/style.css @@ -396,12 +396,6 @@ opacity: 0.6; } -.widget-hero-value { - font-size: 20px; - font-weight: bold; - color: @foreground; -} - .widget-stat-row { padding: 2px 0; } diff --git a/ags/widget/QuickSettings.tsx b/ags/widget/QuickSettings.tsx index 4461563..2c60ee9 100644 --- a/ags/widget/QuickSettings.tsx +++ b/ags/widget/QuickSettings.tsx @@ -144,8 +144,6 @@ function Toggles() { sh("omarchy-launch-bluetooth") }} /> - - + + - - { closePanel(); sh("omarchy-capture-screenrecording") }} /> + + { closePanel(); sh("hyprpicker -a") }} /> @@ -318,19 +318,6 @@ function CalendarSection() { ) } -const uptime = createPoll("", 60000, shell("uptime -p"), (stdout) => - stdout.trim().replace(/^up /, ""), -) - -function UptimeCard() { - return ( - - - - ) -} - 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( { 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 ( - ) diff --git a/ags/widget/WidgetCard.tsx b/ags/widget/WidgetCard.tsx index 11e8183..477121e 100644 --- a/ags/widget/WidgetCard.tsx +++ b/ags/widget/WidgetCard.tsx @@ -3,8 +3,8 @@ import { Gtk } from "ags/gtk3" export function CardHeader({ icon, title }: { icon: any; title: any }) { return ( - - diff --git a/install.sh b/install.sh index 5f73ac6..b338ee7 100755 --- a/install.sh +++ b/install.sh @@ -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