diff --git a/home-manager/modules/de2u.nix b/home-manager/modules/de2u.nix index 2dd59d1..be0bd68 100644 --- a/home-manager/modules/de2u.nix +++ b/home-manager/modules/de2u.nix @@ -13,6 +13,12 @@ in default = true; description = "Enable tiling stuff"; }; + + touch = mkOption { + type = types.bool; + default = false; + description = "Make usable for touchscreens"; + }; }; config = mkIf cfg.enable { @@ -142,17 +148,17 @@ in systemd.user.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = lib.mkIf cfg.tiling "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = lib.mkIf (cfg.tiling && !cfg.touch) "1"; }; xdg.configFile."gtk-4.0/gtk.css".text = '' /* UNITE windowDecorations */ - @import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk4/buttons-right/${if cfg.tiling then "always" else "both"}.css'); + @import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk4/buttons-right/${if (cfg.tiling && !cfg.touch) then "always" else "both"}.css'); /* windowDecorations UNITE */ ''; gtk.gtk3.extraCss = '' /* UNITE windowDecorations */ - @import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk3/buttons-right/${if cfg.tiling then "always" else "both"}.css'); + @import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk3/buttons-right/${if (cfg.tiling && !cfg.touch) then "always" else "both"}.css'); /* windowDecorations UNITE */ ''; home.activation.gtk3css-over-unite = { @@ -262,8 +268,8 @@ in only-on-primary = cfg.tiling; }; "org/gnome/shell/extensions/unite" = { - hide-window-titlebars = if cfg.tiling then "always" else "both"; - hide-activities-button = if cfg.tiling then "never" else "always"; + hide-window-titlebars = if (cfg.tiling && !cfg.touch) then "always" else "both"; + hide-activities-button = if (cfg.tiling || cfg.touch) then "never" else "always"; show-window-buttons = if cfg.tiling then "never" else "both"; notifications-position = "center"; restrict-to-primary-screen = false;