#!/bin/bash

# Script to install the Kazam desktop entry

# Create the local applications directory if it doesn't exist
mkdir -p ~/.local/share/applications

# Update the desktop file with the correct path
CURRENT_DIR=$(pwd)
sed "s|\$(pwd)|$CURRENT_DIR|g" kazam.desktop > ~/.local/share/applications/kazam-python.desktop

echo "Desktop entry installed at ~/.local/share/applications/kazam-python.desktop"
echo "Kazam should now appear in your application menu"

# Update the desktop database
update-desktop-database ~/.local/share/applications || echo "Could not update desktop database (not critical)" 
