diff --git a/config/yazi/yazi.toml b/config/yazi/yazi.toml index 4b1b090..6fbe5f7 100644 --- a/config/yazi/yazi.toml +++ b/config/yazi/yazi.toml @@ -17,7 +17,7 @@ pdf = [ ] image = [ { run = 'xdg-open "$@"', desc = "Open" }, - { run = 'set-theme "$@"', desc = "Set desktop theme from this image" }, + { run = 'set-theme %s1', desc = "Set desktop theme from this image" }, ] [open] diff --git a/scripts/set-theme b/scripts/set-theme index 41bc88c..e5928aa 100755 --- a/scripts/set-theme +++ b/scripts/set-theme @@ -1,4 +1,4 @@ #!/bin/sh cd "$(dirname "$0")/.." -./setup.sh $1 +./setup.sh $(readlink --canonicalize $1) diff --git a/setup.sh b/setup.sh index 26a1a3a..fa5fa3e 100755 --- a/setup.sh +++ b/setup.sh @@ -30,9 +30,7 @@ fi # │ System config file │ # └ ┘ # (currently only env) -confirmation="" -read -p "Also install the system-wide environment file? (y/N) " confirmation -if [[ "$confirmation" == "y" ]]; then +if [[ "$2" == "sys" ]]; then sudo cp ./system/environment /etc/environment fi @@ -58,7 +56,7 @@ cp ./linters/indentconfig_import.yaml ~/.indentconfig.yaml # If no image is specified, then the previous one is used # If no image was used previously and none is specified, an error is raised if [[ -n $1 ]]; then - matugen image --prefer value $1 + matugen image --prefer closest-to-fallback --fallback-color "#0000FF" --type scheme-smart $1 mkdir ~/.local/state/janishutz &> /dev/null || true echo "$1" >~/.local/state/janishutz/imgcache else