ssh scwrypts extension + moved dotwryn scwrypts extension deeper

This commit is contained in:
2023-07-20 14:49:06 -06:00
parent 8ec32af38e
commit 8ab8647402
28 changed files with 357 additions and 3 deletions

View File

@ -0,0 +1,27 @@
#####################################################################
DEPENDENCIES+=(
awk sed tr
)
REQUIRED_ENV+=()
#####################################################################
GET_COLORSCHEME_HEX() {
[ $1 ] && [[ $1 -le 15 ]] && [[ $1 -ge 0 ]] \
|| FAIL 1 'must provide ANSI color number 0-15'
grep "^color$1 " "$DOTWRYN/colorschemes/kitty.main" \
| awk '{print $2}' \
| sed 's/ //g; s/#//g' \
| tr '[:lower:]' '[:upper:]' \
;
}
SET_THEME() {
local THEME="$DOTWRYN/colorschemes/kitty.$1"
[ ! -f "$THEME" ] && FAIL 1 "no such theme '$1'"
local LOCAL_THEME="$HOME/.config/kitty/theme.conf"
rm -- $LOCAL_THEME
ln -s "$THEME" "$LOCAL_THEME"
}

View File

@ -0,0 +1,19 @@
#####################################################################
DEPENDENCIES+=(
notify-send
)
REQUIRED_ENV+=()
#####################################################################
NOTIFY_SEND() { notify-send "$SCWRYPT_GROUP : $SCWRYPT_NAME" "$1"; }
_NOTIFY() {
NOTIFY_SEND "$1 : ${*:2}"
$1 ${@:2}
}
NOTIFY_SUCCESS() { _NOTIFY SUCCESS $@; }
NOTIFY_ERROR() { _NOTIFY ERROR $@; }
NOTIFY_FAIL() { _NOTIFY FAIL $@; }