Merge branch 'master' into add-steam-installer

This commit is contained in:
David Heinemeier Hansson
2024-06-13 20:19:56 +02:00
committed by GitHub
16 changed files with 122 additions and 72 deletions

View File

@@ -1,11 +1,5 @@
#!/bin/bash
source $OMAKUB_PATH/ascii.sh
if [ $# -eq 0 ]; then
SUB=$(gum choose "Help" "Theme" "Font" "Install" "Uninstall" "Update" --height 9 --header "" | tr '[:upper:]' '[:lower:]')
else
SUB=$1
fi
[ -n "$SUB" ] && source $OMAKUB_PATH/bin/omakub-$SUB
echo "" # Add spacing
source $OMAKUB_PATH/bin/omakub-menu

View File

@@ -22,7 +22,7 @@ set_font() {
if [ "$#" -gt 1 ]; then
choice=${!#}
else
choice=$(gum choose "Cascadia Mono" "Fira Mono" "JetBrains Mono" "Meslo" --height 6)
choice=$(gum choose "Cascadia Mono" "Fira Mono" "JetBrains Mono" "Meslo" "<< Back" --height 7 --header "Choose your programming font")
fi
case $choice in
@@ -38,7 +38,6 @@ case $choice in
"Meslo")
set_font "MesloLGS Nerd Font" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip" "Meslo" "ttf"
;;
* )
exit 0
;;
esac
source $OMAKUB_PATH/bin/omakub-menu

View File

@@ -1,2 +1,3 @@
HELP=$(gum choose "Hotkeys" "Commands" "Tactile" --header "What do you need help with?" --height 5 | tr '[:upper:]' '[:lower:]')
[ -n "$HELP" ] && gum pager --soft-wrap <$OMAKUB_PATH/help/$HELP.md
source $OMAKUB_PATH/bin/omakub-menu

View File

@@ -1,2 +1,4 @@
INSTALLER=$(gum file $OMAKUB_PATH/install)
[ -n "$INSTALLER" ] && gum confirm "Run installer?" && source $INSTALLER
clear
source $OMAKUB_PATH/bin/omakub

7
bin/omakub-menu Normal file
View File

@@ -0,0 +1,7 @@
if [ $# -eq 0 ]; then
SUB=$(gum choose "Theme" "Font" "Install" "Uninstall" "Help" "Update" "Quit" --height 10 --header "" | tr '[:upper:]' '[:lower:]')
else
SUB=$1
fi
[ -n "$SUB" ] && [ "$SUB" != "quit" ] && source $OMAKUB_PATH/bin/omakub-$SUB

View File

@@ -1,45 +1,46 @@
# Pick a preconfigured theme
THEME_NAMES=("Tokyo Night" "Catppuccin" "Nord" "Everforest" "Gruvbox" "Kanagawa" "Rose Pine")
THEME=$(gum choose "${THEME_NAMES[@]}" --header "Choose your theme" --height 9 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
THEME=$(gum choose "${THEME_NAMES[@]}" "<< Back" --header "Choose your theme" --height 10 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
[ ! -n "$THEME" ] && exit 0
if [ -n "$THEME" ] && [ "$THEME" != "<<-back" ]; then
# Install theme in Gnome, Terminal, and both default editors
source $OMAKUB_PATH/themes/gnome/$THEME.sh
cp $OMAKUB_PATH/themes/alacritty/$THEME.toml ~/.config/alacritty/theme.toml
# Install theme in Gnome, Terminal, and both default editors
source $OMAKUB_PATH/themes/gnome/$THEME.sh
cp $OMAKUB_PATH/themes/alacritty/$THEME.toml ~/.config/alacritty/theme.toml
if [ ! -f ~/.config/nvim/plugin/after/transparency.lua ]; then
mkdir -p ~/.config/nvim/plugin/after
cp $OMAKUB_PATH/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/transparency.lua
fi
if [ ! -f ~/.config/nvim/plugin/after/transparency.lua ]; then
mkdir -p ~/.config/nvim/plugin/after
cp $OMAKUB_PATH/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/transparency.lua
cp $OMAKUB_PATH/themes/neovim/$THEME.lua ~/.config/nvim/lua/plugins/theme.lua
sed -i "s/theme \".*\"/theme \"$THEME\"/g" ~/.config/zellij/config.kdl
# Translate to specific VSC theme name
if [ "$THEME" == "gruvbox" ]; then
VSC_THEME="Gruvbox Dark Medium"
VSC_EXTENSION="jdinhlife.gruvbox"
elif [ "$THEME" == "catppuccin" ]; then
VSC_THEME="Catppuccin Macchiato"
VSC_EXTENSION="Catppuccin.catppuccin-vsc"
elif [ "$THEME" == "tokyo-night" ]; then
VSC_THEME="Tokyo Night"
VSC_EXTENSION="enkia.tokyo-night"
elif [ "$THEME" == "everforest" ]; then
VSC_THEME="Everforest Dark"
VSC_EXTENSION="sainnhe.everforest"
elif [ "$THEME" == "rose-pine" ]; then
VSC_THEME="Rosé Pine Dawn"
VSC_EXTENSION="mvllow.rose-pine"
elif [ "$THEME" == "nord" ]; then
VSC_THEME="Nord"
VSC_EXTENSION="arcticicestudio.nord-visual-studio-code"
elif [ "$THEME" == "kanagawa" ]; then
VSC_THEME="Kanagawa"
VSC_EXTENSION="qufiwefefwoyn.kanagawa"
fi
code --install-extension $VSC_EXTENSION > /dev/null
sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json
fi
cp $OMAKUB_PATH/themes/neovim/$THEME.lua ~/.config/nvim/lua/plugins/theme.lua
sed -i "s/theme \".*\"/theme \"$THEME\"/g" ~/.config/zellij/config.kdl
# Translate to specific VSC theme name
if [ "$THEME" == "gruvbox" ]; then
VSC_THEME="Gruvbox Dark Medium"
VSC_EXTENSION="jdinhlife.gruvbox"
elif [ "$THEME" == "catppuccin" ]; then
VSC_THEME="Catppuccin Macchiato"
VSC_EXTENSION="Catppuccin.catppuccin-vsc"
elif [ "$THEME" == "tokyo-night" ]; then
VSC_THEME="Tokyo Night"
VSC_EXTENSION="enkia.tokyo-night"
elif [ "$THEME" == "everforest" ]; then
VSC_THEME="Everforest Dark"
VSC_EXTENSION="sainnhe.everforest"
elif [ "$THEME" == "rose-pine" ]; then
VSC_THEME="Rosé Pine Dawn"
VSC_EXTENSION="mvllow.rose-pine"
elif [ "$THEME" == "nord" ]; then
VSC_THEME="Nord"
VSC_EXTENSION="arcticicestudio.nord-visual-studio-code"
elif [ "$THEME" == "kanagawa" ]; then
VSC_THEME="Kanagawa"
VSC_EXTENSION="qufiwefefwoyn.kanagawa"
fi
code --install-extension $VSC_EXTENSION > /dev/null
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)"
source $OMAKUB_PATH/bin/omakub-menu

View File

@@ -1,2 +1,4 @@
UNINSTALLER=$(gum file $OMAKUB_PATH/uninstall)
[ -n "$UNINSTALLER" ] && gum confirm "Run uninstaller?" && source $UNINSTALLER
clear
source $OMAKUB_PATH/bin/omakub

View File

@@ -1,3 +1,6 @@
cd $OMAKUB_PATH
git pull
cd -
gum spin --spinner globe --title "Update has completed!" -- sleep 3
clear
source $OMAKUB_PATH/bin/omakub

View File

@@ -1,22 +1,45 @@
-- transparent background
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'none' })
vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'none' })
vim.api.nvim_set_hl(0, 'Terminal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'EndOfBuffer', { bg = 'none' })
vim.api.nvim_set_hl(0, 'FoldColumn', { bg = 'none' })
vim.api.nvim_set_hl(0, 'Folded', { bg = 'none' })
vim.api.nvim_set_hl(0, 'SignColumn', { bg = 'none' })
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "Pmenu", { bg = "none" })
vim.api.nvim_set_hl(0, "Terminal", { bg = "none" })
vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "none" })
vim.api.nvim_set_hl(0, "FoldColumn", { bg = "none" })
vim.api.nvim_set_hl(0, "Folded", { bg = "none" })
vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
vim.api.nvim_set_hl(0, "WhichKeyFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopeBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopeNormal", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopePromptBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopePromptTitle", { bg = "none" })
-- transparent background for neotree
vim.api.nvim_set_hl(0, 'NeoTreeNormal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NeoTreeNormalNC', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NeoTreeVertSplit', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NeoTreeWinSeparator', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NeoTreeEndOfBuffer', { bg = 'none' })
vim.api.nvim_set_hl(0, "NeoTreeNormal", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeNormalNC", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeVertSplit", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeWinSeparator", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeEndOfBuffer", { bg = "none" })
-- transparent background for nvim-tree
vim.api.nvim_set_hl(0, 'NvimTreeNormal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NvimTreeVertSplit', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NvimTreeEndOfBuffer', { bg = 'none' })
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
vim.api.nvim_set_hl(0, "NvimTreeVertSplit", { bg = "none" })
vim.api.nvim_set_hl(0, "NvimTreeEndOfBuffer", { bg = "none" })
-- transparent notify background
vim.api.nvim_set_hl(0, "NotifyINFOBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyERRORBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyWARNBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyTRACEBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyDEBUGBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyINFOTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyERRORTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyWARNTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyTRACETitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyDEBUGTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyINFOBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyERRORBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyWARNBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyTRACEBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyDEBUGBorder", { bg = "none" })

View File

@@ -4,6 +4,7 @@ alias lsa='ls -a'
alias lt='eza --tree --level=2 --long --icons --git'
alias lta='lt -a'
alias ff="fzf --preview 'batcat --style=numbers --color=always {}'"
alias fd="fdfind"
# Directories
alias ..='cd ..'
@@ -27,3 +28,10 @@ alias gcad='git commit -a --amend'
# Compression
compress() { tar -czf "${1%/}.tar.gz" "${1%/}"; }
alias decompress="tar -xzf"
# Convert webm files generated by the Gnome screenshot video recorder to mp4s that are more compatible
webm2mp4() {
input_file="$1"
output_file="${input_file%.webm}.mp4"
ffmpeg -i "$input_file" -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 192k "$output_file"
}

View File

@@ -1,3 +1,3 @@
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
sudo apt update
sudo add-apt-repository -y ppa:zhangsongcui3371/fastfetch
sudo apt update -y
sudo apt install -y fastfetch

View File

@@ -2,6 +2,8 @@ sudo apt install -y neovim
if [ ! -d "$HOME/.config/nvim" ]; then
git clone https://github.com/LazyVim/starter ~/.config/nvim
# Disable update notification popup in starter config
sed -i 's/checker = { enabled = true }/checker = { enabled = true, notify = false }/g' ~/.config/nvim/lua/config/lazy.lua
mkdir -p ~/.config/nvim/plugin/after
cp ~/.local/share/omakub/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/
cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua

View File

@@ -1 +1 @@
sudo apt install -y fzf ripgrep bat eza zoxide plocate btop apache2-utils
sudo apt install -y fzf ripgrep bat eza zoxide plocate btop apache2-utils fd-find

View File

@@ -0,0 +1,3 @@
sudo apt install -y flatpak
sudo apt install -y gnome-software-plugin-flatpak
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

View File

@@ -1,10 +1,11 @@
# Install default programming languages
languages=$(gum choose "Ruby" "Node.js" "Go" "Python" "Java" --no-limit --selected "Ruby","Node.js" --height 7 --header "Select programming languages")
languages=$(gum choose "Ruby on Rails" "Node.js" "Go" "Python" "Java" "Elixir" --no-limit --selected "Ruby on Rails","Node.js" --height 8 --header "Select programming languages")
for language in $languages; do
case $language in
Ruby)
mise use --global ruby@3.3
gem install rails --no-document
;;
Node.js)
mise use --global node@lts
@@ -18,6 +19,10 @@ for language in $languages; do
Python)
mise use --global python@latest
;;
Elixir)
mise use --global erlang@latest
mise use --global elixir@latest
;;
esac
done

View File

@@ -1,5 +1,5 @@
# Install optional apps
apps=$(gum choose "1password" "Spotify" "Zoom" "Dropbox" "Steam" --no-limit --selected "1password","Spotify","Zoom" --height 6 --header "Select optional apps"
apps=$(gum choose "1password" "Spotify" "Zoom" "Dropbox" "Steam" --no-limit --selected "1password","Spotify","Zoom" --height 6 --header "Select optional apps")
for app in $apps; do
source "$OMAKUB_PATH/install/optional/app-${app,,}.sh"