better touch support in de2

This commit is contained in:
notgne2 2022-05-22 23:09:58 -07:00
parent ece39204ae
commit 35ebe2352d
Signed by: notgne2
GPG Key ID: 5CE0A245A2DAC84A

View File

@ -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;