diff --git a/dot_common.sh b/dot_common.sh index 247d8e3..6dc76c0 100644 --- a/dot_common.sh +++ b/dot_common.sh @@ -3,3 +3,12 @@ command_exists() { command -v ${1} >/dev/null; } source_if_exists() { [ -f "$1" ] && source $1; } + +append_path () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} diff --git a/dot_zshrc b/dot_zshrc index 88c5c10..1fbf8c9 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -26,17 +26,27 @@ export MAILDIR=$HOME/Mail # export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock source_if_exists $HOME/.cargo/env -source_if_exists $HOME/.ghcup/env +source_if_exists "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env" -export PATH="$HOME/.local/bin:$HOME/.local/scripts:$HOME/.dotnet/tools:$PATH:$HOME/go/bin:$HOME/.idris2/bin:$HOME/.opam/default/bin" -export PATH="$HOME/.local/share/prt:$PATH" -[ -f "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env" ] && source "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env" +append_path "$HOME/.local/bin" +append_path "$HOME/.local/scripts" +append_path "$HOME/.dotnet/tools" +append_path "$HOME/go/bin" +append_path "$HOME/.idris2/bin" +append_path "$HOME/.opam/default/bin" +append_path "$HOME/.local/share/prt" +# [ -f "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env" ] && source "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env" -[[ -s $HOME/.autojump/etc/profile.d/autojump.sh ]] && source $HOME/.autojump/etc/profile.d/autojump.sh +# [[ -s $HOME/.autojump/etc/profile.d/autojump.sh ]] && source $HOME/.autojump/etc/profile.d/autojump.sh autoload -U compinit && compinit -u +eval $(opam env) # opam configuration -test -r /home/michael/.opam/opam-init/init.zsh && . /home/michael/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true +# test -r /home/michael/.opam/opam-init/init.zsh && . /home/michael/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true + +function rgc() { + rg --color always $@ | bat --color always +} function loadnpm() { export NVM_DIR="$HOME/.nvm" diff --git a/executable_dot_xsessionrc b/executable_dot_xsessionrc new file mode 100644 index 0000000..adebd5d --- /dev/null +++ b/executable_dot_xsessionrc @@ -0,0 +1,2 @@ +#!/bin/bash +xinput set-prop 'Synaptics TM3276-031' 'libinput Tapping Enabled' 1