omarchy remove dev (#4065)

Co-authored-by: JustinMissmahl <github@emeruslabs.com~>
This commit is contained in:
Justin Mißmahl 2026-01-03 22:23:43 +01:00 committed by GitHub
parent c723411049
commit 941e1c2dd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 148 additions and 1 deletions

View File

@ -366,10 +366,11 @@ show_install_elixir_menu() {
}
show_remove_menu() {
case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in
case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰵮 Development\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in
*Package*) terminal omarchy-pkg-remove ;;
*Web*) present_terminal omarchy-webapp-remove ;;
*TUI*) present_terminal omarchy-tui-remove ;;
*Development*) show_remove_development_menu ;;
*Theme*) present_terminal omarchy-theme-remove ;;
*Windows*) present_terminal "omarchy-windows-vm remove" ;;
*Fingerprint*) present_terminal "omarchy-setup-fingerprint --remove" ;;
@ -378,6 +379,50 @@ show_remove_menu() {
esac
}
show_remove_development_menu() {
case $(menu "Remove" "󰫏 Ruby on Rails\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml\n Clojure") in
*Rails*) present_terminal "omarchy-remove-dev-env ruby" ;;
*JavaScript*) show_remove_javascript_menu ;;
*Go*) present_terminal "omarchy-remove-dev-env go" ;;
*PHP*) show_remove_php_menu ;;
*Python*) present_terminal "omarchy-remove-dev-env python" ;;
*Elixir*) show_remove_elixir_menu ;;
*Zig*) present_terminal "omarchy-remove-dev-env zig" ;;
*Rust*) present_terminal "omarchy-remove-dev-env rust" ;;
*Java*) present_terminal "omarchy-remove-dev-env java" ;;
*NET*) present_terminal "omarchy-remove-dev-env dotnet" ;;
*OCaml*) present_terminal "omarchy-remove-dev-env ocaml" ;;
*Clojure*) present_terminal "omarchy-remove-dev-env clojure" ;;
*) show_remove_menu ;;
esac
}
show_remove_javascript_menu() {
case $(menu "Remove" " Node.js\n Bun\n Deno") in
*Node*) present_terminal "omarchy-remove-dev-env node" ;;
*Bun*) present_terminal "omarchy-remove-dev-env bun" ;;
*Deno*) present_terminal "omarchy-remove-dev-env deno" ;;
*) show_remove_development_menu ;;
esac
}
show_remove_php_menu() {
case $(menu "Remove" " PHP\n Laravel\n Symfony") in
*PHP*) present_terminal "omarchy-remove-dev-env php" ;;
*Laravel*) present_terminal "omarchy-remove-dev-env laravel" ;;
*Symfony*) present_terminal "omarchy-remove-dev-env symfony" ;;
*) show_remove_development_menu ;;
esac
}
show_remove_elixir_menu() {
case $(menu "Remove" " Elixir\n Phoenix") in
*Elixir*) present_terminal "omarchy-remove-dev-env elixir" ;;
*Phoenix*) present_terminal "omarchy-remove-dev-env phoenix" ;;
*) show_remove_development_menu ;;
esac
}
show_update_menu() {
case $(menu "Update" " Omarchy\n󰔫 Channel\n Config\n󰸌 Extra Themes\n Process\n󰇅 Hardware\n Firmware\n Password\n Timezone\n Time") in
*Omarchy*) present_terminal omarchy-update ;;

102
bin/omarchy-remove-dev-env Executable file
View File

@ -0,0 +1,102 @@
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Usage: omarchy-remove-dev-env <ruby|node|bun|deno|go|php|laravel|symfony|python|elixir|phoenix|zig|rust|java|dotnet|ocaml|clojure>" >&2
exit 1
fi
remove_php() {
sudo pacman -Rns --noconfirm php composer php-sqlite xdebug 2>/dev/null || true
}
case "$1" in
ruby)
echo -e "Removing Ruby...\n"
mise uninstall ruby --all
mise rm -g ruby
rm -f ~/.gemrc
;;
node)
echo -e "Removing Node.js...\n"
mise uninstall node --all
mise rm -g node
;;
bun)
echo -e "Removing Bun...\n"
mise uninstall bun --all
mise rm -g bun
;;
deno)
echo -e "Removing Deno...\n"
mise uninstall deno --all
mise rm -g deno
;;
go)
echo -e "Removing Go...\n"
mise uninstall go --all
mise rm -g go
;;
php)
echo -e "Removing PHP...\n"
remove_php
;;
laravel)
echo -e "Removing Laravel...\n"
composer global remove laravel/installer 2>/dev/null || true
;;
symfony)
echo -e "Removing Symfony CLI...\n"
sudo pacman -Rns --noconfirm symfony-cli 2>/dev/null || true
;;
python)
echo -e "Removing Python...\n"
mise uninstall python --all
mise rm -g python
rm -rf ~/.local/bin/uv ~/.local/bin/uvx ~/.cargo/bin/uv 2>/dev/null || true
;;
elixir|phoenix)
echo -e "Removing Elixir/Erlang...\n"
mise uninstall elixir --all
mise uninstall erlang --all
mise rm -g elixir
mise rm -g erlang
;;
zig)
echo -e "Removing Zig...\n"
mise uninstall zig --all
mise uninstall zls --all
mise rm -g zig
mise rm -g zls
;;
rust)
echo -e "Removing Rust...\n"
rustup self uninstall -y 2>/dev/null || true
;;
java)
echo -e "Removing Java...\n"
mise uninstall java --all
mise rm -g java
;;
dotnet)
echo -e "Removing .NET...\n"
mise uninstall dotnet --all
mise rm -g dotnet
;;
ocaml)
echo -e "Removing OCaml...\n"
opam switch remove default -y 2>/dev/null || true
rm -rf ~/.opam 2>/dev/null || true
sudo rm -f /usr/local/bin/opam 2>/dev/null || true
;;
clojure)
echo -e "Removing Clojure...\n"
mise uninstall clojure --all
mise rm -g clojure
;;
*)
echo "Unknown environment: $1"
exit 1
;;
esac
echo -e "\nDone!"