even more stuff

master
Drake 2 years ago
parent 0319114365
commit 5ee4cebaef

File diff suppressed because it is too large Load Diff

@ -0,0 +1,73 @@
call plug#begin('~/.vim/plugged')
Plug 'sainnhe/sonokai'
Plug 'dstein64/vim-startuptime'
call plug#end()
" ASSORTED SHIT
syntax on
set termguicolors
set mouse=a
set number
set tabstop=4
set shiftwidth=4
" SONOKAI CONFIG
let g:sonokai_style = 'atlantis'
let g:sonokai_diagnostic_line_highlight = 1
let g:sonokai_diagnostic_virtual_text = 'colored'
let g:sonokai_current_word = 'underline'
let g:sonokai_better_performance = 1
colorscheme sonokai
" STATUSLINE SHIT
set laststatus=2
set statusline=
set statusline+=%1*
set statusline+= 
set statusline+=%{StatuslineMode()}
set statusline+= 
set statusline+=%2*
set statusline+=
set statusline+=%4*
set statusline+= 
set statusline+=%f
set statusline+=%=
set statusline+=%2*
set statusline+=
set statusline+=%1*
set statusline+= 
set statusline+=%y
set statusline+= 
hi User1 gui=bold cterm=bold guibg=#7ad5f1 guifg=black
hi User2 guifg=#7ad5f1 guibg=#2a2f38
hi User4 guibg=#2a2f38 guifg=white
function! StatuslineMode()
let l:mode=mode()
if l:mode==#"n"
return "NORMAL"
elseif l:mode==?"v"
return "VISUAL"
elseif l:mode==#"i"
return "INSERT"
elseif l:mode==#"R"
return "REPLACE"
elseif l:mode==?"s"
return "SELECT"
elseif l:mode==#"t"
return "TERMINAL"
elseif l:mode==#"c"
return "COMMAND"
elseif l:mode==#"!"
return "SHELL"
endif
endfunction
function! CheckUserAndComplainOtherwise()
if $USER=="root"
call input("You are running as root. Here be dragons! ")
endif
endfunction
autocmd VimEnter * call CheckUserAndComplainOtherwise()

@ -0,0 +1,41 @@
# Start configuration added by Zim install {{{
# -------
# Modules
# -------
# Sets sane Zsh built-in environment options.
zmodule environment
# Provides handy git aliases and functions.
zmodule git
# Applies correct bindkeys for input events.
zmodule input
#
# Prompt
#
# Exposes to prompts how long the last command took to execute, used by asciiship.
zmodule duration-info
# Exposes git repository status information to prompts, used by asciiship.
zmodule git-info
# Additional completion definitions for Zsh.
zmodule zsh-users/zsh-completions
# Enables and configures smart and extensive tab completion.
# completion must be sourced after zsh-users/zsh-completions
zmodule completion
# Fish-like autosuggestions for Zsh.
zmodule zsh-users/zsh-autosuggestions
# Fish-like syntax highlighting for Zsh.
# zsh-users/zsh-syntax-highlighting must be sourced after completion
zmodule zsh-users/zsh-syntax-highlighting
# Fish-like history search (up arrow) for Zsh.
# zsh-users/zsh-history-substring-search must be sourced after zsh-users/zsh-syntax-highlighting
zmodule zsh-users/zsh-history-substring-search
zmodule romkatv/powerlevel10k
zmodule romkatv/zsh-prompt-benchmark
zmodule zpm-zsh/ls
zmodule larkery/zsh-histdb
zmodule ajeetdsouza/zoxide
zmodule asdf
zmodule termtitle

@ -0,0 +1,9 @@
# Start configuration added by Zim install {{{
#
# User configuration sourced by all invocations of the shell
#
# Define Zim location
: ${ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim}
# }}} End configuration added by Zim install

103
.zshrc

@ -0,0 +1,103 @@
#Drake's Early Shit
#Apparently, P10k removes tty access, so we need to define it up here to fix that
export GPG_TTY=$(tty)
GITSTATUS_LOG_LEVEL=DEBUG
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Set editor default keymap to emacs (`-e`) or vi (`-v`)
bindkey -e
# Remove path separator from WORDCHARS.
WORDCHARS=${WORDCHARS//[\/]}
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=242'
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
# Update static initialization script if it does not exist or it's outdated, before sourcing it
source ${ZIM_HOME}/zimfw.zsh init -q
fi
source ${ZIM_HOME}/init.zsh
# Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# Bind up and down keys
zmodload -F zsh/terminfo +p:terminfo
if [[ -n ${terminfo[kcuu1]} && -n ${terminfo[kcud1]} ]]; then
bindkey ${terminfo[kcuu1]} history-substring-search-up
bindkey ${terminfo[kcud1]} history-substring-search-down
fi
# Lines configured by zsh-newuser-install
HISTFILE=~/.zshhistory
HISTSIZE=1000
SAVEHIST=10000
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/ruthenic/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#Drake's shit
#Setup Zoxide alias
alias cd="z"
#Setup doas alias
alias sudo="doas"
#Setup $PATH
PATH="/usr/lib/jvm/graalvm16/bin:$PATH:/home/ruthenic/.local/bin:/usr/share/code"
#Make ZSH highlighting colors more Fish-like
ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=blue,underline
ZSH_HIGHLIGHT_STYLES[precommand]=fg=blue,underline
ZSH_HIGHLIGHT_STYLES[arg0]=fg=blue
#Set up general-use aliases
alias npm="pnpm"
alias xbps-search="xbps-query -Rs"
alias cat="bat"
alias micro="nvim"
alias cls="/usr/bin/clear"
#alias clear="clear;ls"
function fullpath() {
local fptmp=${PWD}
for x ($*); do local fptmp="$fptmp/$x"; done
echo $fptmp
}
function mkcd() {
mkdir $1
cd $1
}
export JAVA_HOME=${JAVA_HOME=/usr/lib/jvm/graalvm16}
_zsh_autosuggest_strategy_histdb_top() {
local query="select commands.argv from
history left join commands on history.command_id = commands.rowid
left join places on history.place_id = places.rowid
where commands.argv LIKE '$(sql_escape $1)%'
group by commands.argv
order by places.dir != '$(sql_escape $PWD)', count(*) desc limit 1"
suggestion=$(_histdb_query "$query")
}
ZSH_AUTOSUGGEST_STRATEGY=histdb_top
alias luamake=/home/ruthenic/lua-language-server/3rd/luamake/luamake
# bun completions
[ -s "/home/ruthenic/.bun/_bun" ] && source "/home/ruthenic/.bun/_bun"
# Bun
export BUN_INSTALL="/home/ruthenic/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Loading…
Cancel
Save