#!/bin/bash
# Filename: add-desktop-personal-plugin
# Dependencies: add-desktop
# Version: 1.0
# Purpose: plugin to add the selected item to the personal menu via add-desktop
# Authors: Dave

# Copyright (C) Monday, Jan. 25, 2021  by Dave / 
# david@daveserver.info
# License: gplv2
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#############################################################################


TEXTDOMAINDIR=/usr/share/locale
TEXTDOMAIN=add-desktop

#Name|Icon|Category|Exec|Location '1) Application Menu|2) Desktop Shortcut|3) Personal'|File Name|Terminal (True/False)|
if add-desktop --add "$1|$2|$3|$4|3|personal-$(basename "$5" .desktop)|$6"; then
    yad --image dialog-information --title Alert --button=gtk-ok:0 --text $"Item added to personal menu";
else
    yad --image dialog-error --title Alert --button=gtk-ok:0 --text $"Item could not be added to personal menu";
fi
