Add some more mime-types and improve query func
This commit is contained in:
parent
708cb4c97f
commit
7fa4a0b898
|
@ -51,16 +51,19 @@
|
||||||
"hypr/macchiato.conf".source = ./macchiato.conf;
|
"hypr/macchiato.conf".source = ./macchiato.conf;
|
||||||
"hypr/extra.conf" = lib.mkDefault { text = ""; };
|
"hypr/extra.conf" = lib.mkDefault { text = ""; };
|
||||||
};
|
};
|
||||||
mimeApps = {
|
mimeApps = let
|
||||||
|
associations = {
|
||||||
|
"image/jpeg" = [ "swayimg.desktop" ];
|
||||||
|
"image/png" = [ "swayimg.desktop" ];
|
||||||
|
"application/pdf" = [ "zathura.desktop" "emacs.desktop" ];
|
||||||
|
"application/json" = [ "emacs.desktop" "firefox.desktop" ];
|
||||||
|
"application/x-yaml" = [ "emacs.desktop" ];
|
||||||
|
"text/csv" = [ "calc.desktop" "emacs.desktop" ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = associations;
|
||||||
"image/jpeg" = [ "swayimg.desktop" ];
|
associations.added = associations;
|
||||||
"image/png" = [ "swayimg.desktop" ];
|
|
||||||
};
|
|
||||||
associations.added = {
|
|
||||||
"image/jpeg" = [ "swayimg.desktop" ];
|
|
||||||
"image/png" = [ "swayimg.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,11 @@
|
||||||
source ${catppuccin-themes.zsh}
|
source ${catppuccin-themes.zsh}
|
||||||
'';
|
'';
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
xdg-query-program () { xdg-mime query default $(xdg-mime query filetype $@) }
|
xdg-query-program () {
|
||||||
|
FILETYPE=$(xdg-mime query filetype $@)
|
||||||
|
DEFAULT=$(xdg-mime query default $FILETYPE)
|
||||||
|
echo "$FILETYPE -> $DEFAULT"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue