m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/xdg-open.md
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2026-02-01 22:03:08 +0100
committerMarcin Chrzanowski <m@m-chrzan.xyz>2026-02-01 22:03:08 +0100
commit4c89df889ec0c33c89e2c787dbed1bfe4449c07c (patch)
tree8ff20fade3b2178082a1f2c5817095e22d191c1a /xdg-open.md
parente1262c7eb2aa3ab968876eef979120a99856ea5b (diff)
mime type stuffHEADmaster
Diffstat (limited to 'xdg-open.md')
-rw-r--r--xdg-open.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/xdg-open.md b/xdg-open.md
index a688517..6113679 100644
--- a/xdg-open.md
+++ b/xdg-open.md
@@ -6,6 +6,13 @@ 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):