From 1fa6c018a461a6db44545517a1728071eb3f97d2 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sun, 17 Aug 2025 20:15:03 -0300 Subject: [PATCH] :wrench: chore(hypr/scripts/exec): support executing desktop entries by name --- config/hypr/scripts/exec.sh | 7 ++++++- config/hypr/shell/autostart.conf | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/hypr/scripts/exec.sh b/config/hypr/scripts/exec.sh index e90d9d6..44abdc9 100644 --- a/config/hypr/scripts/exec.sh +++ b/config/hypr/scripts/exec.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script executes the provided program with UWSM -# if in usage or launches it normally with hyprctl. +# if active, or else normally. # --------------- # Licensed under the MIT License # Made by retrozinndev (João Dias) @@ -13,4 +13,9 @@ if uwsm check is-active; then exit 0 fi +if [[ $1 =~ [.]desktop$ ]]; then + gtk-launch $@ + exit 0 +fi + exec "$@" diff --git a/config/hypr/shell/autostart.conf b/config/hypr/shell/autostart.conf index 4f58f69..94013b3 100644 --- a/config/hypr/shell/autostart.conf +++ b/config/hypr/shell/autostart.conf @@ -18,4 +18,4 @@ exec-once = sh $XDG_CONFIG_HOME/hypr/scripts/gen-pywal.sh exec-once = sleep 3 && sh $XDG_CONFIG_HOME/hypr/scripts/load-hyprsunset.sh # wait some time to actually set the filters # Shell -exec-once = $exec colorshell +exec-once = $exec colorshell.desktop