M Cargo.toml +9 -3
@@ 1,11 1,17 @@
[package]
name = "choosier"
version = "0.1.0"
+edition = "2018"
authors = ["Michel Alexandre Salim <michel@michel-slm.name>"]
-edition = "2018"
+homepage = "https://sr.ht/~michel-slm/choosier/"
+repository = "https://hg.sr.ht/~michel-slm/choosier"
+readme = "README.md"
license = "MPL-2.0"
-readme = "README.md"
-repository = "https://hg.sr.ht/~michel-slm/choosier"
+keywords = ["browser"]
+categories = ["command-line-utilities"]
+description = """
+Choose your browser based on the URL given
+"""
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
A => Makefile +17 -0
@@ 0,0 1,17 @@
+DESTDIR=
+INSTALL=/usr/bin/install -p
+PREFIX=/usr/local
+
+default:
+ cargo build
+
+clean:
+ cargo clean
+
+install: assets/choosier.desktop
+ ${INSTALL} -D assets/choosier.desktop ${DESTDIR}${PREFIX}/share/applications/choosier.desktop
+
+install-bin: src/main.rs
+ cargo install --path . --root ${DESTDIR}${PREFIX}
+
+install-all: install install-bin
M README.md +25 -0
@@ 6,6 6,31 @@ be configured to open the URL in differe
The initial prototype just passes through the URL to the current default
browser; routing and registering this as a browser will be added later.
+## Installation
+
+A Fedora RPM is in the works. Meanwhile, to install:
+
+`sudo make install-all` will install `choosier` to `/usr/local/bin` and the
+desktop file to `/usr/local/share/applications`.
+
+Override the prefix using `PREFIX`, e.g. change it to `/usr`:
+
+``` shell
+sudo make install-all PREFIX=/usr
+```
+
+Verify that `choosier` is available as a MIME handler:
+
+``` shell
+gio mime text/html
+gio mime application/xhtml+xml
+```
+
+Then copy `examples/choosier.toml` to `$HOME/.config/choosier/choosier.toml` (to
+use it for your own user) or to `/etc/choosier/choosier.toml` (will apply to all
+users unless that user has a local override), and change your default browser to
+Choosier (e.g. in GNOME, `Settings -> Default Applications -> Web`).
+
## License
`choosier` is subject to the terms of the Mozilla Public License, v. 2.0.
A => assets/choosier.desktop +13 -0
@@ 0,0 1,13 @@
+[Desktop Entry]
+Version=1.0
+Name=Choosier
+GenericName=Web Browser
+Comment=Browse the Web
+Exec=choosier %u
+Icon=web-browser
+Terminal=false
+Type=Application
+MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
+StartupNotify=true
+Categories=Network;WebBrowser;
+Keywords=web;browser;internet;