Compare commits
No commits in common. "60a32a46bd3855ccd31af5a5f4defa1a2d074fb0" and "454452fb500f2aef1227a5e5d2913524624bb7f0" have entirely different histories.
60a32a46bd
...
454452fb50
|
@ -7,29 +7,15 @@
|
|||
!README.md
|
||||
|
||||
# allow some stuff to be pushed
|
||||
!tmux
|
||||
!git
|
||||
!alacritty
|
||||
!nvim
|
||||
!zsh
|
||||
!.pyenv
|
||||
|
||||
# zsh
|
||||
!zsh
|
||||
zsh/*
|
||||
!zsh/.zshrc
|
||||
!zsh/.zshenv
|
||||
!zsh/.zprofile
|
||||
!zsh/scripts.zsh
|
||||
!zsh/aliases.zsh
|
||||
!zsh/completions/.keep
|
||||
# explicity ignore zcoredump
|
||||
zsh/.zcomp*
|
||||
|
||||
# tmux
|
||||
!tmux
|
||||
tmux/*
|
||||
!tmux/tmux.conf
|
||||
!tmux/tmux-sessionizer
|
||||
|
||||
# git
|
||||
!git
|
||||
git/*
|
||||
!git/config
|
||||
!git/gitignore
|
||||
!git/aflabs
|
||||
# explicity ignore tmux plugins
|
||||
tmux/plugins
|
||||
|
|
21
git/config
21
git/config
|
@ -1,16 +1,25 @@
|
|||
[user]
|
||||
name = Matej Janežič
|
||||
email = janezic.mj@gmail.com
|
||||
signingkey = 4298E230ED37B2C0
|
||||
[core]
|
||||
autocrlf = input
|
||||
excludesfile = ~/.config/git/gitignore
|
||||
editor = nvim
|
||||
[init]
|
||||
defaultBranch = master
|
||||
[include]
|
||||
path = ~/.config/git/alias
|
||||
[include]
|
||||
path = ~/.config/git/commitsign
|
||||
[includeIf "gitdir:~/Desktop/git/git.aflabs.org/"]
|
||||
path = ~/.config/git/aflabs
|
||||
[commit]
|
||||
gpgsign = true
|
||||
[gpg]
|
||||
program = /opt/homebrew/bin/gpg
|
||||
[init]
|
||||
defaultBranch = master
|
||||
[alias]
|
||||
andraz = commit --amend --no-edit --author=\"Andraž Kladnik <andraz.kladnik@aflabs.si>\"
|
||||
petra = commit --amend --no-edit --author=\"Petra Podlogar <petra.podlogar@aflabs.si>\"
|
||||
ziga = commit --amend --no-edit --author=\"Žiga Avbreht <ziga.avbreht@aflabs.si>\"
|
||||
laura = commit --amend --no-edit --author=\"lauraGB <laura.guzelj.blatnik@aflabs.si>\"
|
||||
gasper = commit --amend --no-edit --author=\"Gašper Žajdela <gasper.zajdela@aflabs.si>\"
|
||||
luka = commit --amend --no-edit --author=\"Luka Avbreht <luka.avbreht@aflabs.si>\"
|
||||
koprivec = commit --amend --no-edit --author=\"Filip Koprivec <filip.koprivec@aflabs.si>\"
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
set -g default-terminal "xterm-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
set-option -g default-terminal "screen-256color"
|
||||
set -s escape-time 0
|
||||
|
||||
unbind C-b
|
||||
set-option -g prefix C-s
|
||||
bind-key C-s send-prefix
|
||||
# set -g status-style 'bg=#333333 fg=#5eacd3'
|
||||
|
||||
bind r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
set -g base-index 1
|
||||
|
@ -25,12 +25,10 @@ bind -r h select-pane -L
|
|||
bind -r l select-pane -R
|
||||
|
||||
bind -r D neww -c "#{pane_current_path}" "nvim TODO.md"
|
||||
bind -r t neww -c "~" "nvim ~/.TODO.md"
|
||||
|
||||
bind-key -r f run-shell "tmux neww ~/.config/tmux/tmux-sessionizer"
|
||||
bind-key -r g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_HOME"
|
||||
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_HOME"
|
||||
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/Desktop/temp"
|
||||
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
|
File diff suppressed because it is too large
Load Diff
39
zsh/.zshenv
39
zsh/.zshenv
|
@ -1,39 +0,0 @@
|
|||
# default configuration as per https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
# brew sbin
|
||||
export PATH="/opt/homebrew/sbin:$PATH"
|
||||
|
||||
# brew lib
|
||||
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
|
||||
|
||||
# cargo
|
||||
source "$HOME/.cargo/env"
|
||||
|
||||
# language environment
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# editor
|
||||
export EDITOR=nvim
|
||||
|
||||
# go
|
||||
export GOHOME="$XDG_DATA_HOME/go"
|
||||
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
|
||||
export PATH="$GOHOME/bin:$PATH"
|
||||
|
||||
# ggman
|
||||
export GGROOT="$HOME/git"
|
||||
|
||||
# neovim
|
||||
export PATH="$XDG_DATA_HOME/neovim/bin:$PATH"
|
||||
|
||||
# pyenv
|
||||
export PYENV_ROOT="$XDG_DATA_HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
# poetry
|
||||
export POETRY_HOME="$XDG_DATA_HOME/poetry"
|
||||
command -v poetry >/dev/null || export PATH="$POETRY_HOME/bin:$PATH"
|
66
zsh/.zshrc
66
zsh/.zshrc
|
@ -1,5 +1,8 @@
|
|||
# zsh history file
|
||||
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||
# default configuration as per https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
|
@ -8,50 +11,65 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
|||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# completion
|
||||
fpath=($ZDOTDIR/completions $fpath)
|
||||
autoload -Uz compinit
|
||||
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
|
||||
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
|
||||
# zsh history file
|
||||
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# just remind me to update when it's time
|
||||
zstyle ':omz:update' mode reminder
|
||||
zstyle ':omz:update' frequency 7
|
||||
|
||||
# pre plugin load
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
# i don't lazy load nvm because neovim doesn't work well with it
|
||||
|
||||
# load antigen
|
||||
typeset -a ANTIGEN_CHECK_FILES=(${ZDOTDIR:-~}/.zshrc ${ZDOTDIR:-~}/antigen.zsh)
|
||||
source $ZDOTDIR/antigen.zsh
|
||||
# plugins
|
||||
plugins=(zsh-nvm git zsh-autosuggestions zsh-syntax-highlighting)
|
||||
|
||||
# oh-my-zsh library and git plugin
|
||||
antigen use oh-my-zsh
|
||||
antigen bundle git
|
||||
# TODO: lose oh my zsh at some point
|
||||
|
||||
# zsh users plugin
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-autosuggestions
|
||||
# oh my zsh
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# other
|
||||
antigen bundle lukechilds/zsh-nvm
|
||||
# language environment
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# theme
|
||||
antigen theme romkatv/powerlevel10k
|
||||
|
||||
# apply plugin load
|
||||
antigen apply
|
||||
# brew sbin
|
||||
export PATH="/opt/homebrew/sbin:$PATH"
|
||||
|
||||
# pyenv
|
||||
export PYENV_ROOT="$XDG_DATA_HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
# # nvim
|
||||
export PATH="$HOME/neovim/bin:$PATH"
|
||||
|
||||
# go
|
||||
export GOHOME="$XDG_DATA_HOME/go"
|
||||
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
|
||||
export PATH="$PATH:$GOHOME/bin"
|
||||
|
||||
# ggman
|
||||
export GGROOT="$HOME/Desktop/git"
|
||||
eval "$(ggman shellrc)"
|
||||
|
||||
# gpg
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# editor
|
||||
export EDITOR=nvim
|
||||
|
||||
# custom functions and aliases
|
||||
source "$ZDOTDIR/aliases.zsh"
|
||||
source "$ZDOTDIR/scripts.zsh"
|
||||
source "$ZDOTDIR/functions.zsh"
|
||||
|
||||
# opam configuration
|
||||
[[ ! -r /Users/janezicmatej/.opam/opam-init/init.zsh ]] || source /Users/janezicmatej/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
alias z="exec zsh"
|
||||
alias t="tmux a || tmux new-session -s janezicmatej -c ~"
|
||||
alias n=nvim_ve
|
||||
alias vim=nvim_ve
|
||||
|
||||
|
@ -13,10 +11,16 @@ alias accenton="defaults write -g ApplePressAndHoldEnabled -bool true"
|
|||
alias accentoff="defaults write -g ApplePressAndHoldEnabled -bool false"
|
||||
|
||||
# docker
|
||||
alias dps="docker ps --format table'{{ .ID }}\t{{ .Image }}\t{{ .Ports}}\t{{ .Names }}'"
|
||||
alias aafh=./helper
|
||||
|
||||
# git
|
||||
alias gcan="git commit -v --amend --no-edit"
|
||||
alias gros="git reset origin/$(git_current_branch) --soft"
|
||||
|
||||
# quick edit .dotfiles
|
||||
alias zshrc="n $ZDOTDIR/.zshrc && source $ZDOTDIR/.zshrc"
|
||||
alias addalias="n $ZDOTDIR/aliases.zsh && source $ZDOTDIR/.zshrc"
|
||||
|
||||
# unsorted
|
||||
alias ci="glab ci list"
|
||||
alias bm=batman
|
||||
|
|
|
@ -44,39 +44,3 @@ function nukepip {
|
|||
pip uninstall $(pip freeze) -y
|
||||
pip install -r $(pyenv root)/default-packages
|
||||
}
|
||||
|
||||
function pyinit {
|
||||
if [[ -f .python-version ]]; then
|
||||
echo "found .python-version, stopping"
|
||||
return
|
||||
fi
|
||||
|
||||
DIRNAME=$(basename "$PWD")
|
||||
|
||||
if [[ $(pyenv versions | grep "$DIRNAME") ]]; then
|
||||
echo "found existing version with this name, setting..."
|
||||
pyenv local "$DIRNAME"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "no python version provided, defaulting to $(pyenv version-name)"
|
||||
VERSION=$(pyenv version-name)
|
||||
else
|
||||
VERSION=$1
|
||||
fi
|
||||
|
||||
pyenv virtualenv "$VERSION" "$DIRNAME"
|
||||
pyenv local "$DIRNAME"
|
||||
|
||||
}
|
||||
|
||||
function lh {
|
||||
if [[ -z $1 ]]; then
|
||||
PORT=8000
|
||||
else
|
||||
PORT=$1
|
||||
fi
|
||||
|
||||
open "http://localhost:$PORT"
|
||||
}
|
Loading…
Reference in New Issue