From f69b6662cb0da2f5d830c7edf43875d56eb77f91 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 1/8] home: feh: add MIME association --- modules/home/feh/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/feh/default.nix b/modules/home/feh/default.nix index 3a952a2..d72eed2 100644 --- a/modules/home/feh/default.nix +++ b/modules/home/feh/default.nix @@ -10,4 +10,11 @@ in config.programs.feh = lib.mkIf cfg.enable { enable = true; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.media.image = { + bitmap = [ "feh.desktop" ]; + vector = [ "feh.desktop" ]; + }; + }; } From ae2da19bd8fee1b5352195ec335c8a6e0b950818 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 2/8] home: firefox: add MIME associations --- modules/home/firefox/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/firefox/default.nix b/modules/home/firefox/default.nix index 02c74f2..e1b0e37 100644 --- a/modules/home/firefox/default.nix +++ b/modules/home/firefox/default.nix @@ -77,4 +77,8 @@ in }; }; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.editor = [ "firefox.desktop" ]; + }; } From f1e9103bc43fffb1f535b66a5ad9025dfe2936bc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 3/8] home: himalaya: add MIME associations --- modules/home/mail/himalaya/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/mail/himalaya/default.nix b/modules/home/mail/himalaya/default.nix index 849a415..fc64013 100644 --- a/modules/home/mail/himalaya/default.nix +++ b/modules/home/mail/himalaya/default.nix @@ -20,4 +20,8 @@ in ''; }; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.editor = [ "himalaya.desktop" ]; # FIXME: doesn't exist + }; } From 9af0f1d5e80feba73d502a3b306afe40d5691d8f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 4/8] home: mpv: add MIME associations --- modules/home/mpv/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/mpv/default.nix b/modules/home/mpv/default.nix index 8af394c..1ccd0ba 100644 --- a/modules/home/mpv/default.nix +++ b/modules/home/mpv/default.nix @@ -17,5 +17,12 @@ in pkgs.mpvScripts.uosc # Nicer UI ]; }; + + my.home.xdg.mime-apps = { + applications.media = { + audio = [ "mpv.desktop" ]; + video = [ "mpv.desktop" ]; + }; + }; }; } From 1d2419bcea52f689f64bad1a74c30993b3ceb4e6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 5/8] home: nvim: add MIME associations --- modules/home/vim/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/vim/default.nix b/modules/home/vim/default.nix index 8e6bd5c..557588d 100644 --- a/modules/home/vim/default.nix +++ b/modules/home/vim/default.nix @@ -107,4 +107,8 @@ in }; config.xdg.configFile = lib.mkIf cfg.enable configFiles; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.editor = [ "nvim.desktop" ]; + }; } From 6f457afcbf35f346882d6d48d86bb8927283aed8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 6/8] home: zathura: add MIME associations --- modules/home/zathura/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/home/zathura/default.nix b/modules/home/zathura/default.nix index 6162542..7a47e82 100644 --- a/modules/home/zathura/default.nix +++ b/modules/home/zathura/default.nix @@ -17,4 +17,12 @@ in "statusbar-home-tilde" = true; }; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.media.document = { + comic = [ "org.pwmt.zathura.desktop" ]; + ebook = [ "org.pwmt.zathura.desktop" ]; + pdf = [ "org.pwmt.zathura.desktop" ]; + }; + }; } From 0ce420456698afd000e6bcafc2d741f777a8bc18 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 7/8] home: terminal: alacritty: add MIME associations --- modules/home/terminal/alacritty/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/terminal/alacritty/default.nix b/modules/home/terminal/alacritty/default.nix index daf3e80..35a08c6 100644 --- a/modules/home/terminal/alacritty/default.nix +++ b/modules/home/terminal/alacritty/default.nix @@ -48,5 +48,9 @@ in }; }; }; + + my.home.xdg.mime-apps = { + applications.terminal = [ "Alacritty.desktop" ]; + }; }; } From 1953b984cb288c9238f0e4c14e5047e79589fbf5 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 31 Jan 2025 11:43:21 +0000 Subject: [PATCH 8/8] home: terminal: termite: add MIME associations --- modules/home/terminal/termite/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/terminal/termite/default.nix b/modules/home/terminal/termite/default.nix index e8f67a7..b4ecdad 100644 --- a/modules/home/terminal/termite/default.nix +++ b/modules/home/terminal/termite/default.nix @@ -49,5 +49,9 @@ in color15 = ${whiteBold} ''; }; + + my.home.xdg.mime-apps = { + applications.terminal = [ "termite.desktop" ]; + }; }; }