Advertisement
Guest User

Untitled

a guest
Feb 8th, 2021
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # DynCal - Sailfish OS calendar icon will show you the current day of the month.
  4. # Copyright (C) 2015-2016 fravaccaro <fravaccaro90@gmail.com>
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19.  
  20. # Get date and define variables
  21. day="$(date +'%d')"
  22. month="$(date +'%m')"
  23. main=/usr/share/harbour-dyncal
  24.  
  25. # Find if there's an holiday icon for the current day
  26. if [ -f $main/icons/$month$day.png ]; then
  27. icon=$month$day
  28. else
  29. icon=$day
  30. fi
  31.  
  32. # Apply icon
  33. rm /usr/share/applications/jolla-calendar.desktop && touch /usr/share/applications/jolla-calendar.desktop
  34. echo '[Desktop Entry]
  35. Type=Application
  36. Name=Calendar
  37. X-MeeGo-Logical-Id=calendar-ap-name
  38. X-MeeGo-Translation-Catalog=calendar
  39. Icon=icon-launcher-calendar
  40. Exec=invoker --type=silica-qt5 -n -d 5 -s /usr/bin/jolla-calendar
  41. Comment=Jolla calendar
  42. X-Maemo-Service=com.jolla.calendar.ui
  43. X-Maemo-Object-Path=/com/jolla/calendar/ui
  44. X-Maemo-Method=com.jolla.calendar.ui.activateWindow
  45. X-Desktop-File-Install-Version=0.23
  46. [X-Sailjail]
  47. Permissions=Accounts;Notifications;Calendar;Contacts;Privileged;SyncFW;Sharing
  48. OrganizationName=com.jolla
  49. ApplicationName=calendar' > /usr/share/applications/jolla-calendar.desktop
  50. /usr/bin/desktop-file-install /usr/share/applications/jolla-calendar.desktop --set-icon=$main/icons/$icon.png
  51. exit 0
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement