Compare commits

..
16 Commits
Author SHA1 Message Date
pascalyazid 123760d643 Added theming docs for Ghostty 2026-11-30 16:59:19 +01:00
pascalyazid 6347fdbc2a fix(theme): stop the update script from stalling wallpaper switches
execAsync resolves only once stdout/stderr reach EOF, and update_script.sh
started dunst with '&' so the daemon inherited AGS's captured pipes. Once
theme switches were serialized behind themeQueue, that pending promise blocked
every later switch, including the one restoreTheme() queues at startup, so
clicking a wallpaper did nothing.

- detach dunst with setsid and redirected stdio in update_script.sh
- run update_script.sh with its fds detached and without awaiting it, so
  user-added commands can never stall the queue
2026-11-27 19:15:34 +01:00
pascalyazid 58749dcbdc docs(readme) added greeter screenshot 2026-11-27 19:04:45 +01:00
pascalyazid fb6a8b31a6 docs(readme): document greeter and refresh dependencies
- split dependencies into core shell, wallpaper, workspaces, system services
  and optional greeter groups
- add a Greeter section covering architecture, install, systemd reload and
  preview commands
- link the greeter screenshot and fix the duplicated screenshot caption
- give the standalone greeter its own AGS instance name so previewing it
  no longer collides with the running bar
2026-11-27 19:02:45 +01:00
pascalyazid a614f9190a refactor(controls): type monitor prop as Gdk.Monitor 2026-11-27 18:55:33 +01:00
pascalyazid 2be30164a0 fix(power-menu): sign out through uwsm
Use uwsm stop for Sign Out so the session shuts down cleanly, and pass systemctl and uwsm commands as argument arrays.
2026-11-27 18:55:33 +01:00
pascalyazid 2913fb020f perf(media): stop vinyl animation when hidden
Only run the rotation timer while the record is mapped and playing, and clean up the map and unmap handlers.
2026-11-27 18:55:33 +01:00
pascalyazid 38c6ce5812 perf(quicksettings): poll VPNs only while the popover is open
Replace the always-on 2s nmcli poll with a shared poller that runs only while Quick Settings is visible, coalesce refreshes, and reuse the Bluetooth power binding.
2026-11-27 18:55:33 +01:00
pascalyazid a1cea0e3be feat(greeter): add themed greetd login screen
- Add an AstalGreet login UI with PAM messages, reboot and shutdown.

- Run it under cage via start-greeter.sh and start a uwsm-managed Hyprland session.

- Include install script, polkit rule, fallback theme and README.
2026-11-27 18:55:33 +01:00
pascalyazid 8aea20ea9f feat(theme): sync shell palette with greetd greeter
- Export compiled greeter CSS and wallpaper to /var/tmp for the greeter user.

- Serialize theme changes so rapid switches cannot race wal and sass.

- Avoid duplicate greeter export on startup and disable sass source maps.

- Pass command arguments as arrays and use forEach when creating windows.
2026-11-27 18:55:33 +01:00
pascalyazid 628ebb13ba chore(deps): update dev dependencies and lockfile
Bump eslint and typescript-eslint, drop the ags file dependency, and refresh bun.lock.
2026-11-27 18:55:33 +01:00
pascalyazid f7e43077c5 Updated workspaces to only show active workspaces per monitor,
formatting
2026-11-27 13:16:10 +01:00
pascalyazid 788342c846 Changed pywal command, added hyprctl reload to updatescript 2026-11-26 09:39:31 +01:00
pascalyazid 8d02c166a1 added various templates for pywal 2026-11-26 09:39:07 +01:00
pascalyazid 8a459996ea Made bar and menus non-translucent 2026-10-22 12:51:49 +02:00
pascalyazid baf2021aa9 Added menubutton for choosing powerprofile 2026-10-02 18:32:29 +02:00
22 changed files with 1476 additions and 126 deletions

No files matched your search

