From ad2e8de50a90fb109d57f20e28250d35c8d34fcb Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sat, 11 Mar 2023 00:59:54 +0100 Subject: Add xdg-open info --- xdg-open.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 xdg-open.md diff --git a/xdg-open.md b/xdg-open.md new file mode 100644 index 0000000..e4b685d --- /dev/null +++ b/xdg-open.md @@ -0,0 +1,23 @@ +# Opening files with specific programs + +`xdg-open` looks up a file's mimetype, then determines which application to use +to open it. + +The local database for applications to use is in `~/.config/mimeapps.list`. Need +a `.desktop` file, which can be created under `~/.local/share/applications/`. + +## Setting defaults + +Easiest to do with `mimeopen` (from `perl-file-mimeinfo` on Arch): + + mimeopen -d + # will prompt to select a program from a list + +## Default browser + +The relevant mime types are: + + x-scheme-handler/http= + x-scheme-handler/https= + +For qutebrowser, just copied the `.desktop` from [the repo](https://github.com/qutebrowser/qutebrowser/blob/master/misc/org.qutebrowser.qutebrowser.desktop). -- cgit v1.2.3