nixos_config/home/modules/wm/sway/xdg.nix

57 lines
2.1 KiB
Nix
Raw Normal View History

2026-03-10 21:50:51 +01:00
{ pkgs, ... }:
2026-03-10 21:05:35 +01:00
let
2026-03-10 21:50:51 +01:00
commands = import ../../../../lib/commands.nix { inherit pkgs; };
2026-03-10 21:05:35 +01:00
inherit (commands) swaymsg lock;
in
2026-03-10 18:54:37 +01:00
{
xdg = {
configFile."libinput-gestures.conf".text = ''
gesture pinch in 3 sh -c "echo key ctrl+w | ${pkgs.dotool}/bin/dotool"
gesture swipe left 3 ${swaymsg} workspace prev
gesture swipe right 3 ${swaymsg} workspace next
gesture swipe down 3 ${swaymsg} move container to scratchpad
gesture swipe up 3 ${swaymsg} fullscreen
gesture swipe down 4 ${lock}
gesture pinch out 3 ${swaymsg} floating toggle
gesture pinch in 4 ${swaymsg} kill
'';
configFile."electron-flags.conf".text = ''
--enable-features=WaylandWindowDecorations,AllowQt
--ozone-platform=wayland
--gtk-version=4
'';
mimeApps = {
enable = true;
defaultApplicationPackages = [
pkgs.gnome-text-editor
pkgs.evince
pkgs.vlc
pkgs.loupe
pkgs.nautilus
pkgs.chromium
];
2026-03-10 21:05:35 +01:00
defaultApplications = {
2026-03-10 18:54:37 +01:00
"text/*" = [ "${pkgs.gnome-text-editor}/share/applications/org.gnome.TextEditor.desktop" ];
"application/xml" = [ "${pkgs.gnome-text-editor}/share/applications/org.gnome.TextEditor.desktop" ];
"application/json" = [ "${pkgs.gnome-text-editor}/share/applications/org.gnome.TextEditor.desktop" ];
"application/pdf" = [ "${pkgs.evince}/share/applications/org.gnome.Evince.desktop" ];
2026-03-10 21:05:35 +01:00
2026-03-10 18:54:37 +01:00
"video/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
"audio/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
"text/html" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
"application/xhtml+xml" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
"application/x-web-app-manifest+json" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
"application/xml-dtd" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
2026-03-10 21:50:51 +01:00
"image/*" = [ "${pkgs.loupe}/share/applications/org.gnome.Loupe.desktop" ];
2026-03-10 18:54:37 +01:00
};
};
};
2026-03-10 21:05:35 +01:00
2026-03-10 18:54:37 +01:00
systemd.user.sessionVariables = {
GNOME_DESKTOP_SESSION_ID = "999";
2026-03-10 21:05:35 +01:00
SHELL_THICCNESS = "LOW";
2026-03-10 18:54:37 +01:00
};
2026-03-10 21:50:51 +01:00
}