Files
omarchy/bin/omarchy-tui-remove
Ofir Miller 7e1c88b932 update to use $TERMINAL instead of alacitty (#1648)
* update to use $TERMINAL instead of alacitty

* revert

* move env to hyprconfig

* Only set if we have alacritty

* Add launcher for wifi settings so it can be used in mako config

* Set system terminal in config/uwsm/env to ensure its available everywhere

* Ensure that $TERMINAL is available after update

* Didn't work to have the TERMINAL env in Hyprland

* Configure terminal settings against a full set of options

* Make About usable with any terminal

* One more alacritty-specific setting

* Use the new wifi launcher bin

* Only require the update/relaunch if TERMINAL isn't already set in config/uwsm/env

* More alacritty usage converted to $TERMINAL

* Use new launcher

* Change scrolltouchpad input rule to apply to all terminals

* Its a singular match

* Take current font from waybar, in case we don't have alacritty

* Only set font for alacritty if its being used

* Get ready to be terminal agnostic on the refresh of config too

* Use new launcher

* Note the last reliance we have on alacritty

* Make theme setting for terminals generic and include kitty

* Set font_family for kitty as well

* Quiet grep

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
2025-09-16 14:32:40 +02:00

42 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
ICON_DIR="$HOME/.local/share/applications/icons"
DESKTOP_DIR="$HOME/.local/share/applications/"
if [ "$#" -eq 0 ]; then
# Find all TUIs
while IFS= read -r -d '' file; do
if grep -q '^Exec=.*$TERMINAL.*-e' "$file"; then
TUIS+=("$(basename "${file%.desktop}")")
fi
done < <(find "$DESKTOP_DIR" -name '*.desktop' -print0)
if ((${#TUIS[@]})); then
IFS=$'\n' SORTED_TUIS=($(sort <<<"${TUIS[*]}"))
unset IFS
APP_NAMES_STRING=$(gum choose --no-limit --header "Select TUI to remove..." --selected-prefix="✗ " "${SORTED_TUIS[@]}")
# Convert newline-separated string to array
APP_NAMES=()
while IFS= read -r line; do
[[ -n "$line" ]] && APP_NAMES+=("$line")
done <<< "$APP_NAMES_STRING"
else
echo "No TUIs to remove."
exit 1
fi
else
# Use array to preserve spaces in app names
APP_NAMES=("$@")
fi
if [[ ${#APP_NAMES[@]} -eq 0 ]]; then
echo "You must provide TUI names."
exit 1
fi
for APP_NAME in "${APP_NAMES[@]}"; do
rm -f "$DESKTOP_DIR/$APP_NAME.desktop"
rm -f "$ICON_DIR/$APP_NAME.png"
echo "Removed $APP_NAME"
done