even more stuff
parent
0319114365
commit
5ee4cebaef
@ -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
|
||||
|
@ -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…
Reference in new issue