add modrinth handler and some other tweaks
This commit is contained in:
parent
9708e59cf4
commit
bfd72420f1
5 changed files with 27 additions and 5 deletions
18
modules/home/misc/scheme-handlers.nix
Normal file
18
modules/home/misc/scheme-handlers.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
ferium-installer-script = pkgs.writeShellScript "ferium-installer" ''
|
||||
mod=$(echo "$1" | awk -F'/' '{print $NF}')
|
||||
${pkgs.kitty}/bin/kitty sh -c "ferium add $mod; read"
|
||||
'';
|
||||
in
|
||||
{
|
||||
xdg.desktopEntries."ferium-installer" = {
|
||||
name = "Intercept Modrinth Links to Ferium";
|
||||
exec = "${ferium-installer-script} %u";
|
||||
mimeType = [ "x-scheme-handler/modrinth" ];
|
||||
};
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/modrinth" = "ferium-installer.desktop";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue