blob: 611367972b3976ebd4ec162260fd1709e9ff32f6 (
plain)
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
28
29
30
31
32
33
34
35
36
37
|
# 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/`.
## Checking the database
# Looks up program to open mime type
xdg-mime query default <mime type>
# Looks up mime type of file
xdg-mime query filetype <file>
## Setting defaults
Easiest to do with `mimeopen` (from `perl-file-mimeinfo` on Arch):
mimeopen -d <file>
# 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).
## `ranger`
`ranger` uses its own launcher, `rifle`. Copy the default config to
`~/.config/ranger/rifle.conf`:
ranger --copy-config=rifle
|