initial pikachu configuration

This commit is contained in:
2024-08-14 19:07:00 -06:00
parent 31c50177f5
commit a29a07c0aa
35 changed files with 2319 additions and 46 deletions

View File

@ -65,7 +65,10 @@ MAIN() {
* ) ERROR "unknown argument '$1'" ;;
esac
shift $_S
[[ $_S -le $# ]] \
&& shift $_S \
|| ERROR "missing argument for '$1'" \
|| shift $#
done
CHECK_ERRORS
@ -149,7 +152,9 @@ MAIN() {
[ $BASTION_HOST ] && {
PASSTHROUGH_COMMAND="$(GET_PASSTHROUGH_PREFIX) connect $REMOTE_NAME -- -c $(printf "%q " "$REMOTE_COMMAND")"
DEBUG "REMOTE_COMMAND : $REMOTE_COMMAND"
PASSTHROUGH_COMMAND="$(GET_PASSTHROUGH_PREFIX) connect $REMOTE_NAME --"
[ "$REMOTE_COMMAND" ] && PASSTHROUGH_COMMAND+=" -c $(printf "%q " "$REMOTE_COMMAND")"
BASTION_TARGET=$REMOTE_NAME REMOTE__TARGET=$BASTION_HOST MAIN --command "$PASSTHROUGH_COMMAND"
return $?

View File

@ -1,3 +1,3 @@
GET_PASSTHROUGH_PREFIX() {
echo "SUBSCWRYPT=$((SUBSCWRYPT+1)) SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL scwrypts"
echo "source ~/.zshrc &>/dev/null; SUBSCWRYPT=$((SUBSCWRYPT+1)) SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL scwrypts"
}

View File

@ -60,7 +60,10 @@ MAIN() {
;;
* ) ERROR "unrecognized argument '$1'" ;;
esac
shift $_S
[[ $_S -le $# ]] \
&& shift $_S \
|| ERROR "missing argument for '$1'" \
|| shift $#
done
[ $CONNECTION_STRING ] \
@ -108,7 +111,7 @@ MAIN() {
CONNECTION_TEST() {
[ $REMOTE_NAME ] && {
[[ $(REMOTE__QUERY_CONNECTION .sessions.$REMOTE_NAME) =~ false ]] && {
[[ $(REMOTE__QUERY_CONNECTION .sessions.$REMOTE_NAME.enabled) =~ false ]] && {
return 1
}
}

View File

@ -1,4 +1,4 @@
#!/bin/zsh
#!/usr/bin/env zsh
#
# works as a standalone zsh script
#

View File

@ -9,7 +9,7 @@ set-window-option -g status-keys vi
setw -gq utf8 on
set -g status-style fg=brightmagenta,bg=black
set -g window-status-current-style fg=black,bg=brightmagenta
set -g status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT0/capacity)% "
set -g status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT[01]/capacity | head -n1)% "
# navigate between hosts with ALT+window-number
set -g base-index 1