mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #1439 from turannul/pr/colors
feat(theming): add btop support
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# btop theme generated by noctalia
|
||||
|
||||
theme[main_bg]="{{colors.surface.default.hex}}"
|
||||
theme[main_fg]="{{colors.on_surface.default.hex}}"
|
||||
theme[title]="{{colors.primary.default.hex}}"
|
||||
theme[hi_fg]="{{colors.tertiary.default.hex}}"
|
||||
theme[selected_bg]="{{colors.surface_container_highest.default.hex}}"
|
||||
theme[selected_fg]="{{colors.on_surface.default.hex}}"
|
||||
theme[inactive_fg]="{{colors.on_surface_variant.default.hex}}"
|
||||
theme[proc_misc]="{{colors.secondary.default.hex}}"
|
||||
theme[cpu_box]="{{colors.outline.default.hex}}"
|
||||
theme[mem_box]="{{colors.outline.default.hex}}"
|
||||
theme[net_box]="{{colors.outline.default.hex}}"
|
||||
theme[proc_box]="{{colors.outline.default.hex}}"
|
||||
theme[div_line]="{{colors.outline_variant.default.hex}}"
|
||||
theme[temp_start]="{{colors.primary.default.hex}}"
|
||||
theme[temp_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[temp_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[cpu_start]="{{colors.primary.default.hex}}"
|
||||
theme[cpu_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[cpu_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[free_start]="{{colors.primary.default.hex}}"
|
||||
theme[free_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[free_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[cached_start]="{{colors.primary.default.hex}}"
|
||||
theme[cached_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[cached_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[available_start]="{{colors.primary.default.hex}}"
|
||||
theme[available_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[available_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[used_start]="{{colors.primary.default.hex}}"
|
||||
theme[used_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[used_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[download_start]="{{colors.primary.default.hex}}"
|
||||
theme[download_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[download_end]="{{colors.tertiary.default.hex}}"
|
||||
theme[upload_start]="{{colors.primary.default.hex}}"
|
||||
theme[upload_mid]="{{colors.secondary.default.hex}}"
|
||||
theme[upload_end]="{{colors.tertiary.default.hex}}"
|
||||
+24
-1
@@ -391,7 +391,30 @@ mango)
|
||||
echo "Warning: mmsg command not found, manual restart may be needed." >&2
|
||||
fi
|
||||
;;
|
||||
|
||||
btop)
|
||||
echo "🎨 Applying 'noctalia' theme to btop..."
|
||||
CONFIG_FILE="$HOME/.config/btop/btop.conf"
|
||||
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
if grep -q '^color_theme = "noctalia"' "$CONFIG_FILE"; then
|
||||
echo "Theme already set to noctalia, skipping modification."
|
||||
else
|
||||
if grep -q '^color_theme = ' "$CONFIG_FILE"; then
|
||||
sed -i 's/^color_theme = .*/color_theme = "noctalia"/' "$CONFIG_FILE"
|
||||
else
|
||||
echo 'color_theme = "noctalia"' >>"$CONFIG_FILE"
|
||||
fi
|
||||
echo "✅ Updated btop config to use noctalia theme."
|
||||
fi
|
||||
|
||||
if pgrep -x btop >/dev/null; then
|
||||
echo "Reloading btop..."
|
||||
pkill -SIGUSR2 -x btop
|
||||
fi
|
||||
else
|
||||
echo "Warning: btop config file not found at $CONFIG_FILE" >&2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Handle unknown application names.
|
||||
echo "Error: Unknown application '$APP_NAME'." >&2
|
||||
|
||||
@@ -343,6 +343,18 @@ Singleton {
|
||||
}
|
||||
],
|
||||
"postProcess": () => `${colorsApplyScript} mango`
|
||||
},
|
||||
{
|
||||
"id": "btop",
|
||||
"name": "btop",
|
||||
"category": "misc",
|
||||
"input": "btop.theme",
|
||||
"outputs": [
|
||||
{
|
||||
"path": "~/.config/btop/themes/noctalia.theme"
|
||||
}
|
||||
],
|
||||
"postProcess": () => `${colorsApplyScript} btop`
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user