feat(zsh): Manually manage plugins without omz

This commit is contained in:
js0ny 2024-11-17 14:32:18 +00:00
parent 556eca6b1d
commit 8288945608
5 changed files with 37 additions and 26 deletions

View file

@ -12,7 +12,7 @@ return {
opts = { opts = {
workspaces = { workspaces = {
{ {
name = "All", name = "Obsidian",
path = "~/Obsidian", path = "~/Obsidian",
}, },
}, },

View file

@ -6,8 +6,8 @@ $DOTFILES = "$HOME/.dotfiles"
### Load Configs ### ### Load Configs ###
Get-ChildItem -Path $DOTFILES\powershell -Filter *.ps1 | ForEach-Object {. $_} Get-ChildItem -Path $DOTFILES/powershell -Filter *.ps1 | ForEach-Object {. $_}
Get-ChildItem -Path $DOTFILES\powershell_private -Filter *.ps1 | ForEach-Object {. $_} Get-ChildItem -Path $DOTFILES/powershell_private -Filter *.ps1 | ForEach-Object {. $_}
## Aliases ### ## Aliases ###

View file

@ -1,6 +1,7 @@
# PowerShell Equivalent # # PowerShell Equivalent #
alias ni=touch alias ni=touch
alias cls=clear alias cls=clear
alias ii=open
# Dev # # Dev #
alias g++='g++ -std=c++2b' # Set the default C++ standard to C++20 alias g++='g++ -std=c++2b' # Set the default C++ standard to C++20
@ -9,10 +10,11 @@ alias cl='clang -std=c99'
alias clpp='clang++ -std=c++2b' alias clpp='clang++ -std=c++2b'
alias python=python3 # Set the default Python version to Python 3 alias python=python3 # Set the default Python version to Python 3
alias py=python # Alias for Python alias py=python # Alias for Python
alias pip=pip3 # Alias for pip
alias bashcfg="nvim ~/.bashrc" alias bashcfg="nvim ~/.bashrc"
alias zshcfg="nvim ~/.zshrc" alias zshcfg="nvim ~/.zshrc"
alias shcfg=zshcfg alias shcfg=zshcfg
alias reload="source ~/.zshrc" alias reload="source $ZDOTDIR/.zshrc"
alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/" alias nvimrc="nvim $XDG_CONFIG_HOME/nvim/"
alias ohmyzsh="code ~/.oh-my-zsh" alias ohmyzsh="code ~/.oh-my-zsh"
alias pulldots="cd $DOTFILES && git pull" alias pulldots="cd $DOTFILES && git pull"
@ -27,6 +29,9 @@ alias pymkenv="conda create --name"
alias v=nvim alias v=nvim
alias c=code alias c=code
# lsd #
alias ls='lsd -a'
alias l='lsd -lah'
# Misc # # Misc #
alias cf=cfiles alias cf=cfiles

View file

@ -1,29 +1,22 @@
### ZSH Config ### # ZSH Config #
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
export ZSH="$ZDOTDIR/ohmyzsh"
ZSH_THEME="avit"
# DISABLE_MAGIC_FUNCTIONS="true"
# DISABLE_LS_COLORS="true"
# DISABLE_AUTO_TITLE="true"
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="yyyy-mm-dd" HIST_STAMPS="yyyy-mm-dd"
plugins=(git web-search jsontools z vi-mode zsh-syntax-highlighting zsh-autosuggestions) # plugins=(git web-search jsontools z vi-mode zsh-syntax-highlighting zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
source .private.env.sh
# export MANPATH="/usr/local/man:$MANPATH" # Plugins (Manually Managed) #
# export LANG= "en_US.UTF-8" # $ZDOTDIR/plugins
# Use XDG Base Directory Specification source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZDOTDIR/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
# Tools Related Environment Variables #
PAGER="less"
EDITOR="nvim"
VISUAL="nvim"
# Use XDG Base Directory Specification #
# ~/.dotnet -> $XDG_DATA_HOME/dotnet # ~/.dotnet -> $XDG_DATA_HOME/dotnet
export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet

13
zsh/update.sh Normal file
View file

@ -0,0 +1,13 @@
# $DOTFILES/zsh/update.sh
# This file won't be sourced by zsh by default
# Use `source` to run this file for updating plugins
# Plugins #
# Auto `git pull` on $ZDOTDIR/plugins
for plugin in $ZDOTDIR/plugins/*; do
if [ -d "$plugin" ]; then
cd $plugin
git pull --quiet --no-edit
fi
done