334 lines
9 KiB
Nix
334 lines
9 KiB
Nix
{pkgs, ...}: {
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
systemd.enable = true;
|
|
extraConfig = ''
|
|
monitor=,preferred,auto,1
|
|
'';
|
|
plugins = [pkgs.hyprlandPlugins.hyprexpo];
|
|
settings = {
|
|
"$mod" = "SUPER";
|
|
general = {
|
|
gaps_in = 0;
|
|
gaps_out = 0;
|
|
layout = "master";
|
|
};
|
|
misc = {
|
|
disable_hyprland_logo = true;
|
|
new_window_takes_over_fullscreen = 1;
|
|
exit_window_retains_fullscreen = 1;
|
|
vfr = true;
|
|
};
|
|
decoration = {
|
|
blur = {
|
|
enabled = false;
|
|
};
|
|
shadow = {
|
|
enabled = false;
|
|
};
|
|
};
|
|
animations = {
|
|
enabled = "yes";
|
|
animation = [
|
|
"windows, 1, 3, default, popin"
|
|
"windowsOut, 1, 3, default, popin"
|
|
"fade, 1, 3, default"
|
|
"workspaces, 1, 3, default, fade"
|
|
];
|
|
};
|
|
master = {
|
|
new_status = "slave";
|
|
new_on_top = true;
|
|
};
|
|
input = {
|
|
kb_options = "caps:super";
|
|
repeat_delay = "250";
|
|
repeat_rate = "75";
|
|
|
|
float_switch_override_focus = 0;
|
|
accel_profile = "flat";
|
|
sensitivity = 0.4;
|
|
touchpad = {
|
|
natural_scroll = true;
|
|
tap_button_map = "lrm";
|
|
middle_button_emulation = false;
|
|
drag_lock = true;
|
|
};
|
|
touchdevice = {
|
|
enabled = false;
|
|
};
|
|
};
|
|
bindm = [
|
|
"$mod, mouse:272, movewindow"
|
|
"$mod, mouse:273, resizewindow"
|
|
];
|
|
binde = [
|
|
"$mod ALT, h, resizeactive, -50 0"
|
|
"$mod ALT, l, resizeactive, 50 0"
|
|
"$mod ALT, j, resizeactive, 0 50"
|
|
"$mod ALT, k, resizeactive, 0 -50"
|
|
];
|
|
bind =
|
|
[
|
|
"$mod, a, hyprexpo:expo, toggle"
|
|
"$mod, Return, exec, alacritty"
|
|
"$mod, x, killactive"
|
|
"$mod, f, fullscreen"
|
|
"$mod SHIFT, Escape, exit"
|
|
"$mod SHIFT, f, fullscreenstate, 0 3"
|
|
"$mod, Space, exec, ${pkgs.wofi}/bin/wofi --show run"
|
|
"$mod, Escape, exec, ${pkgs.wlogout}/bin/wlogout"
|
|
"$mod, t, togglefloating"
|
|
"$mod, bracketleft, exec, grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png"
|
|
"$mod, bracketright, exec, grimshot --notify copy area"
|
|
"$mod SHIFT, q, exec, swaylock"
|
|
",XF86MonBrightnessDown, exec, light -U 10"
|
|
",XF86MonBrightnessUp, exec, light -A 10"
|
|
",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%"
|
|
",XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%"
|
|
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
|
|
|
## Movement
|
|
"$mod, p, layoutmsg, swapwithmaster"
|
|
"$mod, e, layoutmsg, orientationnext"
|
|
"$mod, i, layoutmsg, addmaster"
|
|
"$mod, d, layoutmsg, removemaster"
|
|
"$mod, h, movefocus, l"
|
|
"$mod, l, movefocus, r"
|
|
"$mod, k, movefocus, u"
|
|
"$mod, j, movefocus, d"
|
|
"$mod SHIFT, h, movewindow, l"
|
|
"$mod SHIFT, l, movewindow, r"
|
|
"$mod SHIFT, k, movewindow, u"
|
|
"$mod SHIFT, j, movewindow, d"
|
|
"$mod, COMMA, focusmonitor, l"
|
|
"$mod, PERIOD, focusmonitor, r"
|
|
"$mod SHIFT, COMMA, movewindow, mon:l"
|
|
"$mod SHIFT, PERIOD, movewindow, mon:r"
|
|
"$mod, s, togglespecialworkspace"
|
|
]
|
|
++ (
|
|
# workspaces
|
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
|
builtins.concatLists (builtins.genList (
|
|
x: let
|
|
ws = let
|
|
c = (x + 1) / 10;
|
|
in
|
|
builtins.toString (x + 1 - (c * 10));
|
|
in [
|
|
"$mod, ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}"
|
|
"$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
|
|
]
|
|
)
|
|
10)
|
|
);
|
|
windowrulev2 = [
|
|
"workspace 9, class:^(Discord|discord)$"
|
|
"workspace 9, class:^(Signal|signal)$"
|
|
"tile, class:^(Minecraft|minecraft)$"
|
|
"opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$"
|
|
"noanim,class:^(xwaylandvideobridge)$"
|
|
"noinitialfocus,class:^(xwaylandvideobridge)$"
|
|
"maxsize 1 1,class:^(xwaylandvideobridge)$"
|
|
"noblur,class:^(xwaylandvideobridge)$"
|
|
"bordersize 0, floating:0, onworkspace:w[t1]"
|
|
"rounding 0, floating:0, onworkspace:w[t1]"
|
|
"bordersize 0, floating:0, onworkspace:w[tg1]"
|
|
"rounding 0, floating:0, onworkspace:w[tg1]"
|
|
"bordersize 0, floating:0, onworkspace:f[1]"
|
|
"rounding 0, floating:0, onworkspace:f[1]"
|
|
];
|
|
workspace = [
|
|
"w[t1], gapsout:0, gapsin:0"
|
|
"w[tg1], gapsout:0, gapsin:0"
|
|
"f[1], gapsout:0, gapsin:0"
|
|
];
|
|
};
|
|
};
|
|
services.hyprpaper = {
|
|
enable = true;
|
|
settings = {
|
|
preload = ["/home/pape"];
|
|
wallpaper = ",/home/pape";
|
|
ipc = "off";
|
|
splash = false;
|
|
};
|
|
};
|
|
programs.waybar = {
|
|
enable = true;
|
|
systemd.enable = true;
|
|
settings = {
|
|
mainBar = {
|
|
"height" = 14;
|
|
"spacing" = 8;
|
|
"layer" = "top";
|
|
modules-left = [
|
|
"hyprland/workspaces"
|
|
];
|
|
modules-center = [
|
|
"hyprland/window"
|
|
];
|
|
modules-right = [
|
|
"tray"
|
|
"cpu"
|
|
"memory"
|
|
"network"
|
|
"temperature"
|
|
"pulseaudio"
|
|
"battery"
|
|
"clock"
|
|
];
|
|
"hyprland/workspaces" = {
|
|
disable-scroll = true;
|
|
};
|
|
"hyprland/window" = {
|
|
max-length = 100;
|
|
};
|
|
"clock" = {
|
|
"format" = "{:%m-%d-%y %H:%M}";
|
|
};
|
|
"cpu" = {
|
|
"format" = "{load} \@{avg_frequency}Ghz";
|
|
};
|
|
"memory" = {
|
|
"format" = "{used}G";
|
|
};
|
|
"temperature" = {
|
|
"thermal-zone" = 2;
|
|
"hwmon-path" = "/sys/class/hwmon/hwmon0/temp1_input";
|
|
"critical-threshold" = 80;
|
|
"format-critical" = "!{temperatureC}°C";
|
|
"format" = "{temperatureC}°C";
|
|
};
|
|
"battery" = {
|
|
"states" = {
|
|
"warning" = 30;
|
|
"critical" = 15;
|
|
};
|
|
"format" = "{capacity}% {time}";
|
|
"format-charging" = "+{capacity}% {time}";
|
|
"format-plugged" = "+{capacity}%";
|
|
};
|
|
"network" = {
|
|
"format-wifi" = "{signaldBm}db";
|
|
"format-ethernet" = "{ifname}";
|
|
"format-disconnected" = "";
|
|
"tooltip" = "{ifname} = {ipaddr}/{cidr}";
|
|
on-click = "${pkgs.hyprland}/bin/hyprctl dispatch exec \"[float] alacritty -e nmtui\"";
|
|
};
|
|
"pulseaudio" = {
|
|
"format" = "{volume}%";
|
|
on-click = "${pkgs.hyprland}/bin/hyprctl dispatch exec \"[float] alacritty -e pulsemixer\"";
|
|
};
|
|
};
|
|
};
|
|
style = ''
|
|
* {
|
|
font-family: "Spleen 32x64", "UbuntuMono Nerd Font";
|
|
font-size: 14px;
|
|
min-height: 0;
|
|
}
|
|
|
|
window#waybar {
|
|
background: #152528;
|
|
color: #bababd;
|
|
}
|
|
|
|
window#waybar.hidden {
|
|
opacity: 0.2;
|
|
}
|
|
|
|
#workspaces {
|
|
}
|
|
|
|
#window {
|
|
margin: 2px;
|
|
padding-left: 8px;
|
|
padding-right: 8px;
|
|
background-color: #152528;
|
|
}
|
|
|
|
button {
|
|
border: none;
|
|
border-radius: 0;
|
|
}
|
|
|
|
button:hover {
|
|
background: inherit;
|
|
border-top: 2px solid #bababd;
|
|
}
|
|
|
|
#workspaces button {
|
|
padding: 0 4px;
|
|
background-color: #152528;
|
|
color: #666666;
|
|
}
|
|
|
|
#workspaces button.active {
|
|
background-color: #152528;
|
|
color:#bababd;
|
|
border-top: 2px solid #bababd;
|
|
}
|
|
|
|
#workspaces button.urgent {
|
|
background-color: #eb4d4b;
|
|
}
|
|
|
|
#clock,
|
|
#battery,
|
|
#cpu,
|
|
#memory,
|
|
#temperature,
|
|
#network,
|
|
#pulseaudio,
|
|
#tray
|
|
{
|
|
padding: 2px;
|
|
background-color: #152528;
|
|
border-top: 2px solid #666666;
|
|
color: #bababd;
|
|
}
|
|
|
|
/* If workspaces is the leftmost module, omit left margin */
|
|
.modules-left > widget:first-child > #workspaces {
|
|
margin-left: 0;
|
|
}
|
|
|
|
/* If workspaces is the rightmost module, omit right margin */
|
|
.modules-right > widget:last-child > #workspaces {
|
|
margin-right: 0;
|
|
}
|
|
|
|
@keyframes blink {
|
|
to {
|
|
background-color: #ffffff;
|
|
color: #000000;
|
|
}
|
|
}
|
|
|
|
#battery.critical:not(.charging) {
|
|
background-color: #f53c3c;
|
|
color: #ffffff;
|
|
animation-name: blink;
|
|
animation-duration: 0.5s;
|
|
animation-timing-function: linear;
|
|
animation-iteration-count: infinite;
|
|
animation-direction: alternate;
|
|
}
|
|
|
|
label:focus {
|
|
background-color: #152528;
|
|
}
|
|
|
|
#temperature.critical {
|
|
background-color: #eb4d4b;
|
|
}
|
|
|
|
#tray > .needs-attention {
|
|
-gtk-icon-effect: highlight;
|
|
background-color: #eb4d4b;
|
|
}
|
|
'';
|
|
};
|
|
}
|