initial commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf];
|
||||
home.file.".p10k.zsh".source = ./p10k;
|
||||
programs.direnv.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# dotDir = "$HOME/.config/zsh";
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "powerlevel10k-config";
|
||||
src = lib.cleanSource ./p10k;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
# theme = "af-magic";
|
||||
# theme = "powerlevel10k/powerlevel10k";
|
||||
plugins = ["git" "history-substring-search" "colored-man-pages"];
|
||||
};
|
||||
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
# zsh sheeee
|
||||
initExtraFirst = ''
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
'';
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,185 @@
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt nomatch autocd
|
||||
# unsetopt autocd beep extendedglob notify
|
||||
unsetopt beep extendedglob notify
|
||||
bindkey -v
|
||||
zstyle :compinstall filename '/home/synchronous/.zshrc'
|
||||
|
||||
export PATH=/home/synchronous/.local/bin:$PATH
|
||||
export PATH=/home/synchronous/.cargo/bin/:$PATH
|
||||
export NIX_PATH=/home/synchronous/nix-cfg
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# ==== binding keys ====
|
||||
|
||||
bindkey '^ ' autosuggest-accept
|
||||
|
||||
# ==== holy fuck aliases ====
|
||||
|
||||
# make sure i get the right version of python
|
||||
alias python='python3'
|
||||
|
||||
alias pls='sudo'
|
||||
alias please='sudo'
|
||||
|
||||
# fuck
|
||||
alias fuck="sudo !!"
|
||||
|
||||
# neovim
|
||||
alias vi='nvim'
|
||||
alias vim='nvim'
|
||||
alias n="nvim"
|
||||
alias neovim='nvim'
|
||||
alias v='nvim'
|
||||
|
||||
# duplicate current alacritty unit
|
||||
alias dupe='setsid alacritty --working-directory "$(pwd)" > /dev/null'
|
||||
|
||||
# alias so i can copy stuff to my clipboard from my terminal
|
||||
# example:
|
||||
#$ pwd | clip
|
||||
alias clip='perl -p -e "chomp if eof" | xclip -in -sel clip'
|
||||
alias pwdc='pwd | clip | echo "directory clipped"'
|
||||
|
||||
alias cls="clear"
|
||||
|
||||
## Curl Aliases for easy info
|
||||
alias myip="curl https://ipecho.net/plain; echo"
|
||||
alias pq="ping google.com -c 5"
|
||||
|
||||
alias ..="cd ../"
|
||||
alias ../="cd ../"
|
||||
alias ...="cd ../.."
|
||||
alias .4="cd ../../.."
|
||||
|
||||
# replacing ls with exa & lsd
|
||||
# hrr drr why do you use lsd AND exa?
|
||||
# because lsd has icons but exa is better with everything else. smh.
|
||||
|
||||
# Lolcats!!
|
||||
alias neofetch="neofetch | lolcat"
|
||||
|
||||
# tars
|
||||
alias untar="tar -zxvf"
|
||||
alias mktar="tar -cvzf"
|
||||
|
||||
# by default, put zathura windows in new process
|
||||
# alias zathura="sh /home/synchronous/.scripts/zathura/zathura_conditional.sh"
|
||||
# alias exclude-zathura="pwd >> /home/synchronous/.scripts/zathura/excluded;echo 'done'"
|
||||
|
||||
# make ncdu run fast wow
|
||||
alias ncdu="ncdu -rx"
|
||||
|
||||
alias ndwc="nmcli device wifi connect"
|
||||
alias ndwl="nmcli device wifi list"
|
||||
alias ndc="nmcli device disconnect wlan0"
|
||||
alias wt="systemctl restart NetworkManager"
|
||||
alias syncthing="firefox localhost:8384"
|
||||
alias htop="btop" # of course
|
||||
alias top="btop" # of course
|
||||
|
||||
stack() {
|
||||
find . -type f -exec echo -e "\n--- {} ---\n" \; -exec cat {} \;
|
||||
}
|
||||
|
||||
stack-fast() {
|
||||
rg -l . | while read -r file; do
|
||||
echo -e "\n--- $file ---\n"
|
||||
cat "$file"
|
||||
done
|
||||
}
|
||||
|
||||
stack-b() {
|
||||
(
|
||||
while IFS= read -r -d '' file; do
|
||||
# Print a header for each filename:
|
||||
printf '\n--- %s ---\n' "$file"
|
||||
# Dump the raw content of "$file" exactly (no transformations).
|
||||
cat "$file"
|
||||
done < <(find . -type f ! -name '*.json' -print0)
|
||||
) \
|
||||
| perl -p -e 'chomp if eof' \
|
||||
| xclip -in -sel clip
|
||||
}
|
||||
|
||||
stack-min() {
|
||||
find . -maxdepth 1 -type f -exec echo -e "\n--- {} ---\n" \; -exec cat {} \;
|
||||
}
|
||||
|
||||
a.nixi() {
|
||||
nix-store -q --references /var/run/current-system/sw | cut -d'-' -f2-
|
||||
}
|
||||
|
||||
a.pingg() {
|
||||
grc ping 8.8.8.8 -c 1
|
||||
}
|
||||
|
||||
a.sitecopy() {
|
||||
wget -k -K -E -r -l 10 -p -N -F -nH $@
|
||||
}
|
||||
|
||||
a.pdfcopy() {
|
||||
wget -k -r -l 10 -p -A "*.pdf" -N -F -nH $@
|
||||
}
|
||||
|
||||
a.fo() {
|
||||
firefox `pwd`
|
||||
}
|
||||
|
||||
a.dnsenum() {
|
||||
dnsenum "$@"
|
||||
}
|
||||
|
||||
|
||||
# ------------------- fzf configuration
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
export FZF_DEFAULT_COMMAND='fd --type f'
|
||||
export FZF_DEFAULT_OPTS="--layout=reverse --inline-info --height=80%"
|
||||
|
||||
# ------------------- Key Binding
|
||||
bindkey "\e[1~" beginning-of-line # Home
|
||||
bindkey "\e[4~" end-of-line # End
|
||||
bindkey "\e[3~" delete-char #Del
|
||||
bindkey "\e[2~" overwrite-mode # Ins
|
||||
bindkey "\e[6~" end-of-history # PageDown
|
||||
bindkey "\e[5~" beginning-of-history #PageUp
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
|
||||
# -------------------- control backspace deleting previous word entirely
|
||||
bindkey '^H' backward-kill-word
|
||||
bindkey '5~' kill-word
|
||||
|
||||
# ------------------- More Widgets
|
||||
#run_ranger () {
|
||||
## echo
|
||||
# ranger --choosedir=$HOME/.rangedir < $TTY
|
||||
# LASTDIR='cat $HOME/.rangerdir'
|
||||
# cd "$LASTDIR"
|
||||
# zle reset-prompt
|
||||
#}
|
||||
#zle -N run_ranger
|
||||
|
||||
# --------------------- REMOTES CONFIG
|
||||
# source /home/synchronous/.zshrc_remote
|
||||
|
||||
|
||||
export LESS_TERMCAP_mb=$'\e[1;32m'
|
||||
export LESS_TERMCAP_md=$'\e[1;32m'
|
||||
export LESS_TERMCAP_me=$'\e[0m'
|
||||
export LESS_TERMCAP_se=$'\e[0m'
|
||||
export LESS_TERMCAP_so=$'\e[01;33m'
|
||||
export LESS_TERMCAP_ue=$'\e[0m'
|
||||
export LESS_TERMCAP_us=$'\e[1;4;31m'
|
||||
|
||||
# ------ NNN (not no not november)
|
||||
export PATH=/home/synchronous/.scripts/nnn:$PATH
|
||||
# export VISUAL=wrapper.sh
|
||||
# export EDITOR="$VISUAL"
|
||||
export EDITOR="nvim"
|
||||
export NNN_PLUG='m:preview-tui;'
|
||||
export NNN_FIFO=/tmp/nnn.fifo
|
||||
export NNN_TERMINAL=alacritty
|
||||
|
||||
bindkey -s '^o' 'nnn -e ^M'
|
||||
Reference in New Issue
Block a user