m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):