Skip to content

Commit

Permalink
desktop entry icon changed to static one
Browse files Browse the repository at this point in the history
  • Loading branch information
Gictorbit committed Jan 1, 2021
1 parent 51f068d commit c8487c8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/photoshop.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -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


17 changes: 13 additions & 4 deletions scripts/sharedFuncs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/uninstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit c8487c8

Please sign in to comment.