nixos-config/home-manager/modules/picom/default.nix

73 lines
1.7 KiB
Nix
Raw Normal View History

2022-11-11 11:54:21 +01:00
{ pkgs
, config
, lib
, inputs
, ...
}:
with lib; let
cfg = config.eboskma.programs.picom;
picom = pkgs.writeShellScriptBin "picom" ''
${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL ${pkgs.picom}/bin/picom $@
'';
in
{
options.eboskma.programs.picom = { enable = mkEnableOption "activate picom"; };
config = mkIf (cfg.enable) {
# home.packages = [pkgs.nixgl.auto.nixGLDefault];
services.picom = {
enable = true;
package = picom;
backend = "glx";
vSync = true;
experimentalBackends = true;
fade = true;
fadeSteps = [ 0.08 0.08 ];
shadow = true;
inactiveOpacity = 0.8;
opacityRules = [
"0:_NET_WM_STATE@[*]:32a = '_NET_WM_STATE_HIDDEN'"
"100:fullscreen"
"100:name = 'Zoom Meeting'"
"100:name = 'zoom_linux_float_video_window'"
"100:class_g = 'Rofi'"
"100:class_g = 'mpv'"
"100:window_type = 'combo'"
"100:window_type = 'dock'"
"100:window_type = 'dropdown_menu'"
"100:window_type = 'menu'"
"100:window_type = 'popup_menu'"
"100:window_type = 'splash'"
"100:window_type = 'tooltip'"
"100:window_type = 'utility'"
"90:!focused"
];
settings = {
unredir-if-possible = false;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
blur = {
method = "gaussian";
size = 10;
deviation = 5.0;
};
inactive-dim = 0.2;
wintypes = {
dock = { shadow = false; };
dnd = { shadow = false; };
popup_menu = { shadow = false; opacity = 1.0; };
dropdown_menu = { shadow = false; opacity = 1.0; };
};
};
};
};
}