1
0
Fork 0
mirror of https://github.com/MillironX/dotfiles.git synced 2024-11-22 21:39:55 +00:00

Compare commits

..

No commits in common. "44b9b80d27441fed56f8cd9dfa18a81b3af44208" and "4c15e228ce7ff8e9904b50c7fc284f114c4dc41c" have entirely different histories.

12 changed files with 138 additions and 91 deletions

View file

@ -1,6 +1,7 @@
["antigen.zsh"] [".local/bin/n"]
type = "file" type = "file"
url = "https://git.io/antigen" url = "https://raw.githubusercontent.com/tj/n/master/bin/n"
executable = true
refreshPeriod = "168h" refreshPeriod = "168h"
[".local/share/fonts/meslolgs-nf-regular.ttf"] [".local/share/fonts/meslolgs-nf-regular.ttf"]

View file

@ -1,16 +1,22 @@
# 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 # Context-sensitive aliases
{{- if lookPath "batcat" }} alias_if_exists bat batcat
alias bat=batcat alias_if_exists cat bat
{{- end }} alias_if_exists ls lsd
{{- 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 # Universal aliases
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME' alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
@ -18,7 +24,6 @@ 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 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 grim='git rebase -i --autosquash $(git_main_branch)'
alias grid='git rebase -i --autosquash $(git_develop_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 # Alias-like functions
nd () { nd () {

View file

@ -1,2 +1,2 @@
auto_activate_base: false auto_activate_base: false
changeps1: true changeps1: false

View file

@ -1,38 +1,45 @@
{{- if lookPath "pipx" }}
# Enable pipx completions # Enable pipx completions
eval "$(register-python-argcomplete pipx)" if [ $(command -v pipx) ]; then
{{- end }} eval "$(register-python-argcomplete pipx)"
fi
{{- if lookPath "nvim" }}
# Preferred editor for local and remote sessions # Preferred editor for local and remote sessions
export EDITOR=nvim if [ $(command -v nvim) ]; then
{{- end }} 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
{{- if lookPath "kate" }} if [ $(command -v kate) ]; then
export VISUAL=kate export VISUAL=kate
{{- else if lookPath "codium" }} elif [ $(command -v code) ]; then
export VISUAL=codium export VISUAL=code
{{- else if lookPath "code" }} elif [ $(command -v emacs) ]; then
export VISUAL=code export VISUAL=emacs
{{- end }} fi
{{- if lookPath "most" }}
# Set a cool new pager with color support # Set a cool new pager with color support
export PAGER=most if [ $(command -v most) ]; then
{{- end }} export PAGER=most
fi
{{- if or (lookPath "bat") (lookPath "catbat") }}
# Replace cat with bat # Replace cat with bat
export BAT_PAGER="less -SRF" if [ $(command -v bat) ]; then
export MANPAGER="sh -c 'col -bx | bat -l man -p'" export BAT_PAGER="less -SRF"
export MANROFFOPT="-c" export MANPAGER="sh -c 'col -bx | bat -l man -p'"
{{- end }} export MANROFFOPT="-c"
fi
# Add notification support for long-running processes # Add notification support for long-running processes
{{- if lookPath "ntfy" }} if [ $(command -v ntfy) ]; then
eval "$(ntfy shell-integration --longer-than 30)" 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" 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 }} fi
# Set the Nextflow enviroment caches # Set the Nextflow enviroment caches
export NXF_HOME="$HOME/.nextflow" export NXF_HOME="$HOME/.nextflow"

View file

@ -1,36 +1,19 @@
# >>> conda initialize >>> if [ -f $HOME/.rbenv/bin/rbenv ]; then
# !! Contents within this block are managed by 'conda init' !! export PATH="$HOME/.rbenv/bin:$PATH"
__conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $0) 'hook' 2> /dev/null)" eval "$(rbenv init -)"
if [ $? -eq 0 ]; then export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
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 fi
unset __conda_setup
if [ -f "$HOME/miniconda3/etc/profile.d/mamba.sh" ]; then if [ $(command -v n) ]; then
. "$HOME/miniconda3/etc/profile.d/mamba.sh" export N_PREFIX=$HOME/.n
export PATH="$HOME/.n/bin:$PATH"
fi fi
# <<< conda initialize <<<
{{- if lookPath "direnv" }}
eval "$(direnv hook $(basename $0))"
{{- end }}
if [ -f $HOME/.ion/bin/ion ]; then if [ -f $HOME/.ion/bin/ion ]; then
export PATH="$HOME/.ion/bin/ion:$PATH" export PATH="$HOME/.ion/bin/ion:$PATH"
export FPATH="$HOME/.ion/completions:$FPATH" export FPATH="$HOME/.ion/completions:$FPATH"
fi fi
# Import GNU parallel
if [ $(command -v env_parallel.$(basename $0)) ]; then
source $(which env_parallel.$(basename $0))
fi
{{- if eq .machinetype "workstation" }} {{- if eq .machinetype "workstation" }}
export GPG_TTY="$(tty)" export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)

View file

@ -3,8 +3,22 @@
export PATH="$HOME/.local/bin:$HOME/bin:$PATH" export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
# juliaup setup # juliaup setup
export PATH="$HOME/.julia/juliaup/bin:$PATH" if [ -d $HOME/.julia/juliaup/bin ]; then
export PATH="$HOME/.juliaup/bin:$PATH" 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 <<<
# Linuxbrew setup # Linuxbrew setup
if [ -d $HOME/../linuxbrew/.linuxbrew ]; then if [ -d $HOME/../linuxbrew/.linuxbrew ]; then
@ -18,7 +32,3 @@ if [ -n "$BREWPATH" ]; then
export HOMEBREW_MAKE_JOBS=1 export HOMEBREW_MAKE_JOBS=1
export HOMEBREW_NO_ANALYTICS=1 export HOMEBREW_NO_ANALYTICS=1
fi fi
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
fi

View file

@ -1,6 +1,6 @@
set -g default-terminal "tmux-256color" 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" source "/usr/share/powerline/bindings/tmux/powerline.conf"
{{ else }} {{- else -}}
source "/usr/share/tmux/powerline.conf" source "/usr/share/tmux/powerline.conf"
{{ end }} {{- end }}

View file

@ -11,7 +11,33 @@ source $HOME/.hooks
# User specific aliases and functions # User specific aliases and functions
source $HOME/.aliases 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 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 # 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\]] \\$ " export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ "

View file

@ -18,6 +18,9 @@ then
fi fi
# Load the antigen library # Load the antigen library
if [[ ! -f "$HOME/antigen.zsh" ]]; then
curl -L git.io/antigen > $HOME/antigen.zsh
fi
source "$HOME/antigen.zsh" source "$HOME/antigen.zsh"
# Load the oh-my-zsh library # Load the oh-my-zsh library
@ -51,6 +54,27 @@ COMPLETION_WAITING_DOTS="true"
source $HOME/.hooks 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 # Tell Antigen that you're done
antigen apply antigen apply
@ -65,6 +89,11 @@ source $HOME/.envvar
alias zshconfig="$EDITOR ~/.zshrc" alias zshconfig="$EDITOR ~/.zshrc"
source $HOME/.aliases source $HOME/.aliases
# Import GNU parallel
if [ $(command -v env_parallel.zsh) ]; then
source $(which env_parallel.zsh)
fi
{{ if or {{ if or
(eq .machinetype "workstation") (eq .machinetype "workstation")
(eq .chezmoi.osRelease.id "fedora") (eq .chezmoi.osRelease.id "fedora")

View file

@ -1,4 +1,2 @@
enable-ssh-support default-cache-ttl 10000
ttyname $GPG_TTY max-cache-ttl 86400
default-cache-ttl 60
max-cache-ttl 120

View file

@ -1,6 +1,6 @@
Host * Host *
IdentitiesOnly yes IdentitiesOnly yes
IdentityFile {{ if and (eq .machinetype "workstation") (ne .chezmoi.os "windows") }}~/.ssh/id_rsa_yubikey.pub{{ else }}~/.ssh/id_ed25519{{ end }} IdentityFile {{ if and (eq .machinetype "workstation") (ne .chezmoi.os "windows") }}~/.ssh/id_rsa_yubikey.pub{{ else }}~/.ssh/id_ed25519.pub{{ end }}
Host aahz Host aahz
HostName 129.130.108.37 HostName 129.130.108.37

View file

@ -1,12 +0,0 @@
#!/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 }}