Compare commits

...

2 commits

12 changed files with 30 additions and 13 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
set -eo pipefail
# Define associative array
declare -A apps=()
@ -8,7 +8,6 @@ declare -A apps=()
mkdir -p "${HOME}/.config/launch-menu-apps.d"
cat << EOF >> "${HOME}/.config/launch-menu-apps.d/template.sh.disabled"
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["Example application"]="example-application"
@ -26,9 +25,38 @@ for script in "${HOME}"/.config/launch-menu-apps.d/*.sh; do
source "${script}"
done
# Sort entries
if [ -n "${MENU_SORT}" ]; then
echo ":: Warning: Sorting is currently broken and is considered experimental"
declare -a apps_sorted=($(
for app in "${!apps[@]}"; do
echo "[\"${key}\"]=${apps[${app}]}"
done | sort
))
unset apps
declare -A apps=()
for app in "${!apps_sorted[@]}"; do
key=$(echo -n "${apps_sorted[${app}]}" | grep -o '\["[A-Za-z]+"\]' || true)
value=$(echo -n "${apps_sorted[${app}]}" | grep -o '"[A-Za-z]+"' || true)
echo ":: COPY BSE: ${apps_sorted[@]}"
echo ":: KEY: ${key}"
echo " VAL: ${value}"
apps+=(
["${app}"]="${apps_sorted[${app}]}"
)
done
fi
# Create new variables
apps_keys=
for app in "${!apps[@]}"; do
if [ -n "${MENU_SORT}" ]; then
echo ":: KEYC KEY: ${app}"
echo " VAL: ${apps[${app}]}"
fi
[[ -n "${apps_keys}" ]] && apps_keys="${apps_keys}\n"
apps_keys=${apps_keys}${app}
done

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["LibreWolf"]="librewolf"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["UltraISO"]="flatpak run --command=bottles-cli com.usebottles.bottles run -p UltraISO -b 'UltraISO'"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["Android Studio"]="android-studio"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["ClassiCube"]="~/.apps/ClassiCube/ClassiCube"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["Reload Hyprland"]="hyprctl reload"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["Waycheck"]="flatpak run dev.serebit.Waycheck"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["Kaiteki"]="flatpak run app.kaiteki.Kaiteki"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["LibreSprite"]="flatpak run com.github.libresprite.LibreSprite"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["OpenRGB"]="openrgb"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["Example application"]="example-application"

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
apps+=(
["OpenRGB"]="openrgb"