1
0
Fork 0

use stow for dotfiles (#1)

Reviewed-on: #1
This commit is contained in:
Von Random 2023-02-04 12:45:02 +02:00
parent a282cf4d63
commit 8789a2a83e
33 changed files with 37 additions and 24 deletions

5
.gitignore vendored
View file

@ -1,2 +1,3 @@
fish/fish_variables cli/.config/zsh/local.zsh
nvim/plugin/packer_compiled.lua cli/.config/fish/fish_variables
cli/.config/nvim/plugin/packer_compiled.lua

View file

2
cli/.config/bat/config Normal file
View file

@ -0,0 +1,2 @@
--theme=gruvbox-dark
--italic-text=always

View file

@ -1,3 +1,8 @@
# Fuck default aliases
unalias -a
testbin() { whence $@ > /dev/null }
termcompat() { termcompat() {
typeset term=$TERM typeset term=$TERM
case $term in case $term in
@ -34,15 +39,21 @@ fixterm() { printf $'c' }
diff() { command diff --color $@ } diff() { command diff --color $@ }
tailf() { command less +F $@ } 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 $@ } fwcmd() { command firewall-cmd $@ }
sush() { command sudo -Es } sush() { command sudo -Es }
s() { termcompat ssh $@ } s() { termcompat ssh $@ }
nv() { command nvim $@ } if testbin nvim; then
vi() { command nvim $@ }
vim() { command nvim $@ }
fi
tmux() { command tmux -2 $@ } tmux() { command tmux -2 $@ }
atmux() { tmux attach || tmux } atmux() { tmux attach || tmux }
g() { command lazygit $@ }
tig() { termcompat tig $@ } tig() { termcompat tig $@ }
gsi() { tig status } gsi() { tig status }
gci() { command git commit $@ } gci() { command git commit $@ }
@ -62,13 +73,13 @@ greset() {
/usr/bin/git reset --hard /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 } gdf() { gdiff $@ | command diff-so-fancy | command less --tabs=4 -RSFX }
else else
gdf() { gdiff $@ } gdf() { gdiff $@ }
fi fi
if [[ -x $(whence -p exa) ]]; then if testbin exa; then
ls() { command exa --group-directories-first $@ } ls() { command exa --group-directories-first $@ }
ll() { ls -alg $@ } ll() { ls -alg $@ }
ld() { ls -dlg $@ } ld() { ls -dlg $@ }
@ -79,7 +90,7 @@ else
fi fi
# grc # grc
if [[ -x $(whence -p grc) ]]; then if testbin grc; then
cmds=(\ cmds=(\
cc configure cvs df dig gcc gmake id ip last lsof make mount \ cc configure cvs df dig gcc gmake id ip last lsof make mount \
mtr netstat ping ping6 ps tcpdump traceroute traceroute6 \ mtr netstat ping ping6 ps tcpdump traceroute traceroute6 \

View file

View file

16
cli/.zshrc Normal file
View 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

View file

@ -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