From 2334e407f515816608189a828ade8b387b1bbd7a Mon Sep 17 00:00:00 2001 From: Akira Ohgaki <akiraohgaki@gmail.com> Date: Wed, 12 Oct 2016 23:15:50 +0900 Subject: [PATCH] Path variables --- src/configs/destinations.json | 40 +++++++++++++++++------------------ src/handlers/xdgurl.cpp | 8 +++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/configs/destinations.json b/src/configs/destinations.json index 1f2e76b..65e2c3e 100644 --- a/src/configs/destinations.json +++ b/src/configs/destinations.json @@ -4,11 +4,11 @@ "pictures": "$HOME/Pictures", "music": "$HOME/Music", "videos": "$HOME/Videos", - "wallpapers": "$XDG_DATA/wallpapers", + "wallpapers": "$XDG_DATA_HOME/wallpapers", "fonts": "$HOME/.fonts", "cursors": "$HOME/.icons", - "icons": "$XDG_DATA/icons", - "emoticons": "$XDG_DATA/emoticons", + "icons": "$XDG_DATA_HOME/icons", + "emoticons": "$XDG_DATA_HOME/emoticons", "themes": "$HOME/.themes", "emerald_themes": "$HOME/.emerald/themes", "enlightenment_themes": "$HOME/.e/e/themes", @@ -16,22 +16,22 @@ "fluxbox_styles": "$HOME/.fluxbox/styles", "pekwm_themes": "$HOME/.pekwm/themes", "icewm_themes": "$HOME/.icewm/themes", - "plasma_plasmoids": "$XDG_DATA/plasma/plasmoids", - "plasma_look_and_feel": "$XDG_DATA/plasma/look-and-feel", - "plasma_desktopthemes": "$XDG_DATA/plasma/desktoptheme", - "kwin_effects": "$XDG_DATA/kwin/effects", - "kwin_scripts": "$XDG_DATA/kwin/scripts", - "kwin_tabbox": "$XDG_DATA/kwin/tabbox", - "aurorae_themes": "$XDG_DATA/aurorae/themes", - "dekorator_themes": "$XDG_DATA/deKorator/themes", - "qtcurve": "$XDG_DATA/QtCurve", - "color_schemes": "$XDG_DATA/color-schemes", - "gnome_shell_extensions": "$XDG_DATA/gnome-shell/extensions", - "cinnamon_applets": "$XDG_DATA/cinnamon/applets", - "cinnamon_desklets": "$XDG_DATA/cinnamon/desklets", - "cinnamon_extensions": "$XDG_DATA/cinnamon/extensions", - "nautilus_scripts": "$XDG_DATA/nautilus/scripts", - "amarok_scripts": "$KDE_DATA/apps/amarok/scripts", - "yakuake_skins": "$KDE_DATA/apps/yakuake/skins", + "plasma_plasmoids": "$XDG_DATA_HOME/plasma/plasmoids", + "plasma_look_and_feel": "$XDG_DATA_HOME/plasma/look-and-feel", + "plasma_desktopthemes": "$XDG_DATA_HOME/plasma/desktoptheme", + "kwin_effects": "$XDG_DATA_HOME/kwin/effects", + "kwin_scripts": "$XDG_DATA_HOME/kwin/scripts", + "kwin_tabbox": "$XDG_DATA_HOME/kwin/tabbox", + "aurorae_themes": "$XDG_DATA_HOME/aurorae/themes", + "dekorator_themes": "$XDG_DATA_HOME/deKorator/themes", + "qtcurve": "$XDG_DATA_HOME/QtCurve", + "color_schemes": "$XDG_DATA_HOME/color-schemes", + "gnome_shell_extensions": "$XDG_DATA_HOME/gnome-shell/extensions", + "cinnamon_applets": "$XDG_DATA_HOME/cinnamon/applets", + "cinnamon_desklets": "$XDG_DATA_HOME/cinnamon/desklets", + "cinnamon_extensions": "$XDG_DATA_HOME/cinnamon/extensions", + "nautilus_scripts": "$XDG_DATA_HOME/nautilus/scripts", + "amarok_scripts": "$KDEHOME/share/apps/amarok/scripts", + "yakuake_skins": "$KDEHOME/share/apps/yakuake/skins", "cairo_clock_themes": "$HOME/.cairo-clock/themes" } diff --git a/src/handlers/xdgurl.cpp b/src/handlers/xdgurl.cpp index 0b924c5..bf56d0f 100644 --- a/src/handlers/xdgurl.cpp +++ b/src/handlers/xdgurl.cpp @@ -84,11 +84,11 @@ QString XdgUrl::_convertPathString(const QString &path) if (newPath.contains("$HOME")) { newPath.replace("$HOME", Utility::File::homePath()); } - else if (newPath.contains("$XDG_DATA")) { - newPath.replace("$XDG_DATA", Utility::File::xdgDataHomePath()); + else if (newPath.contains("$XDG_DATA_HOME")) { + newPath.replace("$XDG_DATA_HOME", Utility::File::xdgDataHomePath()); } - else if (newPath.contains("$KDE_DATA")) { - newPath.replace("$KDE_DATA", Utility::File::kdehomePath()); + else if (newPath.contains("$KDEHOME")) { + newPath.replace("$KDEHOME", Utility::File::kdehomePath()); } return newPath; -- GitLab