feat: add Flatpak support for Feishin/Zen, fix fastfetch alignment, and use cute hamster emoji for launcher button

This commit is contained in:
Sho 2026-08-01 23:23:14 +09:00
parent 15f655d020
commit 3e29850c4f
3 changed files with 107 additions and 49 deletions

View File

@ -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"
]

View File

@ -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
}
}

View File

@ -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)
# 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
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: