2023-11-08 17:15:32 +01:00

70 lines
2.2 KiB
Nix

{ lib, config, pkgs, ... }:
let
dbus-hyprland-environment = pkgs.writeTextFile {
name = "dbus-hyprland-environment";
destination = "/bin/dbus-hyprland-environment";
executable = true;
text = ''
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=hyprland
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire wireplumber pipewire-media-session xdg-desktop-portal xdg-desktop-portal-hyprland
'';
};
in {
config = lib.mkIf (config.homecfg.wm == "Wayland") {
home.packages = with pkgs; [
dbus-hyprland-environment
wayland
grim
slurp
swappy
cliphist
wl-clipboard
wlr-randr
wdisplays
kanshi
glib
brillo
swww
];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/discord-409416265891971072" =
[ "discord-409416265891971072.desktop" ];
"x-scheme-handler/discord-402572971681644545" =
[ "discord-402572971681644545.desktop" ];
"x-scheme-handler/discord-696343075731144724" =
[ "discord-696343075731144724.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/chrome" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
"application/x-extension-htm" = [ "firefox.desktop" ];
"application/x-extension-html" = [ "firefox.desktop" ];
"application/x-extension-shtml" = [ "firefox.desktop" ];
"application/xhtml+xml" = [ "firefox.desktop" ];
"application/x-extension-xhtml" = [ "firefox.desktop" ];
"application/x-extension-xht" = [ "firefox.desktop" ];
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
"text/plain" = [ "vscodium.desktop" ];
"video/mp4" = [ "mpv.desktop" ];
"image/png" = [ "imv-dir.desktop" ];
"image/jpg" = [ "imv-dir.desktop" ];
};
associations = {
removed = { "application/pdf" = [ "krita_pdf.desktop" ]; };
};
};
};
}