nixos/home/scripts/xdg-query-program.sh

6 lines
133 B
Bash
Executable file

#!/usr/bin/env bash
FILETYPE=$(xdg-mime query filetype $@)
DEFAULT=$(xdg-mime query default $FILETYPE)
echo "$FILETYPE -> $DEFAULT"