desktop entry icon changed to static one

This commit is contained in:
victor 2021-01-01 16:49:19 +03:30
parent 51f068d8af
commit c8487c8a90
5 changed files with 19 additions and 10 deletions

View File

@ -4,7 +4,7 @@ if [ $# -ne 0 ];then
exit 1 exit 1
fi fi
notify-send "Photoshop CC started." -i "photoshop" notify-send "Photoshop CC started." -i "photoshopicon"
SCR_PATH="pspath" SCR_PATH="pspath"
CACHE_PATH="pscache" CACHE_PATH="pscache"

View File

@ -5,7 +5,7 @@ Exec=bash pspath/launcher/launcher.sh
Type=Application Type=Application
StartupNotify=true StartupNotify=true
Comment=Photoshop CC for Linux Comment=Photoshop CC for Linux
Icon=photoshop Icon=photoshopicon
Name[fr_FR]=Photoshop CC Name[fr_FR]=Photoshop CC

View File

@ -69,21 +69,30 @@ function launcher() {
#create desktop entry #create desktop entry
local desktop_entry="$PWD/photoshop.desktop" 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 if [ -f "$desktop_entry" ];then
show_message "desktop entry detected..." show_message "desktop entry detected..."
#delete desktop entry if exists #delete desktop entry if exists
if [ -f "$desktop_entry_dest" ];then if [ -f "$desktop_entry_dest" ];then
show_message "desktop entry exist deleted..." show_message "desktop entry exist deleted..."
sudo rm "$desktop_entry_dest" rm "$desktop_entry_dest"
fi fi
sudo cp "$desktop_entry" "/usr/share/applications" || error "can't copy desktop entry" cp "$desktop_entry" "$desktop_entry_dest" || error "can't copy desktop entry"
sudo sed -i "s|pspath|$SCR_PATH|g" "$desktop_entry_dest" || error "can't edit desktop entry" sed -i "s|pspath|$SCR_PATH|g" "$desktop_entry_dest" || error "can't edit desktop entry"
else else
error "desktop entry Not Found" error "desktop entry Not Found"
fi 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 #create photoshop command
show_message "create photoshop command..." show_message "create photoshop command..."
if [ -f "/usr/local/bin/photoshop" ];then if [ -f "/usr/local/bin/photoshop" ];then

View File

@ -5,7 +5,7 @@ source "sharedFuncs.sh"
main(){ main(){
CMD_PATH="/usr/local/bin/photoshop" 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" notify-send "photoshop uninstaller started" -i "photoshop"

View File

@ -1,5 +1,5 @@
1- change check package installed function implementation (done) 1- change check package installed function implementation
2- change photoshop.desktop icon to orginal png icon (done) 2- change photoshop.desktop icon to orginal png icon
3- remove sudo access 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)