README.md 3.62 KB
Newer Older
akiraohgaki's avatar
akiraohgaki committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# xdgurl

An install helper program for desktop stuff.


## How to install

For Ubuntu/Debian system,
you can use "install.sh" in the project to install the program.

    $ sh install.sh

And you can use "uninstall.sh" to uninstall the program.

    $ sh uninstall.sh


## How to use

#### From web browser

Open XDG-URL by click a links, or type XDG-URL in browser's address bar.

In firefox,
you can get a program selection window when first time to open XDG-URL,
and you can choose "xdgurl" as custom URL handler.

akiraohgaki's avatar
akiraohgaki committed
28
If you can not get a program selection window,
akiraohgaki's avatar
akiraohgaki committed
29
30
31
32
you need set the xdgurl program as custom URL handler for xdg:// scheme in browser's settings.

#### From command-line terminal

akiraohgaki's avatar
akiraohgaki committed
33
Execute xdgurl program with argument XDG-URL.
akiraohgaki's avatar
akiraohgaki committed
34
35
36
37
38
39

    $ xdgurl "XDG-URL"


## XDG-URL

akiraohgaki's avatar
akiraohgaki committed
40
XDG-URL is a custom URL that represent the installation method for desktop stuff.
akiraohgaki's avatar
akiraohgaki committed
41
42
43
44
45
46
47
48
49
50
51

    [scheme]://[command]?[query string]

    For example:
    xdg://install?url=http%3A%2F%2Fexample.com%2Ficons.tar.gz&type=icons

#### Scheme

* xdg
* xdgs

akiraohgaki's avatar
akiraohgaki committed
52
53
"xdgs" scheme is the same of the xdg scheme for now,
it's a reserved name for secure protocol in the future.
akiraohgaki's avatar
akiraohgaki committed
54
55
56
57
58
59
60
61

#### Command

* download
* install

Command "download" will download the file from specified URL to local destination of specified install-type.

akiraohgaki's avatar
akiraohgaki committed
62
Command "install" will make file downloading and trigger installation process.
akiraohgaki's avatar
akiraohgaki committed
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110

#### Query string

XDG-URL's query string is an option of command.

*All query string values should be urlencoded.*

**url** = File URL of desktop stuff

Must be set.

**type** = Install-type

Optional.
Default is "downloads".

Available install-type:

Install-type | Local destination
-------------|------------------
downloads | ~/Downloads
documents | ~/Documents
pictures | ~/Pictures
music | ~/Music
videos | ~/Videos
wallpapers | ~/.local/share/wallpapers
fonts | ~/.fonts
cursors | ~/.icons
icons | ~/.local/share/icons
emoticons | ~/.local/share/emoticons
themes | ~/.themes
emerald_themes | ~/.emerald/themes
enlightenment_themes | ~/.e/e/themes
enlightenment_backgrounds | ~/.e/e/backgrounds
fluxbox_styles | ~/.fluxbox/styles
pekwm_themes | ~/.pekwm/themes
icewm_themes | ~/.icewm/themes
plasma_plasmoids | ~/.local/share/plasma/plasmoids
plasma_look_and_feel | ~/.local/share/plasma/look-and-feel
plasma_desktopthemes | ~/.local/share/plasma/desktoptheme
kwin_effects | ~/.local/share/kwin/effects
kwin_scripts | ~/.local/share/kwin/scripts
kwin_tabbox | ~/.local/share/kwin/tabbox
aurorae_themes | ~/.local/share/aurorae/themes
dekorator_themes | ~/.local/share/deKorator/themes
qtcurve | ~/.local/share/QtCurve
color_schemes | ~/.local/share/color-schemes
gnome_shell_extensions | ~/.local/share/gnome-shell/extensions
111
cinnamon_applets | ~/.local/share/cinnamon/applets
akiraohgaki's avatar
akiraohgaki committed
112
cinnamon_desklets | ~/.local/share/cinnamon/desklets
113
cinnamon_extensions | ~/.local/share/cinnamon/extensions
akiraohgaki's avatar
akiraohgaki committed
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
nautilus_scripts | ~/.local/share/nautilus/scripts
amarok_scripts | ~/.kde/share/apps/amarok/scripts
yakuake_skins | ~/.kde/share/apps/yakuake/skins
cairo_clock_themes | ~/.cairo-clock/themes

Available alias name of the install-type:

Alias | Install-type
------|-------------
gnome_shell_themes | themes
cinnamon_themes | themes
gtk2_themes | themes
gtk3_themes | themes
metacity_themes | themes
xfwm4_themes | themes
openbox_themes | themes
kvantum_themes | themes
compiz_themes | emerald_themes
beryl_themes | emerald_themes
plasma4_plasmoids | plasma_plasmoids
plasma5_plasmoids | plasma_plasmoids
plasma5_look_and_feel | plasma_look_and_feel
plasma5_desktopthemes | plasma_desktopthemes
plasma_color_schemes | color_schemes

**filename** = Alternative file name

Optional.
This option is useful if the download URL does not represent the file name.