From b3364c9c3f8a0a2a073a3ec8b9dd3ee23ce5b24a Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Tue, 14 Apr 2020 15:08:53 +0200 Subject: [PATCH] XDG application desktop launcher & configuration cleanup There were `.desktop` files for applications that are not used anymore for some time now as well as applications that don't require a user-level launcher file anymore. >> Desktop Launchers - `atom.desktop` - Atom [1] was not used anymore since at least February 23 2019 and was replaced by Visual Studio Code [2] in GH-179. - `evolution.desktop` - The usage of Evolution [3] was only temporary and for test purposes regarding the compatibility with different protocols that could be used through opt-in extensions, but it was never the plan to replace the fantasic Thunderbird [4] as main mail application. - `gpick.desktop` - The main reason for a user-level launcher was the missing `MimeType` entry for `application/x-gpick-palette` which has already been patched in the upstream [5]. Anyway, Gpick is also not used anymore since most design related applications include tools to pick colors, like e.g. Firefox's Eyedropper [6] or of course GIMP [7]. - `gtkhash.desktop` - GTKHash [8] is also not used anymore, the user-level launcher was introduced back then to add more keywords for supported hash algorithms. - `jetbrains-ide.desktop` - The user-level launcher was introduced because the used icon name `intellij-idea-ultimate-edition` was not provided by the used icon the ("Numix Circle") so it was changed to the available `idea` icon. Anyway, a symlink was added a long time ago in the icon theme upstream and therefore the custom launcher is not required anymore. - `org.gnome.gedit.desktop` - The user-level launcher was introduced to add more _MIME_ types that should be handled by Gedit [9], this was then resolved shortly afterwards using the correct way through XDG MIME type handling [10]. - `shotwell-viewer.desktop` - The user-level launcher was introduced in order to hide the `shotwell-viewer` application, that is not intended to be called as standalone application, using the `NoDisplay` attribute. Anyway, the launcher is now hidden by default in the upstream [11] and therefore doesn't require a custom launcher anymore. >> XDG Autostart - `dropbox.desktop` - Dropbox [12] was only used for testing purposes and has been replaced by the fantastic and advanced Syncthing [13] and Seafile [14] projects. >> XDG Configurations The `$XDG_CONFIG_HOME/gtk-*/bookmarks` file was never really useful since it only support absolute file/directory paths using the `file://` protocol but doesn't resolve environment variables. It also takes less than a minute to manually create the bookmarks using either Nautilus UI or any other GTK application that support the `GtkPlacesSidebar` API [15]. This also allows to dynamically add or remove bookmarks based on the current requirements. Therefore the file has been removed at all. [1]: https://atom.io [2]: https://code.visualstudio.com [3]: https://wiki.gnome.org/Apps/Evolution [4]: https://www.thunderbird.net [5]: https://github.com/thezbyg/gpick/blob/6adcd1337416e11959a7bc64829ac63459086416/share/applications/gpick.desktop#L10 [6]: https://developer.mozilla.org/en-US/docs/Tools/Eyedropper [7]: https://www.gimp.org [8]: https://github.com/tristanheaven/gtkhash [9]: https://wiki.gnome.org/Apps/Gedit [10]: https://wiki.archlinux.org/index.php/XDG_MIME_Applications [11]: https://gitlab.gnome.org/GNOME/shotwell/-/blob/ca03ce2f8e70670d43be00e9f381f9cd22afbceb/data/org.gnome.Shotwell-Viewer.desktop.in#L9 [12]: https://www.dropbox.com [13]: https://syncthing.net [14]: https://www.seafile.com [15]: https://developer.gnome.org/gtk3/stable/GtkPlacesSidebar.html GH-246 --- snowblocks/xdg/README.md | 45 ++++------ snowblocks/xdg/applications/atom.desktop | 19 ---- snowblocks/xdg/applications/evolution.desktop | 21 ----- snowblocks/xdg/applications/gpick.desktop | 14 --- snowblocks/xdg/applications/gtkhash.desktop | 14 --- .../xdg/applications/jetbrains-idea.desktop | 7 -- .../xdg/applications/org.gnome.gedit.desktop | 15 ---- .../xdg/applications/shotwell-viewer.desktop | 12 --- snowblocks/xdg/autostart/dropbox.desktop | 12 --- ....desktop.igloo => plank.desktop.polarbear} | 2 +- .../xdg/gtk-3.0/bookmarks-igloo.igloocrypt | Bin 418 -> 0 bytes snowblocks/xdg/gtk-3.0/settings.ini | 2 +- snowblocks/xdg/snowblock.json | 84 +++++------------- snowblocks/xdg/user-dirs.dirs | 5 +- 14 files changed, 43 insertions(+), 209 deletions(-) delete mode 100644 snowblocks/xdg/applications/atom.desktop delete mode 100644 snowblocks/xdg/applications/evolution.desktop delete mode 100644 snowblocks/xdg/applications/gpick.desktop delete mode 100644 snowblocks/xdg/applications/gtkhash.desktop delete mode 100644 snowblocks/xdg/applications/jetbrains-idea.desktop delete mode 100644 snowblocks/xdg/applications/org.gnome.gedit.desktop delete mode 100644 snowblocks/xdg/applications/shotwell-viewer.desktop delete mode 100644 snowblocks/xdg/autostart/dropbox.desktop rename snowblocks/xdg/autostart/{plank.desktop.igloo => plank.desktop.polarbear} (92%) delete mode 100644 snowblocks/xdg/gtk-3.0/bookmarks-igloo.igloocrypt diff --git a/snowblocks/xdg/README.md b/snowblocks/xdg/README.md index 3b88b90..92d83e6 100644 --- a/snowblocks/xdg/README.md +++ b/snowblocks/xdg/README.md @@ -1,39 +1,26 @@ -* [Application Desktop Entries](#application-desktop-entries) -* [Autostart](#autostart) -* [Bookmarks](#bookmarks) -* [User Directories](#user-directories) +## _XDG_ Application Desktop Launchers -### Application Desktop Entries +All application `*.desktop` launcher files adhere the [_XDG_ Desktop Entry Specification][fd-spec-desktop-entry]. -All application `*.desktop` entry files adhere the freedesktop [Desktop Entry Specification][fd-spec-desktop-entry]. +See the _Arch Linux wiki_ page about [desktop entries][archw-desktop_entries] for more details. -Read the [Arch Linux Wiki][archw-desktop-entries] site for detailed information and examples. +## _XDG_ Autostart -### Autostart +In an _XDG_-compliant desktop environment, such as [GNOME][], the desktop environment will automatically start `*.desktop` files found in the directories specified in the [Desktop Application Autostart Specification][fd-spec-autostart]: -In an XDG-compliant desktop environment, such as GNOME, the desktop environment will automatically start `*.desktop` files found in the directories specified in the [Desktop Application Autostart Specification][fd-spec-autostart]: +- System-wide: `$XDG_CONFIG_DIRS/autostart/` (`/etc/xdg/autostart/` by default) + - GNOME also starts files found in `/usr/share/gnome/autostart` +- User-level: `$XDG_CONFIG_HOME/autostart` (`~/.config/autostart/` by default) -* System-wide: `$XDG_CONFIG_DIRS/autostart/` (`/etc/xdg/autostart/` by default) - * GNOME also starts files found in `/usr/share/gnome/autostart/` -* User-specific: `$XDG_CONFIG_HOME/autostart/` (`~/.config/autostart/` by default) +See the _Arch Linux_ wiki page about [desktop autostart entries][archw-desktop_entries#autostart] for more details. -System-wide `*.desktop` files can be overridden via the user-specific `~/.config/autostart/` folder. +## _XDG_ User Directories -References: +All user directory configurations adhere the _freedesktop_/_XDG_ [user directories specification][archw-xdg_user_dir]. -* [Arch Linux Wiki - Desktop Entries (Autostart)][archw-desktop-entries-autostart] - -### Bookmarks - -All bookmark configurations adhere the freedesktop [Desktop Bookmark Specification][fd-spec-bookmark]. - -### User Directories - -All user directory configurations adhere the freedesktop [XDG user directories][archw-xdg-user-dir] specification. - -[archw-desktop-entries]: https://wiki.archlinux.org/index.php/Desktop_entries -[archw-desktop-entries-autostart]: https://wiki.archlinux.org/index.php/Desktop_entries#Autostart -[archw-xdg-user-dir]: https://wiki.archlinux.org/index.php/XDG_user_directories +[archw-desktop_entries]: https://wiki.archlinux.org/index.php/Desktop_entries +[archw-desktop_entries#autostart]: https://wiki.archlinux.org/index.php/Desktop_entries#Autostart +[archw-xdg_user_dir]: https://wiki.archlinux.org/index.php/XDG_user_directories [fd-spec-autostart]: https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html -[fd-spec-bookmark]: https://www.freedesktop.org/wiki/Specifications/desktop-bookmark-spec/ -[fd-spec-desktop-entry]: https://specifications.freedesktop.org/desktop-entry-spec/latest/ +[fd-spec-desktop-entry]: https://specifications.freedesktop.org/desktop-entry-spec/latest +[gnome]: https://www.gnome.org diff --git a/snowblocks/xdg/applications/atom.desktop b/snowblocks/xdg/applications/atom.desktop deleted file mode 100644 index a3c7025..0000000 --- a/snowblocks/xdg/applications/atom.desktop +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=Atom -Icon=atom -Exec=/usr/lib/atom/atom %F -StartupNotify=true -MimeType=text/plain;text/css;text/java;text/md;text/markupdescription;text/readme;text/h;text/c;text/cpp;text/cp;text/js;text/xml;text/schema;text/x-sass;text/x-less;text/markdown; -Actions=dev-mode; - -[Desktop Action dev-mode] -Name=DevMode -Exec=atom --dev diff --git a/snowblocks/xdg/applications/evolution.desktop b/snowblocks/xdg/applications/evolution.desktop deleted file mode 100644 index 8304cc9..0000000 --- a/snowblocks/xdg/applications/evolution.desktop +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=Evolution -Exec=evolution --offline %U -Icon=evolution -StartupNotify=true -X-GNOME-UsesNotifications=true -MimeType=text/calendar;text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto; -Keywords=email;calendar;contact;addressbook;task; -Actions=compose; - -[Desktop Action compose] -Name=Compose a message -Exec=evolution mailto: diff --git a/snowblocks/xdg/applications/gpick.desktop b/snowblocks/xdg/applications/gpick.desktop deleted file mode 100644 index 6e8d441..0000000 --- a/snowblocks/xdg/applications/gpick.desktop +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=Gpick -Icon=gpick -Exec=gpick -StartupNotify=true -MimeType=text/x-utility;application/x-gpick-color-palette; diff --git a/snowblocks/xdg/applications/gtkhash.desktop b/snowblocks/xdg/applications/gtkhash.desktop deleted file mode 100644 index 1296dd2..0000000 --- a/snowblocks/xdg/applications/gtkhash.desktop +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=GtkHash -Icon=gtkhash -Exec=gtkhash -StartupNotify=true -Keywords=hash;checksum;digest;md5;sha1;sha256;sha512;whirlpool;crc32 diff --git a/snowblocks/xdg/applications/jetbrains-idea.desktop b/snowblocks/xdg/applications/jetbrains-idea.desktop deleted file mode 100644 index 272e884..0000000 --- a/snowblocks/xdg/applications/jetbrains-idea.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name=IntelliJ IDEA Ultimate Edition -Exec=intellij-idea-ultimate-edition %u -Icon=idea -Terminal=false -StartupWMClass=jetbrains-idea -Type=Application diff --git a/snowblocks/xdg/applications/org.gnome.gedit.desktop b/snowblocks/xdg/applications/org.gnome.gedit.desktop deleted file mode 100644 index 6c2cb2f..0000000 --- a/snowblocks/xdg/applications/org.gnome.gedit.desktop +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=Gedit -Icon=gedit -Exec=gedit %U -StartupNotify=true -DBusActivatable=true -MimeType=text/plain;text/css;text/java;text/md;text/markupdescription;text/markdown;text/github-flavored-markdown;text/readme;text/h;text/c;text/cpp;text/cp;text/js;text/xml;text/schema; diff --git a/snowblocks/xdg/applications/shotwell-viewer.desktop b/snowblocks/xdg/applications/shotwell-viewer.desktop deleted file mode 100644 index 0005d09..0000000 --- a/snowblocks/xdg/applications/shotwell-viewer.desktop +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=Shotwell Viewer -NoDisplay=true -Exec= diff --git a/snowblocks/xdg/autostart/dropbox.desktop b/snowblocks/xdg/autostart/dropbox.desktop deleted file mode 100644 index b81e884..0000000 --- a/snowblocks/xdg/autostart/dropbox.desktop +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2016-present Arctic Ice Studio -# Copyright (C) 2016-present Sven Greb - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT - -[Desktop Entry] -Type=Application -Name=Dropbox -Exec=dropbox -Icon=dropbox diff --git a/snowblocks/xdg/autostart/plank.desktop.igloo b/snowblocks/xdg/autostart/plank.desktop.polarbear similarity index 92% rename from snowblocks/xdg/autostart/plank.desktop.igloo rename to snowblocks/xdg/autostart/plank.desktop.polarbear index c91a03c..a8260f6 100644 --- a/snowblocks/xdg/autostart/plank.desktop.igloo +++ b/snowblocks/xdg/autostart/plank.desktop.polarbear @@ -8,5 +8,5 @@ [Desktop Entry] Name=Plank Type=Application -Exec=plank -n igloo +Exec=plank -n polarbear Icon=plank diff --git a/snowblocks/xdg/gtk-3.0/bookmarks-igloo.igloocrypt b/snowblocks/xdg/gtk-3.0/bookmarks-igloo.igloocrypt deleted file mode 100644 index 1c385ecf2b7c90fdd5f69c20175960c78d3fe1c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 418 zcmV;T0bTw8M@dveQdv+`07|hBob|X@B6}f!#gOo+$eF-?-)W5Y;!E6=8_*wAA6*au zC?QJ0Go4X>Ifza4&`H!Qe(>QkZl`a#zsN@AacJu_Q!VRKF~q~f_hozGoWL58*WMib zL2G|OmR%92)eIgEQ8ib)o;VbM)8@VPM#NStQ3e-#Ja<&)a0SOCf#0FPo@Wft&3N4p zJI`GRI7@k5xM_mfD#EDZ|PTBkm-Y>C@AN zu^yKSU#2HK7kRf+gWAfKRkQ2IPw)kM4NA3hJ6c@j(16P`tu!$gNvQhZ$7aZP&N+T} z<4aiXNoe*WJt+xb@DD+w`Q3OasHp8d#mQMiHl>%Y2(U6>74Iwg)dJb&1zAHll&GP$ zzxQjqNXO~dIAP>-iE~>FPqBC3ZIWO|C4213;u@iKg7+A_w8n%f*tO~%Az6TBG_Eu%MZdFZ9_2$ka1r!7f6K;5x-U>BDl6b<_4O2- MP=jc*S?#9p6M5##DgXcg diff --git a/snowblocks/xdg/gtk-3.0/settings.ini b/snowblocks/xdg/gtk-3.0/settings.ini index 564e432..0d69496 100644 --- a/snowblocks/xdg/gtk-3.0/settings.ini +++ b/snowblocks/xdg/gtk-3.0/settings.ini @@ -7,5 +7,5 @@ [Settings] gtk-application-prefer-dark-theme=0 -gtk-button-images=1 +gtk-button-images=0 gtk-menu-images=0 diff --git a/snowblocks/xdg/snowblock.json b/snowblocks/xdg/snowblock.json index 86230df..4d6a420 100644 --- a/snowblocks/xdg/snowblock.json +++ b/snowblocks/xdg/snowblock.json @@ -1,86 +1,50 @@ [ { "clean": [ - "~/.config", - "~/.config/autostart", - "~/.config/gtk-3.0", - "~/.local/share/applications" + "$XDG_CONFIG_HOME", + "$XDG_CONFIG_HOME/autostart", + "$XDG_CONFIG_HOME/gtk-3.0", + "$XDG_DATA_HOME/applications" ] }, { "link": { - "~/.config/user-dirs.conf": { - "force": true - }, - "~/.config/user-dirs.dirs": { - "force": true - }, - "~/.config/user-dirs.locale": { - "force": true - }, - "~/.config/gtk-3.0/bookmarks": { + "$XDG_DATA_HOME/applications/minecraft.desktop": { "create": true, "force": true, "hosts": { - "igloo": "gtk-3.0/bookmarks-igloo.igloocrypt" + "polarbear": "applications/minecraft.desktop" } }, - "~/.local/share/applications/atom.desktop": { - "create": true, - "force": true, - "path": "applications/atom.desktop" - }, - "~/.local/share/applications/evolution.desktop": { - "create": true, - "force": true, - "path": "applications/evolution.desktop" - }, - "~/.local/share/applications/gpick.desktop": { - "create": true, - "force": true, - "path": "applications/gpick.desktop" - }, - "~/.local/share/applications/gtkhash.desktop": { - "create": true, - "force": true, - "path": "applications/gtkhash.desktop" - }, - "~/.local/share/applications/minecraft.desktop": { - "create": true, - "force": true, - "path": "applications/minecraft.desktop" - }, - "~/.local/share/applications/org.gnome.gedit.desktop": { - "create": true, - "force": true, - "path": "applications/org.gnome.gedit.desktop" - }, - "~/.local/share/applications/org.gnome.Screenshot.desktop": { + "$XDG_DATA_HOME/applications/org.gnome.Screenshot.desktop": { "create": true, "force": true, - "path": "applications/org.gnome.Screenshot.desktop" - }, - "~/.local/share/applications/shotwell-viewer.desktop": { - "create": true, - "force": true, - "path": "applications/shotwell-viewer.desktop" + "hosts": { + "polarbear": "applications/org.gnome.Screenshot.desktop" + } }, - "~/.config/autostart/dropbox.desktop": { + "$XDG_CONFIG_HOME/autostart/plank.desktop": { "create": true, "force": true, - "path": "autostart/dropbox.desktop" + "hosts": { + "polarbear": "autostart/plank.desktop.polarbear" + } }, - "~/.config/autostart/plank.desktop": { + "$XDG_CONFIG_HOME/gtk-3.0/settings.ini": { "create": true, "force": true, "hosts": { - "igloo": "autostart/plank.desktop.igloo" + "polarbear": "gtk-3.0/settings.ini" } }, - "~/.config/gtk-3.0/settings.ini": { - "create": true, - "force": true, - "path": "gtk-3.0/settings.ini" + "$XDG_CONFIG_HOME/user-dirs.conf": { + "force": true + }, + "$XDG_CONFIG_HOME/user-dirs.dirs": { + "force": true + }, + "$XDG_CONFIG_HOME/user-dirs.locale": { + "force": true } } } diff --git a/snowblocks/xdg/user-dirs.dirs b/snowblocks/xdg/user-dirs.dirs index f9e5811..329cd86 100644 --- a/snowblocks/xdg/user-dirs.dirs +++ b/snowblocks/xdg/user-dirs.dirs @@ -7,11 +7,8 @@ XDG_DESKTOP_DIR="$HOME/desktop" Desktop XDG_DOCUMENTS_DIR="$HOME/documents" Documents -XDG_TEMPLATES_DIR="$HOME/code/snippetbox/gists" XDG_DOWNLOAD_DIR="$HOME/downloads" Downloads XDG_MUSIC_DIR="$HOME/music" Music XDG_PICTURES_DIR="$HOME/images" Images +XDG_TEMPLATES_DIR="$HOME/code/snippetbox/gists" XDG_VIDEOS_DIR="$HOME/videos" Videos - -# Public share directory is currently disabled -#XDG_PUBLICSHARE_DIR="$HOME/public/share"