Initial commit
This commit is contained in:
25
lib/apply_scheme_to_template.sh
Normal file
25
lib/apply_scheme_to_template.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
SCHEME=$1
|
||||
TEMPLATE=$2
|
||||
|
||||
if [ -z "$MO_PATH" ]; then
|
||||
MO_PATH="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/mo/mo"
|
||||
fi
|
||||
|
||||
source $MO_PATH
|
||||
|
||||
rgb_r() {
|
||||
echo "$((0x${MO_FUNCTION_ARGS[0]:0:2}))"
|
||||
}
|
||||
|
||||
rgb_g() {
|
||||
echo "$((0x${MO_FUNCTION_ARGS[0]:2:2}))"
|
||||
}
|
||||
|
||||
rgb_b() {
|
||||
echo "$((0x${MO_FUNCTION_ARGS[0]:4:4}))"
|
||||
}
|
||||
|
||||
set -a # All variables after this will be exported
|
||||
source $SCHEME
|
||||
mo "$TEMPLATE"
|
||||
1
lib/mo
Submodule
1
lib/mo
Submodule
Submodule lib/mo added at 6e57510ba9
Reference in New Issue
Block a user