Skip to content

Instantly share code, notes, and snippets.

View salman-abedin's full-sized avatar

Salman Abedin salman-abedin

View GitHub Profile
@salman-abedin
salman-abedin / launch.sh
Last active September 7, 2023 12:12
XDG Alternative
#!/bin/sh
#
# Launches files based on their mimetypes
# Usage: launch [FILE...]
# Dependencies: file
case $(file --mime-type "$@" -bL) in
# Check for the mimetype of your file (This is POSIX regex)
video/* | audio/* | image/gif)
# Launch using your favorite application