diff --git a/scripts/launcher.sh b/scripts/launcher.sh index bfe02c6..5e707b5 100755 --- a/scripts/launcher.sh +++ b/scripts/launcher.sh @@ -4,7 +4,7 @@ if [ $# -ne 0 ];then exit 1 fi -notify-send "Photoshop CC started." -i "photoshop" +notify-send "Photoshop CC started." -i "photoshopicon" SCR_PATH="pspath" CACHE_PATH="pscache" diff --git a/scripts/photoshop.desktop b/scripts/photoshop.desktop index 37fa9aa..9d38199 100755 --- a/scripts/photoshop.desktop +++ b/scripts/photoshop.desktop @@ -5,7 +5,7 @@ Exec=bash pspath/launcher/launcher.sh Type=Application StartupNotify=true Comment=Photoshop CC for Linux -Icon=photoshop +Icon=photoshopicon Name[fr_FR]=Photoshop CC diff --git a/scripts/sharedFuncs.sh b/scripts/sharedFuncs.sh index afc4b8f..0ee03ba 100755 --- a/scripts/sharedFuncs.sh +++ b/scripts/sharedFuncs.sh @@ -69,21 +69,30 @@ function launcher() { #create desktop entry local desktop_entry="$PWD/photoshop.desktop" - local desktop_entry_dest="/usr/share/applications/photoshop.desktop" + local desktop_entry_dest="/home/$USER/.local/share/applications/photoshop.desktop" if [ -f "$desktop_entry" ];then show_message "desktop entry detected..." + #delete desktop entry if exists if [ -f "$desktop_entry_dest" ];then show_message "desktop entry exist deleted..." - sudo rm "$desktop_entry_dest" + rm "$desktop_entry_dest" fi - sudo cp "$desktop_entry" "/usr/share/applications" || error "can't copy desktop entry" - sudo sed -i "s|pspath|$SCR_PATH|g" "$desktop_entry_dest" || error "can't edit desktop entry" + cp "$desktop_entry" "$desktop_entry_dest" || error "can't copy desktop entry" + sed -i "s|pspath|$SCR_PATH|g" "$desktop_entry_dest" || error "can't edit desktop entry" else error "desktop entry Not Found" fi + #change photoshop icon of desktop entry + local entry_icon="../images/AdobePhotoshop-icon.png" + local launch_icon="$launcher_dest/AdobePhotoshop-icon.png" + + cp "$entry_icon" "$launcher_dest" + sed -i "s|photoshopicon|$launch_icon|g" "$desktop_entry_dest" || error "can't edit desktop entry" + sed -i "s|photoshopicon|$launch_icon|g" "$launcher_dest/launcher.sh" || error "can't edit launcher script" + #create photoshop command show_message "create photoshop command..." if [ -f "/usr/local/bin/photoshop" ];then diff --git a/scripts/uninstaller.sh b/scripts/uninstaller.sh index b21c7d4..310d298 100755 --- a/scripts/uninstaller.sh +++ b/scripts/uninstaller.sh @@ -5,7 +5,7 @@ source "sharedFuncs.sh" main(){ CMD_PATH="/usr/local/bin/photoshop" - ENTRY_PATH="/usr/share/applications/photoshop.desktop" + ENTRY_PATH="/home/$USER/.local/share/applications/photoshop.desktop" notify-send "photoshop uninstaller started" -i "photoshop" diff --git a/todo.txt b/todo.txt index 995ac2a..9fc2b0c 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,5 @@ -1- change check package installed function implementation -2- change photoshop.desktop icon to orginal png icon +(done) 1- change check package installed function implementation +(done) 2- change photoshop.desktop icon to orginal png icon 3- remove sudo access -4- add download links to json file instead hard coding +4- add download links to json file instead hard coding (mirror)