Skip to content

Commit

Permalink
Merge pull request #78 from arcticicestudio/feature/gh-74-xdg
Browse files Browse the repository at this point in the history
XDG
  • Loading branch information
arcticicestudio authored Nov 28, 2017
2 parents 1eb5ffc + f6309e8 commit 89b6877
Show file tree
Hide file tree
Showing 25 changed files with 328 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
snowblocks/bash/**/*.local
snowblocks/bash/.log


# +--- git ---+
snowblocks/git/gitconfig_auth_job

# +--- xdg ---+
snowblocks/xdg/applications/mimeinfo.cache
39 changes: 39 additions & 0 deletions snowblocks/xdg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
* [Application Desktop Entries](#application-desktop-entries)
* [Autostart](#autostart)
* [Bookmarks](#bookmarks)
* [User Directories](#user-directories)

### Application Desktop Entries

All application `*.desktop` entry files adhere the freedesktop [Desktop Entry Specification][fd-spec-desktop-entry].

Read the [Arch Linux Wiki][archw-desktop-entries] site for detailed information and examples.

### 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-specific: `$XDG_CONFIG_HOME/autostart/` (`~/.config/autostart/` by default)

System-wide `*.desktop` files can be overridden via the user-specific `~/.config/autostart/` folder.

References:

* [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
[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/
12 changes: 12 additions & 0 deletions snowblocks/xdg/applications/atom.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=Atom
Icon=atom
Exec=electron --app=/usr/lib/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;
Actions=dev-mode;

[Desktop Action dev-mode]
Name=DevMode
Exec=atom --dev
14 changes: 14 additions & 0 deletions snowblocks/xdg/applications/evolution.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[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:
7 changes: 7 additions & 0 deletions snowblocks/xdg/applications/gpick.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Gpick
Icon=gpick
Exec=gpick
StartupNotify=true
MimeType=text/x-utility;application/x-gpick-color-palette;
7 changes: 7 additions & 0 deletions snowblocks/xdg/applications/gtkhash.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=GtkHash
Icon=gtkhash
Exec=gtkhash
StartupNotify=true
Keywords=hash;checksum;digest;md5;sha1;sha256;sha512;whirlpool;crc32
5 changes: 5 additions & 0 deletions snowblocks/xdg/applications/intellij-idea-ce.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=IntelliJ IDEA Community Edition
Icon=intellij-idea-ce
Exec=/opt/intellij-idea-ce/bin/idea.sh
5 changes: 5 additions & 0 deletions snowblocks/xdg/applications/intellij-idea-u.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=IntelliJ IDEA Ultimate
Icon=intellij-idea
Exec=/opt/intellij-idea-u/bin/idea.sh
6 changes: 6 additions & 0 deletions snowblocks/xdg/applications/minecraft.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=Minecraft
Icon=minecraft
Exec=/opt/minecraft-launcher/minecraft-launcher.sh
Path=/opt/minecraft-launcher
14 changes: 14 additions & 0 deletions snowblocks/xdg/applications/org.gnome.Nautilus.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Desktop Entry]
Type=Application
Name=Nautilus
Icon=org.gnome.Nautilus
Exec=nautilus --new-window %U
DBusActivatable=true
Actions=new-window;
StartupNotify=true
MimeType=inode/directory;application/x-gnome-saved-search;
X-GNOME-UsesNotifications=true

[Desktop Action new-window]
Name=New Window
Exec=nautilus --new-window
24 changes: 24 additions & 0 deletions snowblocks/xdg/applications/org.gnome.Screenshot.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[Desktop Entry]
Type=Application
Name=Screenshot
Icon=applets-screenshooter
Exec=gnome-screenshot --interactive
DBusActivatable=true
Actions=area;window;window-shadow;screen;
StartupNotify=true

[Desktop Action area]
Name=Area
Exec=gnome-screenshot --area

[Desktop Action window]
Name=Window
Exec=gnome-screenshot --window --delay=3

[Desktop Action window-shadow]
Name=Window (Shadow)
Exec=gnome-screenshot --window --delay=3 --border-effect=shadow

[Desktop Action screen]
Name=Screen
Exec=gnome-screenshot --delay=3
8 changes: 8 additions & 0 deletions snowblocks/xdg/applications/org.gnome.gedit.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[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;
5 changes: 5 additions & 0 deletions snowblocks/xdg/applications/pycharm-community.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=PyCharm Community
Icon=pycharm
Exec=/opt/pycharm-community/bin/pycharm.sh
5 changes: 5 additions & 0 deletions snowblocks/xdg/applications/shotwell-viewer.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=Shotwell Viewer
NoDisplay=true
Exec=
5 changes: 5 additions & 0 deletions snowblocks/xdg/applications/webstorm.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=WebStorm
Icon=webstorm
Exec=/opt/webstorm/bin/webstorm.sh
5 changes: 5 additions & 0 deletions snowblocks/xdg/autostart/dropbox.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=Dropbox
Exec=dropbox
Icon=dropbox
5 changes: 5 additions & 0 deletions snowblocks/xdg/autostart/plank.desktop.archbook
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Name=Plank
Type=Application
Exec=plank -n archbook
Icon=plank
5 changes: 5 additions & 0 deletions snowblocks/xdg/autostart/plank.desktop.igloo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Name=Plank
Type=Application
Exec=plank -n igloo
Icon=plank
Binary file added snowblocks/xdg/gtk-3.0/bookmarks.archbook.igloocrypt
Binary file not shown.
Binary file added snowblocks/xdg/gtk-3.0/bookmarks.igloo.igloocrypt
Binary file not shown.
11 changes: 11 additions & 0 deletions snowblocks/xdg/gtk-3.0/settings.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2016-2017 Arctic Ice Studio <[email protected]>
# Copyright (c) 2016-2017 Sven Greb <[email protected]>

# Project: igloo
# Repository: https://github.com/arcticicestudio/igloo
# License: MIT

[Settings]
gtk-application-prefer-dark-theme=0
gtk-button-images=1
gtk-menu-images=0
114 changes: 114 additions & 0 deletions snowblocks/xdg/snowblock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[
{
"clean": [
"~/.config",
"~/.config/autostart",
"~/.config/gtk-3.0",
"~/.local/share/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": {
"create": true,
"force": true,
"hosts": {
"archbook": "gtk-3.0/bookmarks.archbook.igloocrypt",
"igloo": "gtk-3.0/bookmarks.igloo.igloocrypt"
}
},
"~/.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/intellij-idea-ce.desktop": {
"create": true,
"force": true,
"path": "applications/intellij-idea-ce.desktop"
},
"~/.local/share/applications/intellij-idea-u.desktop": {
"create": true,
"force": true,
"path": "applications/intellij-idea-u.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.Nautilus.desktop": {
"create": true,
"force": true,
"path": "applications/org.gnome.Nautilus.desktop"
},
"~/.local/share/applications/org.gnome.Screenshot.desktop": {
"create": true,
"force": true,
"path": "applications/org.gnome.Screenshot.desktop"
},
"~/.local/share/applications/pycharm-community.desktop": {
"create": true,
"force": true,
"path": "applications/pycharm-community.desktop"
},
"~/.local/share/applications/shotwell-viewer.desktop": {
"create": true,
"force": true,
"path": "applications/shotwell-viewer.desktop"
},
"~/.local/share/applications/webstorm.desktop": {
"create": true,
"force": true,
"path": "applications/webstorm.desktop"
},
"~/.config/autostart/dropbox.desktop": {
"create": true,
"force": true,
"path": "autostart/dropbox.desktop"
},
"~/.config/autostart/plank.desktop": {
"create": true,
"force": true,
"hosts": {
"archbook": "autostart/plank.desktop.archbook",
"igloo": "autostart/plank.desktop.igloo"
}
},
"~/.config/gtk-3.0/settings.ini": {
"create": true,
"force": true,
"path": "gtk-3.0/settings.ini"
}
}
}
]
11 changes: 11 additions & 0 deletions snowblocks/xdg/user-dirs.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2016-2017 Arctic Ice Studio <[email protected]>
# Copyright (c) 2016-2017 Sven Greb <[email protected]>

# Project: igloo
# Repository: https://github.com/arcticicestudio/igloo
# License: MIT

# Prevent "xdg-user-dirs-update" to override custom user directories on login with default configurations.
enabled=False

filename_encoding=UTF-8
17 changes: 17 additions & 0 deletions snowblocks/xdg/user-dirs.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2016-2017 Arctic Ice Studio <[email protected]>
# Copyright (c) 2016-2017 Sven Greb <[email protected]>

# Project: igloo
# Repository: https://github.com/arcticicestudio/igloo
# License: MIT

XDG_DESKTOP_DIR="$HOME/desktop" Desktop
XDG_DOCUMENTS_DIR="$HOME/documents" Documents
XDG_TEMPLATES_DIR="$HOME/code/scratchpad/gists"
XDG_DOWNLOAD_DIR="$HOME/downloads" Downloads
XDG_MUSIC_DIR="$HOME/music" Music
XDG_PICTURES_DIR="$HOME/images" Images
XDG_VIDEOS_DIR="$HOME/videos" Videos

# Public share directory is currently disabled
#XDG_PUBLICSHARE_DIR="$HOME/public/share"
1 change: 1 addition & 0 deletions snowblocks/xdg/user-dirs.locale
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C

0 comments on commit 89b6877

Please sign in to comment.