Compare commits
2 commits
180ba5f7df
...
add62d1929
Author | SHA1 | Date | |
---|---|---|---|
add62d1929 | |||
9926ec4048 |
12 changed files with 30 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["LibreWolf"]="librewolf"
|
||||
|
|
|
@ -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'"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["Android Studio"]="android-studio"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["ClassiCube"]="~/.apps/ClassiCube/ClassiCube"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["Reload Hyprland"]="hyprctl reload"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["Waycheck"]="flatpak run dev.serebit.Waycheck"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["Kaiteki"]="flatpak run app.kaiteki.Kaiteki"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["LibreSprite"]="flatpak run com.github.libresprite.LibreSprite"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["OpenRGB"]="openrgb"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["Example application"]="example-application"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
apps+=(
|
||||
["OpenRGB"]="openrgb"
|
||||
|
|
Loading…
Reference in a new issue