Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export RYSTAL_SHELL_CONFIG_DIR="$PWD/.dev/config"
export RYSTAL_SHELL_DATA_DIR="$PWD"
export RYSTAL_SHELL_INSTANCE="rystal-shell-dev"
export RYPRLAND_CACHE_DIR="$PWD/.dev/cache"
export RYPRLAND_STATE_DIR="$PWD/.dev/state"
export RYPRLAND_RUNTIME_DIR="$PWD/.dev/runtime"

PATH_add node_modules/.bin
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
node_modules/

.generated/
@girs/

themes/matugen.scss
.dev/

config.json

assets/launcher_bg*.png
assets/icons/hicolor/icon-theme.cache

dist/
start-ags

oneshot/style.css
Expand Down
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ https://github.com/user-attachments/assets/8cb65a27-2284-4302-b0b1-8c1be2ef4631

## Requirements

When you install Ryprland, this repository is cloned as a submodule and included in the Ryprland configuration.
So, you don't need to install it separately.
When you install Ryprland, this repository is cloned as a submodule and deployed by the
Ryprland configuration. The source tree is separate from the runtime installation.

If you want to use this shell in your own configuration, you can clone this repository and use it as a part of your configuration.

Expand All @@ -24,19 +24,21 @@ If you want to use this shell in your own configuration, you can clone this repo
paru -S aylurs-gtk-shell-git libastal-meta
```

### How to Start
### Build, Deploy, and Start

These are pre-configured in Ryprland's configuration, so normally you don't need to start it manually.

Make sure you have created a `~/.config/ags` directory and copied the contents of this repository into it.

Run the following command to start the shell:
Build and deploy the runtime bundle, static assets, and styles to
`${XDG_DATA_HOME:-$HOME/.local/share}/rystal-shell`:

```sh
cd ~/.config/ags
./launch.sh
pnpm install
pnpm deploy:user
```

Place user configuration in `${XDG_CONFIG_HOME:-$HOME/.config}/rystal-shell`, then start the
deployed shell through the `rystal-shell` launcher supplied by Ryprland-dot.

In practice, it relies on Hyprland's autostart capabilities.
When doing so, you need to account for the lag associated with loading the modules.
Therefore, you must introduce a startup delay as shown below:
Expand All @@ -45,7 +47,7 @@ Therefore, you must introduce a startup delay as shown below:
-- hyprland.lua
hl.on("hyprland.start",
function()
hl.exec_cmd("sleep 5; ~/.config/ags/launch.sh")
hl.exec_cmd("sleep 5; rystal-shell")
hl.exec_cmd("sleep 10; blueman-applet")
end
)
Expand All @@ -55,10 +57,12 @@ hl.on("hyprland.start",

There are several configurable items in this shell.

First, copy the [config template](./config.json.template) using the following command:
First, copy the [config template](./config/config.json.template):

```sh
cp ./config.json.template ./config.json
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/rystal-shell"
cp ./config/config.json.template \
"${XDG_CONFIG_HOME:-$HOME/.config}/rystal-shell/config.json"
```

By modifying each setting in that file, you can alter the shell's behavior and some of the displayed information.
Expand Down Expand Up @@ -103,14 +107,16 @@ Rystal-shell uses subdirectories below these roots for wallpaper thumbnails,
media artwork, application history, compiled CSS, and Caffeine state. The same
roots are also used by Ryprland's theme-switching scripts.

## Development Note
## Development

`pnpm dev` starts the `rystal-shell-dev` AGS instance with config, cache, state, and runtime
data isolated below `.dev/`. Optionally run `direnv allow` to load the same environment while
working in the repository.

Run the static checks before submitting changes:

```sh
pnpm lint
pnpm knip
pnpm tsc
pnpm check
pnpm build
```

Expand Down
File renamed without changes.
14 changes: 8 additions & 6 deletions debug/run-memory-scenarios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -euo pipefail
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
ROOT_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
COLLECTOR="$SCRIPT_DIR/collect-memory.sh"
AGS_INSTANCE="${RYSTAL_SHELL_INSTANCE:-rystal-shell-dev}"
export RYSTAL_SHELL_INSTANCE="$AGS_INSTANCE"

usage() {
cat <<'EOF'
Expand Down Expand Up @@ -103,9 +105,9 @@ snapshot() {

ags_request() {
if "$dry_run"; then
printf '+ ags request %q\n' "$1"
printf '+ ags request -i %q %q\n' "$AGS_INSTANCE" "$1"
else
ags request "$1"
ags request -i "$AGS_INSTANCE" "$1"
fi
}

Expand All @@ -119,17 +121,17 @@ randomize_theme() {

stop_ags() {
if "$dry_run"; then
printf '+ killall gjs ags\n'
printf '+ ags quit -i %q\n' "$AGS_INSTANCE"
else
killall gjs ags >/dev/null 2>&1 || true
ags quit -i "$AGS_INSTANCE" >/dev/null 2>&1 || true
fi
}

start_ags() {
if "$dry_run"; then
printf '+ ags run\n'
printf '+ %q/scripts/dev.sh\n' "$ROOT_DIR"
else
ags run >/dev/null 2>&1 &
"$ROOT_DIR/scripts/dev.sh" >/dev/null 2>&1 &
fi
wait_for_settle "$settle_seconds"
}
Expand Down
Loading