diff --git a/bin/omakub b/bin/omakub index 581ca8c..a12e85e 100755 --- a/bin/omakub +++ b/bin/omakub @@ -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 diff --git a/bin/omakub-font b/bin/omakub-font index 4269db8..da8c939 100644 --- a/bin/omakub-font +++ b/bin/omakub-font @@ -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 diff --git a/bin/omakub-help b/bin/omakub-help index 22820bf..af72209 100644 --- a/bin/omakub-help +++ b/bin/omakub-help @@ -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 diff --git a/bin/omakub-install b/bin/omakub-install index 40f5d65..1503f37 100644 --- a/bin/omakub-install +++ b/bin/omakub-install @@ -1,2 +1,4 @@ INSTALLER=$(gum file $OMAKUB_PATH/install) [ -n "$INSTALLER" ] && gum confirm "Run installer?" && source $INSTALLER +clear +source $OMAKUB_PATH/bin/omakub diff --git a/bin/omakub-menu b/bin/omakub-menu new file mode 100644 index 0000000..8d0d624 --- /dev/null +++ b/bin/omakub-menu @@ -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 diff --git a/bin/omakub-theme b/bin/omakub-theme index 165a0ba..97ad6a8 100644 --- a/bin/omakub-theme +++ b/bin/omakub-theme @@ -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 diff --git a/bin/omakub-uninstall b/bin/omakub-uninstall index f30c503..c1d1dc3 100644 --- a/bin/omakub-uninstall +++ b/bin/omakub-uninstall @@ -1,2 +1,4 @@ UNINSTALLER=$(gum file $OMAKUB_PATH/uninstall) [ -n "$UNINSTALLER" ] && gum confirm "Run uninstaller?" && source $UNINSTALLER +clear +source $OMAKUB_PATH/bin/omakub diff --git a/bin/omakub-update b/bin/omakub-update index 6006134..75e369a 100644 --- a/bin/omakub-update +++ b/bin/omakub-update @@ -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 diff --git a/configs/neovim/transparency.lua b/configs/neovim/transparency.lua index a7717fc..d0090f0 100644 --- a/configs/neovim/transparency.lua +++ b/configs/neovim/transparency.lua @@ -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" }) diff --git a/defaults/bash/aliases b/defaults/bash/aliases index a29172e..5e1e35f 100644 --- a/defaults/bash/aliases +++ b/defaults/bash/aliases @@ -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" +} diff --git a/install/app-fastfetch.sh b/install/app-fastfetch.sh index 2bf9d6a..6658288 100644 --- a/install/app-fastfetch.sh +++ b/install/app-fastfetch.sh @@ -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 diff --git a/install/app-neovim.sh b/install/app-neovim.sh index 1548e63..987c7af 100644 --- a/install/app-neovim.sh +++ b/install/app-neovim.sh @@ -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 diff --git a/install/apps-terminal.sh b/install/apps-terminal.sh index 1dabba2..9ca622f 100644 --- a/install/apps-terminal.sh +++ b/install/apps-terminal.sh @@ -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 diff --git a/install/optional/app-flatpak.sh b/install/optional/app-flatpak.sh new file mode 100644 index 0000000..c49b421 --- /dev/null +++ b/install/optional/app-flatpak.sh @@ -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 diff --git a/install/select-dev-env.sh b/install/select-dev-env.sh index 1049e77..27f49b3 100644 --- a/install/select-dev-env.sh +++ b/install/select-dev-env.sh @@ -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 diff --git a/install/select-optional-apps.sh b/install/select-optional-apps.sh index cc14a76..87ed8de 100644 --- a/install/select-optional-apps.sh +++ b/install/select-optional-apps.sh @@ -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"