feat: add Flatpak support for Feishin/Zen, fix fastfetch alignment, and use cute hamster emoji for launcher button
This commit is contained in:
parent
15f655d020
commit
3e29850c4f
@ -2,11 +2,15 @@
|
|||||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||||
"logo": {
|
"logo": {
|
||||||
"source": "~/.config/fastfetch/hamster_cookie.txt",
|
"source": "~/.config/fastfetch/hamster_cookie.txt",
|
||||||
|
"type": "file",
|
||||||
"padding": {
|
"padding": {
|
||||||
"right": 4
|
"top": 0,
|
||||||
|
"left": 1,
|
||||||
|
"right": 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"display": {
|
"display": {
|
||||||
|
"separator": " ➜ ",
|
||||||
"color": {
|
"color": {
|
||||||
"keys": "#a7c080",
|
"keys": "#a7c080",
|
||||||
"title": "#7fbbb3"
|
"title": "#7fbbb3"
|
||||||
@ -15,18 +19,61 @@
|
|||||||
"modules": [
|
"modules": [
|
||||||
"title",
|
"title",
|
||||||
"separator",
|
"separator",
|
||||||
"os",
|
{
|
||||||
"host",
|
"type": "os",
|
||||||
"kernel",
|
"key": "OS",
|
||||||
"uptime",
|
"keyColor": "cyan"
|
||||||
"packages",
|
},
|
||||||
"shell",
|
{
|
||||||
"display",
|
"type": "host",
|
||||||
"wm",
|
"key": "Host",
|
||||||
"terminal",
|
"keyColor": "green"
|
||||||
"cpu",
|
},
|
||||||
"gpu",
|
{
|
||||||
"memory",
|
"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",
|
"break",
|
||||||
"colors"
|
"colors"
|
||||||
]
|
]
|
||||||
|
|||||||
@ -49,23 +49,23 @@ Item {
|
|||||||
Behavior on color { ColorAnimation { duration: 120 } }
|
Behavior on color { ColorAnimation { duration: 120 } }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Distro Icon Image Container
|
// Distro / Cute Emoji Icon Container
|
||||||
Item {
|
Item {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: 26
|
width: 26
|
||||||
height: 26
|
height: 26
|
||||||
scale: launcherBtn.isHovered ? 1.12 : 1.0
|
scale: launcherBtn.isHovered ? 1.15 : 1.0
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Text {
|
||||||
anchors.fill: parent
|
anchors.centerIn: parent
|
||||||
sourceSize.width: 26
|
text: "🐹"
|
||||||
sourceSize.height: 26
|
font.pixelSize: 20
|
||||||
fillMode: Image.PreserveAspectFit
|
horizontalAlignment: Text.AlignHCenter
|
||||||
source: "file:///usr/share/icons/cachyos.svg"
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -557,34 +557,43 @@ tab[selected="true"] {{
|
|||||||
'user_pref("toolkit.startup.max_resumed_crashes", -1);\n'
|
'user_pref("toolkit.startup.max_resumed_crashes", -1);\n'
|
||||||
]
|
]
|
||||||
|
|
||||||
zen_base = os.path.expanduser('~/.config/zen')
|
zen_bases = [
|
||||||
if os.path.exists(zen_base):
|
os.path.expanduser('~/.config/zen'),
|
||||||
for profile in os.listdir(zen_base):
|
os.path.expanduser('~/.zen'),
|
||||||
profile_dir = os.path.join(zen_base, profile)
|
os.path.expanduser('~/.var/app/app.zen_browser.zen/.zen'),
|
||||||
if os.path.isdir(profile_dir) and ('.' in profile or 'default' in profile.lower()):
|
os.path.expanduser('~/.var/app/io.github.zen_browser.zen/.zen'),
|
||||||
# Ensure user.js enables stylesheets and disables crash dialogs
|
os.path.expanduser('~/.var/app/org.zen_browser.zen/.zen'),
|
||||||
user_js = os.path.join(profile_dir, 'user.js')
|
os.path.expanduser('~/.var/app/app.zen_browser.zen/config/zen'),
|
||||||
js_content = ""
|
os.path.expanduser('~/.var/app/io.github.zen_browser.zen/config/zen')
|
||||||
if os.path.exists(user_js):
|
]
|
||||||
with open(user_js, 'r') as f:
|
for zen_base in zen_bases:
|
||||||
js_content = f.read()
|
if os.path.exists(zen_base):
|
||||||
for line in pref_lines:
|
for profile in os.listdir(zen_base):
|
||||||
pref_key = line.split('"')[1]
|
profile_dir = os.path.join(zen_base, profile)
|
||||||
if pref_key not in js_content:
|
if os.path.isdir(profile_dir) and ('.' in profile or 'default' in profile.lower()):
|
||||||
with open(user_js, 'a') as f:
|
# Ensure user.js enables stylesheets and disables crash dialogs
|
||||||
f.write("\n" + line)
|
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
|
# Write userChrome.css and userContent.css
|
||||||
chrome_dir = os.path.join(profile_dir, 'chrome')
|
chrome_dir = os.path.join(profile_dir, 'chrome')
|
||||||
os.makedirs(chrome_dir, exist_ok=True)
|
os.makedirs(chrome_dir, exist_ok=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(chrome_dir, 'userChrome.css'), 'w') as f:
|
with open(os.path.join(chrome_dir, 'userChrome.css'), 'w') as f:
|
||||||
f.write(chrome_css)
|
f.write(chrome_css)
|
||||||
with open(os.path.join(chrome_dir, 'userContent.css'), 'w') as f:
|
with open(os.path.join(chrome_dir, 'userContent.css'), 'w') as f:
|
||||||
f.write(content_css)
|
f.write(content_css)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Graceful SIGTERM restart with profile lock release buffer
|
# Graceful SIGTERM restart with profile lock release buffer
|
||||||
res = subprocess.run(["pgrep", "-f", "zen-browser"], capture_output=True, text=True)
|
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 = [
|
feishin_dirs = [
|
||||||
os.path.expanduser('~/.config/feishin'),
|
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:
|
for base_dir in feishin_dirs:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user