sway: remove gtk window decoration

This commit is contained in:
Leonardo Eugênio 2023-02-25 16:43:58 -03:00
parent 1beedef599
commit 313a8e168a
5 changed files with 68 additions and 3 deletions

View file

@ -36,7 +36,10 @@
'';
};
papirus_red = (final.unstable.papirus-icon-theme.override { color = "red"; });
orchis_theme_compact = (final.orchis-theme.override { tweaks = [ "compact" "solid" ]; });
orchis_theme_compact = (final.orchis-theme.override {
border-radius = 0;
tweaks = [ "compact" "solid" ];
});
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
});

View file

@ -6,4 +6,5 @@
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; };
amdgpu-kernel-module = pkgs.callPackage ./amdgpu-kernel-module.nix { };
gtk3-nocsd = pkgs.callPackage ./gtk3-nocsd.nix { };
}

40
pkgs/gtk3-nocsd.nix Normal file
View file

@ -0,0 +1,40 @@
{ lib
, stdenv
, fetchFromGitHub
, pkgconfig
, gtk3
, gobject-introspection
}:
stdenv.mkDerivation rec {
pname = "gtk3-nocsd";
version = "3.0.1";
src = fetchFromGitHub {
owner = "ZaWertun";
repo = pname;
rev = "v${version}";
sha256 = "035rrn9jq9bdfkmmj6xl4q8paqx7xf3hxsw6gslgk86sh7x56lvi";
};
buildInputs = [
gtk3
gobject-introspection
];
nativeBuildInputs = [
pkgconfig
];
makeFlags = [
"prefix=${placeholder "out"}"
];
meta = with lib; {
description = "A hack to disable gtk+ 3 client side decoration";
homepage = https://github.com/PCMan/gtk3-nocsd;
license = licenses.lgpl21Plus;
# maintainers = with maintainers; [ peanutbutter144 ];
platforms = platforms.linux;
};
}

View file

@ -188,7 +188,13 @@ in
};
floating = {
modifier = "Mod4";
criteria = [{ class = "file_picker"; } { app_id = "file_picker"; }];
criteria = [
{ class = "file_picker"; }
{ app_id = "file_picker"; }
{ app_id = "wdisplays"; }
{ app_id = "pavucontrol"; }
{ app_id = ".*[Hh]elvum.*"; }
];
};
keybindings =
let
@ -471,6 +477,7 @@ in
sway
swaybg
swaylock
wdisplays
waybar
dhist
@ -509,5 +516,9 @@ in
};
};
home.file = { ".local/share/backgrounds".source = ./backgrounds; };
home.sessionVariables = {
LD_PRELOAD = "${pkgs.gtk3-nocsd}/lib/libgtk3-nocsd.so.0";
GTK_CSD = "0";
};
};
}

View file

@ -24,7 +24,14 @@ in
name = icon_theme;
package = pkgs.papirus_red;
};
};
} // (
let
shared.extraConfig = {
gtk-decoration-layout = "menu:";
};
in
{ gtk4 = shared; gtk3 = shared; }
);
# qt = {
# enable = true;
# platformTheme = "gtk";
@ -39,6 +46,9 @@ in
cursor-theme = cursor_theme;
color-scheme = "prefer-${color.type}";
};
"org/gnome/desktop/wm/preferences" = {
button-layout = "menu:";
};
};
# fonts.fontconfig.enable = true;