[bin] Add my own xdg-open handler

This commit is contained in:
Sebastian Schulze 2021-04-13 16:59:21 +02:00
parent b68c0a31fd
commit 6114a16d1b
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
2 changed files with 30 additions and 1 deletions

30
bin/executable_xdg-open Normal file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
lower=${1,,}
echo $lower
case "${lower%%:*}" in
*.slack.*)
exec qutebrowser-comms "$1"
;;
http|https)
exec firefox "$1"
;;
*.pdf)
exec zathura "$1"
;;
*.gif)
exec mpv --loop=inf "$1"
;;
*.jpg|*.png)
exec feh "$1"
;;
mailto)
exec emacs -nw "$1"
;;
*)
zenity --warning --text "Don't know how to open $@" >&2
;;
esac

View File

@ -32,7 +32,6 @@
networking.useDHCP = false;
networking.networkmanager.enable = true;
networking.useNetworkd = true;
networking.hostName = "apfelstrudel";
networking.firewall.allowedTCPPorts = [ 22 ];
systemd.services.NetworkManager-wait-online.enable = false;