aboutsummaryrefslogtreecommitdiff
path: root/misc/bin/xdgdef
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-08-21 16:42:27 +1000
committerYuchen Pei <id@ypei.org>2023-08-21 16:42:27 +1000
commitffea78e98b6a9c494c0a52f59e6ad1678a6dc445 (patch)
tree8e09859b1e23e71391e83b45c97bc8b5dfbf2da6 /misc/bin/xdgdef
parent0c844c3e9a8e72bd83e370c12eda5cb315ac5d41 (diff)
Fixing a few things in emacs, adding xdgdef
Emacs: updating the org clock refile so that it refiles all text in the logbook
Diffstat (limited to 'misc/bin/xdgdef')
-rwxr-xr-xmisc/bin/xdgdef5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/bin/xdgdef b/misc/bin/xdgdef
new file mode 100755
index 0000000..3d8791f
--- /dev/null
+++ b/misc/bin/xdgdef
@@ -0,0 +1,5 @@
+#!/bin/bash
+# Print xdg file type and the default opener for a file
+
+filetype=$(xdg-mime query filetype "$1")
+echo $filetype=`xdg-mime query default "$filetype"`