mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
Transfered aliases from zshrc to aliasrc
This commit is contained in:
parent
226971daa2
commit
12d9efd0d1
@ -28,7 +28,7 @@ local function footer()
|
|||||||
-- local fortune = handle:read('*a')
|
-- local fortune = handle:read('*a')
|
||||||
-- handle:close()
|
-- handle:close()
|
||||||
-- return fortune
|
-- return fortune
|
||||||
return "chrisatmachine.com"
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
dashboard.section.footer.val = footer()
|
dashboard.section.footer.val = footer()
|
||||||
|
|||||||
@ -19,8 +19,8 @@ vim.cmd([[
|
|||||||
|
|
||||||
augroup _markdown
|
augroup _markdown
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FileType markdown setlocal wrap
|
autocmd FileType markdown,vimwiki setlocal wrap
|
||||||
autocmd FileType markdown setlocal spell
|
autocmd FileType markdown,vimwiki setlocal spell
|
||||||
augroup end
|
augroup end
|
||||||
|
|
||||||
augroup _auto_resize
|
augroup _auto_resize
|
||||||
@ -40,6 +40,7 @@ vim.cmd([[
|
|||||||
|
|
||||||
augroup _run
|
augroup _run
|
||||||
autocmd!
|
autocmd!
|
||||||
|
autocmd FileType python imap <buffer> <C-b> <esc><cmd>w<CR><cmd>exec '!python3' shellescape(@%, 1)<CR>
|
||||||
autocmd FileType python map <buffer> <C-b> <cmd>w<CR><cmd>exec '!python3' shellescape(@%, 1)<CR>
|
autocmd FileType python map <buffer> <C-b> <cmd>w<CR><cmd>exec '!python3' shellescape(@%, 1)<CR>
|
||||||
autocmd FileType rust imap <buffer> <C-b> <esc><cmd>w<CR><cmd>exec '!cargo run'<CR>
|
autocmd FileType rust imap <buffer> <C-b> <esc><cmd>w<CR><cmd>exec '!cargo run'<CR>
|
||||||
autocmd FileType rust map <buffer> <C-b> <cmd>w<CR><cmd>exec '!cargo run'<CR>
|
autocmd FileType rust map <buffer> <C-b> <cmd>w<CR><cmd>exec '!cargo run'<CR>
|
||||||
|
|||||||
@ -66,7 +66,6 @@ return packer.startup(function(use)
|
|||||||
|
|
||||||
-- Vimwiki
|
-- Vimwiki
|
||||||
use("vimwiki/vimwiki")
|
use("vimwiki/vimwiki")
|
||||||
use("jbyuki/carrot.nvim")
|
|
||||||
|
|
||||||
-- Colorschemes
|
-- Colorschemes
|
||||||
use("Mofiqul/dracula.nvim")
|
use("Mofiqul/dracula.nvim")
|
||||||
|
|||||||
49
.config/shell/aliasrc
Normal file
49
.config/shell/aliasrc
Normal file
@ -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"
|
||||||
@ -33,11 +33,13 @@ zmodload zsh/complist
|
|||||||
compinit
|
compinit
|
||||||
_comp_options+=(globdots) # Include hidden files
|
_comp_options+=(globdots) # Include hidden files
|
||||||
|
|
||||||
HISTFILE=~/.config/zsh/.zshistory
|
HISTSIZE=1000000
|
||||||
HISTSIZE=10000
|
SAVEHIST=1000000
|
||||||
SAVEHIST=10000
|
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
|
||||||
WORDCHARS=${WORDCHARS//\/[&.;]/} # Don't consider certain part of the word
|
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
|
# theme/plugins
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
|
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
|
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'
|
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
|
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
||||||
|
|
||||||
autoload -U promptinit
|
autoload -U promptinit
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user