parent
a282cf4d63
commit
8789a2a83e
33 changed files with 37 additions and 24 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
fish/fish_variables
|
||||
nvim/plugin/packer_compiled.lua
|
||||
cli/.config/zsh/local.zsh
|
||||
cli/.config/fish/fish_variables
|
||||
cli/.config/nvim/plugin/packer_compiled.lua
|
||||
|
|
2
cli/.config/bat/config
Normal file
2
cli/.config/bat/config
Normal file
|
@ -0,0 +1,2 @@
|
|||
--theme=gruvbox-dark
|
||||
--italic-text=always
|
|
@ -1,3 +1,8 @@
|
|||
# Fuck default aliases
|
||||
unalias -a
|
||||
|
||||
testbin() { whence $@ > /dev/null }
|
||||
|
||||
termcompat() {
|
||||
typeset term=$TERM
|
||||
case $term in
|
||||
|
@ -34,15 +39,21 @@ fixterm() { printf $'c' }
|
|||
|
||||
diff() { command diff --color $@ }
|
||||
tailf() { command less +F $@ }
|
||||
rgrep() { command grep --exclude-dir=\.git -R $@ }
|
||||
grep() { command grep --color=auto }
|
||||
rgrep() { grep --color=auto --exclude-dir=\.git -R $@ }
|
||||
fwcmd() { command firewall-cmd $@ }
|
||||
sush() { command sudo -Es }
|
||||
s() { termcompat ssh $@ }
|
||||
|
||||
nv() { command nvim $@ }
|
||||
if testbin nvim; then
|
||||
vi() { command nvim $@ }
|
||||
vim() { command nvim $@ }
|
||||
fi
|
||||
|
||||
tmux() { command tmux -2 $@ }
|
||||
atmux() { tmux attach || tmux }
|
||||
|
||||
g() { command lazygit $@ }
|
||||
tig() { termcompat tig $@ }
|
||||
gsi() { tig status }
|
||||
gci() { command git commit $@ }
|
||||
|
@ -62,13 +73,13 @@ greset() {
|
|||
/usr/bin/git reset --hard
|
||||
}
|
||||
|
||||
if [[ -x $(whence -p diff-so-fancy) ]]; then
|
||||
if testbin diff-so-fancy; then
|
||||
gdf() { gdiff $@ | command diff-so-fancy | command less --tabs=4 -RSFX }
|
||||
else
|
||||
gdf() { gdiff $@ }
|
||||
fi
|
||||
|
||||
if [[ -x $(whence -p exa) ]]; then
|
||||
if testbin exa; then
|
||||
ls() { command exa --group-directories-first $@ }
|
||||
ll() { ls -alg $@ }
|
||||
ld() { ls -dlg $@ }
|
||||
|
@ -79,7 +90,7 @@ else
|
|||
fi
|
||||
|
||||
# grc
|
||||
if [[ -x $(whence -p grc) ]]; then
|
||||
if testbin grc; then
|
||||
cmds=(\
|
||||
cc configure cvs df dig gcc gmake id ip last lsof make mount \
|
||||
mtr netstat ping ping6 ps tcpdump traceroute traceroute6 \
|
16
cli/.zshrc
Normal file
16
cli/.zshrc
Normal file
|
@ -0,0 +1,16 @@
|
|||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
confdir=$HOME/.config/zsh
|
||||
conflist=(
|
||||
settings.zsh
|
||||
powerline.zsh
|
||||
functions.zsh
|
||||
local.zsh
|
||||
)
|
||||
|
||||
for conf in $conflist; do
|
||||
[[ -f $confdir/$conf ]] && . $confdir/$conf
|
||||
done
|
||||
|
||||
unset conf confdir conflist
|
17
zsh/init.zsh
17
zsh/init.zsh
|
@ -1,17 +0,0 @@
|
|||
# Source me via an absolute path
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# We rely on absolute path here, so don't do anything if it's relative
|
||||
[[ $0[1] != / ]] && return
|
||||
|
||||
confdir=$(dirname $0)
|
||||
conflist=(
|
||||
settings.zsh
|
||||
powerline.zsh
|
||||
functions.zsh
|
||||
)
|
||||
|
||||
for config in $conflist; do
|
||||
[[ -r $confdir/$config ]] && . $confdir/$config
|
||||
done
|
Loading…
Reference in a new issue