+116 -5
View File
@@ -14,7 +14,8 @@ This shell features dynamic theming using **Pywal**, completely integrating your
- **Smart Media Player**: Automatically tracks and controls your active media player via MPRIS. Includes a popover with album art and playback controls. - **Smart Media Player**: Automatically tracks and controls your active media player via MPRIS. Includes a popover with album art and playback controls.
- **Quick Settings Dropdown**: Easily manage your Network, Bluetooth (safe non-blocking toggles), and Audio (Speaker/Mic sliders). - **Quick Settings Dropdown**: Easily manage your Network, Bluetooth (safe non-blocking toggles), and Audio (Speaker/Mic sliders).
- **System Tray & Clock**: Unified system tray and a datetime display with a clickable calendar popover. - **System Tray & Clock**: Unified system tray and a datetime display with a clickable calendar popover.
- **Hyprland Workspaces**: Highlights the active workspace and allows click-to-switch navigation. - **Per-Monitor Workspaces**: Each bar only shows the workspaces that belong to its monitor (open or holding applications), with click-to-switch navigation.
- **Themed Greeter**: Optional AGS login screen for greetd that reuses the current Pywal palette and wallpaper, shows PAM messages, and offers reboot/shutdown buttons.
--- ---
@@ -23,19 +24,66 @@ This shell features dynamic theming using **Pywal**, completely integrating your
![Screenshot 1](./screenshots/screenshot_01.png) ![Screenshot 1](./screenshots/screenshot_01.png)
![Screenshot 2](./screenshots/screenshot_02.png) ![Screenshot 2](./screenshots/screenshot_02.png)
![Screenshot 3](./screenshots/screenshot_03.png) ![Screenshot 3](./screenshots/screenshot_03.png)
![Screenshot 3](./screenshots/screenshot_04.png) ![Screenshot 4](./screenshots/screenshot_04.png)
### Greeter
![Greeter](./screenshots/screenshot_05.png)
## 📦 Dependencies ## 📦 Dependencies
To use this shell, you need to install AGS and the required backend libraries. Since you are most probably using Arch, you can install them via your package manager or AUR. To use this shell, you need to install AGS and the required backend libraries. Since you are most probably using Arch, you can install them via your package manager or AUR.
### Core shell
```bash ```bash
# Astal libraries, core AGS and Sass compiler for theming, Hyprmod for Hyprland settings, Dunst notification daemon # AGS, Astal libraries (includes AstalGreet), Sass, Hyprland settings and notifications
paru -S libastal-meta aylurs-gtk-shell dart-sass hyprmod dunst paru -S libastal-meta aylurs-gtk-shell dart-sass hyprmod dunst
```
# Wallpaper dependencies ### Wallpaper and theming
```bash
paru -S hyprpaper python-pywal16 paru -S hyprpaper python-pywal16
```
### Workspaces widget
The workspace bar reads Hyprland's IPC socket directly and uses a small Python helper:
```bash
sudo pacman -S openbsd-netcat python
```
### System services
The Astal widgets talk to these services (usually already present on a desktop install):
```bash
sudo pacman -S networkmanager bluez bluez-utils pipewire wireplumber upower power-profiles-daemon
```
`power-profiles-daemon` is optional (the power profile section is hidden without it). `easyeffects` is optional and is launched by the Audio button:
```bash
sudo pacman -S easyeffects
```
### Greeter (optional)
The included greetd greeter additionally needs:
```bash
sudo pacman -S greetd cage uwsm polkit dbus
```
`dbus` and `polkit` are usually already installed. `libastal-meta` already includes AstalGreet; if you installed the Astal libraries individually, also install `libastal-greetd-git`.
The greeter runs as the `greeter` user, which must be able to access the GPU:
```bash
# only if the user does not exist yet
sudo useradd -M -G video greeter
``` ```
--- ---
@@ -66,10 +114,64 @@ _(Note: The shell is configured to automatically restore your last used wallpape
--- ---
## 🔐 Greeter
This repository includes an optional AGS greeter for `greetd` in `greeter/`. It uses [AstalGreet](https://aylur.github.io/libastal/greet/) for authentication, runs under the `cage` kiosk compositor, and reuses the current Pywal palette and wallpaper so the login screen matches the shell.
```text
greetd -> start-greeter.sh -> cage -> dbus-run-session -> ags run greeter.tsx
^ |
+------------ AstalGreet (GREETD_SOCK) --------------+
```
- `theme.ts` exports the compiled greeter CSS and current wallpaper to `/var/tmp/ags-greeter` on every theme change.
- `greeter/install.sh` copies the greeter to `/etc/greetd/ags`, creates `/var/lib/greetd`, installs a polkit rule for reboot/shutdown, and configures `/etc/greetd/config.toml`.
- A successful login starts a uwsm-managed Hyprland session (`hyprland.desktop`).
### Install
```bash
sudo pacman -S cage uwsm polkit dbus
sudo ./greeter/install.sh
```
Keep a TTY available (`Ctrl+Alt+F2`) before applying it, then restart greetd or reboot:
```bash
sudo systemctl reset-failed greetd
sudo systemctl restart greetd
```
See [`greeter/README.md`](./greeter/README.md) for details, the debug log (`/tmp/greeter.log`), and alternate session commands.
### Preview
Run the login UI inside your current Hyprland session. It will refuse to log in without greetd, which is expected:
```bash
ags run ./greeter/greeter.tsx
```
For a full kiosk-style preview, and for screenshots, run it inside a nested cage window:
```bash
cage -d -- dbus-run-session -- ags run ./greeter/greeter.tsx
```
Close the preview with your Hyprland close-window keybind or:
```bash
ags quit -i greeter
```
---
## 🎨 Applying the Theme Globally ## 🎨 Applying the Theme Globally
Because this shell uses **Pywal**, you can easily inject the dynamically generated colors into almost any other application on your system. Because this shell uses **Pywal**, you can easily inject the dynamically generated colors into almost any other application on your system.
Pywal applies the colors to config files located in `~/.config/wal/templates`. Examples can be found in this repos templates folder.
Whenever you change the wallpaper via the AGS bar, Pywal updates the color templates inside `~/.cache/wal/`. Here is how to apply them to other apps: Whenever you change the wallpaper via the AGS bar, Pywal updates the color templates inside `~/.cache/wal/`. Here is how to apply them to other apps:
### Manual Updates: ### Manual Updates:
@@ -86,7 +188,16 @@ include ~/.cache/wal/colors-kitty.conf
_Next time you open Kitty, it will perfectly match your wallpaper._ _Next time you open Kitty, it will perfectly match your wallpaper._
### Example 2: Dunst (Notification Daemon) ### Example 2: Ghostty
Ghostty allows to link custom theme files. copy the `templates/colors-ghostty-custom` file to `~/.config/wal/templates`.
Then, in your Ghostty config file `~/.config/ghostty/config.ghostty` add this line:
```conf
config-file = ?~/.cache/wal/colors-ghostty-custom
```
Ghostty will hot reload the theme and also save it for the next time you open it.
### Example 3: Dunst (Notification Daemon)
Pywal doesn't generate a theme for every application, hence you have to define some templates yourself in `~/.config/wal/templates`. Pywal doesn't generate a theme for every application, hence you have to define some templates yourself in `~/.config/wal/templates`.
In this case we will create a template for Dunst: In this case we will create a template for Dunst:
+4 -4
View File
@@ -12,18 +12,18 @@ const colorsPath = `${HOME}/.cache/wal/colors.scss`
if (!GLib.file_test(colorsPath, GLib.FileTest.EXISTS)) { if (!GLib.file_test(colorsPath, GLib.FileTest.EXISTS)) {
const agsDir = `${HOME}/.config/ags` const agsDir = `${HOME}/.config/ags`
exec(`wal -q -n -i ${agsDir}/pywal.jpg`) exec(["wal", "-q", "-n", "-i", `${agsDir}/pywal.jpg`])
} }
const scss = `${HOME}/.config/ags/style.scss` const scss = `${HOME}/.config/ags/style.scss`
const css = `/tmp/ags-compiled-style.css` const css = `/tmp/ags-compiled-style.css`
exec(`sass ${scss} ${css}`) exec(["sass", "--no-source-map", scss, css])
app.start({ app.start({
css: css, css: css,
main() { main() {
restoreTheme() restoreTheme()
app.get_monitors().map(Bar) app.get_monitors().forEach(Bar)
app.get_monitors().map(PowerMenu) app.get_monitors().forEach(PowerMenu)
}, },
}) })
+81 -26
View File
@@ -4,7 +4,6 @@
"workspaces": { "workspaces": {
"": { "": {
"dependencies": { "dependencies": {
"ags": "*",
"gnim": "*", "gnim": "*",
"prettier": "^3.8.1", "prettier": "^3.8.1",
}, },
@@ -12,36 +11,48 @@
"@eslint/js": "^10.0.1", "@eslint/js": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^8.57.2", "@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2", "@typescript-eslint/parser": "^8.57.2",
"eslint": "^10.1.0", "eslint": "^10.16.0",
"typescript-eslint": "^8.57.2", "typescript-eslint": "^8.74.0",
}, },
}, },
}, },
"packages": { "packages": {
"@cacheable/memory": ["@cacheable/memory@2.2.0", "", { "dependencies": { "@cacheable/utils": "^2.5.0", "@keyv/bigmap": "^1.3.1", "hookified": "^1.15.1", "keyv": "^5.6.0" } }, "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ=="],
"@cacheable/utils": ["@cacheable/utils@2.5.0", "", { "dependencies": { "hashery": "^1.5.1", "keyv": "^5.6.0" } }, "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA=="],
"@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="], "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="],
"@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="], "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="],
"@eslint/config-array": ["@eslint/config-array@0.23.3", "", { "dependencies": { "@eslint/object-schema": "^3.0.3", "debug": "^4.3.1", "minimatch": "^10.2.4" } }, "sha512-j+eEWmB6YYLwcNOdlwQ6L2OsptI/LO6lNBuLIqe5R7RetD658HLoF+Mn7LzYmAWWNNzdC6cqP+L6r8ujeYXWLw=="], "@eslint/config-array": ["@eslint/config-array@0.23.7", "", { "dependencies": { "@eslint/object-schema": "^3.0.5", "debug": "^4.3.1", "minimatch": "^11.0.5" } }, "sha512-Ix1tmZjA7/OmE7ROAfORe83hVnqlDzLpZVHFjHQt5mvLm1U03qMexpaxKqFIL362QV32SoPaZqmKQr3tdqFY2w=="],
"@eslint/config-helpers": ["@eslint/config-helpers@0.5.3", "", { "dependencies": { "@eslint/core": "^1.1.1" } }, "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw=="], "@eslint/config-helpers": ["@eslint/config-helpers@0.7.0", "", { "dependencies": { "@eslint/core": "^1.2.1" } }, "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw=="],
"@eslint/core": ["@eslint/core@1.1.1", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ=="], "@eslint/core": ["@eslint/core@1.2.1", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ=="],
"@eslint/js": ["@eslint/js@10.0.1", "", { "peerDependencies": { "eslint": "^10.0.0" } }, "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA=="], "@eslint/js": ["@eslint/js@10.0.1", "", { "peerDependencies": { "eslint": "^10.0.0" } }, "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA=="],
"@eslint/object-schema": ["@eslint/object-schema@3.0.3", "", {}, "sha512-iM869Pugn9Nsxbh/YHRqYiqd23AmIbxJOcpUMOuWCVNdoQJ5ZtwL6h3t0bcZzJUlC3Dq9jCFCESBZnX0GTv7iQ=="], "@eslint/object-schema": ["@eslint/object-schema@3.0.5", "", {}, "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw=="],
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.6.1", "", { "dependencies": { "@eslint/core": "^1.1.1", "levn": "^0.4.1" } }, "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ=="], "@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.3", "", { "dependencies": { "@eslint/core": "^1.2.1", "levn": "^0.4.1" } }, "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q=="],
"@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], "@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="],
"@humanfs/node": ["@humanfs/node@0.16.7", "", { "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ=="], "@humanfs/node": ["@humanfs/node@0.16.8", "", { "dependencies": { "@humanfs/core": "^0.19.2", "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ=="],
"@humanfs/types": ["@humanfs/types@0.15.0", "", {}, "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q=="],
"@humanwhocodes/module-importer": ["@humanwhocodes/module-importer@1.0.1", "", {}, "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA=="], "@humanwhocodes/module-importer": ["@humanwhocodes/module-importer@1.0.1", "", {}, "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA=="],
"@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.3", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="], "@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.3", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="],
"@isaacs/nonrecursive-glob-match": ["@isaacs/nonrecursive-glob-match@1.1.0", "", {}, "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw=="],
"@keyv/bigmap": ["@keyv/bigmap@1.3.1", "", { "dependencies": { "hashery": "^1.4.0", "hookified": "^1.15.0" }, "peerDependencies": { "keyv": "^5.6.0" } }, "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ=="],
"@keyv/serialize": ["@keyv/serialize@1.1.1", "", {}, "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA=="],
"@types/esrecurse": ["@types/esrecurse@4.3.1", "", {}, "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw=="], "@types/esrecurse": ["@types/esrecurse@4.3.1", "", {}, "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw=="],
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
@@ -72,13 +83,13 @@
"acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="], "acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="],
"ags": ["ags@file:../../../../usr/share/ags/js", { "devDependencies": { "@eslint/js": "latest", "eslint": "^9.39.1", "typescript": "^5.9.3", "typescript-eslint": "^8.48.0" }, "peerDependencies": { "gnim": "^1.9.0" }, "os": "linux" }],
"ajv": ["ajv@6.14.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw=="], "ajv": ["ajv@6.14.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw=="],
"balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="], "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
"brace-expansion": ["brace-expansion@5.0.5", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="], "brace-expansion": ["brace-expansion@5.1.0", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-aa11Dv491GKnYqxaul3aRJ0szew7yMJMfZPnqD44NjGrZXoj62l41OEDDpdpC4eE2P88vBFfLuSyRhpG91NUvg=="],
"cacheable": ["cacheable@2.5.0", "", { "dependencies": { "@cacheable/memory": "^2.2.0", "@cacheable/utils": "^2.5.0", "hookified": "^1.15.0", "keyv": "^5.6.0", "qified": "^0.10.1" } }, "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g=="],
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
@@ -88,7 +99,7 @@
"escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
"eslint": ["eslint@10.1.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.3", "@eslint/config-helpers": "^0.5.3", "@eslint/core": "^1.1.1", "@eslint/plugin-kit": "^0.6.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": "bin/eslint.js" }, "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA=="], "eslint": ["eslint@10.16.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.7", "@eslint/config-helpers": "^0.7.0", "@eslint/core": "^1.2.1", "@eslint/plugin-kit": "^0.7.3", "@humanfs/node": "^0.16.8", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "11.1.5 || >11.1.6 <12", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^11.0.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-Xu3PRLG/wCaZWZ20gkExUcNqL2mWWsXTR+Lln3Sof4Y9WuA678fH9hrlQ8B6UNwbTnsKdDdBYOd2jxtycXVTGQ=="],
"eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="], "eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="],
@@ -112,17 +123,21 @@
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" } }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" } }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
"file-entry-cache": ["file-entry-cache@8.0.0", "", { "dependencies": { "flat-cache": "^4.0.0" } }, "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ=="], "file-entry-cache": ["file-entry-cache@11.1.5", "", { "dependencies": { "flat-cache": "^6.1.23" } }, "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q=="],
"find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="],
"flat-cache": ["flat-cache@4.0.1", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" } }, "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw=="], "flat-cache": ["flat-cache@6.1.23", "", { "dependencies": { "cacheable": "^2.5.0", "flatted": "^3.4.2", "hookified": "^1.15.0" } }, "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA=="],
"flatted": ["flatted@3.4.2", "", {}, "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA=="], "flatted": ["flatted@3.4.2", "", {}, "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA=="],
"glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="],
"gnim": ["gnim@file:../../../../usr/share/ags/js/node_modules/gnim", {}], "gnim": ["gnim@1.9.1", "", {}, "sha512-WttkzzZg17qrJKGk87HlE1zHKUdYoimSqjmsULt4C6DNq3JfYSPhYNjwUjBMHFpzZMbyUVHgpTTW6IIehme9tQ=="],
"hashery": ["hashery@1.5.1", "", { "dependencies": { "hookified": "^1.15.0" } }, "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ=="],
"hookified": ["hookified@1.15.1", "", {}, "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg=="],
"ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], "ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="],
@@ -134,19 +149,17 @@
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
"json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
"json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="], "json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="],
"json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="], "json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="],
"keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], "keyv": ["keyv@5.6.0", "", { "dependencies": { "@keyv/serialize": "^1.1.1" } }, "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw=="],
"levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="], "levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],
"locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="],
"minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], "minimatch": ["minimatch@11.0.9", "", { "dependencies": { "@isaacs/nonrecursive-glob-match": "^1.1.0", "brace-expansion": "^5.0.12" } }, "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q=="],
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
@@ -170,6 +183,8 @@
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
"qified": ["qified@0.10.1", "", { "dependencies": { "hookified": "^2.1.1" } }, "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA=="],
"semver": ["semver@7.7.4", "", { "bin": "bin/semver.js" }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "semver": ["semver@7.7.4", "", { "bin": "bin/semver.js" }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
"shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
@@ -184,7 +199,7 @@
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
"typescript-eslint": ["typescript-eslint@8.57.2", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.57.2", "@typescript-eslint/parser": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/utils": "8.57.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A=="], "typescript-eslint": ["typescript-eslint@8.74.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.74.0", "@typescript-eslint/parser": "8.74.0", "@typescript-eslint/typescript-estree": "8.74.0", "@typescript-eslint/utils": "8.74.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-OsWQlsedt1ZpZXfZZMNK3m4SoQONFFcy4h/uRznsCeRfVuEic3gh4KGUs2pJJ5o0Jj0Jr7keUHQGN1Ns9aDw7Q=="],
"uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="], "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="],
@@ -196,12 +211,52 @@
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
"@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="], "@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="],
"ags/gnim": ["gnim@file:../../../../usr/share/ags/js/node_modules/gnim", {}],
"eslint/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], "eslint/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
"espree/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="], "qified/hookified": ["hookified@2.2.0", "", {}, "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA=="],
"typescript-eslint/@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.74.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.74.0", "@typescript-eslint/type-utils": "8.74.0", "@typescript-eslint/utils": "8.74.0", "@typescript-eslint/visitor-keys": "8.74.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.74.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-z3KXk1+Vm+d82ZRplOoC89ho4Rf1da5ju6sx8//92GnN532U62DGPjECXkkVqtYzIv0zoJlpO39SX2Z9tk6LVw=="],
"typescript-eslint/@typescript-eslint/parser": ["@typescript-eslint/parser@8.74.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.74.0", "@typescript-eslint/types": "8.74.0", "@typescript-eslint/typescript-estree": "8.74.0", "@typescript-eslint/visitor-keys": "8.74.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-ecr8AYdig7avVkxaHdQvxHnIJ/mOyliO4Gv/uWF8q69vBew/z3sexqBwHUZX5Vql+Ns0w4sH6gBLkICGbOvJkA=="],
"typescript-eslint/@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.74.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.74.0", "@typescript-eslint/tsconfig-utils": "8.74.0", "@typescript-eslint/types": "8.74.0", "@typescript-eslint/visitor-keys": "8.74.0", "debug": "^4.4.3", "minimatch": "^11.0.1", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev", "typescript": ">=4.8.4 <6.1.0" }, "optionalPeers": ["@typescript/native"] }, "sha512-wL348k6l92DNG+kPP5rVpKwNBoz7a3xRZy3TPKc1uymQttd7u7gcMv3eENmcuh4CjC4mO3FTM0DYstFXMyDLuw=="],
"typescript-eslint/@typescript-eslint/utils": ["@typescript-eslint/utils@8.74.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.74.0", "@typescript-eslint/types": "8.74.0", "@typescript-eslint/typescript-estree": "8.74.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-IpWXPxXXomzxyTcvjhZJexgdvtTR1TooLAPpuxzaGqQ8BHll1lf4Ysp/BTE/l0U5TJ+x1j7B4bEM8pLRrvY+XA=="],
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@5.0.5", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="],
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "@typescript-eslint/visitor-keys": "8.74.0" } }, "sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ=="],
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "@typescript-eslint/typescript-estree": "8.74.0", "@typescript-eslint/utils": "8.74.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-CV3Y3la8l3F9ANfxcfpgSSiQgJTe4IeLEoZV4O/gcW86Ugp8X6SKiQ0vm+QegXaRIbbDMokZZSF3A1CgiU/kPw=="],
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g=="],
"typescript-eslint/@typescript-eslint/parser/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "@typescript-eslint/visitor-keys": "8.74.0" } }, "sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ=="],
"typescript-eslint/@typescript-eslint/parser/@typescript-eslint/types": ["@typescript-eslint/types@8.74.0", "", {}, "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA=="],
"typescript-eslint/@typescript-eslint/parser/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g=="],
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.74.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.74.0", "@typescript-eslint/types": "^8.74.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-z/mymuE+JlEeSFIv3Mo70EvgG1Zz74Hl0IDfExfXutARAP834bt+MppTD7mVAwmZO0GdxdOAi0jbTam749eH6g=="],
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.74.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-p07wAuaS6BjCYgOSXKJi4YhvTnAf7fiG37e9THcpnYaQEt2QiTTYZWKwUFNgeRiywiMudazhzgddAirZ0GgHtQ=="],
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/types": ["@typescript-eslint/types@8.74.0", "", {}, "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA=="],
"typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g=="],
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "@typescript-eslint/visitor-keys": "8.74.0" } }, "sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ=="],
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.74.0", "", {}, "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA=="],
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager/@typescript-eslint/types": ["@typescript-eslint/types@8.74.0", "", {}, "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA=="],
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils/@typescript-eslint/types": ["@typescript-eslint/types@8.74.0", "", {}, "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA=="],
"typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/visitor-keys/@typescript-eslint/types": ["@typescript-eslint/types@8.74.0", "", {}, "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA=="],
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.74.0", "", { "dependencies": { "@typescript-eslint/types": "8.74.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g=="],
} }
} }
+135
View File
@@ -0,0 +1,135 @@
# AGS greeter for greetd
A small AGS (GTK4) login UI that reuses this shell's pywal theme, wired to
greetd through [AstalGreet](https://aylur.github.io/libastal/greet/).
## How it fits together
```
greetd ──exec──> start-greeter.sh ──> cage ──> dbus-run-session ──> ags run greeter.tsx
^ │
└──────────────── AstalGreet.Greeter (GREETD_SOCK) <─────────────────────┘
```
AstalGreet is only the greetd IPC client; a compositor still has to host the
GTK window. Cage is used because it is a tiny kiosk compositor. Cage does not
support `wlr-layer-shell`, so the greeter is a plain `Gtk.ApplicationWindow`
(which cage maximizes) instead of an `Astal.Window`.
## Requirements
- `greetd` (already installed)
- `libastal-meta` (includes AstalGreet) or `libastal-greetd`
- `ags` (already installed)
- `cage` — `pacman -S cage`
- `uwsm`, `polkit` and `dbus` — `pacman -S uwsm polkit dbus`
- `dart-sass` (already installed, used to compile the theme)
- a `greeter` user in the `video` group (already present)
## Install
```sh
sudo pacman -S cage uwsm polkit dbus
sudo ./greeter/install.sh
```
The script:
- copies `greeter.tsx`, `style.scss`, and `start-greeter.sh` to
`/etc/greetd/ags` (the `greeter` user cannot read `/home/pascal`, which is
`0700`)
- creates `/var/lib/greetd/{run,.cache}` owned by `greeter`
- compiles a fallback theme and seeds the current pywal theme/wallpaper
- installs `/etc/polkit-1/rules.d/49-greetd-greeter.rules` so the `greeter`
user can reboot/power off from the login screen
- writes `/etc/greetd/config.toml` (backup at `config.toml.bak`)
**Keep a TTY available (Ctrl+Alt+F2)** before restarting greetd so you can
recover if the greeter fails.
```sh
sudo systemctl restart greetd
```
## Theming
`theme.ts` now calls `exportGreeterTheme()` on startup and after every
`setTheme()`:
- `greeter/style.scss` is compiled with the current `wal` palette to
`/var/tmp/ags-greeter/greeter.css`
- `~/.cache/current_wallpaper.jpg` is copied to
`/var/tmp/ags-greeter/wallpaper.jpg`
`/var/tmp` is used because it survives reboots and is readable by the
`greeter` user. `/tmp` is empty at boot (the greeter runs before login) and
`~/.cache/wal` is unreadable by `greeter`.
If the exported files do not exist yet, the greeter uses
`/etc/greetd/ags/fallback.css`, then an inline fallback.
## Preview
In a running Hyprland session, next to the bar (the greeter uses the distinct
`greeter` instance name):
```sh
ags run ./greeter/greeter.tsx
```
This shows the real UI, but pressing "Log in" reports that the greeter must be
started by greetd (there is no `GREETD_SOCK` in your session).
For a full kiosk-style preview, and for screenshots, run it inside a nested
cage window:
```sh
cage -d -- dbus-run-session -- ags run ./greeter/greeter.tsx
```
Close the preview with your Hyprland close-window keybind or:
```sh
ags quit -i greeter
```
## Login messages and power buttons
PAM info/error messages are shown in the card. greetd often reports only a
result code (for example `authenticate: AUTH_ERR`), so the greeter maps those
to readable text such as "Incorrect password. Please try again."
The card also has reboot and shut-down buttons. They call
`/usr/bin/systemctl`; the polkit rule installed by `install.sh` allows the
`greeter` user to perform those two actions without an authentication agent.
## Debugging
`greetd` prefixes its command with `exec`, so the chain lives in
`start-greeter.sh`. Its output (cage/AGS) is logged to:
```sh
cat /tmp/greeter.log
```
If greetd hits `start-limit-hit`, reset it after fixing:
```sh
sudo systemctl reset-failed greetd
sudo systemctl start greetd
```
## Notes / limitations
- `cage -m last` (in `start-greeter.sh`) puts the greeter on one monitor only.
Use `-m extend` to span all monitors, or switch to a layer-shell compositor
(sway/Hyprland) if you want per-monitor greeter windows.
- After a successful login the greeter starts
`/usr/bin/uwsm start -e -D Hyprland hyprland.desktop` (the same command as
`/usr/share/wayland-sessions/hyprland-uwsm.desktop`). No greetd-specific
uwsm configuration is needed; `~/.config/uwsm/env*` is still read from your
home when uwsm starts the user session. If you stop using uwsm, replace
`SESSION_CMD` in `greeter.tsx` with `["/usr/bin/start-hyprland"]`.
- The username field defaults to the user recorded in
`/etc/greetd/ags/default-user`; it can be edited before logging in.
- The reboot and shutdown buttons act immediately, without a confirmation step.
+372
View File
@@ -0,0 +1,372 @@
import app from "ags/gtk4/app"
import { Gtk } from "ags/gtk4"
import Greet from "gi://AstalGreet?version=0.1"
import GLib from "gi://GLib?version=2.0"
import Gio from "gi://Gio?version=2.0"
import { execAsync } from "ags/process"
// Filled in by greeter/install.sh. Falls back to the local user for preview.
const DEFAULT_USER_FILE = "/etc/greetd/ags/default-user"
// Matches /usr/share/wayland-sessions/hyprland-uwsm.desktop.
// If you ever stop using uwsm, replace this with ["/usr/bin/start-hyprland"].
const SESSION_CMD = [
"/usr/bin/uwsm",
"start",
"-e",
"-D",
"Hyprland",
"hyprland.desktop",
]
const SESSION_ENV = [
"XDG_SESSION_TYPE=wayland",
"XDG_CURRENT_DESKTOP=Hyprland",
"XDG_SESSION_DESKTOP=Hyprland",
]
// Written by exportGreeterTheme() in theme.ts whenever the shell theme changes.
const THEME_CSS = "/var/tmp/ags-greeter/greeter.css"
const FALLBACK_CSS = "/etc/greetd/ags/fallback.css"
const WALLPAPER = "/var/tmp/ags-greeter/wallpaper.jpg"
const INLINE_CSS = `
window.Greeter { background-color: #1e1e1e; color: #d4d4d4; }
window.Greeter .scrim { background-color: rgba(30, 30, 30, 0.45); padding: 32px; }
window.Greeter .login-card {
background-color: rgba(30, 30, 30, 0.9);
border: 1px solid rgba(212, 212, 212, 0.15);
border-radius: 16px;
padding: 32px;
min-width: 320px;
}
window.Greeter .greeting { font-size: 2em; font-weight: bold; }
window.Greeter .subtitle { opacity: 0.65; margin-bottom: 8px; }
window.Greeter entry {
background-color: rgba(212, 212, 212, 0.08);
border: 1px solid rgba(212, 212, 212, 0.15);
border-radius: 8px;
padding: 10px 12px;
color: #d4d4d4;
}
window.Greeter button.login-btn {
background-color: #6a9955;
color: #1e1e1e;
border: none;
border-radius: 8px;
padding: 10px;
font-weight: bold;
}
window.Greeter .messages { min-height: 1.2em; }
window.Greeter .message { font-size: 0.9em; opacity: 0.85; }
window.Greeter .message.error { color: #f44747; }
window.Greeter .message.info { color: #569cd6; }
window.Greeter .power-row { margin-top: 4px; }
window.Greeter button.power-action {
background-color: rgba(212, 212, 212, 0.06);
border: 1px solid rgba(212, 212, 212, 0.1);
border-radius: 8px;
padding: 8px;
min-width: 36px;
min-height: 36px;
}
window.Greeter button.power-action:hover {
background-color: rgba(212, 212, 212, 0.12);
}
window.Greeter button.power-action image { -gtk-icon-size: 18px; }
`
// greetd only reports PAM result codes in the error description, e.g.
// "authenticate: AUTH_ERR". Map them to something human readable.
const AUTH_ERROR_MESSAGES: Record<string, string> = {
AUTH_ERR: "Incorrect password. Please try again.",
MAXTRIES: "Too many failed attempts.",
CRED_EXPIRED: "Your credentials have expired.",
ACCT_EXPIRED: "Your account has expired.",
CRED_INSUFFICIENT: "Insufficient credentials.",
USER_UNKNOWN: "Unknown username.",
PERM_DENIED: "Permission denied.",
SERVICE_ERR: "Authentication service error.",
ABORT: "Authentication aborted.",
}
function errorDescription(error: any): string {
try {
if (typeof error?.get_description === "function")
return error.get_description() ?? ""
return typeof error?.description === "string" ? error.description : ""
} catch {
return ""
}
}
function errorType(error: any): number | null {
try {
if (typeof error?.get_error_type === "function")
return error.get_error_type()
return typeof error?.error_type === "number" ? error.error_type : null
} catch {
return null
}
}
function humanizeError(error: any): string {
const description = errorDescription(error)
const code = description.match(/\b([A-Z][A-Z_]+)\b\s*$/)?.[1]
if (code && AUTH_ERROR_MESSAGES[code]) return AUTH_ERROR_MESSAGES[code]
// Only show the raw description when it is not a cryptic PAM result code.
if (description && !/^[a-z_]+: [A-Z_]+$/.test(description)) return description
// AstalGreet.ErrorType.AUTH_ERROR is 0
if (errorType(error) === 0) return "Authentication failed. Please try again."
return description || "Login failed"
}
function readTextFile(path: string): string | null {
try {
const [ok, contents] = GLib.file_get_contents(path)
if (!ok) return null
let text = ""
for (const byte of contents) text += String.fromCharCode(byte)
return text.trim()
} catch {
return null
}
}
function defaultUser() {
return readTextFile(DEFAULT_USER_FILE) || "pascal"
}
function themeCss() {
if (GLib.file_test(THEME_CSS, GLib.FileTest.EXISTS)) return THEME_CSS
if (GLib.file_test(FALLBACK_CSS, GLib.FileTest.EXISTS)) return FALLBACK_CSS
return INLINE_CSS
}
function Greeter() {
const user = defaultUser()
const underGreetd = GLib.getenv("GREETD_SOCK") !== null
const greeter = new Greet.Greeter()
let userEntry: Gtk.Entry | null = null
let passEntry: Gtk.Entry | null = null
let messageList: Gtk.Box | null = null
let loginButton: Gtk.Button | null = null
let busy = false
let lastPamError = ""
const messageWidgets: Gtk.Label[] = []
const appendMessage = (text: string, kind: "error" | "info" = "info") => {
if (!messageList || !text) return
const label = new Gtk.Label({ label: text, wrap: true, xalign: 0 })
label.set_css_classes(["message", kind])
messageList.append(label)
messageWidgets.push(label)
while (messageWidgets.length > 4) {
const old = messageWidgets.shift()
if (old) messageList.remove(old)
}
}
const clearMessages = () => {
if (!messageList) return
for (const label of messageWidgets) messageList.remove(label)
messageWidgets.length = 0
}
const reset = () => {
busy = false
if (loginButton) loginButton.sensitive = true
if (passEntry) {
passEntry.set_text("")
passEntry.grab_focus()
}
}
const runPower = (action: "reboot" | "poweroff") => {
if (!underGreetd) {
appendMessage("This greeter must be started by greetd", "error")
return
}
appendMessage(action === "reboot" ? "Rebooting…" : "Shutting down…")
execAsync(["/usr/bin/systemctl", action]).catch((error: unknown) => {
appendMessage(`Failed to ${action}: ${`${error}`.trim()}`, "error")
})
}
const login = () => {
if (busy) return
if (!underGreetd) {
appendMessage("This greeter must be started by greetd", "error")
return
}
const username = userEntry?.get_text().trim() || user
if (!passEntry?.get_text()) {
appendMessage("Enter your password", "error")
passEntry?.grab_focus()
return
}
busy = true
if (loginButton) loginButton.sensitive = false
lastPamError = ""
clearMessages()
greeter.create_session(username)
}
greeter.connect("visible-request", (_src: unknown, _message: string) => {
lastPamError = ""
greeter.post_auth(userEntry?.get_text().trim() || user)
})
greeter.connect("secret-request", (_src: unknown, _message: string) => {
lastPamError = ""
greeter.post_auth(passEntry?.get_text() ?? "")
})
greeter.connect("info-message", (_src: unknown, message: string) => {
appendMessage(message)
})
greeter.connect("error-message", (_src: unknown, message: string) => {
lastPamError = message
appendMessage(message, "error")
})
greeter.connect("cancelled", (_src: unknown, error: any) => {
if (!lastPamError) appendMessage(humanizeError(error), "error")
lastPamError = ""
reset()
})
greeter.connect("authenticated", () => {
greeter.start_session(
SESSION_CMD,
SESSION_ENV,
(_src: unknown, res: any) => {
try {
greeter.start_session_finish(res)
} catch (error: any) {
appendMessage(error?.message ?? `${error}`, "error")
reset()
return
}
// greetd starts the session once the greeter process exits.
app.quit()
},
)
})
return (
<Gtk.ApplicationWindow
application={app}
class="Greeter"
title="Login"
decorated={false}
defaultWidth={800}
defaultHeight={500}
$={(window: Gtk.ApplicationWindow) => {
window.present()
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
passEntry?.grab_focus()
return GLib.SOURCE_REMOVE
})
}}
>
<overlay
$={(overlay: Gtk.Overlay) => {
const content = overlay.get_child()
const picture = new Gtk.Picture()
picture.set_content_fit(Gtk.ContentFit.COVER)
picture.set_hexpand(true)
picture.set_vexpand(true)
if (GLib.file_test(WALLPAPER, GLib.FileTest.EXISTS)) {
picture.set_file(Gio.File.new_for_path(WALLPAPER))
}
overlay.set_child(picture)
if (content) overlay.add_overlay(content)
}}
>
<box cssClasses={["scrim"]} orientation={Gtk.Orientation.VERTICAL}>
<box vexpand />
<box
cssClasses={["login-card"]}
orientation={Gtk.Orientation.VERTICAL}
spacing={12}
halign={Gtk.Align.CENTER}
>
<label label="Welcome back" cssClasses={["greeting"]} />
<label
label="Log in to start your session"
cssClasses={["subtitle"]}
/>
<entry
text={user}
placeholderText="Username"
onActivate={login}
$={(entry: Gtk.Entry) => (userEntry = entry)}
/>
<entry
placeholderText="Password"
visibility={false}
onActivate={login}
$={(entry: Gtk.Entry) => (passEntry = entry)}
/>
<button
cssClasses={["login-btn"]}
onClicked={login}
$={(button: Gtk.Button) => (loginButton = button)}
>
<label label="Log in" />
</button>
<box
cssClasses={["messages"]}
orientation={Gtk.Orientation.VERTICAL}
spacing={4}
$={(box: Gtk.Box) => (messageList = box)}
/>
<box
cssClasses={["power-row"]}
spacing={8}
halign={Gtk.Align.CENTER}
>
<button
cssClasses={["power-action"]}
tooltipText="Reboot"
onClicked={() => runPower("reboot")}
>
<image iconName="system-reboot-symbolic" />
</button>
<button
cssClasses={["power-action"]}
tooltipText="Shut down"
onClicked={() => runPower("poweroff")}
>
<image iconName="system-shutdown-symbolic" />
</button>
</box>
</box>
<box vexpand />
</box>
</overlay>
</Gtk.ApplicationWindow>
)
}
app.start({
instanceName: "greeter",
css: themeCss(),
main() {
Greeter()
},
})
+146
View File
@@ -0,0 +1,146 @@
#!/bin/sh
# Installs the AGS greeter for greetd.
#
# Usage: sudo ./greeter/install.sh
#
# This replaces /etc/greetd/config.toml (a .bak copy is kept) and copies the
# greeter into /etc/greetd/ags so the `greeter` user can read it.
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "Run this script with sudo." >&2
exit 1
fi
SRC=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
TARGET_USER=${SUDO_USER:-pascal}
for bin in cage sass dbus-run-session; do
if ! command -v "$bin" >/dev/null 2>&1; then
echo "Missing dependency: $bin" >&2
case "$bin" in
cage) echo "Install it with: pacman -S cage" >&2 ;;
sass) echo "Install it with: pacman -S dart-sass" >&2 ;;
esac
exit 1
fi
done
if ! id greeter >/dev/null 2>&1; then
echo "The 'greeter' user does not exist. Create it with:" >&2
echo " useradd -M -G video greeter" >&2
exit 1
fi
install -d -m 755 /etc/greetd/ags
install -d -o greeter -g greeter -m 700 \
/var/lib/greetd /var/lib/greetd/run /var/lib/greetd/.cache
install -m 644 -o root -g root "$SRC/greeter.tsx" /etc/greetd/ags/greeter.tsx
install -m 644 -o root -g root "$SRC/style.scss" /etc/greetd/ags/style.scss
install -m 755 -o root -g root "$SRC/start-greeter.sh" /etc/greetd/ags/start-greeter.sh
rm -f /etc/greetd/ags/*.map
printf '%s\n' "$TARGET_USER" > /etc/greetd/ags/default-user
chmod 644 /etc/greetd/ags/default-user
# Compile a fallback theme in case the shell has never exported one.
# /tmp is sticky and fs.protected_regular is enabled, so root cannot
# overwrite an existing user-owned file there. Remove it first and give it
# back to the user at the end so theme switching keeps working.
rm -f /tmp/ags-colors.scss
cat > /tmp/ags-colors.scss <<'EOF'
$wallpaper: "";
$background: #1e1e1e;
$foreground: #d4d4d4;
$cursor: #d4d4d4;
$color0: #1e1e1e;
$color1: #f44747;
$color2: #6a9955;
$color3: #d7ba7d;
$color4: #569cd6;
$color5: #c586c0;
$color6: #4ec9b0;
$color7: #d4d4d4;
$color8: #808080;
$color9: #f44747;
$color10: #6a9955;
$color11: #d7ba7d;
$color12: #569cd6;
$color13: #c586c0;
$color14: #4ec9b0;
$color15: #d4d4d4;
EOF
sass --no-source-map /etc/greetd/ags/style.scss /etc/greetd/ags/fallback.css
chmod 644 /etc/greetd/ags/fallback.css
# Seed the greeter theme from the user's current pywal state.
USER_HOME=$(getent passwd "$TARGET_USER" | cut -d: -f6 || true)
if [ -n "${USER_HOME:-}" ] && [ -f "$USER_HOME/.cache/wal/colors.scss" ]; then
install -d -m 755 -o "$TARGET_USER" -g "$TARGET_USER" /var/tmp/ags-greeter
rm -f /var/tmp/ags-greeter/greeter.css \
/var/tmp/ags-greeter/greeter.css.map /var/tmp/ags-greeter/wallpaper.jpg
cp "$USER_HOME/.cache/wal/colors.scss" /tmp/ags-colors.scss
sass --no-source-map /etc/greetd/ags/style.scss \
/var/tmp/ags-greeter/greeter.css
if [ -f "$USER_HOME/.cache/current_wallpaper.jpg" ]; then
cp "$USER_HOME/.cache/current_wallpaper.jpg" \
/var/tmp/ags-greeter/wallpaper.jpg
fi
chown "$TARGET_USER:$TARGET_USER" \
/var/tmp/ags-greeter/greeter.css /var/tmp/ags-greeter/wallpaper.jpg \
2>/dev/null || true
fi
if [ -f /etc/greetd/config.toml ]; then
cp /etc/greetd/config.toml /etc/greetd/config.toml.bak
fi
chown "$TARGET_USER:$TARGET_USER" /tmp/ags-colors.scss 2>/dev/null || true
cat > /etc/greetd/config.toml <<'EOF'
[terminal]
vt = 1
[default_session]
# greetd prefixes the command with `exec`, so it must be a single executable.
# start-greeter.sh sets HOME/XDG dirs, starts cage, then AGS.
command = "/etc/greetd/ags/start-greeter.sh"
user = "greeter"
EOF
# Allow the greeter user to power off/reboot without an auth agent.
if [ ! -d /etc/polkit-1/rules.d ]; then
install -d -m 755 /etc/polkit-1/rules.d
fi
cat > /etc/polkit-1/rules.d/49-greetd-greeter.rules <<'EOF'
polkit.addRule(function(action, subject) {
if (subject.user !== "greeter")
return null;
const allowed = [
"org.freedesktop.login1.power-off",
"org.freedesktop.login1.power-off-multiple-sessions",
"org.freedesktop.login1.reboot",
"org.freedesktop.login1.reboot-multiple-sessions",
];
if (allowed.indexOf(action.id) !== -1)
return polkit.Result.YES;
return null;
});
EOF
chmod 644 /etc/polkit-1/rules.d/49-greetd-greeter.rules
cat <<EOF
Installed.
Keep a TTY available (Ctrl+Alt+F2) before restarting greetd, in case the
greeter fails to start.
Test or apply with:
sudo systemctl restart greetd
Preview the UI in your current session with:
ags run "$SRC/greeter.tsx"
EOF
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
# Launched by greetd as the `greeter` user.
#
# greetd runs `exec <command>`, so the command must be a single executable
# (not a `mkdir ... && cage ...` compound list).
set -eu
LOG=/tmp/greeter.log
exec >>"$LOG" 2>&1
echo "=== $(date -Is) starting greeter ==="
mkdir -p /var/lib/greetd/run /var/lib/greetd/.cache
chmod 700 /var/lib/greetd/run
export HOME=/var/lib/greetd
export XDG_RUNTIME_DIR=/var/lib/greetd/run
export XDG_CACHE_HOME=/var/lib/greetd/.cache
exec /usr/bin/cage -m last -s -d -- \
/usr/bin/dbus-run-session -- \
/usr/bin/ags run /etc/greetd/ags/greeter.tsx
+101
View File
@@ -0,0 +1,101 @@
@use "/tmp/ags-colors.scss" as wal;
window.Greeter {
background-color: wal.$background;
color: wal.$foreground;
.scrim {
background-color: rgba(wal.$background, 0.45);
padding: 32px;
}
.login-card {
background-color: rgba(wal.$background, 0.9);
border: 1px solid rgba(wal.$foreground, 0.12);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
padding: 32px;
min-width: 320px;
.greeting {
font-size: 2em;
font-weight: bold;
}
.subtitle {
opacity: 0.65;
margin-bottom: 8px;
}
}
entry {
background-color: rgba(wal.$foreground, 0.08);
border: 1px solid rgba(wal.$foreground, 0.12);
border-radius: 8px;
padding: 10px 12px;
color: wal.$foreground;
caret-color: wal.$color2;
transition: border-color 0.2s ease-in-out;
&:focus {
border-color: wal.$color2;
}
}
button.login-btn {
background-color: wal.$color2;
color: wal.$background;
border: none;
border-radius: 8px;
padding: 10px;
font-weight: bold;
transition: background-color 0.2s ease-in-out;
&:hover {
background-color: rgba(wal.$color2, 0.85);
}
&:disabled {
opacity: 0.6;
}
}
.messages {
min-height: 1.2em;
}
.message {
font-size: 0.9em;
opacity: 0.85;
&.error {
color: wal.$color1;
}
&.info {
color: wal.$color4;
}
}
.power-row {
margin-top: 4px;
}
button.power-action {
background-color: rgba(wal.$foreground, 0.06);
border: 1px solid rgba(wal.$foreground, 0.1);
border-radius: 8px;
padding: 8px;
min-width: 36px;
min-height: 36px;
transition: background-color 0.2s ease-in-out;
&:hover {
background-color: rgba(wal.$foreground, 0.12);
}
image {
-gtk-icon-size: 18px;
}
}
}
+2 -3
View File
@@ -2,7 +2,6 @@
"name": "tacitshell", "name": "tacitshell",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"ags": "*",
"gnim": "*", "gnim": "*",
"prettier": "^3.8.1" "prettier": "^3.8.1"
}, },
@@ -14,8 +13,8 @@
"@eslint/js": "^10.0.1", "@eslint/js": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^8.57.2", "@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2", "@typescript-eslint/parser": "^8.57.2",
"eslint": "^10.1.0", "eslint": "^10.16.0",
"typescript-eslint": "^8.57.2" "typescript-eslint": "^8.74.0"
}, },
"scripts": { "scripts": {
"lint": "eslint .", "lint": "eslint .",
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

+16 -2
View File
@@ -1,7 +1,7 @@
@use "/tmp/ags-colors.scss" as wal; @use "/tmp/ags-colors.scss" as wal;
$fg-color: wal.$foreground; $fg-color: wal.$foreground;
$bg-color: rgba(wal.$background, 0.8); $bg-color: rgba(wal.$background, 1);
$btn-height: 30px; $btn-height: 30px;
$btn-radius: 8px; $btn-radius: 8px;
@@ -14,7 +14,7 @@ window.Bar {
font-weight: bold; font-weight: bold;
> centerbox { > centerbox {
background: $bg-color; background: rgba(wal.$background, 1);
border-radius: 10px; border-radius: 10px;
margin: 4px 8px; margin: 4px 8px;
padding: 0 8px; padding: 0 8px;
@@ -201,6 +201,20 @@ window.PowerMenu {
background: rgba(wal.$foreground, 0.1); background: rgba(wal.$foreground, 0.1);
} }
} }
.qs-device-name {
font-weight: bold;
}
.qs-device-status {
font-size: 0.9em;
opacity: 0.7;
}
.qs-battery {
font-size: 0.9em;
opacity: 0.7;
}
} }
slider { slider {
+25
View File
@@ -0,0 +1,25 @@
# Pywal 16-color template for Ghostty
palette = 0={color0}
palette = 1={color1}
palette = 2={color2}
palette = 3={color3}
palette = 4={color4}
palette = 5={color5}
palette = 6={color6}
palette = 7={color7}
palette = 8={color8}
palette = 9={color9}
palette = 10={color10}
palette = 11={color11}
palette = 12={color12}
palette = 13={color13}
palette = 14={color14}
palette = 15={color15}
background = {background}
foreground = {foreground}
cursor-color = {cursor}
selection-background = {color4}
selection-foreground = {background}
background-opacity = 0.85
+21
View File
@@ -0,0 +1,21 @@
var_wallpaper = "{wallpaper}"
var_foreground = "rgba({foreground.rgb},1.0)"
var_background = "rgba({background.rgb},1.0)"
var_color0 = "rgba({color0.rgb},1.0)"
var_color1 = "rgba({color1.rgb},1.0)"
var_color2 = "rgba({color2.rgb},1.0)"
var_color3 = "rgba({color3.rgb},1.0)"
var_color4 = "rgba({color4.rgb},1.0)"
var_color5 = "rgba({color5.rgb},1.0)"
var_color6 = "rgba({color6.rgb},1.0)"
var_color7 = "rgba({color7.rgb},1.0)"
var_color8 = "rgba({color8.rgb},1.0)"
var_color9 = "rgba({color9.rgb},1.0)"
var_color10 = "rgba({color10.rgb},1.0)"
var_color11 = "rgba({color11.rgb},1.0)"
var_color12 = "rgba({color12.rgb},1.0)"
var_color13 = "rgba({color13.rgb},1.0)"
var_color14 = "rgba({color14.rgb},1.0)"
var_color15 = "rgba({color15.rgb},1.0)"
+17
View File
@@ -0,0 +1,17 @@
* {
/* Base Colors */
background: #{background.strip}D9; /* D9 = ~85% opacity. Use 99 for 60% or CC for 80% */
background-solid: {background};
foreground: {foreground};
/* Accent Colors */
color0: {color0};
color1: {color1};
color2: {color2};
color3: {color3};
color4: {color4};
color5: {color5};
color6: {color6};
color7: {color7};
color8: {color8};
}
+22
View File
@@ -0,0 +1,22 @@
[global]
# Define the corner radius in pixels.
# A value of 0 disables rounded corners.
corner_radius = 10
[urgency_low]
background = "{background}CC"
foreground = "{foreground}"
frame_color = "{color2}"
timeout = 10
[urgency_normal]
background = "{background}CC"
foreground = "{foreground}"
frame_color = "{color1}"
timeout = 10
[urgency_critical]
background = "{background}CC"
foreground = "{foreground}"
frame_color = "{color9}"
timeout = 0
+84 -13
View File
@@ -5,6 +5,39 @@ import Gio from "gi://Gio?version=2.0"
const HOME = GLib.getenv("HOME") || "" const HOME = GLib.getenv("HOME") || ""
const WALLPAPER_DIR = `${HOME}/wallpapers` const WALLPAPER_DIR = `${HOME}/wallpapers`
const GREETER_DIR = "/var/tmp/ags-greeter"
/**
* Export the current palette and wallpaper for the greetd greeter.
* The greeter runs as the `greeter` user, which cannot read the user's home
* directory, and /tmp is empty at boot. /var/tmp persists across reboots and
* is world-readable, so it works for both.
*/
export async function exportGreeterTheme() {
try {
await execAsync(["mkdir", "-p", GREETER_DIR])
const walCache = `${HOME}/.cache/wal/colors.scss`
const tmpColors = `/tmp/ags-colors.scss`
if (GLib.file_test(walCache, GLib.FileTest.EXISTS)) {
await execAsync(["cp", walCache, tmpColors])
}
await execAsync([
"sass",
"--no-source-map",
`${HOME}/.config/ags/greeter/style.scss`,
`${GREETER_DIR}/greeter.css`,
])
const wallpaper = `${HOME}/.cache/current_wallpaper.jpg`
if (GLib.file_test(wallpaper, GLib.FileTest.EXISTS)) {
await execAsync(["cp", wallpaper, `${GREETER_DIR}/wallpaper.jpg`])
}
} catch (error) {
console.error("Failed to export greeter theme:", error)
}
}
/** /**
* Get a list of all wallpapers in the default wallpapers directory. * Get a list of all wallpapers in the default wallpapers directory.
@@ -83,20 +116,25 @@ $color15: #d4d4d4;
* Restore the last set wallpaper. * Restore the last set wallpaper.
*/ */
export async function restoreTheme() { export async function restoreTheme() {
let themed = false
try { try {
const out = await execAsync(["cat", `${HOME}/.cache/wal/wal`]) const out = await execAsync(["cat", `${HOME}/.cache/wal/wal`])
const wallpaperPath = out.trim() const wallpaperPath = out.trim()
if (wallpaperPath) { if (wallpaperPath) {
// setTheme() exports the greeter theme as its last step.
await setTheme(wallpaperPath) await setTheme(wallpaperPath)
themed = true
} }
} catch {} } catch {}
if (!themed) await exportGreeterTheme()
} }
/** /**
* Set the wallpaper using hyprpaper, generate colors with pywal, * Apply the wallpaper using hyprpaper, generate colors with pywal,
* and reload the AGS theme. * and reload the AGS theme.
*/ */
export async function setTheme(wallpaperPath: string) { async function applyTheme(wallpaperPath: string) {
// 1. Set wallpaper with hyprpaper // 1. Set wallpaper with hyprpaper
try { try {
// Preload the wallpaper first // Preload the wallpaper first
@@ -121,9 +159,15 @@ export async function setTheme(wallpaperPath: string) {
// 2. Generate colors with pywal16 // 2. Generate colors with pywal16
try { try {
// -q: quiet, -i: image, -n: skip setting wallpaper (hyprpaper does it) // -q: quiet, -i: image, -n: skip setting wallpaper (hyprpaper does it)
await execAsync( await execAsync([
`wal --backend modern-colorthief -q -n -i "${wallpaperPath}"`, "wal",
) "--contrast",
"21.0",
"-q",
"-n",
"-i",
wallpaperPath,
])
// Add this line so hyprlock always knows the current wallpaper: // Add this line so hyprlock always knows the current wallpaper:
await execAsync([ await execAsync([
@@ -151,7 +195,7 @@ export async function setTheme(wallpaperPath: string) {
} }
// Compile SCSS to CSS using the sass CLI // Compile SCSS to CSS using the sass CLI
await execAsync(`sass ${scss} ${css}`) await execAsync(["sass", "--no-source-map", scss, css])
// Reset any previously applied CSS and apply the new one // Reset any previously applied CSS and apply the new one
app.reset_css() app.reset_css()
@@ -160,11 +204,38 @@ export async function setTheme(wallpaperPath: string) {
console.error("Failed to recompile and apply AGS styles:", error) console.error("Failed to recompile and apply AGS styles:", error)
} }
// 4. Run update script // 4. Keep the greetd greeter in sync with the current palette/wallpaper
try { await exportGreeterTheme()
const agsDir = `${HOME}/.config/ags`
await execAsync(`${agsDir}/update_script.sh`) // 5. Refresh the rest of the system (dunst, hyprland, ...). Deliberately not
} catch (error) { // awaited, so nothing the script does can stall the theme queue.
console.error("Failed to run update script:", error) runUpdateScript()
} }
/**
* Run update_script.sh detached from our stdio.
*
* execAsync resolves only once stdout/stderr reach EOF. A daemon started with
* `&` in the script would inherit those pipes and keep the promise pending
* forever, which used to block every queued theme switch after the first one.
*/
function runUpdateScript() {
const script = `${HOME}/.config/ags/update_script.sh`
return execAsync([
"bash",
"-c",
`"${script}" >/dev/null 2>&1 </dev/null`,
]).catch((error) => console.error("Failed to run update script:", error))
}
let themeQueue: Promise<void> = Promise.resolve()
/**
* Set the wallpaper and palette. Calls are serialized so rapid theme switches
* cannot run wal/sass concurrently and race on the same output files.
*/
export function setTheme(wallpaperPath: string): Promise<void> {
const run = () => applyTheme(wallpaperPath)
themeQueue = themeQueue.then(run, run)
return themeQueue
} }
+6 -2
View File
@@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
#Dunst notification daemon # Dunst notification daemon.
# Detach it from this script's stdio: AGS only resolves execAsync once the
# captured pipes are closed, so an inherited fd here would stall the caller.
killall dunst killall dunst
dunst & setsid -f dunst >/dev/null 2>&1 </dev/null
hyprctl reload
+3 -3
View File
@@ -1,8 +1,8 @@
import { Gtk } from "ags/gtk4" import { Gdk, Gtk } from "ags/gtk4"
import app from "ags/gtk4/app" import app from "ags/gtk4/app"
import QuickSettings from "./QuickSettings" import QuickSettings from "./QuickSettings"
export function PowerButton({ gdkmonitor }: { gdkmonitor: any }) { export function PowerButton({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) {
return ( return (
<button <button
cssClasses={["control-btn", "power-btn"]} cssClasses={["control-btn", "power-btn"]}
@@ -15,7 +15,7 @@ export function PowerButton({ gdkmonitor }: { gdkmonitor: any }) {
) )
} }
export default function Controls({ gdkmonitor }: { gdkmonitor: any }) { export default function Controls({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) {
return ( return (
<box <box
cssClasses={["controls-container"]} cssClasses={["controls-container"]}
+24 -9
View File
@@ -13,6 +13,8 @@ function VinylRecord({ player, size }: { player: any; size: number }) {
$={(box) => { $={(box) => {
let angle = 0 let angle = 0
let timerId: number | null = null let timerId: number | null = null
let playing =
player.playback_status === AstalMpris.PlaybackStatus.PLAYING
const rotProvider = new Gtk.CssProvider() const rotProvider = new Gtk.CssProvider()
box box
@@ -39,6 +41,11 @@ function VinylRecord({ player, size }: { player: any; size: number }) {
} }
} }
const syncSpin = () => {
if (playing && box.get_mapped()) startSpin()
else stopSpin()
}
const frame = new Gtk.Frame() const frame = new Gtk.Frame()
const provider = new Gtk.CssProvider() const provider = new Gtk.CssProvider()
provider.load_from_string(` provider.load_from_string(`
@@ -73,21 +80,23 @@ function VinylRecord({ player, size }: { player: any; size: number }) {
} }
} }
updateArt() updateArt()
if (player.playback_status === AstalMpris.PlaybackStatus.PLAYING) {
startSpin()
}
applyAngle() applyAngle()
const artConn = player.connect("notify::cover-art", updateArt) const artConn = player.connect("notify::cover-art", updateArt)
const statusConn = player.connect("notify::playback-status", () => { const statusConn = player.connect("notify::playback-status", () => {
if (player.playback_status === AstalMpris.PlaybackStatus.PLAYING) { playing =
startSpin() player.playback_status === AstalMpris.PlaybackStatus.PLAYING
} else { syncSpin()
stopSpin()
}
}) })
// Keep the timer stopped while the record is hidden (other players,
// closed popover, or the whole bar) to avoid burning CPU.
const mapConn = box.connect("map", () => {
if (playing) startSpin()
})
const unmapConn = box.connect("unmap", stopSpin)
syncSpin()
onCleanup(() => { onCleanup(() => {
stopSpin() stopSpin()
try { try {
@@ -96,6 +105,12 @@ function VinylRecord({ player, size }: { player: any; size: number }) {
try { try {
player.disconnect(statusConn) player.disconnect(statusConn)
} catch {} } catch {}
try {
box.disconnect(mapConn)
} catch {}
try {
box.disconnect(unmapConn)
} catch {}
}) })
}} }}
/> />
+5 -5
View File
@@ -5,7 +5,7 @@ import { execAsync } from "ags/process"
interface SysButtonProps { interface SysButtonProps {
icon: string icon: string
label: string label: string
command: string command: string[]
} }
function SysButton({ icon, label, command }: SysButtonProps) { function SysButton({ icon, label, command }: SysButtonProps) {
@@ -66,22 +66,22 @@ export default function PowerMenu(gdkmonitor: Gdk.Monitor) {
<SysButton <SysButton
icon="system-shutdown-symbolic" icon="system-shutdown-symbolic"
label="Power Off" label="Power Off"
command="systemctl poweroff" command={["/usr/bin/systemctl", "poweroff"]}
/> />
<SysButton <SysButton
icon="system-reboot-symbolic" icon="system-reboot-symbolic"
label="Reboot" label="Reboot"
command="systemctl reboot" command={["/usr/bin/systemctl", "reboot"]}
/> />
<SysButton <SysButton
icon="system-log-out-symbolic" icon="system-log-out-symbolic"
label="Sign Out" label="Sign Out"
command="hyprctl dispatch exit" command={["/usr/bin/uwsm", "stop"]}
/> />
<SysButton <SysButton
icon="weather-clear-night-symbolic" icon="weather-clear-night-symbolic"
label="Sleep" label="Sleep"
command="systemctl suspend" command={["/usr/bin/systemctl", "suspend"]}
/> />
</box> </box>
</window> </window>
+166 -18
View File
@@ -2,9 +2,10 @@ import { Gtk } from "ags/gtk4"
import AstalNetwork from "gi://AstalNetwork?version=0.1" import AstalNetwork from "gi://AstalNetwork?version=0.1"
import AstalBluetooth from "gi://AstalBluetooth?version=0.1" import AstalBluetooth from "gi://AstalBluetooth?version=0.1"
import AstalWp from "gi://AstalWp?version=0.1" import AstalWp from "gi://AstalWp?version=0.1"
import AstalPowerProfiles from "gi://AstalPowerProfiles?version=0.1"
import { createBinding, createComputed, createState, For } from "ags" import { createBinding, createComputed, createState, For } from "ags"
import { interval } from "ags/time" import { interval, Timer } from "ags/time"
import { exec, execAsync } from "ags/process" import { execAsync } from "ags/process"
interface VpnConn { interface VpnConn {
name: string name: string
@@ -13,9 +14,9 @@ interface VpnConn {
const VPN_TYPES = new Set(["vpn", "wireguard"]) const VPN_TYPES = new Set(["vpn", "wireguard"])
function fetchVpns(): VpnConn[] { async function fetchVpns(): Promise<VpnConn[]> {
try { try {
const stdout = exec([ const stdout = await execAsync([
"nmcli", "nmcli",
"-t", "-t",
"-f", "-f",
@@ -26,6 +27,7 @@ function fetchVpns(): VpnConn[] {
return stdout return stdout
.trim() .trim()
.split("\n") .split("\n")
.filter(Boolean)
.map((line) => line.split(":")) .map((line) => line.split(":"))
.filter(([, type]) => VPN_TYPES.has(type)) .filter(([, type]) => VPN_TYPES.has(type))
.map(([name, , device]) => ({ name, active: !!device })) .map(([name, , device]) => ({ name, active: !!device }))
@@ -35,12 +37,75 @@ function fetchVpns(): VpnConn[] {
} }
} }
const [vpns, setVpns] = createState<VpnConn[]>(fetchVpns()) const [vpns, setVpns] = createState<VpnConn[]>([])
interval(2000, () => setVpns(fetchVpns()))
const vpnActive = vpns((list) => list.some((c) => c.active)) const vpnActive = vpns((list) => list.some((c) => c.active))
function sameVpns(a: VpnConn[], b: VpnConn[]) {
return (
a.length === b.length &&
a.every((conn, i) => conn.name === b[i].name && conn.active === b[i].active)
)
}
let refreshingVpns = false
let vpnRefreshQueued = false
async function refreshVpns() {
if (refreshingVpns) {
vpnRefreshQueued = true
return
}
refreshingVpns = true
try {
do {
vpnRefreshQueued = false
const next = await fetchVpns()
setVpns((prev) => (sameVpns(prev, next) ? prev : next))
} while (vpnRefreshQueued)
} finally {
refreshingVpns = false
}
}
// nmcli is only polled while a Quick Settings popover is open, and only one
// poller runs no matter how many bars have their popover open.
let vpnPollers = 0
let vpnTimer: Timer | null = null
function acquireVpnPolling() {
vpnPollers += 1
if (vpnTimer) return
// interval() runs its callback immediately, so this also refreshes on open.
vpnTimer = interval(3000, refreshVpns)
}
function releaseVpnPolling() {
vpnPollers = Math.max(0, vpnPollers - 1)
if (vpnPollers > 0 || vpnTimer === null) return
vpnTimer.cancel()
vpnTimer = null
}
const POWER_PROFILE_ICONS: Record<string, string> = {
"power-saver": "power-profile-power-saver-symbolic",
balanced: "power-profile-balanced-symbolic",
performance: "power-profile-performance-symbolic",
}
const POWER_PROFILE_LABELS: Record<string, string> = {
"power-saver": "Power Saver",
balanced: "Balanced",
performance: "Performance",
}
const powerprofiles = AstalPowerProfiles.get_default()
const activeProfile = createBinding(powerprofiles, "active-profile")
const powerProfiles = powerprofiles.get_profiles().map((p) => p.profile)
const hasPowerProfiles = powerProfiles.length > 0
function NetworkItem() { function NetworkItem() {
const network = AstalNetwork.Network.get_default() const network = AstalNetwork.Network.get_default()
const primary = createBinding(network, "primary") const primary = createBinding(network, "primary")
@@ -77,25 +142,28 @@ function NetworkItem() {
function BluetoothItem() { function BluetoothItem() {
const bluetooth = AstalBluetooth.get_default() const bluetooth = AstalBluetooth.get_default()
const powered = createBinding(bluetooth, "is-powered")
return ( return (
<box spacing={12} valign={Gtk.Align.CENTER} cssClasses={["qs-item"]}> <box spacing={12} valign={Gtk.Align.CENTER} cssClasses={["qs-item"]}>
<image <image
iconName={createBinding(bluetooth, "is-powered").as((powered) => iconName={powered.as((isPowered) =>
powered ? "bluetooth-active-symbolic" : "bluetooth-disabled-symbolic", isPowered
? "bluetooth-active-symbolic"
: "bluetooth-disabled-symbolic",
)} )}
cssClasses={["qs-icon"]} cssClasses={["qs-icon"]}
/> />
<label <label
label={createBinding(bluetooth, "is-powered").as((powered) => label={powered.as((isPowered) =>
powered ? "Bluetooth On" : "Bluetooth Off", isPowered ? "Bluetooth On" : "Bluetooth Off",
)} )}
halign={Gtk.Align.START} halign={Gtk.Align.START}
hexpand hexpand
/> />
<switch <switch
valign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER}
active={createBinding(bluetooth, "is-powered")} active={powered}
onNotifyActive={(sw) => { onNotifyActive={(sw) => {
if (bluetooth.adapter) { if (bluetooth.adapter) {
bluetooth.adapter.set_powered(sw.get_active()) bluetooth.adapter.set_powered(sw.get_active())
@@ -138,13 +206,16 @@ function AudioSlider({ type }: { type: "speaker" | "microphone" }) {
function VpnList() { function VpnList() {
const isEmpty = vpns((list) => list.length === 0) const isEmpty = vpns((list) => list.length === 0)
function toggle(conn: VpnConn) { async function toggle(conn: VpnConn) {
const cmd = conn.active const cmd = conn.active
? ["nmcli", "connection", "down", conn.name] ? ["nmcli", "connection", "down", conn.name]
: ["nmcli", "connection", "up", conn.name] : ["nmcli", "connection", "up", conn.name]
execAsync(cmd) try {
.then(() => setVpns(fetchVpns())) await execAsync(cmd)
.catch((e) => console.error("VPN toggle failed:", e)) await refreshVpns()
} catch (e) {
console.error("VPN toggle failed:", e)
}
} }
return ( return (
@@ -190,14 +261,79 @@ function VpnList() {
) )
} }
function PowerProfileItem() {
return (
<menubutton cssClasses={["qs-item"]} hexpand>
<box spacing={12} valign={Gtk.Align.CENTER}>
<image
iconName={activeProfile(
(p) => POWER_PROFILE_ICONS[p] ?? "power-profile-balanced-symbolic",
)}
cssClasses={["qs-icon"]}
/>
<label
label={activeProfile((p) => POWER_PROFILE_LABELS[p] ?? p)}
halign={Gtk.Align.START}
hexpand
/>
<image iconName="pan-down-symbolic" />
</box>
<popover>
<box orientation={Gtk.Orientation.VERTICAL} spacing={4}>
{powerProfiles.map((name) => (
<button
cssClasses={["qs-item"]}
onClicked={(btn) => {
powerprofiles.set_active_profile(name)
const popover = btn.get_ancestor(
Gtk.Popover.$gtype,
) as Gtk.Popover | null
popover?.popdown()
}}
>
<box spacing={12} valign={Gtk.Align.CENTER}>
<image
iconName={
POWER_PROFILE_ICONS[name] ??
"power-profile-balanced-symbolic"
}
cssClasses={["qs-icon"]}
/>
<label
label={POWER_PROFILE_LABELS[name] ?? name}
halign={Gtk.Align.START}
hexpand
/>
</box>
</button>
))}
</box>
</popover>
</menubutton>
)
}
export default function QuickSettings() { export default function QuickSettings() {
let popoverOpen = false
return ( return (
<menubutton <menubutton
cssClasses={["control-btn", "settings-btn"]} cssClasses={["control-btn", "settings-btn"]}
tooltipText="Quick Settings" tooltipText="Quick Settings"
> >
<image iconName="emblem-system-symbolic" /> <image iconName="emblem-system-symbolic" />
<popover> <popover
$={(popover: Gtk.Popover) => {
popover.connect("notify::visible", () => {
const visible = popover.get_visible()
if (visible === popoverOpen) return
popoverOpen = visible
if (visible) acquireVpnPolling()
else releaseVpnPolling()
})
}}
>
<box <box
orientation={Gtk.Orientation.VERTICAL} orientation={Gtk.Orientation.VERTICAL}
spacing={16} spacing={16}
@@ -213,6 +349,18 @@ export default function QuickSettings() {
<BluetoothItem /> <BluetoothItem />
</box> </box>
<VpnList /> <VpnList />
<box
orientation={Gtk.Orientation.VERTICAL}
spacing={8}
visible={hasPowerProfiles}
>
<label
label="Power Profile"
cssClasses={["qs-title"]}
halign={Gtk.Align.START}
/>
<PowerProfileItem />
</box>
<box orientation={Gtk.Orientation.VERTICAL} spacing={8}> <box orientation={Gtk.Orientation.VERTICAL} spacing={8}>
<button <button
cssClasses={["qs-title"]} cssClasses={["qs-title"]}
+109 -36
View File
@@ -1,9 +1,92 @@
import { execAsync, createSubprocess } from "ags/process" import { For, createComputed } from "ags"
import { Gdk } from "ags/gtk4" import { Gdk } from "ags/gtk4"
import { createSubprocess, execAsync } from "ags/process"
import GLib from "gi://GLib?version=2.0" import GLib from "gi://GLib?version=2.0"
interface WorkspaceInfo {
address: string
name: string
monitor: string
active: boolean
}
const HIS = GLib.getenv("HYPRLAND_INSTANCE_SIGNATURE") const HIS = GLib.getenv("HYPRLAND_INSTANCE_SIGNATURE")
const sock = `${GLib.getenv("XDG_RUNTIME_DIR")}/hypr/${HIS}/.socket2.sock` const SOCK = `${GLib.getenv("XDG_RUNTIME_DIR")}/hypr/${HIS}/.socket2.sock`
// Hyprland 0.57 omits the numeric "id" on specialWorkspace, which makes
// AstalHyprland's monitor parsing log Json-CRITICAL errors on every workspace
// switch. Read the IPC JSON directly instead. Only numbered workspaces are
// shown in the bar.
const WORKSPACES_SCRIPT = `
SOCK="${SOCK}"
print_state() {
hyprctl -j monitors | python3 -c '
import json, subprocess, sys
try:
monitors = json.load(sys.stdin)
workspaces = json.loads(subprocess.check_output(["hyprctl", "-j", "workspaces"]))
except Exception:
raise SystemExit(0)
def ident(ws):
return ws.get("address") or ws.get("name") or str(ws.get("id") or "")
seen = set()
out = []
def add(ws, monitor, active):
address = ident(ws)
# only numbered workspaces; special and named ones are not part of the bar
if not address.isdigit():
return
key = (monitor, address)
if key in seen:
return
seen.add(key)
out.append({
"address": address,
"name": ws.get("name") or address,
"monitor": monitor,
"active": active,
})
for monitor in monitors:
name = monitor.get("name") or ""
active = monitor.get("activeWorkspace") or {}
for ws in workspaces:
if ws.get("monitor") == name:
add(ws, name, ident(ws) == ident(active))
# an active workspace always exists, even if it is empty and not listed
add(active, name, True)
print(json.dumps(out))
'
}
print_state
nc -U "$SOCK" | while IFS= read -r line; do
case "$line" in
workspace*|focusedmon*|createworkspace*|destroyworkspace*|moveworkspace*|renameworkspace*|changeworkspaceid*|activespecial*|monitoradded*|monitorremoved*)
print_state
;;
esac
done
`
const workspaces = createSubprocess<WorkspaceInfo[]>(
[],
["sh", "-c", WORKSPACES_SCRIPT],
(out, prev) => {
try {
const parsed = JSON.parse(out)
return Array.isArray(parsed) ? parsed : prev
} catch {
return prev
}
},
)
export default function Workspaces({ export default function Workspaces({
gdkmonitor, gdkmonitor,
@@ -12,48 +95,38 @@ export default function Workspaces({
}) { }) {
const monitorName = gdkmonitor.get_connector() const monitorName = gdkmonitor.get_connector()
// Listen to the Hyprland socket for instant workspace updates const monitorWorkspaces = workspaces.as((all) =>
const activeWs = createSubprocess( all
1, .filter((ws) => ws.monitor === monitorName)
[ .sort((a, b) => Number(a.address) - Number(b.address)),
"sh",
"-c",
`
MON="${monitorName}"
print_ws() {
hyprctl monitors -j | python3 -c "import json, sys; mon = sys.argv[1]; data = json.load(sys.stdin); print(next((m.get('activeWorkspace', {}).get('id', 0) for m in data if m.get('name') == mon), 0))" "$MON"
}
print_ws
nc -U ${sock} | while IFS= read -r line; do
case "$line" in
focusedmon*|workspace*|workspacev2*|moveworkspace*|moveworkspacev2*|createworkspace*|destroyworkspace*)
print_ws
;;
esac
done
`,
],
(out, prev) => {
const num = parseInt(out.trim())
if (!isNaN(num) && num > 0) return num
return prev
},
) )
return ( return (
<box cssClasses={["workspaces"]} spacing={4}> <box cssClasses={["workspaces"]} spacing={4}>
{Array.from({ length: 9 }, (_, i) => i + 1).map((i) => ( <For each={monitorWorkspaces} id={(ws) => ws.address}>
{(ws) => {
// Look the workspace up by identity so the button survives state
// updates and only its props change (keeps the active transition).
const current = createComputed(() =>
workspaces().find(
(w) => w.monitor === monitorName && w.address === ws.address,
),
)
return (
<button <button
cssClasses={activeWs((active) => cssClasses={current.as((w) =>
active === i ? ["workspace-btn", "active"] : ["workspace-btn"], w?.active ? ["workspace-btn", "active"] : ["workspace-btn"],
)} )}
onClicked={() => execAsync(`hyprctl dispatch workspace ${i}`)} onClicked={() =>
execAsync(["hyprctl", "dispatch", "workspace", ws.address])
}
> >
<label label={`${i}`} /> <label label={current.as((w) => w?.name ?? ws.name)} />
</button> </button>
))} )
}}
</For>
</box> </box>
) )
} }