From 3e29850c4f7daf194c323f5a00ce911115330f70 Mon Sep 17 00:00:00 2001 From: Sho Date: Sat, 1 Aug 2026 23:23:14 +0900 Subject: [PATCH] feat: add Flatpak support for Feishin/Zen, fix fastfetch alignment, and use cute hamster emoji for launcher button --- fastfetch/config.jsonc | 73 +++++++++++++++++++----- quickshell/modules/dock/BottomDock.qml | 16 +++--- quickshell/services/python/theme_sync.py | 67 +++++++++++++--------- 3 files changed, 107 insertions(+), 49 deletions(-) diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc index 97c21a3..7c68bce 100644 --- a/fastfetch/config.jsonc +++ b/fastfetch/config.jsonc @@ -2,11 +2,15 @@ "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "logo": { "source": "~/.config/fastfetch/hamster_cookie.txt", + "type": "file", "padding": { - "right": 4 + "top": 0, + "left": 1, + "right": 3 } }, "display": { + "separator": " ➜ ", "color": { "keys": "#a7c080", "title": "#7fbbb3" @@ -15,18 +19,61 @@ "modules": [ "title", "separator", - "os", - "host", - "kernel", - "uptime", - "packages", - "shell", - "display", - "wm", - "terminal", - "cpu", - "gpu", - "memory", + { + "type": "os", + "key": "OS", + "keyColor": "cyan" + }, + { + "type": "host", + "key": "Host", + "keyColor": "green" + }, + { + "type": "kernel", + "key": "Kernel", + "keyColor": "yellow" + }, + { + "type": "uptime", + "key": "Uptime", + "keyColor": "blue" + }, + { + "type": "packages", + "key": "Packages", + "keyColor": "magenta" + }, + { + "type": "shell", + "key": "Shell", + "keyColor": "cyan" + }, + { + "type": "terminal", + "key": "Terminal", + "keyColor": "green" + }, + { + "type": "wm", + "key": "WM", + "keyColor": "yellow" + }, + { + "type": "cpu", + "key": "CPU", + "keyColor": "blue" + }, + { + "type": "gpu", + "key": "GPU", + "keyColor": "magenta" + }, + { + "type": "memory", + "key": "Memory", + "keyColor": "red" + }, "break", "colors" ] diff --git a/quickshell/modules/dock/BottomDock.qml b/quickshell/modules/dock/BottomDock.qml index 642ba17..37365b9 100644 --- a/quickshell/modules/dock/BottomDock.qml +++ b/quickshell/modules/dock/BottomDock.qml @@ -49,23 +49,23 @@ Item { Behavior on color { ColorAnimation { duration: 120 } } } - // Distro Icon Image Container + // Distro / Cute Emoji Icon Container Item { anchors.centerIn: parent width: 26 height: 26 - scale: launcherBtn.isHovered ? 1.12 : 1.0 + scale: launcherBtn.isHovered ? 1.15 : 1.0 Behavior on scale { NumberAnimation { duration: 140; easing.type: Easing.OutCubic } } - Image { - anchors.fill: parent - sourceSize.width: 26 - sourceSize.height: 26 - fillMode: Image.PreserveAspectFit - source: "file:///usr/share/icons/cachyos.svg" + Text { + anchors.centerIn: parent + text: "🐹" + font.pixelSize: 20 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter } } diff --git a/quickshell/services/python/theme_sync.py b/quickshell/services/python/theme_sync.py index a65e2e0..ba3ac4d 100644 --- a/quickshell/services/python/theme_sync.py +++ b/quickshell/services/python/theme_sync.py @@ -557,34 +557,43 @@ tab[selected="true"] {{ 'user_pref("toolkit.startup.max_resumed_crashes", -1);\n' ] - zen_base = os.path.expanduser('~/.config/zen') - if os.path.exists(zen_base): - for profile in os.listdir(zen_base): - profile_dir = os.path.join(zen_base, profile) - if os.path.isdir(profile_dir) and ('.' in profile or 'default' in profile.lower()): - # Ensure user.js enables stylesheets and disables crash dialogs - user_js = os.path.join(profile_dir, 'user.js') - js_content = "" - if os.path.exists(user_js): - with open(user_js, 'r') as f: - js_content = f.read() - for line in pref_lines: - pref_key = line.split('"')[1] - if pref_key not in js_content: - with open(user_js, 'a') as f: - f.write("\n" + line) + zen_bases = [ + os.path.expanduser('~/.config/zen'), + os.path.expanduser('~/.zen'), + os.path.expanduser('~/.var/app/app.zen_browser.zen/.zen'), + os.path.expanduser('~/.var/app/io.github.zen_browser.zen/.zen'), + os.path.expanduser('~/.var/app/org.zen_browser.zen/.zen'), + os.path.expanduser('~/.var/app/app.zen_browser.zen/config/zen'), + os.path.expanduser('~/.var/app/io.github.zen_browser.zen/config/zen') + ] + for zen_base in zen_bases: + if os.path.exists(zen_base): + for profile in os.listdir(zen_base): + profile_dir = os.path.join(zen_base, profile) + if os.path.isdir(profile_dir) and ('.' in profile or 'default' in profile.lower()): + # Ensure user.js enables stylesheets and disables crash dialogs + user_js = os.path.join(profile_dir, 'user.js') + js_content = "" + if os.path.exists(user_js): + with open(user_js, 'r') as f: + js_content = f.read() + for line in pref_lines: + pref_key = line.split('"')[1] + if pref_key not in js_content: + with open(user_js, 'a') as f: + f.write("\n" + line) - # Write userChrome.css and userContent.css - chrome_dir = os.path.join(profile_dir, 'chrome') - os.makedirs(chrome_dir, exist_ok=True) - - try: - with open(os.path.join(chrome_dir, 'userChrome.css'), 'w') as f: - f.write(chrome_css) - with open(os.path.join(chrome_dir, 'userContent.css'), 'w') as f: - f.write(content_css) - except Exception: - pass + # Write userChrome.css and userContent.css + chrome_dir = os.path.join(profile_dir, 'chrome') + os.makedirs(chrome_dir, exist_ok=True) + + try: + with open(os.path.join(chrome_dir, 'userChrome.css'), 'w') as f: + f.write(chrome_css) + with open(os.path.join(chrome_dir, 'userContent.css'), 'w') as f: + f.write(content_css) + except Exception: + pass # Graceful SIGTERM restart with profile lock release buffer res = subprocess.run(["pgrep", "-f", "zen-browser"], capture_output=True, text=True) @@ -691,7 +700,9 @@ def sync_feishin(bg, surface, current_line, fg, accent, sub_accent, is_dark, var feishin_dirs = [ os.path.expanduser('~/.config/feishin'), - os.path.expanduser('~/.var/app/org.jeffvli.feishin/config/feishin') + os.path.expanduser('~/.var/app/io.github.jeffvli.feishin/config/feishin'), + os.path.expanduser('~/.var/app/org.jeffvli.feishin/config/feishin'), + os.path.expanduser('~/.var/app/feishin/config/feishin') ] for base_dir in feishin_dirs: