« get me outta code hell

acme shenanigans (apparently this is the first acme commit) - dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
path: root/.zshrc
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-10-27 11:34:22 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-10-27 12:24:48 -0300
commit889dfe622abea16049e4d0743c865331c13bdab1 (patch)
tree62f867e705e757432499a01ac7e1b4c599bb91b2 /.zshrc
parent51bf3754cc4805e016ea6f93e00872260e665265 (diff)
acme shenanigans (apparently this is the first acme commit)
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc19
1 files changed, 18 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 25d0ef6..14c2b54 100644
--- a/.zshrc
+++ b/.zshrc
@@ -8,6 +8,9 @@
 #   per-device configuration (post)    <dev-post>
 
 
+export DOTFILES="$(dirname "$(readlink -f "${(%):-%x}")")"
+
+
 # //// per-device configuration //////////////////////////////// <dev-pre> // #
 
 # Per-device configuration is kept here in dotfiles.git too, but it won't be
@@ -20,6 +23,7 @@
 
 device_preconfig() {
   source ~/.device_pre
+  [[ -v ACME ]] && source "$DOTFILES/device/acme_pre"
 }
 
 # The post-config file is intended to run commands that are so specialized to
@@ -28,6 +32,7 @@ device_preconfig() {
 
 device_postconfig() {
   source ~/.device_post
+  [[ -v ACME ]] && source "$DOTFILES/device/acme_post"
 }
 
 device_preconfig
@@ -42,12 +47,13 @@ export HISTSIZE=2000
 autoload -Uz select-word-style
 select-word-style bash
 
-if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
+if [ -x /usr/bin/tput ] && [[ ${TERM} != "dumb" ]] && tput setaf 1 >&/dev/null; then
   autoload -U colors && colors
   PS1=$'\e[0;32;1m%n\e[0;32m@\e[32;1m%m \e[34m%1~ \e[0m%# '
   PROMPT="%F{green}%B%n%b@%B%m %F{blue}%1~%b%f %# "
 else
   PS1=$'%n@%m %1~ %# '
+  unset zle_bracketed_paste
 fi
 
 path+=("$HOME/bin")
@@ -91,6 +97,17 @@ if [[ -v DEVICE_HAS_NVM ]]; then
   [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
 fi
 
+# -- Plan 9 --
+
+if [[ -v DEVICE_HAS_PLAN9 ]]; then
+  export PLAN9="$DEVICE_PLAN9_INSTALLATION"
+  path+=("$PLAN9/bin")
+
+  plumber 2>/dev/null
+
+  alias acme='SHELL="'"$DOTFILES"'"/scripts/acme/acme-shell acme'
+fi
+
 # -- Python --
 
 if [[ -v DEVICE_HAS_PYTHON_3 ]]; then