hyprland: add hy3

This commit is contained in:
Charlie Root 2024-10-01 16:08:11 +02:00
commit 9e2ab640fd
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
4 changed files with 34 additions and 10 deletions

View file

@ -26,7 +26,7 @@
}; };
# Hyprland, my main compositor # Hyprland, my main compositor
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland.url = "github:hyprwm/Hyprland";
# Plugins for hyprland # Plugins for hyprland
hyprland-plugins = { hyprland-plugins = {
@ -40,6 +40,12 @@
inputs.hyprland.follows = "hyprland"; inputs.hyprland.follows = "hyprland";
}; };
# much better than sway
hy3 = {
url = "github:outfoxxed/hy3";
inputs.hyprland.follows = "hyprland";
};
# Treefmt provides formatting for all files in my flake. # Treefmt provides formatting for all files in my flake.
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";

View file

@ -27,18 +27,25 @@ in {
workspace = toString i; workspace = toString i;
in "$mainMod SHIFT, ${key}, split-movetoworkspacesilent, ${workspace}" in "$mainMod SHIFT, ${key}, split-movetoworkspacesilent, ${workspace}"
) (genList (i: i + 1) 10) ) (genList (i: i + 1) 10)
++ map (
i: let
mod = a: b: a - (b * (a / b));
key = toString (mod i 10);
index = toString i;
in "$mainMod CONTROL, ${key}, hy3:focustab, index, ${index}"
) (genList (i: i + 1) 10)
++ [ ++ [
"$mainMod, RETURN, exec, ${pkgs.foot}/bin/foot" "$mainMod, RETURN, exec, ${pkgs.foot}/bin/foot"
"$mainMod, Q, killactive" "$mainMod, Q, hy3:killactive"
"$mainMod, F, fullscreen, 0" "$mainMod, F, fullscreen, 0"
"$mainMod, D, exec, ${pkgs.procps}/bin/pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" "$mainMod, D, exec, ${pkgs.procps}/bin/pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel"
"$mainMod, SPACE, togglefloating, active" "$mainMod, SPACE, togglefloating, active"
# Move Windows # Move Windows
"$mainMod SHIFT, H, movewindow, l" "$mainMod SHIFT, H, hy3:movewindow, l, once"
"$mainMod SHIFT, J, movewindow, d" "$mainMod SHIFT, J, hy3:movewindow, d, once"
"$mainMod SHIFT, K, movewindow, u" "$mainMod SHIFT, K, hy3:movewindow, u, once"
"$mainMod SHIFT, L, movewindow, r" "$mainMod SHIFT, L, hy3:movewindow, r, once"
# Screenshotting # Screenshotting
"$mainMod, S, exec, ${pkgs.grimblast}/bin/grimblast copy area" "$mainMod, S, exec, ${pkgs.grimblast}/bin/grimblast copy area"
@ -56,14 +63,22 @@ in {
# Restart waybar # Restart waybar
"$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${pkgs.waybar}/bin/waybar" "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${pkgs.waybar}/bin/waybar"
# hy3 group settings
"$mainMod, Z, hy3:makegroup, h"
"$mainMod SHIFT, Z, hy3:makegroup, v"
"$mainMod, U, hy3:makegroup, tab"
"$mainMod, A, hy3:changefocus, raise"
"$mainMod SHIFT, A, hy3:changefocus, lower"
"$mainMod, C, hy3:changegroup, opposite"
]; ];
binde = [ binde = [
# window focus # window focus
"$mainMod, H, movefocus, l" "$mainMod, H, hy3:movefocus, l"
"$mainMod, J, movefocus, d" "$mainMod, J, hy3:movefocus, d"
"$mainMod, K, movefocus, u" "$mainMod, K, hy3:movefocus, u"
"$mainMod, L, movefocus, r" "$mainMod, L, hy3:movefocus, r"
]; ];
# Media controls # Media controls

View file

@ -11,6 +11,7 @@
(inputs'.split-monitor-workspaces.packages) (inputs'.split-monitor-workspaces.packages)
split-monitor-workspaces split-monitor-workspaces
; ;
inherit (inputs'.hy3.packages) hy3;
inherit (lib) mkIf mkDefault; inherit (lib) mkIf mkDefault;
in { in {
imports = [ imports = [
@ -51,6 +52,7 @@ in {
# Split-monitor-workspaces provides awesome-like workspace behaviour # Split-monitor-workspaces provides awesome-like workspace behaviour
plugins = [ plugins = [
split-monitor-workspaces split-monitor-workspaces
hy3
]; ];
# Xwayland for X applications # Xwayland for X applications

View file

@ -47,6 +47,7 @@ in {
}; };
general = { general = {
layout = "hy3";
gaps_in = 0; gaps_in = 0;
gaps_out = 0; gaps_out = 0;
border_size = 2; border_size = 2;