parent
4a2ad39114
commit
49dc072b81
56 changed files with 684 additions and 506 deletions
modules/ags
|
@ -1,195 +1,205 @@
|
|||
self: {...}: let
|
||||
self: {
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (self.lib.hypr) mkAnimation mkBezier mkBind mkLayerRule;
|
||||
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfgDesktop = osConfig.roles.desktop;
|
||||
in {
|
||||
config.wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 0;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 12;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
config = mkIf cfgDesktop.ags.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 0;
|
||||
};
|
||||
|
||||
shadow.enabled = false;
|
||||
};
|
||||
decoration = {
|
||||
rounding = 12;
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
|
||||
bezier = map mkBezier [
|
||||
shadow.enabled = false;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = map mkBezier [
|
||||
{
|
||||
name = "easeInQuart";
|
||||
p0 = [0.895 0.030];
|
||||
p1 = [0.685 0.220];
|
||||
}
|
||||
{
|
||||
name = "easeOutQuart";
|
||||
p0 = [0.165 0.840];
|
||||
p1 = [0.440 1.000];
|
||||
}
|
||||
{
|
||||
name = "easeInOutQuart";
|
||||
p0 = [0.770 0.000];
|
||||
p1 = [0.175 1.000];
|
||||
}
|
||||
|
||||
# fade out
|
||||
{
|
||||
name = "easeInExpo";
|
||||
p0 = [0.950 0.050];
|
||||
p1 = [0.795 0.035];
|
||||
}
|
||||
];
|
||||
|
||||
animation = map mkAnimation [
|
||||
{
|
||||
name = "workspaces";
|
||||
duration = 6;
|
||||
bezier = "easeOutQuart";
|
||||
style = "slide";
|
||||
}
|
||||
|
||||
{
|
||||
name = "windows";
|
||||
duration = 4;
|
||||
bezier = "easeOutQuart";
|
||||
style = "slide";
|
||||
}
|
||||
{
|
||||
name = "fadeIn";
|
||||
enable = false;
|
||||
}
|
||||
{
|
||||
name = "fadeOut";
|
||||
duration = 4;
|
||||
bezier = "easeInExpo";
|
||||
}
|
||||
|
||||
{
|
||||
name = "fadeLayersIn";
|
||||
enable = false;
|
||||
}
|
||||
{
|
||||
name = "fadeLayersOut";
|
||||
duration = 4;
|
||||
bezier = "easeInExpo";
|
||||
}
|
||||
{
|
||||
name = "layers";
|
||||
duration = 4;
|
||||
bezier = "easeInOutQuart";
|
||||
style = "fade";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
layerrule = map mkLayerRule [
|
||||
{
|
||||
name = "easeInQuart";
|
||||
p0 = [0.895 0.030];
|
||||
p1 = [0.685 0.220];
|
||||
rule = "animation popin";
|
||||
namespace = "^(hyprpaper.*)";
|
||||
}
|
||||
{
|
||||
name = "easeOutQuart";
|
||||
p0 = [0.165 0.840];
|
||||
p1 = [0.440 1.000];
|
||||
rule = "animation fade";
|
||||
namespace = "^(bg-layer.*)";
|
||||
}
|
||||
{
|
||||
name = "easeInOutQuart";
|
||||
p0 = [0.770 0.000];
|
||||
p1 = [0.175 1.000];
|
||||
rule = "noanim";
|
||||
namespace = "^(noanim-.*)";
|
||||
}
|
||||
|
||||
# fade out
|
||||
{
|
||||
name = "easeInExpo";
|
||||
p0 = [0.950 0.050];
|
||||
p1 = [0.795 0.035];
|
||||
rule = "blur";
|
||||
namespace = "^(blur-bg.*)";
|
||||
}
|
||||
{
|
||||
rule = "ignorealpha 0.19";
|
||||
namespace = "^(blur-bg.*)";
|
||||
}
|
||||
];
|
||||
|
||||
animation = map mkAnimation [
|
||||
exec-once = [
|
||||
"ags"
|
||||
"sleep 3; ags request 'open win-applauncher'"
|
||||
];
|
||||
|
||||
bind = map mkBind [
|
||||
{
|
||||
name = "workspaces";
|
||||
duration = 6;
|
||||
bezier = "easeOutQuart";
|
||||
style = "slide";
|
||||
modifier = "$mainMod SHIFT";
|
||||
key = "E";
|
||||
command = "ags toggle win-powermenu";
|
||||
}
|
||||
{
|
||||
modifier = "$mainMod";
|
||||
key = "D";
|
||||
command = "ags toggle win-applauncher";
|
||||
}
|
||||
{
|
||||
modifier = "$mainMod";
|
||||
key = "V";
|
||||
command = "ags toggle win-clipboard";
|
||||
}
|
||||
{
|
||||
key = "Print";
|
||||
command = "ags toggle win-screenshot";
|
||||
}
|
||||
|
||||
{
|
||||
name = "windows";
|
||||
duration = 4;
|
||||
bezier = "easeOutQuart";
|
||||
style = "slide";
|
||||
key = "XF86AudioMute";
|
||||
command = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
}
|
||||
{
|
||||
name = "fadeIn";
|
||||
enable = false;
|
||||
key = "XF86AudioMicMute";
|
||||
command = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
}
|
||||
{
|
||||
name = "fadeOut";
|
||||
duration = 4;
|
||||
bezier = "easeInExpo";
|
||||
modifier = "$mainMod";
|
||||
key = "Print";
|
||||
command = "bash -c \"grim -g \\\"$(slurp)\\\" - | satty -f -\"";
|
||||
}
|
||||
];
|
||||
|
||||
binde = map mkBind [
|
||||
{
|
||||
key = "XF86MonBrightnessUp";
|
||||
command = "ags request 'Brightness.screen +0.05'";
|
||||
}
|
||||
{
|
||||
key = "XF86MonBrightnessDown";
|
||||
command = "ags request 'Brightness.screen -0.05'";
|
||||
}
|
||||
|
||||
{
|
||||
name = "fadeLayersIn";
|
||||
enable = false;
|
||||
key = "XF86AudioRaiseVolume";
|
||||
command = "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ & ags request 'popup speaker' &";
|
||||
}
|
||||
{
|
||||
name = "fadeLayersOut";
|
||||
duration = 4;
|
||||
bezier = "easeInExpo";
|
||||
key = "XF86AudioLowerVolume";
|
||||
command = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- & ags request 'popup speaker' &";
|
||||
}
|
||||
];
|
||||
|
||||
bindn = map mkBind [
|
||||
{
|
||||
name = "layers";
|
||||
duration = 4;
|
||||
bezier = "easeInOutQuart";
|
||||
style = "fade";
|
||||
key = "Escape";
|
||||
command = "ags request closeAll";
|
||||
}
|
||||
];
|
||||
|
||||
bindr = map mkBind [
|
||||
{
|
||||
modifier = "CAPS";
|
||||
key = "Caps_Lock";
|
||||
command = "ags request fetchCapsState";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
layerrule = map mkLayerRule [
|
||||
{
|
||||
rule = "animation popin";
|
||||
namespace = "^(hyprpaper.*)";
|
||||
}
|
||||
{
|
||||
rule = "animation fade";
|
||||
namespace = "^(bg-layer.*)";
|
||||
}
|
||||
{
|
||||
rule = "noanim";
|
||||
namespace = "^(noanim-.*)";
|
||||
}
|
||||
|
||||
{
|
||||
rule = "blur";
|
||||
namespace = "^(blur-bg.*)";
|
||||
}
|
||||
{
|
||||
rule = "ignorealpha 0.19";
|
||||
namespace = "^(blur-bg.*)";
|
||||
}
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"ags"
|
||||
"sleep 3; ags request 'open win-applauncher'"
|
||||
];
|
||||
|
||||
bind = map mkBind [
|
||||
{
|
||||
modifier = "$mainMod SHIFT";
|
||||
key = "E";
|
||||
command = "ags toggle win-powermenu";
|
||||
}
|
||||
{
|
||||
modifier = "$mainMod";
|
||||
key = "D";
|
||||
command = "ags toggle win-applauncher";
|
||||
}
|
||||
{
|
||||
modifier = "$mainMod";
|
||||
key = "V";
|
||||
command = "ags toggle win-clipboard";
|
||||
}
|
||||
{
|
||||
key = "Print";
|
||||
command = "ags toggle win-screenshot";
|
||||
}
|
||||
|
||||
{
|
||||
key = "XF86AudioMute";
|
||||
command = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioMicMute";
|
||||
command = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
}
|
||||
{
|
||||
modifier = "$mainMod";
|
||||
key = "Print";
|
||||
command = "bash -c \"grim -g \\\"$(slurp)\\\" - | satty -f -\"";
|
||||
}
|
||||
];
|
||||
|
||||
binde = map mkBind [
|
||||
{
|
||||
key = "XF86MonBrightnessUp";
|
||||
command = "ags request 'Brightness.screen +0.05'";
|
||||
}
|
||||
{
|
||||
key = "XF86MonBrightnessDown";
|
||||
command = "ags request 'Brightness.screen -0.05'";
|
||||
}
|
||||
|
||||
{
|
||||
key = "XF86AudioRaiseVolume";
|
||||
command = "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ & ags request 'popup speaker' &";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioLowerVolume";
|
||||
command = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- & ags request 'popup speaker' &";
|
||||
}
|
||||
];
|
||||
|
||||
bindn = map mkBind [
|
||||
{
|
||||
key = "Escape";
|
||||
command = "ags request closeAll";
|
||||
}
|
||||
];
|
||||
|
||||
bindr = map mkBind [
|
||||
{
|
||||
modifier = "CAPS";
|
||||
key = "Caps_Lock";
|
||||
command = "ags request fetchCapsState";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ self: {
|
|||
|
||||
gtkSessionLock = gtk-session-lock.packages.${pkgs.system}.default;
|
||||
|
||||
inherit (lib) attrValues boolToString filter getExe optionalAttrs optionals;
|
||||
inherit (lib) attrValues boolToString filter getExe mkIf optionalAttrs optionals;
|
||||
|
||||
inherit (osConfig.networking) hostName;
|
||||
|
||||
|
@ -29,7 +29,7 @@ self: {
|
|||
'';
|
||||
};
|
||||
in {
|
||||
config = {
|
||||
config = mkIf cfgDesktop.ags.enable {
|
||||
# Make these accessible outside these files
|
||||
programs.ags = {
|
||||
package = ags.packages.${pkgs.system}.ags.override {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue