From e3d496502ae3d001918ea6b1960fc2a941fb930b Mon Sep 17 00:00:00 2001 From: Sho Date: Sat, 1 Aug 2026 23:07:02 +0900 Subject: [PATCH] feat: add fastfetch hampter config and bashrc setup to ecosystem --- ZOEY_EXPORT_GUIDE.md | 17 ++++++++--- fastfetch/config.jsonc | 33 +++++++++++++++++++++ fastfetch/hamster_cookie.txt | 4 +++ install.sh | 28 +++++++++++++++-- quickshell/modules/desktop/SystemWidget.qml | 2 ++ quickshell/services/python/theme_sync.py | 6 ++++ 6 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 fastfetch/config.jsonc create mode 100644 fastfetch/hamster_cookie.txt diff --git a/ZOEY_EXPORT_GUIDE.md b/ZOEY_EXPORT_GUIDE.md index 5b0ed51..e197a49 100644 --- a/ZOEY_EXPORT_GUIDE.md +++ b/ZOEY_EXPORT_GUIDE.md @@ -93,18 +93,27 @@ cmake --build build sudo cmake --install build ``` -### Step 3: Deploy QuickShell Configuration to `~/.config/quickshell/` +### Step 3: Deploy QuickShell & Fastfetch Configurations to `~/.config/` -Copy the QuickShell ecosystem into Zoey's `.config` directory: +Copy the QuickShell ecosystem and Fastfetch Hampter configuration into Zoey's `.config` directory: ```bash -mkdir -p ~/.config/quickshell +mkdir -p ~/.config/quickshell ~/.config/fastfetch cp -r quickshell/* ~/.config/quickshell/ +cp -r fastfetch/* ~/.config/fastfetch/ chmod +x ~/.config/quickshell/toggle_launcher.sh chmod +x ~/.config/quickshell/services/python/*.py ``` -### Step 4: Configure Systemd User Service +### Step 4: Configure `~/.bashrc` to Auto-run Fastfetch + +Ensure `fastfetch` runs on interactive terminal startup in `~/.bashrc`: + +```bash +grep -q "fastfetch" ~/.bashrc || echo -e "\n# Run fastfetch on terminal startup\nfastfetch" >> ~/.bashrc +``` + +### Step 5: Configure Systemd User Service Create `~/.config/systemd/user/quickshell.service`: diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc new file mode 100644 index 0000000..97c21a3 --- /dev/null +++ b/fastfetch/config.jsonc @@ -0,0 +1,33 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "~/.config/fastfetch/hamster_cookie.txt", + "padding": { + "right": 4 + } + }, + "display": { + "color": { + "keys": "#a7c080", + "title": "#7fbbb3" + } + }, + "modules": [ + "title", + "separator", + "os", + "host", + "kernel", + "uptime", + "packages", + "shell", + "display", + "wm", + "terminal", + "cpu", + "gpu", + "memory", + "break", + "colors" + ] +} diff --git a/fastfetch/hamster_cookie.txt b/fastfetch/hamster_cookie.txt new file mode 100644 index 0000000..2818703 --- /dev/null +++ b/fastfetch/hamster_cookie.txt @@ -0,0 +1,4 @@ + + (\_/) + ( •_•) + / >🍪 "nom nom" diff --git a/install.sh b/install.sh index 1383adf..e82a3ff 100755 --- a/install.sh +++ b/install.sh @@ -200,10 +200,33 @@ deploy_configs() { chmod +x "${TARGET_CONFIG_DIR}/quickshell/services/python/"*.py 2>/dev/null || true fi + # Fastfetch Config + if [ -d "${SCRIPT_DIR}/fastfetch" ]; then + info "Deploying Fastfetch Hampter configuration..." + mkdir -p "${TARGET_CONFIG_DIR}/fastfetch" + cp -r "${SCRIPT_DIR}/fastfetch/"* "${TARGET_CONFIG_DIR}/fastfetch/" + fi + success "QuickShell configuration deployed successfully!" } -# 5. Systemd User Service Setup +# 5. Bashrc Fastfetch Setup +setup_bashrc() { + info "Setting up fastfetch in ~/.bashrc..." + BASHRC_FILE="${HOME}/.bashrc" + if [ -f "$BASHRC_FILE" ]; then + if ! grep -q "fastfetch" "$BASHRC_FILE"; then + echo "" >> "$BASHRC_FILE" + echo "# Run fastfetch on terminal startup" >> "$BASHRC_FILE" + echo "fastfetch" >> "$BASHRC_FILE" + success "Fastfetch added to ~/.bashrc" + else + info "Fastfetch already present in ~/.bashrc" + fi + fi +} + +# 6. Systemd User Service Setup setup_systemd_service() { info "Setting up Systemd User Service for QuickShell..." SERVICE_DIR="${TARGET_CONFIG_DIR}/systemd/user" @@ -232,7 +255,7 @@ EOF success "Systemd user service configured!" } -# 6. Run Theme Sync Engine +# 7. Run Theme Sync Engine run_initial_sync() { info "Triggering initial multi-app dynamic theme synchronization..." THEME_SYNC_SCRIPT="${TARGET_CONFIG_DIR}/quickshell/services/python/theme_sync.py" @@ -256,6 +279,7 @@ run_initial_sync() { install_dependencies install_quickshell deploy_configs +setup_bashrc setup_systemd_service run_initial_sync diff --git a/quickshell/modules/desktop/SystemWidget.qml b/quickshell/modules/desktop/SystemWidget.qml index a771bc4..2407e71 100644 --- a/quickshell/modules/desktop/SystemWidget.qml +++ b/quickshell/modules/desktop/SystemWidget.qml @@ -22,6 +22,8 @@ PanelWindow { exclusionMode: ExclusionMode.Ignore color: "transparent" + mask: Region {} + implicitWidth: mainCol.implicitWidth implicitHeight: mainCol.implicitHeight diff --git a/quickshell/services/python/theme_sync.py b/quickshell/services/python/theme_sync.py index 38b88b9..a65e2e0 100644 --- a/quickshell/services/python/theme_sync.py +++ b/quickshell/services/python/theme_sync.py @@ -1059,6 +1059,12 @@ def sync_fastfetch(bg, surface, current_line, fg, accent, sub_accent): fastfetch_jsonc = f"""{{ "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": {{ + "source": "~/.config/fastfetch/hamster_cookie.txt", + "padding": {{ + "right": 4 + }} + }}, "display": {{ "color": {{ "keys": "{accent}",