diff --git a/.config/nvim/lua/user/alpha.lua b/.config/nvim/lua/user/alpha.lua index b874570b..9fb30c46 100644 --- a/.config/nvim/lua/user/alpha.lua +++ b/.config/nvim/lua/user/alpha.lua @@ -28,7 +28,7 @@ local function footer() -- local fortune = handle:read('*a') -- handle:close() -- return fortune - return "chrisatmachine.com" + return "" end dashboard.section.footer.val = footer() diff --git a/.config/nvim/lua/user/autocommands.lua b/.config/nvim/lua/user/autocommands.lua index bf23c238..17df3566 100644 --- a/.config/nvim/lua/user/autocommands.lua +++ b/.config/nvim/lua/user/autocommands.lua @@ -19,8 +19,8 @@ vim.cmd([[ augroup _markdown autocmd! - autocmd FileType markdown setlocal wrap - autocmd FileType markdown setlocal spell + autocmd FileType markdown,vimwiki setlocal wrap + autocmd FileType markdown,vimwiki setlocal spell augroup end augroup _auto_resize @@ -40,6 +40,7 @@ vim.cmd([[ augroup _run autocmd! + autocmd FileType python imap wexec '!python3' shellescape(@%, 1) autocmd FileType python map wexec '!python3' shellescape(@%, 1) autocmd FileType rust imap wexec '!cargo run' autocmd FileType rust map wexec '!cargo run' diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 45b550ae..29f84c67 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -66,7 +66,6 @@ return packer.startup(function(use) -- Vimwiki use("vimwiki/vimwiki") - use("jbyuki/carrot.nvim") -- Colorschemes use("Mofiqul/dracula.nvim") diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc new file mode 100644 index 00000000..008dea38 --- /dev/null +++ b/.config/shell/aliasrc @@ -0,0 +1,49 @@ +#!/bin/sh + +# Use neovim for vim if present +[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d" + +# Use $XINITRC variable of file exists +[ -f "$XINITRC" ] && alias startx="startx $XINITRC" + +# doas not required for some system commands +for command in mount umount sv pacman updatedb su shutdown poweroff reboot zzz systemctl ; do + alias $command="doas $command" +done; unset command + +# Vervosity and settings that you pretty much just always are going to wand +alias \ + cp="cp -iv" \ + mv="mv -iv" \ + rm="rm -vI" \ + bc="bc -ql" \ + mkdir="mkdir -pv" \ + df="df -h" \ + nsxiv="nsxiv -a" + +# Colorize commands when possible +alias \ + ls="exa -a --icons --group-directories-first" \ + grep="rg --color=auto" \ + diff="diff --color=auto" \ + ip="ip -color=auto" + +# These common commands ate just too long! Abbriviate them +alias \ + g="git" \ + ga="git add" \ + gc="git commit" \ + gp="git push" \ + e="$EDITOR" \ + v="$EDITOR" \ + battery="acpi" \ + code="vscodium" \ + dv="doasedit" \ + matrix="unimatrix -s 95" \ + py="python" \ + airpods="bluetoothctl connect C8:B1:CD:E0:14:4F" \ + lf="lfrun" \ + weather="curl wttr.in/" \ + ww="$EDITOR ~/vimwiki/index.wiki" \ + day="redshift -PO 6500" \ + night="redshift -PO 4500" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 191c76a2..3bdb9ed4 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -33,11 +33,13 @@ zmodload zsh/complist compinit _comp_options+=(globdots) # Include hidden files -HISTFILE=~/.config/zsh/.zshistory -HISTSIZE=10000 -SAVEHIST=10000 +HISTSIZE=1000000 +SAVEHIST=1000000 +HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history" WORDCHARS=${WORDCHARS//\/[&.;]/} # Don't consider certain part of the word +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" + # theme/plugins source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null @@ -119,35 +121,6 @@ bindkey -M visual '^[[P' vi-delete bindkey -s '^n' '^unvim .\n' -# Aliases -alias airpods='bluetoothctl connect C8:B1:CD:E0:14:4F' -alias battery='acpi' -alias code='vscodium' -alias cp='cp -iv' # Confirm before overwriting something -alias df='df -h' # Human-readable sizes -alias diff='diff --color=auto' -alias dv='doasedit' -alias free='free -m' # Show sizes in MB -alias gitu='git add . && git commit && git push' -alias grep='grep --color=auto' -alias grep='rg' -alias ip='ip -color=auto' -alias lf='lfrun' -alias ls='exa -a --icons --group-directories-first' -alias matrix='unimatrix -s 95' -alias mkdir='mkdir -pv' -alias mv='mv -iv' -alias nsxiv='nsxiv -a' -alias pman='doas pacman' -alias py='python' -alias rm='rm -vI' -alias v='nvim' -alias weather='curl wttr.in/' -alias ww='nvim ~/vimwiki/index.wiki' -alias zzz='doas zzz' -alias day='redshift -PO 6500' -alias night='redshift -PO 4500' - source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null autoload -U promptinit