picom settings

This commit is contained in:
2024-04-20 00:58:20 +02:00
parent b5764e72eb
commit bc33898566
6 changed files with 121 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# screenlayout setup for odin
# bash main.sh
autorandr -c
# start some nice programs
# if [ -d /etc/X11/xinit/xinitrc.d ] ; then

View File

@@ -0,0 +1,22 @@
#version 330
in vec2 texcoord;
uniform float opacity;
uniform bool invert_color;
uniform sampler2D tex;
vec4 window_shader() {
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
{
// Change vec4(1.0, 1.0, 1.0, 1.0) to your desired color
vec4 vdiff = abs(vec4(0.0, 0.0, 0.0, 1.0) - c);
float diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a);
// Change 0.8 to your desired opacity
if (diff < 0.001)
c *= 0;
}
if (invert_color)
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a);
c *= opacity;
// vec4 default_post_processing(vec4 c);
return c;
}

View File

@@ -4,12 +4,15 @@
pkgs,
...
}: {
imports = [
./picom.nix
];
home.packages = with pkgs; [
rofi
dmenu
st
dunst
unstable.picom
xss-lock
flameshot
xdg-desktop-portal-gtk
@@ -18,12 +21,18 @@
xorg.xset
xorg.xsetroot
xorg.setxkbmap
xclip
gnome.gnome-keyring
feh
gruvbox-dark-gtk
kde-gruvbox
gruvbox-dark-icons-gtk
alsaUtils
];
home.file = {
".xinitrc" = {
source = ./.xinitrc;
};
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
config,
pkgs,
...
}: {
services.picom = {
enable = true;
package = pkgs.unstable.picom;
backend = "glx";
shadow = true;
shadowOpacity = 0.2;
shadowOffsets = [1 1];
shadowExclude = [
"name = 'Notification'"
"class_g = 'Conky'"
"_GTK_FRAME_EXTENTS@:c"
"override_redirect = 1 && !WM_CLASS@:s"
"class_g ?= 'Dmenu'"
"class_g ?= 'Dunst'"
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
"_GTK_FRAME_EXTENTS@:c"
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
"class_g ?= 'i3-frame'"
"class_g = 'Rofi'"
];
fade = true;
fadeSteps = [0.08 0.05];
vSync = true;
settings = {
corner-radius = 9;
blur = {
method = "dual_kawase";
strength = 10;
background = false;
background-frame = false;
background-fixed = false;
};
};
};
}