shell: zsh -> fish
This commit is contained in:
11
.config/fish/config.fish
Normal file
11
.config/fish/config.fish
Normal file
@ -0,0 +1,11 @@
|
||||
set fish_greeting
|
||||
|
||||
fish_add_path $HOME/.local/bin:$PATH
|
||||
fish_add_path $HOME/.local/share/cargo/bin:$PATH
|
||||
fish_add_path $HOME/.local/share/go/bin:$PATH
|
||||
fish_add_path $HOME/.local/share/npm/bin:$PATH
|
||||
fish_add_path $HOME/tools/nvim:$PATH
|
||||
fish_add_path $HOME/.config/scripts/applications:$PATH
|
||||
fish_add_path $HOME/.config/scripts/util:$PATH
|
||||
fish_add_path xterm # for ssh
|
||||
set EDITOR nvim
|
||||
4
.config/fish/functions/.....fish
Normal file
4
.config/fish/functions/.....fish
Normal file
@ -0,0 +1,4 @@
|
||||
function .... --wraps='cd ../../..' --description 'alias ....=cd ../../..'
|
||||
cd ../../.. $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/....fish
Normal file
4
.config/fish/functions/....fish
Normal file
@ -0,0 +1,4 @@
|
||||
function ... --wraps='cd ../..' --description 'alias ...=cd ../..'
|
||||
cd ../.. $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/...fish
Normal file
4
.config/fish/functions/...fish
Normal file
@ -0,0 +1,4 @@
|
||||
function .. --description 'alias ..=cd ..'
|
||||
cd .. $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/c.fish
Normal file
4
.config/fish/functions/c.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function c --wraps=clear --description 'alias c=clear'
|
||||
clear $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/cl.fish
Normal file
4
.config/fish/functions/cl.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function cl --wraps='clear && ls' --description 'alias cl=clear && ls'
|
||||
clear && ls $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/cll.fish
Normal file
4
.config/fish/functions/cll.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function cll --wraps='clear && ls -lah' --description 'alias cll=clear && ls -lah'
|
||||
clear && ls -lah $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/dots.fish
Normal file
4
.config/fish/functions/dots.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function dots --wraps='/usr/bin/git --git-dir=$HOME/docs/git/dotfiles.git --work-tree=$HOME' --description 'alias dots=/usr/bin/git --git-dir=$HOME/docs/git/dotfiles.git --work-tree=$HOME'
|
||||
/usr/bin/git --git-dir=$HOME/docs/git/dotfiles.git --work-tree=$HOME $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/fzfcd.fish
Normal file
4
.config/fish/functions/fzfcd.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function fzfcd --wraps='source ~/.config/scripts/util/cdfzf' --description 'alias fzfcd=source ~/.config/scripts/util/cdfzf'
|
||||
source ~/.config/scripts/util/cdfzf $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/grep.fish
Normal file
4
.config/fish/functions/grep.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function grep --description 'alias grep=grep --color=auto'
|
||||
command grep --color=auto $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/hc.fish
Normal file
4
.config/fish/functions/hc.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function hc --wraps=herbstclient --description 'alias hc=herbstclient'
|
||||
herbstclient $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/ll.fish
Normal file
4
.config/fish/functions/ll.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function ll --wraps='ls -lah' --description 'alias ll=ls -lah'
|
||||
ls -lah $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/n.fish
Normal file
4
.config/fish/functions/n.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function n --wraps=nvim --description 'alias n=nvim'
|
||||
nvim $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/oomox-wal.fish
Normal file
4
.config/fish/functions/oomox-wal.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function oomox-wal --wraps='oomox-cli -o wal -t ~/.local/share/themes ~/.cache/wal/colors-oomox' --description 'alias oomox-wal=oomox-cli -o wal -t ~/.local/share/themes ~/.cache/wal/colors-oomox'
|
||||
oomox-cli -o wal -t ~/.local/share/themes ~/.cache/wal/colors-oomox $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/pm.fish
Normal file
4
.config/fish/functions/pm.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function pm --wraps=pulsemixer --description 'alias pm=pulsemixer'
|
||||
pulsemixer $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/py.fish
Normal file
4
.config/fish/functions/py.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function py --wraps=python --description 'alias py=python'
|
||||
python $argv
|
||||
|
||||
end
|
||||
4
.config/fish/functions/yeet.fish
Normal file
4
.config/fish/functions/yeet.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function yeet --wraps='pikaur -Rsn' --description 'alias yeet=pikaur -Rsn'
|
||||
pikaur -Rsn $argv
|
||||
|
||||
end
|
||||
@ -1 +0,0 @@
|
||||
source $ZDOTDIR/zshrc
|
||||
@ -1,38 +0,0 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# time savers
|
||||
alias rezsh="source ~/.config/zsh/zshrc"
|
||||
alias xclipboard="xclip -selection clipboard"
|
||||
alias dots='/usr/bin/git --git-dir=$HOME/docs/git/dotfiles.git --work-tree=$HOME'
|
||||
alias cdto='source ~/.config/scripts/util/cdto'
|
||||
alias fzfcd='source ~/.config/scripts/util/cdfzf'
|
||||
alias oomox-wal='oomox-cli -o wal -t ~/.local/share/themes ~/.cache/wal/colors-oomox'
|
||||
mpvyt() {mpv https://youtu.be/$1}
|
||||
mc() {mkdir -p $1 && cd $1}
|
||||
chtsh() {curl cht.sh/$1}
|
||||
|
||||
# applications
|
||||
alias n="nvim"
|
||||
alias c="clear"
|
||||
alias p="pikaur"
|
||||
alias nq="nvim-qt"
|
||||
alias py="python"
|
||||
alias hc="herbstclient"
|
||||
alias pm="pulsemixer"
|
||||
|
||||
# flags
|
||||
# alias cp="cp -i -r"
|
||||
# alias mv="mv -i"
|
||||
# alias rm="rm -Ir"
|
||||
alias ll="ls -lah"
|
||||
alias cl="clear && ls"
|
||||
alias cll="clear && ls -lah"
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
# cd ..
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
|
||||
# I actually use this one
|
||||
alias yeet="pikaur -Rsn"
|
||||
@ -1,38 +0,0 @@
|
||||
# prompt
|
||||
autoload -U colors && colors
|
||||
PS1="%B%{$fg[cyan]%}%n%{$reset_color%}@%M %~ $%b "
|
||||
|
||||
# vi mode
|
||||
bindkey -v
|
||||
|
||||
# history config
|
||||
HISTFILE=$XDG_CACHE_HOME/zsh/histfile
|
||||
HISTSIZE=5000
|
||||
SAVEHIST=5000
|
||||
setopt histignorespace
|
||||
|
||||
# history search
|
||||
autoload -U history-search-end
|
||||
autoload -Uz compinit && compinit
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
bindkey "^[[A" history-beginning-search-backward-end
|
||||
bindkey "^[[B" history-beginning-search-forward-end
|
||||
|
||||
#
|
||||
# paths & variables
|
||||
#
|
||||
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
export PATH=$HOME/.local/share/cargo/bin:$PATH
|
||||
export PATH=$HOME/.local/share/go/bin:$PATH
|
||||
export PATH=$HOME/.local/share/npm/bin:$PATH
|
||||
export PATH=$HOME/tools/nvim:$PATH
|
||||
export PATH=$HOME/.config/scripts/applications:$PATH
|
||||
export PATH=$HOME/.config/scripts/util:$PATH
|
||||
export TERM=xterm # for ssh
|
||||
export EDITOR=nvim
|
||||
|
||||
# sources
|
||||
source $ZDOTDIR/aliases
|
||||
source $XDG_DATA_HOME/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
43
.zshenv
43
.zshenv
@ -1,43 +0,0 @@
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
|
||||
export ZDOTDIR=$XDG_CONFIG_HOME/zsh
|
||||
|
||||
# cleanup
|
||||
export ANDROID_HOME="$XDG_DATA_HOME"/android
|
||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
||||
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
||||
export GDBHISTFILE="$XDG_DATA_HOME"/gdb/history
|
||||
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
||||
export GOPATH="$XDG_DATA_HOME"/go
|
||||
export ICEAUTHORITY="$XDG_CACHE_HOME"/ICEauthority
|
||||
export IPYTHONDIR="$XDG_CONFIG_HOME"/ipython
|
||||
export LESSHISTFILE=-
|
||||
export MYPY_CACHE_DIR="$XDG_CACHE_HOME"/mypy
|
||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
|
||||
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
||||
export SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history
|
||||
export UNCRUSTIFY_CONFIG="$XDG_CONFIG_HOME"/uncrustify/uncrustify.cfg
|
||||
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
||||
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
|
||||
|
||||
# wine prefix
|
||||
export WINEPREFIX="$XDG_DATA_HOME/wine/"
|
||||
|
||||
# kvantum
|
||||
export QT_STYLE_OVERRIDE=kvantum
|
||||
|
||||
# use nvim for stuff
|
||||
export EDITOR=nvim
|
||||
export MANPAGER=nvimpager
|
||||
|
||||
[ ! -d "$XDG_CACHE_HOME/zsh/" ] && mkdir -p $XDG_CACHE_HOME/zsh
|
||||
[ ! -d "$XDG_DATA_HOME/zsh/" ] && mkdir -p $XDG_DATA_HOME/zsh
|
||||
[ ! -d "$XDG_CONFIG_HOME/zsh/zshrc" ] && source "$XDG_CONFIG_HOME/zsh/zshrc"
|
||||
if [ ! -d "$XDG_DATA_HOME/zsh/zsh-syntax-highlighting" ]; then
|
||||
cd $XDG_DATA_HOME/zsh
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
cd
|
||||
fi
|
||||
Reference in New Issue
Block a user