mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Pull the font-menu into omarchy-menu
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
OMARCHY_BIN_PATH=~/.local/share/omarchy/bin
|
||||
|
||||
menu() {
|
||||
echo -e "$2" | walker --dmenu --theme dmenu_250 -p "$1…"
|
||||
echo -e "$2" | walker --dmenu --theme dmenu_250 -p "$1…" $3
|
||||
}
|
||||
|
||||
terminal() {
|
||||
@@ -23,6 +23,10 @@ install_and_launch() {
|
||||
present_terminal "echo 'Installing $1...'; yay -Sy --noconfirm $2 && gtk-launch $3"
|
||||
}
|
||||
|
||||
install_font() {
|
||||
present_terminal "echo 'Installing $1...'; yay -Sy --noconfirm $2 && ~/.local/share/omarchy/bin/omarchy-font-set "$3""
|
||||
}
|
||||
|
||||
show_learn_menu() {
|
||||
case $(menu "Learn" " Keybindings\n Omarchy\n Hyprland\n Arch\n Neovim\n Bash") in
|
||||
*Keybindings*) $OMARCHY_BIN_PATH/omarchy-menu-keybindings ;;
|
||||
@@ -38,7 +42,7 @@ show_learn_menu() {
|
||||
show_style_menu() {
|
||||
case $(menu "Style" " Theme\n Font\n Background") in
|
||||
*Theme*) show_theme_menu ;;
|
||||
*Font*) terminal $OMARCHY_BIN_PATH/omarchy-font-menu ;;
|
||||
*Font*) show_font_menu ;;
|
||||
*Background*) $OMARCHY_BIN_PATH/omarchy-theme-bg-next ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
@@ -53,6 +57,15 @@ show_theme_menu() {
|
||||
fi
|
||||
}
|
||||
|
||||
show_font_menu() {
|
||||
theme=$(menu "Font" "$($OMARCHY_BIN_PATH/omarchy-font-list)" "-w 350")
|
||||
if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then
|
||||
show_main_menu
|
||||
else
|
||||
$OMARCHY_BIN_PATH/omarchy-font-set "$theme"
|
||||
fi
|
||||
}
|
||||
|
||||
show_capture_menu() {
|
||||
case $(menu "Capture" " Screenshot\n Screenrecord\n Color") in
|
||||
*Screenshot*) show_screenshot_menu ;;
|
||||
@@ -146,6 +159,17 @@ show_install_editor_menu() {
|
||||
esac
|
||||
}
|
||||
|
||||
show_install_font_menu() {
|
||||
case $(menu "Install" " Meslo LG Mono") in
|
||||
*Meslo*) install_font "VSCode" "visual-studio-code-bin" "code" ;;
|
||||
*Fira*) install_and_launch "Fira Code" "ttf-firacode-nerd" "FiraCode Nerd Font" ;;
|
||||
*Victor*) install_font "Victor Code" "ttf-victor-mono-nerd" "VictorMono Nerd Font" ;;
|
||||
*Victor*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;;
|
||||
*Bitstream*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;;
|
||||
*) show_install_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_remove_menu() {
|
||||
case $(menu "Remove" " Package\n Web App\n Theme\n Fingerprint\n Fido2") in
|
||||
*Package*) terminal $OMARCHY_BIN_PATH/omarchy-pkg-remove ;;
|
||||
|
||||
Reference in New Issue
Block a user