summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2022-11-03 11:55:33 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2022-11-03 11:55:33 -0500
commit0146107851a7f6a05b1a2146e275b631edf20338 (patch)
tree2652b7d3a04cc32656b54bd7f2ab1dfed56847b2
parenta0943a0a387400afc8e49e7a626532e73990d24f (diff)
downloaddotconfig-0146107851a7f6a05b1a2146e275b631edf20338.tar.xz
dotconfig-0146107851a7f6a05b1a2146e275b631edf20338.zip
idk
-rw-r--r--htop/htoprc2
-rw-r--r--launch/config2
-rwxr-xr-xzsh/zscripts/aliasrc.zsh7
-rwxr-xr-xzsh/zscripts/termuxprompt.zsh8
-rwxr-xr-xzsh/zscripts/zplug.zsh6
-rwxr-xr-xzsh/zshrc2
6 files changed, 20 insertions, 7 deletions
diff --git a/htop/htoprc b/htop/htoprc
index 0eb61a0..56ce8e6 100644
--- a/htop/htoprc
+++ b/htop/htoprc
@@ -1,7 +1,7 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 124 46 47 109 110 17 2 18 49 16 1
-sort_key=46
+sort_key=110
sort_direction=-1
tree_sort_key=124
tree_sort_direction=1
diff --git a/launch/config b/launch/config
index 25e6329..026d830 100644
--- a/launch/config
+++ b/launch/config
@@ -17,7 +17,7 @@ halt|off|poweroff|shutdown
^
^
suspend|zzz
- doas s2ram
+ doas s2ram --nofbsuspend
doas zzz
-
reboot|res|restart
diff --git a/zsh/zscripts/aliasrc.zsh b/zsh/zscripts/aliasrc.zsh
index 308690d..8d2f86b 100755
--- a/zsh/zscripts/aliasrc.zsh
+++ b/zsh/zscripts/aliasrc.zsh
@@ -6,10 +6,11 @@ typeset -A repaliases=(
htop htim
mutt neomutt
vim nvim
- sudo "$SUDO"
+ sudo "${SUDO:- }"
)
for alias rep in ${(kv)repaliases}; do command -v $rep >/dev/null && alias $alias=$rep; done # Tests if replacement exists before creating alias
+
# Shorten program names
alias \
open="xdg-open" \
@@ -63,3 +64,7 @@ alias \
mbsync="mbsync --config $MBSYNCRC" \
startx="startx $X11CONFIG/xinitrc" \
+# Copy-pasting from internet
+alias \
+ \$="" \
+ \#="${SUDO-sudo}" \
diff --git a/zsh/zscripts/termuxprompt.zsh b/zsh/zscripts/termuxprompt.zsh
new file mode 100755
index 0000000..1442cc8
--- /dev/null
+++ b/zsh/zscripts/termuxprompt.zsh
@@ -0,0 +1,8 @@
+#!/usr/bin/env zsh
+
+if [ -n "$TERMUX_VERSION" ]; then
+ PS1="%B%F{green}[%F{blue}%U%~%u%F{green}]%f%b%(!.#.$) "
+ PS1OVERRIDE=1
+ export ZPLUGINSDIR=~/.local/share/zsh/zplugins
+ export ZPLUGNOROOT=1
+fi
diff --git a/zsh/zscripts/zplug.zsh b/zsh/zscripts/zplug.zsh
index 587a8c0..b3eff09 100755
--- a/zsh/zscripts/zplug.zsh
+++ b/zsh/zscripts/zplug.zsh
@@ -1,12 +1,12 @@
#!/usr/bin/env zsh
local zplugs="${ZDOTDIR:-~/.}${ZDOTDIR:+/}zplugs" # Declare all variables using `local` to keep them away from the interactive shell
-local zplugins="${ZPLUGINSDIR:-/usr/local/share/zsh/zplugins}"
-[[ $EUID != 0 ]] && local sudo=${SUDO-sudo}
+local zplugins="${ZPLUGINSDIR:-/usr/local/share/zsh/zplugins}" # TODO set default dir if zplugnoroot
+[[ $EUID != 0 ]] && [ -z "$ZPLUGNOROOT" ] && local sudo=${SUDO-sudo}
function __zplugInstall() {
touch "$zplugs"
- local pluglist=( `grep -v '#' "$zplugs"` )
+ local pluglist=( `\grep -v '#' "$zplugs"` )
local confirm plug
shift
for plug in "$@"; do; pluglist+=(${plug}); done
diff --git a/zsh/zshrc b/zsh/zshrc
index e57b70d..7f2c51c 100755
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -5,7 +5,7 @@ for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!
# Colors! + Prompt
autoload -U colors && colors
-PS1="%B%F{${colbr:-red}}[%F{${colname:-yellow}}%n%F{${colat:-green}}@%F{${colhost:-blue}}%m %F{${coldir:-magenta}}%U%~%u%F{${colbr:-red}}]%f%b%(!.#.$) "
+[ -z "$PS1OVERRIDE" ] && PS1="%B%F{${colbr:-red}}[%F{${colname:-yellow}}%n%F{${colat:-green}}@%F{${colhost:-blue}}%m %F{${coldir:-magenta}}%U%~%u%F{${colbr:-red}}]%f%b%(!.#.$) "
# Cd settings
setopt AUTO_CD # `cd` is implied