diff --git a/.gitignore b/.gitignore index a959aa7..d0ace42 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/bashrc b/cli/.bashrc similarity index 100% rename from bashrc rename to cli/.bashrc diff --git a/cli/.config/bat/config b/cli/.config/bat/config new file mode 100644 index 0000000..e7704bd --- /dev/null +++ b/cli/.config/bat/config @@ -0,0 +1,2 @@ +--theme=gruvbox-dark +--italic-text=always diff --git a/fish/config.fish b/cli/.config/fish/config.fish similarity index 100% rename from fish/config.fish rename to cli/.config/fish/config.fish diff --git a/nvim/init.lua b/cli/.config/nvim/init.lua similarity index 100% rename from nvim/init.lua rename to cli/.config/nvim/init.lua diff --git a/nvim/lua/maps.lua b/cli/.config/nvim/lua/maps.lua similarity index 100% rename from nvim/lua/maps.lua rename to cli/.config/nvim/lua/maps.lua diff --git a/nvim/lua/packer_init.lua b/cli/.config/nvim/lua/packer_init.lua similarity index 100% rename from nvim/lua/packer_init.lua rename to cli/.config/nvim/lua/packer_init.lua diff --git a/nvim/lua/plugins.lua b/cli/.config/nvim/lua/plugins.lua similarity index 100% rename from nvim/lua/plugins.lua rename to cli/.config/nvim/lua/plugins.lua diff --git a/nvim/lua/settings.lua b/cli/.config/nvim/lua/settings.lua similarity index 100% rename from nvim/lua/settings.lua rename to cli/.config/nvim/lua/settings.lua diff --git a/zsh/functions.zsh b/cli/.config/zsh/functions.zsh similarity index 85% rename from zsh/functions.zsh rename to cli/.config/zsh/functions.zsh index 216c847..2996bb8 100644 --- a/zsh/functions.zsh +++ b/cli/.config/zsh/functions.zsh @@ -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 \ diff --git a/zsh/powerline.zsh b/cli/.config/zsh/powerline.zsh similarity index 100% rename from zsh/powerline.zsh rename to cli/.config/zsh/powerline.zsh diff --git a/zsh/settings.zsh b/cli/.config/zsh/settings.zsh similarity index 100% rename from zsh/settings.zsh rename to cli/.config/zsh/settings.zsh diff --git a/doom/config.el b/cli/.doom.d/config.el similarity index 100% rename from doom/config.el rename to cli/.doom.d/config.el diff --git a/doom/init.el b/cli/.doom.d/init.el similarity index 100% rename from doom/init.el rename to cli/.doom.d/init.el diff --git a/doom/packages.el b/cli/.doom.d/packages.el similarity index 100% rename from doom/packages.el rename to cli/.doom.d/packages.el diff --git a/inputrc b/cli/.inputrc similarity index 100% rename from inputrc rename to cli/.inputrc diff --git a/defunct/nanorc b/cli/.nanorc similarity index 100% rename from defunct/nanorc rename to cli/.nanorc diff --git a/defunct/screenrc b/cli/.screenrc similarity index 100% rename from defunct/screenrc rename to cli/.screenrc diff --git a/tigrc b/cli/.tigrc similarity index 100% rename from tigrc rename to cli/.tigrc diff --git a/tmux.conf b/cli/.tmux.conf similarity index 100% rename from tmux.conf rename to cli/.tmux.conf diff --git a/vimplugrc b/cli/.vimplugrc similarity index 100% rename from vimplugrc rename to cli/.vimplugrc diff --git a/vimrc b/cli/.vimrc similarity index 100% rename from vimrc rename to cli/.vimrc diff --git a/cli/.zshrc b/cli/.zshrc new file mode 100644 index 0000000..f116dc9 --- /dev/null +++ b/cli/.zshrc @@ -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 diff --git a/defunct/alacritty.yml b/gui/.config/alacritty/alacritty.yml similarity index 100% rename from defunct/alacritty.yml rename to gui/.config/alacritty/alacritty.yml diff --git a/kitty.conf b/gui/.config/kitty/kitty.conf similarity index 100% rename from kitty.conf rename to gui/.config/kitty/kitty.conf diff --git a/wezterm.lua b/gui/.wezterm.lua similarity index 100% rename from wezterm.lua rename to gui/.wezterm.lua diff --git a/defunct/xresources b/lnx/.Xresources similarity index 100% rename from defunct/xresources rename to lnx/.Xresources diff --git a/defunct/foot.ini b/lnx/.config/foot/foot.ini similarity index 100% rename from defunct/foot.ini rename to lnx/.config/foot/foot.ini diff --git a/defunct/i3_config b/lnx/.config/i3/config similarity index 100% rename from defunct/i3_config rename to lnx/.config/i3/config diff --git a/defunct/i3status-rust_config.toml b/lnx/.config/i3status-rust/config.toml similarity index 100% rename from defunct/i3status-rust_config.toml rename to lnx/.config/i3status-rust/config.toml diff --git a/defunct/sway_config b/lnx/.config/sway/config similarity index 100% rename from defunct/sway_config rename to lnx/.config/sway/config diff --git a/defunct/dunstrc b/lnx/.dunstrc similarity index 100% rename from defunct/dunstrc rename to lnx/.dunstrc diff --git a/zsh/init.zsh b/zsh/init.zsh deleted file mode 100644 index 175c684..0000000 --- a/zsh/init.zsh +++ /dev/null @@ -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