aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zsh/export.zsh17
-rw-r--r--zsh/.zsh/function.zsh4
-rw-r--r--zsh/.zsh/startup.zsh5
-rw-r--r--zsh/.zshrc14
4 files changed, 27 insertions, 13 deletions
diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh
index c488153..c7e34f8 100644
--- a/zsh/.zsh/export.zsh
+++ b/zsh/.zsh/export.zsh
@@ -15,6 +15,7 @@ export PATH="${PATH}:/opt/intelFPGA_lite/18.1/quartus/bin"
export PATH="${HOME}/.local/bin:${PATH}"
export PATH="${HOME}/.cargo/bin:${PATH}"
export PATH="${HOME}/.cabal/bin:${PATH}"
+if [[ -d "${HOME}/.gem/ruby/2.7.0/bin" ]]; then export PATH="${HOME}/.gem/ruby/2.7.0/bin:${PATH}"; fi
export PATH="/usr/local/bin:${PATH}"
export PATH="/Library/TeX/texbin:${PATH}"
export PATH="${PATH}:/Users/yannherklotz/Library/Python/3.7/bin"
@@ -22,4 +23,18 @@ export PATH="${PATH}:/Users/yannherklotz/Library/Python/3.7/bin"
# Stop dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
-eval "$(direnv hook zsh)"
+# Fix java windows for tiling window managers
+if [[ $(uname -r) = "Linux" ]]; then export _JAVA_AWT_WM_NONREPARENTING=1; fi
+
+[ -f "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh"
+
+# Direnv hook setup
+command -v direnv >/dev/null 2>&1
+if [[ "$?" -eq 0 ]]; then eval "$(direnv hook zsh)"; fi
+
+# Opam hook setup and initialising it
+command -v opam >/dev/null 2>&1
+if [[ "$?" -eq 0 ]]; then
+ test -r /home/yannherklotz/.opam/opam-init/init.zsh && . /home/yannherklotz/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
+ eval "$(opam env)";
+fi
diff --git a/zsh/.zsh/function.zsh b/zsh/.zsh/function.zsh
index 06a8e43..20dc12d 100644
--- a/zsh/.zsh/function.zsh
+++ b/zsh/.zsh/function.zsh
@@ -18,11 +18,11 @@ fdd() {
wal-tile() {
wal -n -i "$@"
feh --bg-fill "$(< "${HOME}/.cache/wal/wal")"
- /home/yannherklotz/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")"
+ $HOME/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")"
}
wal-tile-l() {
wal -l -n -i "$@"
feh --bg-fill "$(< "${HOME}/.cache/wal/wal")"
- /home/yannherklotz/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")"
+ $HOME/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")"
}
diff --git a/zsh/.zsh/startup.zsh b/zsh/.zsh/startup.zsh
index e69de29..67716ac 100644
--- a/zsh/.zsh/startup.zsh
+++ b/zsh/.zsh/startup.zsh
@@ -0,0 +1,5 @@
+# Nix
+if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
+ . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
+fi
+# End Nix
diff --git a/zsh/.zshrc b/zsh/.zshrc
index ae0ee35..ccf9080 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -1,3 +1,5 @@
+[[ $TERM == "dumb" ]] && unsetopt zle && PS1=$ && return
+
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
@@ -23,9 +25,7 @@ setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
-if [ -d ~/.cache/wal ]; then
- (cat ~/.cache/wal/sequences &)
-fi
+if [ -d ~/.cache/wal ]; then (cat ~/.cache/wal/sequences &) fi
# Sourcing everything
if [ -e /usr/share/fzf/key-bindings.zsh ]; then source /usr/share/fzf/key-bindings.zsh; fi
@@ -39,10 +39,4 @@ if [ -e $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then source $H
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey -M emacs '^P' history-substring-search-up
-bindkey -M emacs '^N' history-substring-search-down
-
-# opam configuration
-test -r /home/yannherklotz/.opam/opam-init/init.zsh && . /home/yannherklotz/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
-
-# added by travis gem
-[ -f /Users/yannherklotz/.travis/travis.sh ] && source /Users/yannherklotz/.travis/travis.sh
+bindkey -M emacs ^N history-substring-search-down