Faster theme and bg changes
This commit is contained in:
+12
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Open a generic image selector menu
|
||||
# omarchy:args=[--selected <image>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--cache-only] <image-dir>...
|
||||
# omarchy:args=[--selected <image>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--preload] [--cache-only] <image-dir>...
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
|
||||
@@ -11,11 +11,12 @@ show_labels=false
|
||||
filterable=false
|
||||
lazy_thumbnails=false
|
||||
prepare_only=false
|
||||
preload=false
|
||||
cache_only=false
|
||||
image_dirs=()
|
||||
|
||||
usage() {
|
||||
echo "Usage: omarchy-menu-images [--selected <image>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--cache-only] <image-dir>..."
|
||||
echo "Usage: omarchy-menu-images [--selected <image>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--preload] [--cache-only] <image-dir>..."
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
@@ -49,6 +50,10 @@ while [[ $# -gt 0 ]]; do
|
||||
prepare_only=true
|
||||
shift
|
||||
;;
|
||||
--preload)
|
||||
preload=true
|
||||
shift
|
||||
;;
|
||||
--cache-only)
|
||||
cache_only=true
|
||||
shift
|
||||
@@ -225,6 +230,11 @@ fi
|
||||
# ImagePicker plugin Qt.atob()s on the other side.
|
||||
rows_b64=$(printf '%s' "$rows" | base64 -w 0)
|
||||
|
||||
if [[ $preload == true ]]; then
|
||||
omarchy-shell-ipc image-selector preload "$rows_b64" "$selected_list_image" "$show_labels" "$filterable" >/dev/null || true
|
||||
exit 0
|
||||
fi
|
||||
|
||||
send_builtin_ipc_request() {
|
||||
perl -MCwd=abs_path -MEncode=encode,decode -MSocket \
|
||||
-e '
|
||||
|
||||
Reference in New Issue
Block a user