Compare commits
2 Commits
v0.8.5
...
115cfe6bb1
| Author | SHA1 | Date | |
|---|---|---|---|
| 115cfe6bb1 | |||
| 05ddbdc81e |
@@ -1,22 +1,22 @@
|
|||||||
# ABOUTME: Updates pkgver in moonarch-pkgbuilds after a push to main.
|
# ABOUTME: Updates pkgver in moonarch-pkgbuilds when a new moonset tag is pushed.
|
||||||
# ABOUTME: Ensures paru detects new versions of this package.
|
# ABOUTME: Reads the latest version tag and bumps the PKGBUILD + .SRCINFO.
|
||||||
|
|
||||||
name: Update PKGBUILD version
|
name: Update PKGBUILD version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
tags:
|
||||||
- main
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-pkgver:
|
update-pkgver:
|
||||||
runs-on: moonarch
|
runs-on: moonarch
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repo
|
- name: Determine pkgver from latest tag
|
||||||
run: |
|
run: |
|
||||||
git clone --bare http://gitea:3000/nevaforget/moonset.git source.git
|
git clone --bare http://gitea:3000/nevaforget/moonset.git source.git
|
||||||
cd source.git
|
cd source.git
|
||||||
PKGVER=$(git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./')
|
PKGVER=$(git describe --tags --abbrev=0 | sed 's/^v//')
|
||||||
echo "New pkgver: $PKGVER"
|
echo "New pkgver: $PKGVER"
|
||||||
echo "$PKGVER" > /tmp/pkgver
|
echo "$PKGVER" > /tmp/pkgver
|
||||||
|
|
||||||
@@ -26,18 +26,18 @@ jobs:
|
|||||||
git clone http://gitea:3000/nevaforget/moonarch-pkgbuilds.git pkgbuilds
|
git clone http://gitea:3000/nevaforget/moonarch-pkgbuilds.git pkgbuilds
|
||||||
cd pkgbuilds
|
cd pkgbuilds
|
||||||
|
|
||||||
OLD_VER=$(grep '^pkgver=' moonset-git/PKGBUILD | cut -d= -f2)
|
OLD_VER=$(grep '^pkgver=' moonset/PKGBUILD | cut -d= -f2)
|
||||||
if [ "$OLD_VER" = "$PKGVER" ]; then
|
if [ "$OLD_VER" = "$PKGVER" ]; then
|
||||||
echo "pkgver already up to date ($PKGVER)"
|
echo "pkgver already up to date ($PKGVER)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i "s/^pkgver=.*/pkgver=$PKGVER/" moonset-git/PKGBUILD
|
sed -i "s/^pkgver=.*/pkgver=$PKGVER/" moonset/PKGBUILD
|
||||||
sed -i "s/^\tpkgver = .*/\tpkgver = $PKGVER/" moonset-git/.SRCINFO
|
sed -i "s/^\tpkgver = .*/\tpkgver = $PKGVER/" moonset/.SRCINFO
|
||||||
echo "Updated pkgver: $OLD_VER → $PKGVER"
|
echo "Updated pkgver: $OLD_VER → $PKGVER"
|
||||||
|
|
||||||
git config user.name "pkgver-bot"
|
git config user.name "pkgver-bot"
|
||||||
git config user.email "gitea@moonarch.de"
|
git config user.email "gitea@moonarch.de"
|
||||||
git add moonset-git/PKGBUILD moonset-git/.SRCINFO
|
git add moonset/PKGBUILD moonset/.SRCINFO
|
||||||
git commit -m "chore(moonset-git): bump pkgver to $PKGVER"
|
git commit -m "chore(moonset): bump pkgver to $PKGVER"
|
||||||
git -c http.extraHeader="Authorization: token ${{ secrets.PKGBUILD_TOKEN }}" push
|
git -c http.extraHeader="Authorization: token ${{ secrets.PKGBUILD_TOKEN }}" push
|
||||||
|
|||||||
@@ -1,57 +1,57 @@
|
|||||||
# Moonset
|
# Moonset
|
||||||
|
|
||||||
## Projekt
|
## Project
|
||||||
|
|
||||||
Moonset ist ein Wayland Session Power Menu, gebaut mit Rust + gtk4-rs + gtk4-layer-shell.
|
Moonset is a Wayland session power menu, built with Rust + gtk4-rs + gtk4-layer-shell.
|
||||||
Teil des Moonarch-Ökosystems. Per Keybind aufrufbares Overlay mit 5 Aktionen:
|
Part of the Moonarch ecosystem. A keybind-invoked overlay with 5 actions:
|
||||||
Lock, Logout, Hibernate, Reboot, Shutdown.
|
Lock, Logout, Hibernate, Reboot, Shutdown.
|
||||||
|
|
||||||
## Tech-Stack
|
## Tech Stack
|
||||||
|
|
||||||
- Rust (Edition 2024), gtk4-rs 0.11, glib 0.22
|
- Rust (edition 2024), gtk4-rs 0.11, glib 0.22
|
||||||
- gtk4-layer-shell 0.8 für Wayland Layer Shell (OVERLAY Layer)
|
- gtk4-layer-shell 0.8 for the Wayland Layer Shell (OVERLAY layer)
|
||||||
- `cargo test` für Unit-Tests
|
- `cargo test` for unit tests
|
||||||
|
|
||||||
## Projektstruktur
|
## Project Structure
|
||||||
|
|
||||||
- `src/` — Rust-Quellcode (main.rs, power.rs, i18n.rs, config.rs, users.rs, panel.rs)
|
- `src/` — Rust source code (main.rs, power.rs, i18n.rs, config.rs, users.rs, panel.rs)
|
||||||
- `resources/` — GResource-Assets (style.css, default-avatar.svg)
|
- `resources/` — GResource assets (style.css, default-avatar.svg)
|
||||||
- `config/` — Beispiel-Konfigurationsdateien
|
- `config/` — example configuration files
|
||||||
|
|
||||||
## Kommandos
|
## Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Tests ausführen
|
# Run tests
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
# Release-Build
|
# Release build
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
||||||
# Power-Menu starten (in Niri-Session)
|
# Start the power menu (in a Niri session)
|
||||||
LD_PRELOAD=/usr/lib/libgtk4-layer-shell.so ./target/release/moonset
|
LD_PRELOAD=/usr/lib/libgtk4-layer-shell.so ./target/release/moonset
|
||||||
```
|
```
|
||||||
|
|
||||||
## Architektur
|
## Architecture
|
||||||
|
|
||||||
- `main.rs` — Entry Point, GTK App, Layer Shell Setup, Multi-Monitor, systemd-Journal-Logging, Debug-Level per `MOONSET_DEBUG` Env-Var, zentrale `GRESOURCE_PREFIX`-Konstante
|
- `main.rs` — entry point, GTK app, Layer Shell setup, multi-monitor, systemd journal logging, debug level via the `MOONSET_DEBUG` env var, central `GRESOURCE_PREFIX` constant
|
||||||
- `power.rs` — 5 Power-Action-Wrapper mit absoluten Pfaden und 30s Timeout (lock, logout, hibernate, reboot, shutdown)
|
- `power.rs` — 5 power-action wrappers with absolute paths and a 30s timeout (lock, logout, hibernate, reboot, shutdown)
|
||||||
- `i18n.rs` — Locale-Erkennung und String-Tabellen (DE/EN)
|
- `i18n.rs` — locale detection and string tables (DE/EN)
|
||||||
- `config.rs` — TOML-Config + Wallpaper-Fallback
|
- `config.rs` — TOML config + wallpaper fallback
|
||||||
- `panel.rs` — GTK4 UI (Action-Buttons, Inline-Confirmation, WallpaperWindow)
|
- `panel.rs` — GTK4 UI (action buttons, inline confirmation, WallpaperWindow)
|
||||||
- `users.rs` — User-Erkennung, Avatar-Loading (AccountsService, ~/.face, GResource-Fallback)
|
- `users.rs` — user detection, avatar loading (AccountsService, ~/.face, GResource fallback)
|
||||||
- `resources/style.css` — GTK-Theme-Colors für Konsistenz mit dem aktiven Desktop-Theme
|
- `resources/style.css` — GTK theme colors for consistency with the active desktop theme
|
||||||
|
|
||||||
## Design Decisions
|
## Design Decisions
|
||||||
|
|
||||||
Siehe `DECISIONS.md` für das vollständige Entscheidungsprotokoll.
|
See `DECISIONS.md` for the full decision log.
|
||||||
|
|
||||||
Kurzfassung der wichtigsten Entscheidungen:
|
Summary of the most important decisions:
|
||||||
- **OVERLAY statt TOP Layer**: Waybar liegt auf TOP, moonset muss darüber
|
- **OVERLAY instead of TOP layer**: Waybar sits on TOP, moonset must be above it
|
||||||
- **Niri-spezifischer Logout** (`niri msg action quit`): Moonarch setzt fest auf Niri
|
- **Niri-specific logout** (`niri msg action quit`): Moonarch commits firmly to Niri
|
||||||
- **Einmal-Start per Keybind**: Kein Daemon, GTK `application_id` verhindert Doppelstart
|
- **Single launch per keybind**: no daemon, the GTK `application_id` prevents double launch
|
||||||
- **System-Icons**: Adwaita/Catppuccin liefern alle benötigten symbolischen Icons
|
- **System icons**: Adwaita/Catppuccin provide all required symbolic icons
|
||||||
- **Lock ohne Confirmation**: Lock ist sofort reversibel, braucht kein Confirm
|
- **Lock without confirmation**: lock is immediately reversible, needs no confirm
|
||||||
- **Absolute Pfade für Binaries**: `/usr/bin/systemctl` etc. statt relativer Pfade (Security)
|
- **Absolute paths for binaries**: `/usr/bin/systemctl` etc. instead of relative paths (security)
|
||||||
- **GResource-Bundle**: CSS und Default-Avatar sind in die Binary kompiliert (Wallpaper kommt vom Dateisystem)
|
- **GResource bundle**: CSS and default avatar are compiled into the binary (the wallpaper comes from the filesystem)
|
||||||
- **Async Power Actions**: `glib::spawn_future_local` + `gio::spawn_blocking` mit 30s Timeout
|
- **Async power actions**: `glib::spawn_future_local` + `gio::spawn_blocking` with a 30s timeout
|
||||||
- **Journal-Logging**: `systemd-journal-logger` statt File-Logging — `journalctl -t moonset`, Debug-Level per `MOONSET_DEBUG` Env-Var
|
- **Journal logging**: `systemd-journal-logger` instead of file logging — `journalctl -t moonset`, debug level via the `MOONSET_DEBUG` env var
|
||||||
|
|||||||
Reference in New Issue
Block a user