refractor: Reorganise dotfiles structures

This commit is contained in:
js0ny 2024-11-29 23:28:18 +00:00
parent 2bd9138a5f
commit bd5ca49c3e
131 changed files with 43 additions and 114 deletions

16
platforms/wsl/.bashrc Normal file
View file

@ -0,0 +1,16 @@
# Append to original bashrc for minimal setup
# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc
bind 'set show-mode-in-prompt on'
set -o vi
bind -m vi-command '"n": next-history'
bind -m vi-command '"e": previous-history'
bind -m vi-command '"l": vi-insertion-mode'
bind -m vi-command '"L": vi-insert-beg'
bind -m vi-command '"i": forward-char'
# bind -m vi-insert '"\C-r": reverse-search-history"'
# bind -m vi-insert '"\C-l": clear-screen'
bind -m vi-command '"j": vi-end-word'
bind -m vi-command '"J": vi-end-word'

83
platforms/wsl/.zshrc Normal file
View file

@ -0,0 +1,83 @@
# $XDG_CONFIG_HOME/zsh/.zshrc
# ln -s $DOTFILES/wsl/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc
### Variables ###
export IS_WSL=true
export DOTFILES="$HOME/.dotfiles"
for file in $DOTFILES/zsh/*.zsh; do
source $file
done
source $DOTFILES/wsl/winterop.zsh
source $ZDOTDIR/.zprivate.zsh
export ARCHFLAGS="-arch x86_64"
# Absolute navigation
alias src="cd ~/Source && ls"
alias dotfiles="cd $DOTFILES && ls"
### WSL Options ###
# WSL open
open() {
local target=$1
if command -v explorer.exe > /dev/null; then
explorer.exe "$target"
else
command open "$target"
fi
}
# WSL Neovide
gvi() {
local target=$1
if command -v neovide.exe > /dev/null; then
neovide.exe "$target"
else
if command -v neovide > /dev/null; then
neovide "$target"
else
echo "neovide is not installed"
fi
fi
}
### Misc ###
export PATH=/opt/bin:$PATH
# Conda #
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/js0ny/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/js0ny/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/js0ny/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/js0ny/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
if [ -f /usr/share/doc/pkgfile/command-not-found.sh ]; then
source /usr/share/doc/pkgfile/command-not-found.sh
fi
# vcpkg
export VCPKG_ROOT=~/vcpkg
# Package Manager
alias pac="sudo pacman"
alias paci="sudo pacman -S"
alias pacr="sudo pacman -R"
alias pacu="sudo pacman -Syu"

View file

@ -0,0 +1,15 @@
alias clip="clip.exe"
alias xclip="clip.exe"
alias paste='pwsh.exe -NoProfile -Command "Get-Clipboard"'
alias dark-mode='pwsh.exe -Command "dark-mode" 2>&1 /dev/null'
alias winfetch='pwsh.exe -NoProfile -Command "winfetch"'
alias psw="tasklist.exe"
alias killw="taskkill.exe"
alias shutdownw="shutdown.exe /s /t 0"
alias rebootw="shutdown.exe /r /t 0"
alias ipconfig="ipconfig.exe"
alias netstatw="netstat.exe"
alias diskpart="diskpart.exe"
alias winget="winget.exe"
alias pastew='pwsh.exe -NoProfile -Command "Get-Clipboard"'
alias ollama="ollama.exe"