diff --git a/config/fontconfig/fonts.conf b/config/fontconfig/fonts.conf new file mode 100644 index 0000000..5574934 --- /dev/null +++ b/config/fontconfig/fonts.conf @@ -0,0 +1,12 @@ + + + + + + monospace + + + JetBrainsMono Nerd Font + + + diff --git a/docs/install.md b/docs/install.md index c0d0761..00a26e1 100644 --- a/docs/install.md +++ b/docs/install.md @@ -35,7 +35,13 @@ with `--check`. resolves cannot cost you the other hundred and the config, service and login steps below. See [packages.md](packages.md). 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, `fontconfig/fonts.conf`, and the + icon font, and the font cache is refreshed. The shell draws every icon as a + Nerd Font glyph in the `monospace` family, and on a fresh Arch install + fontconfig resolves that to a font with no such glyphs, so the bar and its + panels come up full of blanks. `fonts.conf` binds `monospace` to + `JetBrainsMono Nerd Font`; `blob font set` rewrites the same file, and the + installer then reports it as a local change and keeps your choice. `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 diff --git a/install.sh b/install.sh index d60615a..d437708 100755 --- a/install.sh +++ b/install.sh @@ -63,6 +63,7 @@ link_blob_path install_packages install_shipped_config +refresh_font_cache install_shell_profile install_user_units install_systemd_dropins diff --git a/install/steps/config.sh b/install/steps/config.sh index 23aefcd..2283269 100644 --- a/install/steps/config.sh +++ b/install/steps/config.sh @@ -63,6 +63,21 @@ install_shipped_config() { install_file "$repo_dir/fonts/omarchy.ttf" "$font_dir/omarchy.ttf" "fonts/omarchy.ttf" } +refresh_font_cache() { + if ! command -v fc-cache &>/dev/null; then + say "SKIP font cache (fc-cache not installed)" + return 0 + fi + + if [[ $check == true ]]; then + say "would refresh the font cache" + return 0 + fi + + fc-cache -f "$font_dir" >/dev/null 2>&1 || true + say "ok font cache" +} + install_shell_profile() { install_root_file "$repo_dir/session/profile.sh" /etc/profile.d/blob.sh "profile.d/blob.sh" } diff --git a/shell/plugins/panels/quick-settings/QuickSettings.qml b/shell/plugins/panels/quick-settings/QuickSettings.qml index db747b1..1900e31 100644 --- a/shell/plugins/panels/quick-settings/QuickSettings.qml +++ b/shell/plugins/panels/quick-settings/QuickSettings.qml @@ -15,6 +15,13 @@ Item { readonly property string pluginId: (manifest && manifest.id) || "blob.quick-settings" + readonly property int barInset: { + var bar = root.shell ? root.shell.bar : null + if (!bar || bar.barHidden === true) return 0 + if (String(bar.position || "top") !== "top") return 0 + return Math.max(0, bar.barSize || 0) + } + function open(payloadJson) { root.opened = true } @@ -187,7 +194,7 @@ Item { Row { anchors.top: parent.top - anchors.topMargin: Style.spaceReal(10) + anchors.topMargin: Style.spaceReal(10) + root.barInset anchors.horizontalCenter: parent.horizontalCenter spacing: Style.spaceReal(12)