treewide: format with nixfmt
This commit is contained in:
parent
303e982a8e
commit
26ad72592a
47 changed files with 380 additions and 725 deletions
|
@ -1,28 +1,11 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../default.nix
|
||||
../wlr
|
||||
./swaylock.nix
|
||||
./swayidle.nix
|
||||
];
|
||||
{ lib, config, pkgs, ... }: {
|
||||
imports = [ ../default.nix ../wlr ./swaylock.nix ./swayidle.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
grimblast
|
||||
pamixer
|
||||
playerctl
|
||||
];
|
||||
home.packages = with pkgs; [ grimblast pamixer playerctl ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
};
|
||||
systemd = { enable = true; };
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
|
@ -32,12 +15,10 @@
|
|||
};
|
||||
cursor.inactive_timeout = 4;
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "royuan-akko-keyboard";
|
||||
kb_layout = "us_intl";
|
||||
}
|
||||
];
|
||||
device = [{
|
||||
name = "royuan-akko-keyboard";
|
||||
kb_layout = "us_intl";
|
||||
}];
|
||||
|
||||
dwindle = {
|
||||
split_width_multiplier = 1.35;
|
||||
|
@ -51,14 +32,8 @@
|
|||
"ignorezero,^(wofi)$"
|
||||
];
|
||||
|
||||
windowrulev2 =
|
||||
let
|
||||
steam = "title:^()$,class:^(steam)$";
|
||||
in
|
||||
[
|
||||
"stayfocused, ${steam}"
|
||||
"minsize 1 1, ${steam}"
|
||||
];
|
||||
windowrulev2 = let steam = "title:^()$,class:^(steam)$";
|
||||
in [ "stayfocused, ${steam}" "minsize 1 1, ${steam}" ];
|
||||
|
||||
decoration = {
|
||||
active_opacity = 1.0;
|
||||
|
@ -109,119 +84,100 @@
|
|||
];
|
||||
};
|
||||
|
||||
bindm = [
|
||||
"SUPER,mouse:272,movewindow"
|
||||
"SUPER,mouse:273,resizewindow"
|
||||
];
|
||||
bindm = [ "SUPER,mouse:272,movewindow" "SUPER,mouse:273,resizewindow" ];
|
||||
|
||||
bind =
|
||||
let
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
grimblast = lib.getExe pkgs.grimblast;
|
||||
workspaces = [
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
];
|
||||
directions = rec {
|
||||
left = "l";
|
||||
right = "r";
|
||||
up = "u";
|
||||
down = "d";
|
||||
h = left;
|
||||
l = right;
|
||||
k = up;
|
||||
j = down;
|
||||
};
|
||||
in
|
||||
[
|
||||
"SUPER,Return,exec,${terminal}"
|
||||
"SUPERSHIFT,q,killactive" # exit program
|
||||
"SUPERSHIFT,e,exit" # exit hyprland
|
||||
"SUPERSHIFT,r,exec,hyprctl reload" # reload currently running hyprland
|
||||
bind = let
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
grimblast = lib.getExe pkgs.grimblast;
|
||||
workspaces = [ "1" "2" "3" "4" "5" ];
|
||||
directions = rec {
|
||||
left = "l";
|
||||
right = "r";
|
||||
up = "u";
|
||||
down = "d";
|
||||
h = left;
|
||||
l = right;
|
||||
k = up;
|
||||
j = down;
|
||||
};
|
||||
in [
|
||||
"SUPER,Return,exec,${terminal}"
|
||||
"SUPERSHIFT,q,killactive" # exit program
|
||||
"SUPERSHIFT,e,exit" # exit hyprland
|
||||
"SUPERSHIFT,r,exec,hyprctl reload" # reload currently running hyprland
|
||||
|
||||
"SUPER,s,togglesplit" # horizontal split
|
||||
"SUPER,f,fullscreen,1" # borderless window
|
||||
"SUPERSHIFT,f,fullscreen,0" # proper fullscreen
|
||||
"ALTSHIFT,space,togglefloating" # floating window
|
||||
"SUPER,s,togglesplit" # horizontal split
|
||||
"SUPER,f,fullscreen,1" # borderless window
|
||||
"SUPERSHIFT,f,fullscreen,0" # proper fullscreen
|
||||
"ALTSHIFT,space,togglefloating" # floating window
|
||||
|
||||
"SUPER,minus,splitratio,-0.25" # split gets slightly smaller
|
||||
"SUPERSHIFT,minus,splitratio,-0.3333333" # split gets smaller
|
||||
"SUPER,equal,splitratio,0.25" # split gets slightly larger
|
||||
"SUPERSHIFT,equal,splitratio,0.3333333" # split gets larger
|
||||
"SUPER,minus,splitratio,-0.25" # split gets slightly smaller
|
||||
"SUPERSHIFT,minus,splitratio,-0.3333333" # split gets smaller
|
||||
"SUPER,equal,splitratio,0.25" # split gets slightly larger
|
||||
"SUPERSHIFT,equal,splitratio,0.3333333" # split gets larger
|
||||
|
||||
"SUPER,g,togglegroup" # make a window group
|
||||
"SUPER,t,lockactivegroup,toggle" # lock/unlock the current group
|
||||
"SUPER,tab,changegroupactive,f" # switch to next window in group
|
||||
"SUPERSHIFT,tab,changegroupactive,p" # switch to prev window in group
|
||||
"SUPER,g,togglegroup" # make a window group
|
||||
"SUPER,t,lockactivegroup,toggle" # lock/unlock the current group
|
||||
"SUPER,tab,changegroupactive,f" # switch to next window in group
|
||||
"SUPERSHIFT,tab,changegroupactive,p" # switch to prev window in group
|
||||
|
||||
"SUPER,dead_grave,workspace,previous" # prev workspace
|
||||
"SUPER,dead_grave,workspace,next" # next workspace
|
||||
"SUPER,dead_grave,workspace,previous" # prev workspace
|
||||
"SUPER,dead_grave,workspace,next" # next workspace
|
||||
|
||||
"SUPER,u,togglespecialworkspace" # toggle special workspace
|
||||
"SUPERSHIFT,u,movetoworkspacesilent,special" # move to special workspace
|
||||
"SUPER,u,togglespecialworkspace" # toggle special workspace
|
||||
"SUPERSHIFT,u,movetoworkspacesilent,special" # move to special workspace
|
||||
|
||||
",Print,exec,${grimblast} --notify --freeze copy area" # screenshot area
|
||||
"SHIFT,Print,exec,${grimblast} --notify --freeze copy output" # screenshot all
|
||||
",Print,exec,${grimblast} --notify --freeze copy area" # screenshot area
|
||||
"SHIFT,Print,exec,${grimblast} --notify --freeze copy output" # screenshot all
|
||||
|
||||
",XF86AudioRaiseVolume,exec,pamixer -i 5" # raise volume
|
||||
",XF86AudioLowerVolume,exec,pamixer -d 5" # lower volume
|
||||
",XF86AudioPlay,exec,playerctl play-pause" # play/pause
|
||||
",XF86AudioNext,exec,playerctl next" # next song
|
||||
",XF86AudioPrev,exec,playerctl previous" # previous song
|
||||
]
|
||||
++
|
||||
# change workspace
|
||||
(map (n: "SUPER,${n},workspace,name:${n}") workspaces)
|
||||
++
|
||||
# move window to workspace
|
||||
(map (n: "SUPERSHIFT,${n},movetoworkspacesilent,name:${n}") workspaces)
|
||||
++
|
||||
# move focus
|
||||
(lib.mapAttrsToList (key: direction: "SUPER,${key},movefocus,${direction}") directions)
|
||||
++
|
||||
# swap windows
|
||||
(lib.mapAttrsToList (key: direction: "SUPERSHIFT,${key},swapwindow,${direction}") directions)
|
||||
++
|
||||
# move windows
|
||||
(lib.mapAttrsToList (
|
||||
key: direction: "SUPERCONTROL,${key},movewindoworgroup,${direction}"
|
||||
) directions)
|
||||
++
|
||||
# move monitor focus
|
||||
(lib.mapAttrsToList (key: direction: "SUPERALT,${key},focusmonitor,${direction}") directions)
|
||||
++
|
||||
# move workspace to other monitor
|
||||
(lib.mapAttrsToList (
|
||||
key: direction: "SUPERALTSHIFT,${key},movecurrentworkspacetomonitor,${direction}"
|
||||
) directions)
|
||||
++
|
||||
# launcher
|
||||
(
|
||||
let
|
||||
wofi = lib.getExe pkgs.wofi;
|
||||
in
|
||||
lib.optionals config.programs.wofi.enable [
|
||||
"SUPER,Space,exec,${wofi} -S drun -W 20% -H 15%"
|
||||
"SHIFTSUPER,Space,exec,${wofi} -S run -W 20% -H 15%"
|
||||
]
|
||||
);
|
||||
",XF86AudioRaiseVolume,exec,pamixer -i 5" # raise volume
|
||||
",XF86AudioLowerVolume,exec,pamixer -d 5" # lower volume
|
||||
",XF86AudioPlay,exec,playerctl play-pause" # play/pause
|
||||
",XF86AudioNext,exec,playerctl next" # next song
|
||||
",XF86AudioPrev,exec,playerctl previous" # previous song
|
||||
] ++
|
||||
# change workspace
|
||||
(map (n: "SUPER,${n},workspace,name:${n}") workspaces) ++
|
||||
# move window to workspace
|
||||
(map (n: "SUPERSHIFT,${n},movetoworkspacesilent,name:${n}") workspaces) ++
|
||||
# move focus
|
||||
(lib.mapAttrsToList
|
||||
(key: direction: "SUPER,${key},movefocus,${direction}") directions) ++
|
||||
# swap windows
|
||||
(lib.mapAttrsToList
|
||||
(key: direction: "SUPERSHIFT,${key},swapwindow,${direction}")
|
||||
directions) ++
|
||||
# move windows
|
||||
(lib.mapAttrsToList
|
||||
(key: direction: "SUPERCONTROL,${key},movewindoworgroup,${direction}")
|
||||
directions) ++
|
||||
# move monitor focus
|
||||
(lib.mapAttrsToList
|
||||
(key: direction: "SUPERALT,${key},focusmonitor,${direction}")
|
||||
directions) ++
|
||||
# move workspace to other monitor
|
||||
(lib.mapAttrsToList (key: direction:
|
||||
"SUPERALTSHIFT,${key},movecurrentworkspacetomonitor,${direction}")
|
||||
directions) ++
|
||||
# launcher
|
||||
(let wofi = lib.getExe pkgs.wofi;
|
||||
in lib.optionals config.programs.wofi.enable [
|
||||
"SUPER,Space,exec,${wofi} -S drun -W 20% -H 15%"
|
||||
"SHIFTSUPER,Space,exec,${wofi} -S run -W 20% -H 15%"
|
||||
]);
|
||||
|
||||
monitor = map (
|
||||
m:
|
||||
monitor = map (m:
|
||||
"${m.name},${
|
||||
if m.enabled then
|
||||
"${toString m.width}x${toString m.height}@${toString m.refreshRate},${m.position},${m.scale}"
|
||||
"${toString m.width}x${toString m.height}@${
|
||||
toString m.refreshRate
|
||||
},${m.position},${m.scale}"
|
||||
else
|
||||
"disable"
|
||||
}"
|
||||
) config.monitors;
|
||||
}") config.monitors;
|
||||
|
||||
workspace = map (m: "name:${m.workspace},monitor:${m.name}") (
|
||||
lib.filter (m: m.enabled && m.workspace != null) config.monitors
|
||||
);
|
||||
workspace = map (m: "name:${m.workspace},monitor:${m.name}")
|
||||
(lib.filter (m: m.enabled && m.workspace != null) config.monitors);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue