Put the blob command on PATH and reapply the default theme when it is missing
This commit is contained in:
@@ -77,7 +77,7 @@ It runs these steps, in this order, and every one of them is idempotent:
|
|||||||
| 1. Directories | creates the 19 directories the shell and scripts expect, before anything writes into them |
|
| 1. Directories | creates the 19 directories the shell and scripts expect, before anything writes into them |
|
||||||
| 2. `BLOB_PATH` | symlinks `~/.local/share/blob` to this checkout |
|
| 2. `BLOB_PATH` | symlinks `~/.local/share/blob` to this checkout |
|
||||||
| 3. Packages | installs what is missing from `packages/`, bootstrapping `yay` first on a machine that has no AUR helper |
|
| 3. Packages | installs what is missing from `packages/`, bootstrapping `yay` first on a machine that has no AUR helper |
|
||||||
| 4. Config | copies `hypr/`, the themed app configs, `blob/shell.json`, the uwsm environment, and the icon font into `~/.config` |
|
| 4. Config | copies `hypr/`, the themed app configs, `blob/shell.json`, the uwsm environment, and the icon font into `~/.config`, and writes `/etc/profile.d/blob.sh` so a login shell finds the `blob` command |
|
||||||
| 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, picks a background, and links the btop and Neovim theme files, so the first login is not a blank desktop |
|
| 5. First theme | links `~/wallpapers` to the checkout, applies `flats` headless, picks a background, and links the btop and Neovim theme files, so the first login is not a blank desktop |
|
||||||
| 6. User units | installs the session services into `~/.config/systemd/user` and enables them |
|
| 6. User units | installs the session services into `~/.config/systemd/user` and enables them |
|
||||||
| 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` |
|
| 7. systemd drop-ins | writes the shutdown timeouts, oomd thresholds, plocate prune paths, and sleep hooks under `/etc` |
|
||||||
|
|||||||
+12
-2
@@ -13,7 +13,7 @@ with `--check`.
|
|||||||
| `install/helpers/as-root.sh` | `as_root`, a no-op when already root |
|
| `install/helpers/as-root.sh` | `as_root`, a no-op when already root |
|
||||||
| `install/steps/directories.sh` | the directories the shell and scripts expect |
|
| `install/steps/directories.sh` | the directories the shell and scripts expect |
|
||||||
| `install/steps/packages.sh` | repo and AUR packages, and the yay bootstrap |
|
| `install/steps/packages.sh` | repo and AUR packages, and the yay bootstrap |
|
||||||
| `install/steps/config.sh` | the `BLOB_PATH` symlink and everything under `~/.config` |
|
| `install/steps/config.sh` | the `BLOB_PATH` symlink, everything under `~/.config`, and the login shell profile |
|
||||||
| `install/steps/services.sh` | system services, systemd drop-ins, user units |
|
| `install/steps/services.sh` | system services, systemd drop-ins, user units |
|
||||||
| `install/steps/theme.sh` | the wallpaper link, the first theme, the first background |
|
| `install/steps/theme.sh` | the wallpaper link, the first theme, the first background |
|
||||||
| `install/steps/login.sh` | SDDM, the session entry, and the first launch |
|
| `install/steps/login.sh` | SDDM, the session entry, and the first launch |
|
||||||
@@ -33,6 +33,13 @@ with `--check`.
|
|||||||
built once with `makepkg`. See [packages.md](packages.md).
|
built once with `makepkg`. See [packages.md](packages.md).
|
||||||
4. **Config** is copied into `~/.config`: `hypr/`, the themed app configs,
|
4. **Config** is copied into `~/.config`: `hypr/`, the themed app configs,
|
||||||
`blob/shell.json`, the uwsm environment, and the icon font.
|
`blob/shell.json`, the uwsm environment, and the icon font.
|
||||||
|
`session/profile.sh` also goes to `/etc/profile.d/blob.sh`, which sources
|
||||||
|
`session/env-bootstrap` and is what puts `blob` on `PATH` in a login shell.
|
||||||
|
Without it `BLOB_PATH` and `$BLOB_PATH/bin` are only set by
|
||||||
|
`~/.config/uwsm/env.d/10-blob`, which uwsm reads when the graphical session
|
||||||
|
starts, so `blob` is not found from a TTY. A shell that was already open when
|
||||||
|
the installer ran keeps its old `PATH`; open a new one, or
|
||||||
|
`source ~/.local/share/blob/session/env-bootstrap`.
|
||||||
5. **The first theme** is applied. `~/wallpapers` is symlinked to the checkout's
|
5. **The first theme** is applied. `~/wallpapers` is symlinked to the checkout's
|
||||||
`wallpapers/`, `flats` is applied with `BLOB_THEME_HEADLESS=1` (no shell or
|
`wallpapers/`, `flats` is applied with `BLOB_THEME_HEADLESS=1` (no shell or
|
||||||
session bus exists yet), and the background symlink is pointed at the first
|
session bus exists yet), and the background symlink is pointed at the first
|
||||||
@@ -42,7 +49,10 @@ with `--check`.
|
|||||||
`~/.config/btop/themes/current.theme` (btop's `color_theme = "current"`) and,
|
`~/.config/btop/themes/current.theme` (btop's `color_theme = "current"`) and,
|
||||||
only when `~/.config/nvim/lua/plugins` already exists, `theme.lua` there.
|
only when `~/.config/nvim/lua/plugins` already exists, `theme.lua` there.
|
||||||
Every step is skipped when a theme, a background, a wallpaper directory or a
|
Every step is skipped when a theme, a background, a wallpaper directory or a
|
||||||
theme file of your own is already in place.
|
theme file of your own is already in place. A theme counts as in place only
|
||||||
|
when the staged theme under `~/.local/state/blob/current/theme` is there too,
|
||||||
|
so a recorded theme name left without its palette is applied again rather
|
||||||
|
than skipped.
|
||||||
6. **User units** land in `~/.config/systemd/user` and are enabled, not started:
|
6. **User units** land in `~/.config/systemd/user` and are enabled, not started:
|
||||||
they are all `WantedBy=graphical-session.target`, so they come up with the
|
they are all `WantedBy=graphical-session.target`, so they come up with the
|
||||||
session. `blob-speaker-tuning.service` is left out, because
|
session. `blob-speaker-tuning.service` is left out, because
|
||||||
|
|||||||
+9
-1
@@ -63,6 +63,7 @@ link_blob_path
|
|||||||
install_packages
|
install_packages
|
||||||
|
|
||||||
install_shipped_config
|
install_shipped_config
|
||||||
|
install_shell_profile
|
||||||
install_user_units
|
install_user_units
|
||||||
install_systemd_dropins
|
install_systemd_dropins
|
||||||
install_zen_config
|
install_zen_config
|
||||||
@@ -88,7 +89,14 @@ if [[ $check == true ]]; then
|
|||||||
(( changes == 0 )) || exit 1
|
(( changes == 0 )) || exit 1
|
||||||
else
|
else
|
||||||
say "$changes item(s) changed."
|
say "$changes item(s) changed."
|
||||||
say "Change the theme with 'blob theme set <name>' once the session is up."
|
|
||||||
|
active_theme="$(cat "$current_state_dir/theme.name" 2>/dev/null || true)"
|
||||||
|
if [[ -n $active_theme ]]; then
|
||||||
|
say "Theme: $active_theme. Change it with 'blob theme set <name>'."
|
||||||
|
fi
|
||||||
|
|
||||||
|
say "New shells find the blob command through /etc/profile.d/blob.sh."
|
||||||
|
say "For this shell: source $blob_path/session/env-bootstrap"
|
||||||
say ""
|
say ""
|
||||||
launch_desktop
|
launch_desktop
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ install_shipped_config() {
|
|||||||
install_file "$repo_dir/fonts/omarchy.ttf" "$font_dir/omarchy.ttf" "fonts/omarchy.ttf"
|
install_file "$repo_dir/fonts/omarchy.ttf" "$font_dir/omarchy.ttf" "fonts/omarchy.ttf"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_shell_profile() {
|
||||||
|
install_root_file "$repo_dir/session/profile.sh" /etc/profile.d/blob.sh "profile.d/blob.sh"
|
||||||
|
}
|
||||||
|
|
||||||
install_zen_config() {
|
install_zen_config() {
|
||||||
local profile
|
local profile
|
||||||
profile="$(find "$config_dir/zen" -maxdepth 1 -type d -name '*.Default (release)*' 2>/dev/null | head -1)"
|
profile="$(find "$config_dir/zen" -maxdepth 1 -type d -name '*.Default (release)*' 2>/dev/null | head -1)"
|
||||||
|
|||||||
@@ -37,8 +37,11 @@ link_wallpapers() {
|
|||||||
# like a failed session. Applied headless: no shell and no session bus exist
|
# like a failed session. Applied headless: no shell and no session bus exist
|
||||||
# while the installer runs.
|
# while the installer runs.
|
||||||
install_default_theme() {
|
install_default_theme() {
|
||||||
if [[ -s $current_state_dir/theme.name ]]; then
|
local current_name=""
|
||||||
say "ok theme ($(cat "$current_state_dir/theme.name"))"
|
[[ -s $current_state_dir/theme.name ]] && current_name="$(cat "$current_state_dir/theme.name")"
|
||||||
|
|
||||||
|
if [[ -n $current_name && -f $current_state_dir/theme/colors.toml ]]; then
|
||||||
|
say "ok theme ($current_name)"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -53,6 +56,7 @@ install_default_theme() {
|
|||||||
say "theme $default_theme"
|
say "theme $default_theme"
|
||||||
else
|
else
|
||||||
say "WARN could not apply the $default_theme theme"
|
say "WARN could not apply the $default_theme theme"
|
||||||
|
say " the session will come up without a palette; run 'blob theme set $default_theme'"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Put the blob command on PATH for login shells. The graphical session gets the
|
||||||
|
# same environment from ~/.config/uwsm/env.d/10-blob.
|
||||||
|
|
||||||
|
if [ -r "$HOME/.local/share/blob/session/env-bootstrap" ]; then
|
||||||
|
. "$HOME/.local/share/blob/session/env-bootstrap"
|
||||||
|
fi
|
||||||
@@ -7,6 +7,7 @@ config_dir="$HOME/.config"
|
|||||||
session_entry="/usr/local/share/wayland-sessions/blob.desktop"
|
session_entry="/usr/local/share/wayland-sessions/blob.desktop"
|
||||||
|
|
||||||
root_files=(
|
root_files=(
|
||||||
|
/etc/profile.d/blob.sh
|
||||||
/etc/sddm.conf.d/zz-blob.conf
|
/etc/sddm.conf.d/zz-blob.conf
|
||||||
/etc/sddm.conf.d/zzz-blob-autologin.conf
|
/etc/sddm.conf.d/zzz-blob-autologin.conf
|
||||||
/etc/sddm/hyprland-greeter.conf
|
/etc/sddm/hyprland-greeter.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user