From 0b0dbed47a55e2a19dd384f2a6986860bc3ae265 Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 25 May 2024 19:33:08 -0400 Subject: [PATCH] Fix not loading extra zsh files --- .../nvim/lua/aleidk/plugins/git.lua | 1 - chezmoi/dot_config/zsh/aliases/flatpak.zsh | 26 -------------- chezmoi/dot_config/zsh/aliases/fzf.zsh | 3 +- chezmoi/dot_config/zsh/aliases/git.zsh | 19 ----------- chezmoi/dot_config/zsh/aliases/nvim.zsh | 34 +++++++++---------- chezmoi/dot_config/zsh/aliases/silverblue.zsh | 2 -- chezmoi/executable_dot_zshrc | 14 +++++++- 7 files changed, 30 insertions(+), 69 deletions(-) delete mode 100644 chezmoi/dot_config/zsh/aliases/flatpak.zsh delete mode 100644 chezmoi/dot_config/zsh/aliases/git.zsh delete mode 100644 chezmoi/dot_config/zsh/aliases/silverblue.zsh diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua index 17ebb44..c8934fc 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua +++ b/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua @@ -56,7 +56,6 @@ return { graph_style = "unicode", kind = "tab", ignored_settings = { - "NeogitPushPopup--force-with-lease", "NeogitPushPopup--force", "NeogitPullPopup--rebase", "NeogitCommitPopup--allow-empty", diff --git a/chezmoi/dot_config/zsh/aliases/flatpak.zsh b/chezmoi/dot_config/zsh/aliases/flatpak.zsh deleted file mode 100644 index e9bca3a..0000000 --- a/chezmoi/dot_config/zsh/aliases/flatpak.zsh +++ /dev/null @@ -1,26 +0,0 @@ -if [[ "$OSTYPE" != 'linux-gnu' ]]; then - return -fi - -# Auto-generated aliases for Flatpak applications - -alias pikabackup='flatpak run org.gnome.World.PikaBackup' -alias gdmsettings='flatpak run io.github.realmazharhussain.GdmSettings' -alias detwinner='flatpak run com.neatdecisions.Detwinner' -alias czkawka='flatpak run com.github.qarmin.czkawka' -alias signal='flatpak run org.signal.Signal' -alias librewolf-community='flatpak run io.gitlab.librewolf-community' -alias studio='flatpak run io.beekeeperstudio.Studio' -alias client='flatpak run com.spotify.Client' -alias slack='flatpak run com.slack.Slack' -alias browser='flatpak run com.brave.Browser' -alias syncthingtk='flatpak run me.kozec.syncthingtk' -alias amberol='flatpak run io.bassi.Amberol' -alias celeste='flatpak run com.hunterwittenborn.Celeste' -alias flatseal='flatpak run com.github.tchx84.Flatseal' -alias megasync='flatpak run nz.mega.MEGAsync' -alias guiscrcpy='flatpak run in.srev.guiscrcpy' -alias kid3='flatpak run org.kde.kid3' -alias jellyfin-media-player='flatpak run com.github.iwalton3.jellyfin-media-player' -alias junction='flatpak run re.sonny.Junction' -alias ncspot='flatpak run io.github.hrkfdn.ncspot -c ~/.config/ncspot/config.toml' diff --git a/chezmoi/dot_config/zsh/aliases/fzf.zsh b/chezmoi/dot_config/zsh/aliases/fzf.zsh index ec0c17f..0cda652 100644 --- a/chezmoi/dot_config/zsh/aliases/fzf.zsh +++ b/chezmoi/dot_config/zsh/aliases/fzf.zsh @@ -1,2 +1 @@ -alias \ - fzf-fp='fzf-flatpak-install-widget'; +alias fzf-fp='fzf-flatpak-install-widget' diff --git a/chezmoi/dot_config/zsh/aliases/git.zsh b/chezmoi/dot_config/zsh/aliases/git.zsh deleted file mode 100644 index 40605eb..0000000 --- a/chezmoi/dot_config/zsh/aliases/git.zsh +++ /dev/null @@ -1,19 +0,0 @@ -alias \ - glf='git log -p --' \ - gs='git status' \ - ga='git add' \ - gp='git push' \ - gpo='git push origin' \ - gtd='git tag --delete' \ - gtdr='git tag --delete origin' \ - gr='git branch -r' \ - gplo='git pull origin' \ - gb='git branch ' \ - gc='git commit' \ - gd='git diff' \ - gco='git checkout ' \ - gl='git log' \ - gr='git remote' \ - grs='git remote show' \ - glo='git log --pretty="oneline"' \ - glol='git log --graph --oneline --decorate' diff --git a/chezmoi/dot_config/zsh/aliases/nvim.zsh b/chezmoi/dot_config/zsh/aliases/nvim.zsh index ae596eb..5259ff9 100644 --- a/chezmoi/dot_config/zsh/aliases/nvim.zsh +++ b/chezmoi/dot_config/zsh/aliases/nvim.zsh @@ -1,24 +1,22 @@ alias \ - vi='nvim' \ - vi-astro='NVIM_APPNAME=Distro-AstroNvim nvim' \ - vi-lazy='NVIM_APPNAME=LazyVim nvim' + vi='nvim' \ + vi-astro='NVIM_APPNAME=Distro-AstroNvim nvim' \ + vi-lazy='NVIM_APPNAME=LazyVim nvim' vis() { - items=( - default - AstroNvim - LazyVim - ) - config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config  " --height=~50% --layout=reverse --border --exit-0) + items=( + default + AstroNvim + LazyVim + ) + config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config  " --height=~50% --layout=reverse --border --exit-0) - if [[ -z $config ]]; then - echo "Nothing selected" - return 0 - elif [[ $config == "default" ]]; then - config="" - fi + if [[ -z $config ]]; then + echo "Nothing selected" + return 0 + elif [[ $config == "default" ]]; then + config="" + fi - NVIM_APPNAME=$config nvim $@ + NVIM_APPNAME=$config nvim $@ } - -bindkey -s ^a "vis\n" diff --git a/chezmoi/dot_config/zsh/aliases/silverblue.zsh b/chezmoi/dot_config/zsh/aliases/silverblue.zsh deleted file mode 100644 index 63b1570..0000000 --- a/chezmoi/dot_config/zsh/aliases/silverblue.zsh +++ /dev/null @@ -1,2 +0,0 @@ -alias \ - sb-list='ostree remote refs fedora | grep "[0-9]\{2\}\/x86_64\/[a-z]\+$"' diff --git a/chezmoi/executable_dot_zshrc b/chezmoi/executable_dot_zshrc index 212d307..bf0d1b5 100644 --- a/chezmoi/executable_dot_zshrc +++ b/chezmoi/executable_dot_zshrc @@ -115,12 +115,24 @@ zstyle ':completion:*' menu no zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath' zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' + +# ╭──────────────────────────────────────────────────────────╮ +# │ ZSH Options │ +# ╰──────────────────────────────────────────────────────────╯ +setopt EXTENDED_GLOB +setopt DOT_GLOB +setopt GLOB_DOTS + # ╭──────────────────────────────────────────────────────────╮ # │ Source other files │ # ╰──────────────────────────────────────────────────────────╯ -source $HOME/.config/zsh/**/*.zsh source $HOME/.config/fzf/fzfrc +# this prevents errors and not loading some files +for file in $HOME/.config/zsh/**/*.zsh; do + source $file +done + # ╭──────────────────────────────────────────────────────────╮ # │ Init external programs │ # ╰──────────────────────────────────────────────────────────╯