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
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
# Define associative array
|
# Define associative array
|
||||||
declare -A apps=()
|
declare -A apps=()
|
||||||
|
@ -8,7 +8,6 @@ declare -A apps=()
|
||||||
mkdir -p "${HOME}/.config/launch-menu-apps.d"
|
mkdir -p "${HOME}/.config/launch-menu-apps.d"
|
||||||
cat << EOF >> "${HOME}/.config/launch-menu-apps.d/template.sh.disabled"
|
cat << EOF >> "${HOME}/.config/launch-menu-apps.d/template.sh.disabled"
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["Example application"]="example-application"
|
["Example application"]="example-application"
|
||||||
|
@ -26,9 +25,38 @@ for script in "${HOME}"/.config/launch-menu-apps.d/*.sh; do
|
||||||
source "${script}"
|
source "${script}"
|
||||||
done
|
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
|
# Create new variables
|
||||||
apps_keys=
|
apps_keys=
|
||||||
for app in "${!apps[@]}"; do
|
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"
|
[[ -n "${apps_keys}" ]] && apps_keys="${apps_keys}\n"
|
||||||
apps_keys=${apps_keys}${app}
|
apps_keys=${apps_keys}${app}
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["LibreWolf"]="librewolf"
|
["LibreWolf"]="librewolf"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["UltraISO"]="flatpak run --command=bottles-cli com.usebottles.bottles run -p UltraISO -b 'UltraISO'"
|
["UltraISO"]="flatpak run --command=bottles-cli com.usebottles.bottles run -p UltraISO -b 'UltraISO'"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["Android Studio"]="android-studio"
|
["Android Studio"]="android-studio"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["ClassiCube"]="~/.apps/ClassiCube/ClassiCube"
|
["ClassiCube"]="~/.apps/ClassiCube/ClassiCube"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["Reload Hyprland"]="hyprctl reload"
|
["Reload Hyprland"]="hyprctl reload"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["Waycheck"]="flatpak run dev.serebit.Waycheck"
|
["Waycheck"]="flatpak run dev.serebit.Waycheck"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["Kaiteki"]="flatpak run app.kaiteki.Kaiteki"
|
["Kaiteki"]="flatpak run app.kaiteki.Kaiteki"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["LibreSprite"]="flatpak run com.github.libresprite.LibreSprite"
|
["LibreSprite"]="flatpak run com.github.libresprite.LibreSprite"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["OpenRGB"]="openrgb"
|
["OpenRGB"]="openrgb"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["Example application"]="example-application"
|
["Example application"]="example-application"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
apps+=(
|
apps+=(
|
||||||
["OpenRGB"]="openrgb"
|
["OpenRGB"]="openrgb"
|
||||||
|
|
Loading…
Reference in a new issue