Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDG application desktop launcher & configuration cleanup #247

Merged
merged 1 commit into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 16 additions & 29 deletions snowblocks/xdg/README.md
Original file line number Diff line number Diff line change
@@ -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
19 changes: 0 additions & 19 deletions snowblocks/xdg/applications/atom.desktop

This file was deleted.

21 changes: 0 additions & 21 deletions snowblocks/xdg/applications/evolution.desktop

This file was deleted.

14 changes: 0 additions & 14 deletions snowblocks/xdg/applications/gpick.desktop

This file was deleted.

14 changes: 0 additions & 14 deletions snowblocks/xdg/applications/gtkhash.desktop

This file was deleted.

7 changes: 0 additions & 7 deletions snowblocks/xdg/applications/jetbrains-idea.desktop

This file was deleted.

15 changes: 0 additions & 15 deletions snowblocks/xdg/applications/org.gnome.gedit.desktop

This file was deleted.

12 changes: 0 additions & 12 deletions snowblocks/xdg/applications/shotwell-viewer.desktop

This file was deleted.

12 changes: 0 additions & 12 deletions snowblocks/xdg/autostart/dropbox.desktop

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
[Desktop Entry]
Name=Plank
Type=Application
Exec=plank -n igloo
Exec=plank -n polarbear
Icon=plank
Binary file removed snowblocks/xdg/gtk-3.0/bookmarks-igloo.igloocrypt
Binary file not shown.
2 changes: 1 addition & 1 deletion snowblocks/xdg/gtk-3.0/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

[Settings]
gtk-application-prefer-dark-theme=0
gtk-button-images=1
gtk-button-images=0
gtk-menu-images=0
84 changes: 24 additions & 60 deletions snowblocks/xdg/snowblock.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions snowblocks/xdg/user-dirs.dirs
Original file line number Diff line number Diff line change
Expand Up @@ -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"