#!/bin/bash

# omarchy:summary=Ensure default application launchers and mise wrappers are installed.

# Copy .desktop declarations
mkdir -p ~/.local/share/applications
cp "$OMARCHY_PATH"/applications/*.desktop ~/.local/share/applications/

if omarchy-cmd-present alacritty; then
  cp "$OMARCHY_PATH/default/alacritty/Alacritty.desktop" ~/.local/share/applications/
fi

if [[ -f "$OMARCHY_PATH/install/user/mise.sh" ]]; then
  bash "$OMARCHY_PATH/install/user/mise.sh"
fi

update-desktop-database ~/.local/share/applications
