diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc index 7c68bce..a323a1a 100644 --- a/fastfetch/config.jsonc +++ b/fastfetch/config.jsonc @@ -1,80 +1,89 @@ { - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "source": "~/.config/fastfetch/hamster_cookie.txt", - "type": "file", - "padding": { - "top": 0, - "left": 1, - "right": 3 - } - }, - "display": { - "separator": " ➜ ", - "color": { - "keys": "#a7c080", - "title": "#7fbbb3" - } - }, - "modules": [ - "title", - "separator", - { - "type": "os", - "key": "OS", - "keyColor": "cyan" + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "~/.config/fastfetch/hamster_cookie.txt", + "color": { + "1": "magenta", + "2": "yellow" + }, + "padding": { + "top": 1, + "left": 2, + "right": 2 + } }, - { - "type": "host", - "key": "Host", - "keyColor": "green" + "display": { + "separator": " ", + "color": { + "keys": "#a7c080", + "title": "#7fbbb3" + } }, - { - "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" - ] + "modules": [ + { + "type": "custom", + "format": "╭──────────────╮" + }, + { + "type": "uptime", + "key": "│ 󰅐 uptime │", + "keyColor": "cyan" + }, + { + "type": "os", + "key": "│ 󰣇 distro │", + "keyColor": "green" + }, + { + "type": "packages", + "key": "│ 󰏖 packages │", + "keyColor": "magenta" + }, + { + "type": "terminal", + "key": "│ 󰞅 term │", + "keyColor": "red" + }, + { + "type": "shell", + "key": "│ 󰞷 shell │", + "keyColor": "yellow" + }, + { + "type": "custom", + "format": "├──────────────┤" + }, + { + "type": "cpu", + "key": "│ % cpu load │", + "keyColor": "magenta", + "temp": false + }, + { + "type": "memory", + "key": "│ 󰍛 memory │", + "keyColor": "red", + "format": "{1} / {2} ({3})" + }, + { + "type": "disk", + "key": "│ 󰋊 SSD1 │", + "keyColor": "green", + "format": "{1} / {2} ({3})" + }, + { + "type": "custom", + "format": "├──────────────┤" + }, + { + "type": "colors", + "key": "│ 🎨 colors │", + "keyColor": "yellow", + "symbol": "circle" + }, + { + "type": "custom", + "format": "╰──────────────╯" + } + ] } diff --git a/quickshell/fastfetch/config.jsonc b/quickshell/fastfetch/config.jsonc index 6afa988..a323a1a 100644 --- a/quickshell/fastfetch/config.jsonc +++ b/quickshell/fastfetch/config.jsonc @@ -15,8 +15,8 @@ "display": { "separator": " ", "color": { - "keys": "magenta", - "title": "bright_magenta" + "keys": "#a7c080", + "title": "#7fbbb3" } }, "modules": [ @@ -77,7 +77,7 @@ }, { "type": "colors", - "key": "│ 🎨 colors │", + "key": "│ 🎨 colors │", "keyColor": "yellow", "symbol": "circle" }, diff --git a/quickshell/services/python/theme_sync.py b/quickshell/services/python/theme_sync.py index 971bade..b77a279 100644 --- a/quickshell/services/python/theme_sync.py +++ b/quickshell/services/python/theme_sync.py @@ -1112,74 +1112,8 @@ theme[upload_end]="#ff80bf" pass def sync_fastfetch(bg, surface, current_line, fg, accent, sub_accent): - import re - fastfetch_dir = os.path.expanduser('~/.config/fastfetch') - os.makedirs(fastfetch_dir, exist_ok=True) - conf_path = os.path.join(fastfetch_dir, 'config.jsonc') - - if os.path.exists(conf_path): - try: - with open(conf_path, 'r', encoding='utf-8') as f: - content = f.read() - - modified = False - if '"keys"' in content: - content, count1 = re.subn(r'"keys"\s*:\s*"[^"]*"', f'"keys": "{accent}"', content) - if count1 > 0: modified = True - if '"title"' in content: - content, count2 = re.subn(r'"title"\s*:\s*"[^"]*"', f'"title": "{sub_accent}"', content) - if count2 > 0: modified = True - - if not modified and '"display"' in content: - content = re.sub(r'"display"\s*:\s*\{', f'"display": {{\n "color": {{\n "keys": "{accent}",\n "title": "{sub_accent}"\n }},', content, count=1) - modified = True - - if modified: - with open(conf_path, 'w', encoding='utf-8') as f: - f.write(content) - return - except Exception: - pass - - 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}", - "title": "{sub_accent}" - }} - }}, - "modules": [ - "title", - "separator", - "os", - "host", - "kernel", - "uptime", - "packages", - "shell", - "display", - "wm", - "terminal", - "cpu", - "gpu", - "memory", - "break", - "colors" - ] -}} -""" - try: - with open(conf_path, 'w', encoding='utf-8') as f: - f.write(fastfetch_jsonc) - except Exception: - pass + # Preserves user's exact master fastfetch configuration from ~/.config/fastfetch/ + pass def sync_ghostty(bg, surface, current_line, fg, accent, sub_accent): ghostty_dir = os.path.expanduser('~/.config/ghostty')