mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 05:36:11 +01:00
feat: picom animations and final config
This commit is contained in:
@@ -73,9 +73,6 @@
|
|||||||
".zprofile" = {
|
".zprofile" = {
|
||||||
source = ./.zprofile;
|
source = ./.zprofile;
|
||||||
};
|
};
|
||||||
".config/picom/black_to_transparent.frag" = {
|
|
||||||
source = ./black_to_transparent.frag;
|
|
||||||
};
|
|
||||||
".config/bar.sh" = {
|
".config/bar.sh" = {
|
||||||
source = ./bar.sh;
|
source = ./bar.sh;
|
||||||
};
|
};
|
||||||
|
|||||||
257
home/dwm/picom-animations.conf
Normal file
257
home/dwm/picom-animations.conf
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
# Animations for NORMAL windows.
|
||||||
|
{
|
||||||
|
match = "window_type = 'normal'";
|
||||||
|
animations = (
|
||||||
|
{
|
||||||
|
triggers = ["close", "hide"];
|
||||||
|
opacity = {
|
||||||
|
curve = "linear";
|
||||||
|
duration = 0.1;
|
||||||
|
start = "window-raw-opacity-before";
|
||||||
|
end = 0;
|
||||||
|
};
|
||||||
|
blur-opacity = "opacity";
|
||||||
|
shadow-opacity = "opacity";
|
||||||
|
},
|
||||||
|
{
|
||||||
|
triggers = ["open", "show"];
|
||||||
|
opacity = {
|
||||||
|
curve = "cubic-bezier(0,1,1,1)";
|
||||||
|
duration = 0.5;
|
||||||
|
start = 0;
|
||||||
|
end = "window-raw-opacity";
|
||||||
|
};
|
||||||
|
blur-opacity = "opacity";
|
||||||
|
shadow-opacity = "opacity";
|
||||||
|
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||||
|
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||||
|
scale-x = {
|
||||||
|
curve = "cubic-bezier(0,1.3,1,1)";
|
||||||
|
duration = 0.5;
|
||||||
|
start = 0.6;
|
||||||
|
end = 1;
|
||||||
|
};
|
||||||
|
scale-y = "scale-x";
|
||||||
|
shadow-scale-x = "scale-x";
|
||||||
|
shadow-scale-y = "scale-y";
|
||||||
|
shadow-offset-x = "offset-x";
|
||||||
|
shadow-offset-y = "offset-y";
|
||||||
|
},
|
||||||
|
{
|
||||||
|
triggers = ["geometry"];
|
||||||
|
scale-x = {
|
||||||
|
curve = "cubic-bezier(0,0,0,1.15)";
|
||||||
|
duration = 0.5;
|
||||||
|
start = "window-width-before / window-width";
|
||||||
|
end = 1;
|
||||||
|
}
|
||||||
|
scale-y = {
|
||||||
|
curve = "cubic-bezier(0,0,0,1.15)";
|
||||||
|
duration = 0.5;
|
||||||
|
start = "window-height-before / window-height";
|
||||||
|
end = 1;
|
||||||
|
}
|
||||||
|
# offset-x = {
|
||||||
|
# curve = "cubic-bezier(0,0,0,1.15)";
|
||||||
|
# duration = 0.5;
|
||||||
|
# start = 0;
|
||||||
|
# end = 0;
|
||||||
|
# }
|
||||||
|
# offset-y = {
|
||||||
|
# curve = "cubic-bezier(0,0,0,1.15)";
|
||||||
|
# duration = 0.3;
|
||||||
|
# start = "window-height";
|
||||||
|
# end = 0;
|
||||||
|
# }
|
||||||
|
# offset-x = {
|
||||||
|
# curve = "cubic-bezier(0,0,0,1.15)";
|
||||||
|
# duration = 0.3;
|
||||||
|
# start = "window-x-before - window-monitor-x - window-x";
|
||||||
|
# end = 0;
|
||||||
|
# }
|
||||||
|
offset-y = {
|
||||||
|
curve = "cubic-bezier(0,0,0,1.15)";
|
||||||
|
duration = 0.3;
|
||||||
|
start = "window-height / 2";
|
||||||
|
end = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow-scale-x = "scale-x";
|
||||||
|
shadow-scale-y = "scale-y";
|
||||||
|
# shadow-offset-x = "offset-x";
|
||||||
|
shadow-offset-y = "offset-y";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
# Animations for Rofi launchers.
|
||||||
|
{
|
||||||
|
match = "class_g = 'Rofi'";
|
||||||
|
animations = (
|
||||||
|
{
|
||||||
|
triggers = ["close", "hide"];
|
||||||
|
preset = "disappear";
|
||||||
|
duration = 0.05;
|
||||||
|
scale = 0.5;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
triggers = ["open", "show"];
|
||||||
|
preset = "appear";
|
||||||
|
duration = 0.2;
|
||||||
|
scale = 0.5;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
# Animations for Flameshot.
|
||||||
|
{
|
||||||
|
match = "class_g = 'flameshot'";
|
||||||
|
animations = (
|
||||||
|
{
|
||||||
|
triggers = ["close", "hide"];
|
||||||
|
preset = "disappear";
|
||||||
|
duration = 0.1;
|
||||||
|
scale = 1;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
triggers = ["open", "show"];
|
||||||
|
preset = "appear";
|
||||||
|
duration = 0.1;
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
# Animations for Dunst notifications.
|
||||||
|
{
|
||||||
|
match = "class_g = 'Dunst'";
|
||||||
|
animations = (
|
||||||
|
{
|
||||||
|
triggers = ["close", "hide"];
|
||||||
|
preset = "fly-out"; #-dunst-close-preset
|
||||||
|
direction = "up"; #-dunst-close-direction
|
||||||
|
duration = 0.2;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
triggers = ["open", "show"];
|
||||||
|
preset = "fly-in"; #-dunst-open-preset
|
||||||
|
direction = "up"; #-dunst-open-direction
|
||||||
|
duration = 0.2;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
|
# # Animations for Jgmenu.
|
||||||
|
# {
|
||||||
|
# match = "class_g = 'jgmenu'";
|
||||||
|
# animations = (
|
||||||
|
# {
|
||||||
|
# triggers = ["close", "hide"];
|
||||||
|
# preset = "disappear";
|
||||||
|
# duration = 0.08;
|
||||||
|
# scale = 0.5;
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# triggers = ["open", "show"];
|
||||||
|
# preset = "appear";
|
||||||
|
# duration = 0.15;
|
||||||
|
# scale = 0.5;
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# },
|
||||||
|
#
|
||||||
|
# # Animations for Scratchpad.
|
||||||
|
# {
|
||||||
|
# match = "class_g = 'Scratch'";
|
||||||
|
# animations = (
|
||||||
|
# {
|
||||||
|
# triggers = ["close", "hide"];
|
||||||
|
# preset = "fly-out";
|
||||||
|
# direction = "up";
|
||||||
|
# duration = 0.2;
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# triggers = ["open", "show"];
|
||||||
|
# preset = "fly-in";
|
||||||
|
# direction = "up";
|
||||||
|
# duration = 0.2;
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# },
|
||||||
|
#
|
||||||
|
# # Animations for Eww Profile card.
|
||||||
|
# {
|
||||||
|
# match = "name = 'Eww - launchermenu'";
|
||||||
|
# animations = (
|
||||||
|
# {
|
||||||
|
# triggers = ["close", "hide"];
|
||||||
|
# preset = "slide-out";
|
||||||
|
# direction = "right";
|
||||||
|
# duration = 0.2;
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# triggers = ["open", "show"];
|
||||||
|
# preset = "slide-in";
|
||||||
|
# direction = "right";
|
||||||
|
# duration = 0.2;
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# },
|
||||||
|
#
|
||||||
|
# # Animations for Eww Music player.
|
||||||
|
# {
|
||||||
|
# match = "name = 'Eww - music'";
|
||||||
|
# animations = (
|
||||||
|
# {
|
||||||
|
# triggers = ["close", "hide"];
|
||||||
|
# preset = "slide-out";
|
||||||
|
# direction = "up";
|
||||||
|
# duration = 0.2;
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# triggers = ["open", "show"];
|
||||||
|
# preset = "slide-in";
|
||||||
|
# direction = "up";
|
||||||
|
# duration = 0.2;
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# },
|
||||||
|
#
|
||||||
|
# # Animations for Eww calendar.
|
||||||
|
# {
|
||||||
|
# match = "name = 'Eww - date'";
|
||||||
|
# animations = (
|
||||||
|
# {
|
||||||
|
# triggers = ["close", "hide"];
|
||||||
|
# preset = "fly-out";
|
||||||
|
# direction = "up";
|
||||||
|
# duration = 0.2;
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# triggers = ["open", "show"];
|
||||||
|
# preset = "fly-in";
|
||||||
|
# direction = "up";
|
||||||
|
# duration = 0.2;
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# },
|
||||||
|
#
|
||||||
|
# # Animations for Eww Cheatsheet.
|
||||||
|
# {
|
||||||
|
# match = "name = 'Eww - csheet'";
|
||||||
|
# animations = (
|
||||||
|
# {
|
||||||
|
# triggers = ["close", "hide"];
|
||||||
|
# preset = "disappear";
|
||||||
|
# duration = 0.08;
|
||||||
|
# scale = 0.5;
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# triggers = ["open", "show"];
|
||||||
|
# preset = "appear";
|
||||||
|
# duration = 0.15;
|
||||||
|
# scale = 0.5;
|
||||||
|
# }
|
||||||
|
# )
|
||||||
|
# }
|
||||||
146
home/dwm/picom.conf
Normal file
146
home/dwm/picom.conf
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
## ----- Shadows ----- ##
|
||||||
|
|
||||||
|
shadow = true;
|
||||||
|
|
||||||
|
shadow-radius = 7;
|
||||||
|
#shadow-opacity = .6
|
||||||
|
shadow-offset-x = -7;
|
||||||
|
shadow-offset-y = -7;
|
||||||
|
shadow-color = "#000000"
|
||||||
|
|
||||||
|
## ----- Fading ----- ##
|
||||||
|
|
||||||
|
fading = true;
|
||||||
|
|
||||||
|
fade-in-step = 0.03;
|
||||||
|
fade-out-step = 0.03;
|
||||||
|
fade-delta = 5
|
||||||
|
no-fading-openclose = false
|
||||||
|
no-fading-destroyed-argb = false
|
||||||
|
|
||||||
|
## ----- Transparency ----- ##
|
||||||
|
|
||||||
|
frame-opacity = 1.0;
|
||||||
|
|
||||||
|
# inactive-dim-fixed = true
|
||||||
|
|
||||||
|
## ----- Corners ----- ##
|
||||||
|
|
||||||
|
corner-radius = 10
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# General Settings #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Available backends "xrender" "glx" "egl"
|
||||||
|
backend = "glx"
|
||||||
|
|
||||||
|
dithered-present = false;
|
||||||
|
vsync = true;
|
||||||
|
|
||||||
|
detect-rounded-corners = true;
|
||||||
|
detect-client-opacity = true;
|
||||||
|
detect-transient = true;
|
||||||
|
|
||||||
|
use-damage = true;
|
||||||
|
# xrender-sync-fence = false
|
||||||
|
# transparent-clipping = false
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Rules #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
blur:
|
||||||
|
|
||||||
|
{
|
||||||
|
method = "gaussian";
|
||||||
|
size = 90;
|
||||||
|
deviation = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
rules: (
|
||||||
|
|
||||||
|
{
|
||||||
|
blur-background = false;
|
||||||
|
fade = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "window_type = 'normal'";
|
||||||
|
fade = true; #-fade-switch
|
||||||
|
shadow = true; #-shadow-switch
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "window_type = 'dialog'";
|
||||||
|
shadow = true; #-shadow-switch
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "window_type = 'tooltip'";
|
||||||
|
corner-radius = 0;
|
||||||
|
opacity = 0.90;
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "window_type = 'dock'";
|
||||||
|
corner-radius = 0;
|
||||||
|
fade = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "window_type = 'dropdown_menu' || window_type = 'menu' || window_type = 'popup' || window_type = 'popup_menu'";
|
||||||
|
corner-radius = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "class_g = 'Alacritty' || class_g = 'kitty' || class_g = 'FloaTerm'";
|
||||||
|
opacity = 0.95; #-term-opacity-switch
|
||||||
|
blur-background = true; #-blur-switch
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "class_g = 'Scratch' || class_g = 'Updating'";
|
||||||
|
opacity = 0.93;
|
||||||
|
blur-background = false; #-blur-switch
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "class_g = 'Polybar' || "
|
||||||
|
"class_g = 'eww-bar' || "
|
||||||
|
"class_g = 'Viewnior' || "
|
||||||
|
"class_g = 'Rofi' || "
|
||||||
|
"class_g = 'mpv' || "
|
||||||
|
"class_g = 'scratch' || "
|
||||||
|
"class_g = 'Dunst' || "
|
||||||
|
"class_g = 'retroarch'";
|
||||||
|
corner-radius = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "name = 'Notification' || "
|
||||||
|
"class_g ?= 'Notify-osd' || "
|
||||||
|
"class_g = 'Dunst' || "
|
||||||
|
"class_g = 'Polybar' || "
|
||||||
|
"class_g = 'jgmenu' || "
|
||||||
|
"class_g = 'scratch' || "
|
||||||
|
"class_g = 'Spotify' || "
|
||||||
|
"class_g = 'retroarch' || "
|
||||||
|
"class_g = 'firefox' || "
|
||||||
|
"class_g = 'Rofi' || "
|
||||||
|
"class_g = 'Screenkey' || "
|
||||||
|
"class_g = 'mpv' || "
|
||||||
|
"class_g = 'Viewnior' || "
|
||||||
|
"_GTK_FRAME_EXTENTS@";
|
||||||
|
shadow = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
match = "class_g = 'i3lock'";
|
||||||
|
shader = "black_to_transparent.frag";
|
||||||
|
blur-background = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
@include "picom-animations.conf"
|
||||||
|
|
||||||
|
)
|
||||||
@@ -4,6 +4,21 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
# ".config/picom/picom.conf" = {
|
||||||
|
# text = builtins.readFile ./picom.conf;
|
||||||
|
# };
|
||||||
|
|
||||||
|
".config/picom/picom-animations.conf" = {
|
||||||
|
text = builtins.readFile ./picom-animations.conf;
|
||||||
|
};
|
||||||
|
|
||||||
|
".config/picom/black_to_transparent.frag" = {
|
||||||
|
text = builtins.readFile ./black_to_transparent.frag;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.picom = {
|
services.picom = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.picom;
|
package = pkgs.picom;
|
||||||
|
|||||||
Reference in New Issue
Block a user