mirror of
https://github.com/MillironX/dotfiles.git
synced 2024-11-22 05:29:54 +00:00
Compare commits
21 commits
4c15e228ce
...
44b9b80d27
Author | SHA1 | Date | |
---|---|---|---|
44b9b80d27 | |||
bc153ee4d1 | |||
83f28d03f0 | |||
774e277e99 | |||
2bf7c0a80b | |||
597a4edb0f | |||
9813078c5e | |||
99c8b6ec4b | |||
ba3dfc5f52 | |||
85b05d50f0 | |||
6caa4f13ef | |||
c416a5304b | |||
433c576a44 | |||
f89211ef87 | |||
6f57123a63 | |||
1e8b917803 | |||
7319c73820 | |||
252ce21dc5 | |||
1c558abfa6 | |||
20cc498169 | |||
d4e523271e |
12 changed files with 91 additions and 138 deletions
|
@ -1,7 +1,6 @@
|
|||
[".local/bin/n"]
|
||||
["antigen.zsh"]
|
||||
type = "file"
|
||||
url = "https://raw.githubusercontent.com/tj/n/master/bin/n"
|
||||
executable = true
|
||||
url = "https://git.io/antigen"
|
||||
refreshPeriod = "168h"
|
||||
|
||||
[".local/share/fonts/meslolgs-nf-regular.ttf"]
|
||||
|
|
|
@ -1,22 +1,16 @@
|
|||
# Only create aliases if the underlying programs are available
|
||||
# This allows portability between machines in different states
|
||||
alias_if_exists () {
|
||||
ALIAS=${1}
|
||||
COMMAND=${2}
|
||||
ARGS=${3}
|
||||
if [ $(command -v $COMMAND) ]; then
|
||||
if [ -n "$ARGS" ]; then
|
||||
alias $ALIAS="$COMMAND $ARGS"
|
||||
else
|
||||
alias $ALIAS="$COMMAND"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Context-sensitive aliases
|
||||
alias_if_exists bat batcat
|
||||
alias_if_exists cat bat
|
||||
alias_if_exists ls lsd
|
||||
{{- if lookPath "batcat" }}
|
||||
alias bat=batcat
|
||||
{{- end }}
|
||||
{{- if or (lookPath "bat") (lookPath "batcat") }}
|
||||
alias cat=bat
|
||||
{{- end }}
|
||||
{{- if lookPath "lsd" }}
|
||||
alias ls=lsd
|
||||
{{- end }}
|
||||
{{- if and (lookPath "codium") (not (lookPath "code")) }}
|
||||
alias code=codium
|
||||
{{- end }}
|
||||
|
||||
# Universal aliases
|
||||
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||
|
@ -24,6 +18,7 @@ alias please='sudo $(fc -ln -1)'
|
|||
alias nrun='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus="NVIDIA_only"'
|
||||
alias grim='git rebase -i --autosquash $(git_main_branch)'
|
||||
alias grid='git rebase -i --autosquash $(git_develop_branch)'
|
||||
alias gpub='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
|
||||
|
||||
# Alias-like functions
|
||||
nd () {
|
|
@ -1,2 +1,2 @@
|
|||
auto_activate_base: false
|
||||
changeps1: false
|
||||
changeps1: true
|
||||
|
|
|
@ -1,45 +1,38 @@
|
|||
{{- if lookPath "pipx" }}
|
||||
# Enable pipx completions
|
||||
if [ $(command -v pipx) ]; then
|
||||
eval "$(register-python-argcomplete pipx)"
|
||||
fi
|
||||
eval "$(register-python-argcomplete pipx)"
|
||||
{{- end }}
|
||||
|
||||
{{- if lookPath "nvim" }}
|
||||
# Preferred editor for local and remote sessions
|
||||
if [ $(command -v nvim) ]; then
|
||||
export EDITOR=nvim
|
||||
elif [ $(command -v nano) ]; then
|
||||
export EDITOR=nano
|
||||
elif [ $(command -v vim) ]; then
|
||||
export EDITOR=vim
|
||||
elif [ $(command -v emacs) ]; then
|
||||
export EDITOR='emacs -nw'
|
||||
fi
|
||||
export EDITOR=nvim
|
||||
{{- end }}
|
||||
|
||||
if [ $(command -v kate) ]; then
|
||||
export VISUAL=kate
|
||||
elif [ $(command -v code) ]; then
|
||||
export VISUAL=code
|
||||
elif [ $(command -v emacs) ]; then
|
||||
export VISUAL=emacs
|
||||
fi
|
||||
{{- if lookPath "kate" }}
|
||||
export VISUAL=kate
|
||||
{{- else if lookPath "codium" }}
|
||||
export VISUAL=codium
|
||||
{{- else if lookPath "code" }}
|
||||
export VISUAL=code
|
||||
{{- end }}
|
||||
|
||||
{{- if lookPath "most" }}
|
||||
# Set a cool new pager with color support
|
||||
if [ $(command -v most) ]; then
|
||||
export PAGER=most
|
||||
fi
|
||||
|
||||
export PAGER=most
|
||||
{{- end }}
|
||||
|
||||
{{- if or (lookPath "bat") (lookPath "catbat") }}
|
||||
# Replace cat with bat
|
||||
if [ $(command -v bat) ]; then
|
||||
export BAT_PAGER="less -SRF"
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
export MANROFFOPT="-c"
|
||||
fi
|
||||
export BAT_PAGER="less -SRF"
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
export MANROFFOPT="-c"
|
||||
{{- end }}
|
||||
|
||||
# Add notification support for long-running processes
|
||||
if [ $(command -v ntfy) ]; then
|
||||
eval "$(ntfy shell-integration --longer-than 30)"
|
||||
export AUTO_NTFY_DONE_IGNORE="vim nano emacs kate zshconfig screen tmux ssh top htop less more most nethogs 'singularity shell' julia man glances"
|
||||
fi
|
||||
{{- if lookPath "ntfy" }}
|
||||
eval "$(ntfy shell-integration --longer-than 30)"
|
||||
export AUTO_NTFY_DONE_IGNORE="vim nano emacs kate zshconfig screen tmux ssh top htop less more most nethogs 'singularity shell' julia man glances"
|
||||
{{- end }}
|
||||
|
||||
# Set the Nextflow enviroment caches
|
||||
export NXF_HOME="$HOME/.nextflow"
|
||||
|
|
|
@ -1,19 +1,36 @@
|
|||
if [ -f $HOME/.rbenv/bin/rbenv ]; then
|
||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
||||
eval "$(rbenv init -)"
|
||||
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $0) 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
|
||||
if [ $(command -v n) ]; then
|
||||
export N_PREFIX=$HOME/.n
|
||||
export PATH="$HOME/.n/bin:$PATH"
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/mamba.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/mamba.sh"
|
||||
fi
|
||||
# <<< conda initialize <<<
|
||||
|
||||
{{- if lookPath "direnv" }}
|
||||
eval "$(direnv hook $(basename $0))"
|
||||
{{- end }}
|
||||
|
||||
if [ -f $HOME/.ion/bin/ion ]; then
|
||||
export PATH="$HOME/.ion/bin/ion:$PATH"
|
||||
export FPATH="$HOME/.ion/completions:$FPATH"
|
||||
fi
|
||||
|
||||
# Import GNU parallel
|
||||
if [ $(command -v env_parallel.$(basename $0)) ]; then
|
||||
source $(which env_parallel.$(basename $0))
|
||||
fi
|
||||
|
||||
{{- if eq .machinetype "workstation" }}
|
||||
export GPG_TTY="$(tty)"
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
|
22
dot_profile
22
dot_profile
|
@ -3,22 +3,8 @@
|
|||
export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
||||
|
||||
# juliaup setup
|
||||
if [ -d $HOME/.julia/juliaup/bin ]; then
|
||||
export PATH="$HOME/.julia/juliaup/bin:$PATH"
|
||||
fi
|
||||
|
||||
# >>> juliaup initialize >>>
|
||||
|
||||
# !! Contents within this block are managed by juliaup !!
|
||||
|
||||
case ":$PATH:" in
|
||||
*:/home/millironx/.juliaup/bin:*)
|
||||
;;
|
||||
*)
|
||||
export PATH=/home/millironx/.juliaup/bin${PATH:+:${PATH}}
|
||||
;;
|
||||
esac
|
||||
# <<< juliaup initialize <<<
|
||||
export PATH="$HOME/.julia/juliaup/bin:$PATH"
|
||||
export PATH="$HOME/.juliaup/bin:$PATH"
|
||||
|
||||
# Linuxbrew setup
|
||||
if [ -d $HOME/../linuxbrew/.linuxbrew ]; then
|
||||
|
@ -32,3 +18,7 @@ if [ -n "$BREWPATH" ]; then
|
|||
export HOMEBREW_MAKE_JOBS=1
|
||||
export HOMEBREW_NO_ANALYTICS=1
|
||||
fi
|
||||
|
||||
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
|
||||
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||
fi
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
set -g default-terminal "tmux-256color"
|
||||
{{- if (eq .chezmoi.osRelease.id "debian") }}
|
||||
{{ if (eq .chezmoi.osRelease.id "debian") }}
|
||||
source "/usr/share/powerline/bindings/tmux/powerline.conf"
|
||||
{{- else -}}
|
||||
{{ else }}
|
||||
source "/usr/share/tmux/powerline.conf"
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -11,33 +11,7 @@ source $HOME/.hooks
|
|||
# User specific aliases and functions
|
||||
source $HOME/.aliases
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
conda config --set changeps1 true
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# >>> direnv initalize >>>
|
||||
if [ $(command -v direnv) ]; then
|
||||
eval "$(direnv hook bash)"
|
||||
fi
|
||||
# <<< direnv initalize <<<
|
||||
|
||||
source $HOME/.envvar
|
||||
|
||||
if [ $(command -v env_parallel.bash) ]; then
|
||||
source $(which env_parallel.bash)
|
||||
fi
|
||||
|
||||
# Make the prompt pretty, just in case we're stuck in bash land
|
||||
export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ "
|
||||
|
|
|
@ -18,9 +18,6 @@ then
|
|||
fi
|
||||
|
||||
# Load the antigen library
|
||||
if [[ ! -f "$HOME/antigen.zsh" ]]; then
|
||||
curl -L git.io/antigen > $HOME/antigen.zsh
|
||||
fi
|
||||
source "$HOME/antigen.zsh"
|
||||
|
||||
# Load the oh-my-zsh library
|
||||
|
@ -54,27 +51,6 @@ COMPLETION_WAITING_DOTS="true"
|
|||
|
||||
source $HOME/.hooks
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# >>> direnv initalize >>>
|
||||
if [ $(command -v direnv) ]; then
|
||||
eval "$(direnv hook zsh)"
|
||||
fi
|
||||
# <<< direnv initalize <<<
|
||||
|
||||
# Tell Antigen that you're done
|
||||
antigen apply
|
||||
|
||||
|
@ -89,11 +65,6 @@ source $HOME/.envvar
|
|||
alias zshconfig="$EDITOR ~/.zshrc"
|
||||
source $HOME/.aliases
|
||||
|
||||
# Import GNU parallel
|
||||
if [ $(command -v env_parallel.zsh) ]; then
|
||||
source $(which env_parallel.zsh)
|
||||
fi
|
||||
|
||||
{{ if or
|
||||
(eq .machinetype "workstation")
|
||||
(eq .chezmoi.osRelease.id "fedora")
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
default-cache-ttl 10000
|
||||
max-cache-ttl 86400
|
||||
enable-ssh-support
|
||||
ttyname $GPG_TTY
|
||||
default-cache-ttl 60
|
||||
max-cache-ttl 120
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Host *
|
||||
IdentitiesOnly yes
|
||||
IdentityFile {{ if and (eq .machinetype "workstation") (ne .chezmoi.os "windows") }}~/.ssh/id_rsa_yubikey.pub{{ else }}~/.ssh/id_ed25519.pub{{ end }}
|
||||
IdentityFile {{ if and (eq .machinetype "workstation") (ne .chezmoi.os "windows") }}~/.ssh/id_rsa_yubikey.pub{{ else }}~/.ssh/id_ed25519{{ end }}
|
||||
|
||||
Host aahz
|
||||
HostName 129.130.108.37
|
||||
|
|
12
run_once_install_mamba.sh.tmpl
Normal file
12
run_once_install_mamba.sh.tmpl
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
{{ if eq .chezmoi.os "linux" }}
|
||||
{{ $mambaURL := print "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-x86_64.sh" }}
|
||||
{{ if lookPath "wget" }}
|
||||
wget -qO- "{{ $mambaURL }}" > mamba.sh
|
||||
{{ else }}
|
||||
curl -L "{{ $mambaURL }}" > mamba.sh
|
||||
{{ end }}
|
||||
chmod +x mamba.sh
|
||||
./mamba.sh -b -u -p $HOME/miniconda3
|
||||
rm mamba.sh
|
||||
{{ end }}
|
Loading…
Reference in a new issue