From 6daa512ef990fbd317ad55a203bb08db2ed41117 Mon Sep 17 00:00:00 2001 From: Luca Pattocchio Date: Wed, 14 May 2025 17:40:18 +0200 Subject: [PATCH] upd: add migration for btop themes --- migrations/1747237126.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 migrations/1747237126.sh diff --git a/migrations/1747237126.sh b/migrations/1747237126.sh new file mode 100644 index 0000000..57bc172 --- /dev/null +++ b/migrations/1747237126.sh @@ -0,0 +1,13 @@ +cp ~/.local/share/omakub/configs/alacritty/btop.toml ~/.config/alacritty/btop.toml + +THEME_NAMES=("Tokyo Night" "Catppuccin" "Nord" "Everforest" "Gruvbox" "Kanagawa" "Rose Pine") +THEME=$(gum choose "${THEME_NAMES[@]}" ">> Skip" --header "Choose your current theme" --height 10 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g') + +if [ -n "$THEME" ] && [ "$THEME" != ">>-skip" ]; then + if [ -f "$OMAKUB_PATH/themes/$THEME/btop.theme" ]; then + cp $OMAKUB_PATH/themes/$THEME/btop.theme ~/.config/btop/themes/$THEME.theme + sed -i "s/color_theme = \".*\"/color_theme = \"$THEME\"/g" ~/.config/btop/btop.conf + else + sed -i "s/color_theme = \".*\"/color_theme = \"Default\"/g" ~/.config/btop/btop.conf + fi +fi \ No newline at end of file