remove bloat config setting

This commit is contained in:
Noa Aarts 2024-05-31 16:01:44 +02:00
parent b5054673af
commit 2a897f93b7
2 changed files with 100 additions and 105 deletions

View file

@ -5,9 +5,7 @@ in
{ {
options.modules.automapaper = { options.modules.automapaper = {
enable = lib.mkEnableOption "enable automapaper"; enable = lib.mkEnableOption "enable automapaper";
displays = lib.mkOption { hyprland = lib.mkEnableOption "enable hyprland exec-once integration";
type = with lib.types; listOf str;
};
configurations = lib.mkOption { configurations = lib.mkOption {
description = "automapaper configurations per monitor"; description = "automapaper configurations per monitor";
type = with lib.types; attrsOf (submodule { type = with lib.types; attrsOf (submodule {
@ -16,16 +14,16 @@ in
type = str; type = str;
description = "the shader executed to get the state for the initialisation, and re-initialisation steps"; description = "the shader executed to get the state for the initialisation, and re-initialisation steps";
}; };
state = lib.mkOption { state = lib.mkOption {
type = str; type = str; # TODO: make filepath possible as well
description = "the shader executed to increment the state to the next generation"; description = "the shader executed to increment the state to the next generation";
}; };
display = lib.mkOption { display = lib.mkOption {
type = str; type = str; # TODO: make filepath possible as well
description = "the shader executed to display the state to the monitor"; description = "the shader executed to display the state to the monitor";
}; };
horizontal = lib.mkOption { horizontal = lib.mkOption {
type = int; type = int; # TODO: make filepath possible as well
description = "the amount of horizontal cells in the state"; description = "the amount of horizontal cells in the state";
}; };
vertical = lib.mkOption { vertical = lib.mkOption {
@ -174,12 +172,14 @@ in
"DP-3" = conf; "DP-3" = conf;
"DP-2" = conf; "DP-2" = conf;
}; };
modules.automapaper.displays = wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.hyprland (
lib.mapAttrsToList (name: config: lib.mapAttrsToList (name: config:
"${ "${
inputs.automapaper.packages.${pkgs.system}.default inputs.automapaper.packages.${pkgs.system}.default
}/bin/automapaper -C ${ }/bin/automapaper -C ${
builtins.toFile "${name}.toml" config builtins.toFile "${name}.toml" config
}") displays; }") displays
}); );
}
);
} }

View file

@ -47,11 +47,8 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
# I always want these with hyprland anyways # I always want these with hyprland anyways
libnotify # to enable the notify-send command libnotify # to enable the notify-send command
wl-clipboard wl-clipboard # wl-copy and wl-paste
inputs.hyprpicker
hypridle # TODO: remove when fixed with config
playerctl playerctl
]; ];
@ -63,99 +60,97 @@ in
enable = true; enable = true;
package = cfg.package; package = cfg.package;
settings = { settings = {
monitor = [ monitor = [
"DP-3,2560x1440@360,2560x0,1" "DP-3,2560x1440@360,2560x0,1"
"DP-2,2560x1440@144,0x0,1" "DP-2,2560x1440@144,0x0,1"
"Unknown-1,disable" # NOTE: due to a driver bug a third monitor appears "Unknown-1,disable" # NOTE: due to a driver bug a third monitor appears
]; ];
windowrulev2 = [ windowrulev2 = [
"opacity 1.0 0.6,class:^(kitty)$" "opacity 1.0 0.6,class:^(kitty)$"
"stayfocused,class:^(wofi)$" "stayfocused,class:^(wofi)$"
]; ];
env = [ env = [
"WLR_NO_HARDWARE_CURSORS,1" "WLR_NO_HARDWARE_CURSORS,1"
]; ];
exec-once = [ exec-once = [
"${pkgs.waybar}/bin/waybar" "${pkgs.waybar}/bin/waybar"
"${pkgs.dunst}/bin/dunst" "${pkgs.dunst}/bin/dunst"
"${cfg.package}/bin/hyprctl dispatcher focusmonitor 1" "${cfg.package}/bin/hyprctl dispatcher focusmonitor 1"
"${pkgs.hypridle}/bin/hypridle" "${pkgs.hypridle}/bin/hypridle"
] ++ builtins.map (name: ];
"${inputs.automapaper.packages.${pkgs.system}.default}/bin/automapaper -C ${name}" general = {
) config.modules.automapaper.displays; sensitivity = "1.2";
general = { gaps_in = "2";
sensitivity = "1.2"; gaps_out = "3";
gaps_in = "2"; border_size = "3";
gaps_out = "3"; "col.active_border"="0xff950fad";
border_size = "3"; "col.inactive_border"="0xff26052e";
"col.active_border"="0xff950fad"; };
"col.inactive_border"="0xff26052e"; misc = {
}; key_press_enables_dpms = true;
misc = { };
key_press_enables_dpms = true; decoration = {
}; rounding = "6";
decoration = { active_opacity = "1";
rounding = "6"; inactive_opacity = "1";
active_opacity = "1"; };
inactive_opacity = "1"; workspace = [
}; "DP-3,1"
workspace = [ "DP-2,2"
"DP-3,1" ];
"DP-2,2" animations = {
]; enabled = "1";
animations = { animation = [
enabled = "1"; "windows,1,2,default"
animation = [ "border,1,10,default"
"windows,1,2,default" "fade,0,5,default"
"border,1,10,default" "workspaces,1,4,default"
"fade,0,5,default" ];
"workspaces,1,4,default" };
"$mod" = "SUPER";
bind = [
"$mod,Return,exec,${cfg.terminal}/bin/${cfg.terminal.pname}"
"$mod,tab,cyclenext"
"SUPERSHIFT,Q,killactive"
"$mod,SPACE,exec,wofi-launch"
"$mod,P,exec,wofi-power"
"SUPERSHIFT,m,exit"
"$mod,H,movefocus,l"
"$mod,J,movefocus,u"
"$mod,K,movefocus,d"
"$mod,L,movefocus,r"
"SUPERSHIFT,H,movewindow,l"
"SUPERSHIFT,J,movewindow,u"
"SUPERSHIFT,K,movewindow,d"
"SUPERSHIFT,L,movewindow,r"
"$mod,F,togglefloating"
"$mod,X,togglespecialworkspace"
"SUPERSHIFT,X,movetoworkspace,special"
"SUPERSHIFT,S,exec,${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only"
"$mod,f11,fullscreen,0"
",XF86AudioLowerVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%-"
",XF86AudioRaiseVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%+"
",XF86AudioMute,exec,${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle"
",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause"
",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous"
",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next"
]
++ (
builtins.concatLists (builtins.genList (
x: let
ws = builtins.toString (x);
in [
"$mod,${ws},workspace,${ws}"
"ALT,${ws},movetoworkspace,${ws}"
]
)
10)
);
bindm = [
"$mod,mouse:272,movewindow"
"$mod,mouse:273,resizewindow"
]; ];
}; };
"$mod" = "SUPER";
bind = [
"$mod,Return,exec,${cfg.terminal}/bin/${cfg.terminal.pname}"
"$mod,tab,cyclenext"
"SUPERSHIFT,Q,killactive"
"$mod,SPACE,exec,wofi-launch"
"$mod,P,exec,wofi-power"
"SUPERSHIFT,m,exit"
"$mod,H,movefocus,l"
"$mod,J,movefocus,u"
"$mod,K,movefocus,d"
"$mod,L,movefocus,r"
"SUPERSHIFT,H,movewindow,l"
"SUPERSHIFT,J,movewindow,u"
"SUPERSHIFT,K,movewindow,d"
"SUPERSHIFT,L,movewindow,r"
"$mod,F,togglefloating"
"$mod,X,togglespecialworkspace"
"SUPERSHIFT,X,movetoworkspace,special"
"SUPERSHIFT,S,exec,${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only"
"$mod,f11,fullscreen,0"
",XF86AudioLowerVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%-"
",XF86AudioRaiseVolume,exec,${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 1%+"
",XF86AudioMute,exec,${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle"
",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause"
",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous"
",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next"
]
++ (
builtins.concatLists (builtins.genList (
x: let
ws = builtins.toString (x);
in [
"$mod,${ws},workspace,${ws}"
"ALT,${ws},movetoworkspace,${ws}"
]
)
10)
);
bindm = [
"$mod,mouse:272,movewindow"
"$mod,mouse:273,resizewindow"
];
};
}; };
}; };
} }