diff options
Diffstat (limited to 'dev-utils')
| -rw-r--r-- | dev-utils/fontello-config-small.json | 34 | ||||
| -rwxr-xr-x | dev-utils/run-plugin | 87 |
2 files changed, 119 insertions, 2 deletions
diff --git a/dev-utils/fontello-config-small.json b/dev-utils/fontello-config-small.json index ff3952ff..895de303 100644 --- a/dev-utils/fontello-config-small.json +++ b/dev-utils/fontello-config-small.json @@ -1,5 +1,5 @@ { - "name": "", + "name": "icons", "css_prefix_text": "icon-", "css_use_suffix": false, "hinting": true, @@ -83,6 +83,36 @@ "css": "cancel-1", "code": 67, "src": "fontawesome" + }, + { + "uid": "04f022b8bd044d4ccfffd3887ff72088", + "css": "window-minimize", + "code": 95, + "src": "fontawesome" + }, + { + "uid": "d0e62145dbf40f30e47b3819b8b43a8f", + "css": "window-restore", + "code": 119, + "src": "fontawesome" + }, + { + "uid": "7394501fc0b17cb7bda99538f92e26d6", + "css": "window-close", + "code": 88, + "src": "fontawesome" + }, + { + "uid": "559647a6f430b3aeadbecd67194451dd", + "css": "menu-1", + "code": 77, + "src": "fontawesome" + }, + { + "uid": "07f0832c07f3d9713fffb06c8bffa027", + "css": "window-maximize", + "code": 87, + "src": "fontawesome" } ] -} +}
\ No newline at end of file diff --git a/dev-utils/run-plugin b/dev-utils/run-plugin new file mode 100755 index 00000000..ee950b0d --- /dev/null +++ b/dev-utils/run-plugin @@ -0,0 +1,87 @@ +#!/bin/bash + +set -o errexit + +option_copy=on +pargs=() +while [[ "$#" -gt 0 ]]; do + case $1 in + -keep) + option_copy=off + ;; + -global) + option_global=on + ;; + -*) + echo "error: unknown option \"$1\"" + exit 1 + ;; + *) + pargs+=("$1") + ;; + esac + shift +done + +if [ "${#pargs[@]}" -lt 3 ]; then + echo "usage: $0 [options] <plugin-dir> <plugin-name> <build-dir>" + exit 1 +fi + +plugin_dir="${pargs[0]}" +plugin="${pargs[1]}" + +if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "mingw"* ]]; then + run_windows=yes +fi + +rundir=".run" +bindir="$rundir/bin" +datadir="$rundir/share/lite-xl" + +userdir="$(realpath "$rundir")" +builddir="${pargs[2]}" + +build_lite () { + echo "running ninja" + ninja -C "$builddir" +} + +copy_lite_build () { + echo "copying lite executable and data" + rm -fr "$rundir" + mkdir -p "$bindir" "$datadir" + if [ ! -z ${run_windows+x} ]; then + cp "$builddir/src/lite.exe" "$bindir" + else + cp "$builddir/src/lite" "$bindir" + fi + for module_name in core plugins colors fonts; do + cp -r "data/$module_name" "$datadir" + done +} + +run_lite () { + if [ ! -z ${option_global+x} ]; then + echo "running \"lite ${pargs[@]:3}\"" + exec "$bindir/lite" "${pargs[@]:3}" + else + echo "running \"lite ${pargs[@]:3}\" with local HOME" + if [ ! -z ${run_windows+x} ]; then + USERPROFILE="$userdir" exec "$bindir/lite" "${pargs[@]:3}" + else + HOME="$userdir" exec "$bindir/lite" "${pargs[@]:3}" + fi + fi +} + +copy_plugin () { + echo "-- lite-xl 1.16" | cat - "$plugin_dir/$plugin.lua" > "$datadir/plugins/$plugin.lua" +} + +if [ $option_copy == on ]; then + build_lite + copy_lite_build +fi +copy_plugin +run_lite |
