summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Kudryavtsev <toast@toast.cafe>2020-08-29 13:33:12 -0400
committerChloe Kudryavtsev <toast@toast.cafe>2020-08-29 13:34:22 -0400
commit8e28344e223068d0440a5e87fc285b68a449f672 (patch)
treec3479b8eb645e26173601fffaaf7e5a7268ee45f
parent[zsh] add shar aliases and some envvars (diff)
zsh: nicer environment stuff
uses systemd's environment.d I'm thinking it makes sense to port it to other systems, though especially given pam_env is disabled by default now
-rw-r--r--dot_config/environment.d/.keep0
-rw-r--r--dot_config/environment.d/99-paths.conf5
-rw-r--r--dot_config/go/.keep0
-rw-r--r--dot_config/go/env3
-rw-r--r--dot_zsh/plugins/bat4
-rw-r--r--dot_zsh/plugins/colordiff4
-rw-r--r--dot_zsh/plugins/jump2
-rw-r--r--dot_zsh/source/alias.zsh2
-rw-r--r--dot_zsh/source/path.zsh5
9 files changed, 17 insertions, 8 deletions
diff --git a/dot_config/environment.d/.keep b/dot_config/environment.d/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dot_config/environment.d/.keep
diff --git a/dot_config/environment.d/99-paths.conf b/dot_config/environment.d/99-paths.conf
new file mode 100644
index 0000000..54e917a
--- /dev/null
+++ b/dot_config/environment.d/99-paths.conf
@@ -0,0 +1,5 @@
+CARGO_HOME=$HOME/.local/cargo
+DENO_DIR=$HOME/.local/deno
+LUAROCKS_CONFIG=$HOME/.config/luarocks/config.lua
+
+JUMP_HOME=$HOME/.local/share/jump
diff --git a/dot_config/go/.keep b/dot_config/go/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dot_config/go/.keep
diff --git a/dot_config/go/env b/dot_config/go/env
new file mode 100644
index 0000000..3a836d2
--- /dev/null
+++ b/dot_config/go/env
@@ -0,0 +1,3 @@
+CGO_ENABLED=0
+GO111MODULE=on
+GOPATH=/home/toast/.local/go
diff --git a/dot_zsh/plugins/bat b/dot_zsh/plugins/bat
new file mode 100644
index 0000000..9d542ab
--- /dev/null
+++ b/dot_zsh/plugins/bat
@@ -0,0 +1,4 @@
+#!/bin/zsh
+(( $+commands[bat] )) || return
+
+alias cat=bat pcat='bat -p'
diff --git a/dot_zsh/plugins/colordiff b/dot_zsh/plugins/colordiff
new file mode 100644
index 0000000..729d2cf
--- /dev/null
+++ b/dot_zsh/plugins/colordiff
@@ -0,0 +1,4 @@
+#!/bin/zsh
+(( $+commands[colordiff] )) || return
+
+alias diff=colordiff dif='colordiff -u'
diff --git a/dot_zsh/plugins/jump b/dot_zsh/plugins/jump
index 43e1d44..b64f1df 100644
--- a/dot_zsh/plugins/jump
+++ b/dot_zsh/plugins/jump
@@ -1,4 +1,4 @@
#!/bin/zsh
(( $+commands[jump] )) || return
-export JUMP_HOME=~/.local/share/jump
+
eval "$(jump shell zsh)"
diff --git a/dot_zsh/source/alias.zsh b/dot_zsh/source/alias.zsh
index e0f9c31..6696b1d 100644
--- a/dot_zsh/source/alias.zsh
+++ b/dot_zsh/source/alias.zsh
@@ -1,6 +1,4 @@
-alias cat=bat
alias cp='cp --reflink=auto'
-alias dif='colordiff -u'
alias dit='docker run --rm -it'
alias drun='dit -v "$PWD":/pwd:Z -w /pwd'
alias g=genius
diff --git a/dot_zsh/source/path.zsh b/dot_zsh/source/path.zsh
index 252fbdb..e29bb56 100644
--- a/dot_zsh/source/path.zsh
+++ b/dot_zsh/source/path.zsh
@@ -1,8 +1,3 @@
-export CARGO_HOME=~/.local/cargo
-export DENO_DIR=~/.local/deno
-export GOPATH=~/.local/go
-export LUAROCKS_CONFIG=~/.config/luarocks/config.lua
-
if (( $+commands[luarocks] )); then
PATH="$PATH:$(luarocks path --lr-bin)" # luarocks puts :s in the output
eval $(luarocks path --no-bin)