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

6 lines
133 B
Bash
Raw Normal View History

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