Add Nord theme (and lazy load vsc theme extensions)

Thanks @iljo-dp for finding the themes!
This commit is contained in:
David Heinemeier Hansson 2024-06-06 20:55:17 +02:00
parent 9f21306178
commit 93d0630fb0
7 changed files with 95 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 KiB

View File

@ -1,5 +1,5 @@
# Pick a preconfigured theme # Pick a preconfigured theme
THEME=$(gum choose "Tokyo Night" "Catppuccin" "Everforest" "Gruvbox" "Rose Pine" --header "Choose your theme" --height 7 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g') THEME=$(gum choose "Tokyo Night" "Catppuccin" "Everforest" "Gruvbox" "Nord" "Rose Pine" --header "Choose your theme" --height 8 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
[ ! -n "$THEME" ] && exit 0 [ ! -n "$THEME" ] && exit 0
@ -11,16 +11,25 @@ sed -i "s/theme \".*\"/theme \"$THEME\"/g" ~/.config/zellij/config.kdl
# Translate to specific VSC theme name # Translate to specific VSC theme name
if [ "$THEME" == "gruvbox" ]; then if [ "$THEME" == "gruvbox" ]; then
VSC_THEME="Gruvbox Dark Medium" VSC_THEME="Gruvbox Dark Medium"
VSC_EXTENSION="jdinhlife.gruvbox"
elif [ "$THEME" == "catppuccin" ]; then elif [ "$THEME" == "catppuccin" ]; then
VSC_THEME="Catppuccin Macchiato" VSC_THEME="Catppuccin Macchiato"
VSC_EXTENSION="Catppuccin.catppuccin-vsc"
elif [ "$THEME" == "tokyo-night" ]; then elif [ "$THEME" == "tokyo-night" ]; then
VSC_THEME="Tokyo Night" VSC_THEME="Tokyo Night"
VSC_EXTENSION="enkia.tokyo-night"
elif [ "$THEME" == "everforest" ]; then elif [ "$THEME" == "everforest" ]; then
VSC_THEME="Everforest Dark" VSC_THEME="Everforest Dark"
VSC_EXTENSION="sainnhe.everforest"
elif [ "$THEME" == "rose-pine" ]; then elif [ "$THEME" == "rose-pine" ]; then
VSC_THEME="Rosé Pine Dawn" VSC_THEME="Rosé Pine Dawn"
VSC_EXTENSION="mvllow.rose-pine"
elif [ "$THEME" == "nord" ]; then
VSC_THEME="Nord"
VSC_EXTENSION="arcticicestudio.nord-visual-studio-code"
fi fi
code --install-extension $VSC_EXTENSION > /dev/null
sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json
echo "Restart your terminal for a full theme change (Super + W, then start again with Alt + 2)" echo "Restart your terminal for a full theme change (Super + W, then start again with Alt + 2)"

View File

@ -9,7 +9,3 @@ cp ~/.local/share/omakub/configs/vscode.json ~/.config/Code/User/settings.json
# Install default supported themes # Install default supported themes
code --install-extension enkia.tokyo-night code --install-extension enkia.tokyo-night
code --install-extension jdinhlife.gruvbox
code --install-extension Catppuccin.catppuccin-vsc
code --install-extension mvllow.rose-pine
code --install-extension sainnhe.everforest

View File

@ -0,0 +1,47 @@
[colors]
[colors.primary]
background = "#2e3440"
foreground = "#d8dee9"
dim_foreground = "#a5abb6"
[colors.cursor]
text = "#2e3440"
cursor = "#d8dee9"
[colors.vi_mode_cursor]
text = "#2e3440"
cursor = "#d8dee9"
[colors.selection]
text = "CellForeground"
background = "#4c566a"
[colors.normal]
black = "#3b4252"
red = "#bf616a"
green = "#a3be8c"
yellow = "#ebcb8b"
blue = "#81a1c1"
magenta = "#b48ead"
cyan = "#88c0d0"
white = "#e5e9f0"
[colors.bright]
black = "#4c566a"
red = "#bf616a"
green = "#a3be8c"
yellow = "#ebcb8b"
blue = "#81a1c1"
magenta = "#b48ead"
cyan = "#8fbcbb"
white = "#eceff4"
[colors.dim]
black = "#373e4d"
red = "#94545d"
green = "#809575"
yellow = "#b29e75"
blue = "#68809a"
magenta = "#8c738c"
cyan = "#6d96a5"
white = "#aeb3bb"

9
themes/gnome/nord.sh Normal file
View File

@ -0,0 +1,9 @@
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface cursor-theme 'Yaru'
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-blue-dark'
gsettings set org.gnome.desktop.interface icon-theme 'Yaru-blue'
OMAKUB_DEFAULT_BACKGROUND_IMAGE_PATH="$HOME/.local/share/omakub/backgrounds/nord_scenary.png"
gsettings set org.gnome.desktop.background picture-uri $OMAKUB_DEFAULT_BACKGROUND_IMAGE_PATH
gsettings set org.gnome.desktop.background picture-uri-dark $OMAKUB_DEFAULT_BACKGROUND_IMAGE_PATH
gsettings set org.gnome.desktop.background picture-options 'zoom'

9
themes/neovim/nord.lua Normal file
View File

@ -0,0 +1,9 @@
return {
{ "shaunsingh/nord.nvim" },
{
"LazyVim/LazyVim",
opts = {
colorscheme = "nord",
},
},
}

15
themes/zellij/nord.kdl Normal file
View File

@ -0,0 +1,15 @@
themes {
nord {
fg "#D8DEE9"
bg "#2E3440"
black "#3B4252"
red "#BF616A"
green "#A3BE8C"
yellow "#EBCB8B"
blue "#81A1C1"
magenta "#B48EAD"
cyan "#88C0D0"
white "#E5E9F0"
orange "#D08770"
}
}