This commit is contained in:
hand7s 2025-04-21 18:32:39 +03:00
commit b6cdc78668
210 changed files with 9929 additions and 0 deletions

238
hand7s/wayland/hyprland.nix Normal file
View file

@ -0,0 +1,238 @@
{
inputs,
config,
pkgs,
lib,
...
}: {
wayland = {
windowManager = {
hyprland = {
enable = lib.mkIf (
config.home.gui.sessionType == "Hyprland"
) true;
settings = {
monitor = ", 2560x1440@165.00Hz, 0x0, 1";
general = {
gaps_in = "5";
gaps_out = "20";
border_size = "2";
layout = "dwindle";
snap = {
enabled = true;
window_gap = "5";
monitor_gap = "5";
border_overlap = false;
};
};
input = {
kb_layout = "us, ru";
kb_options = "grp:caps_toggle";
numlock_by_default = true;
follow_mouse = "1";
left_handed = true;
sensitivity = "0";
special_fallthrough = true;
focus_on_close = 1;
touchpad = {
disable_while_typing = true;
tap-to-click = true;
};
tablet = {
output = "current";
left_handed = true;
};
};
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = true;
workspace_swipe_distance = 400;
};
group = {
auto_group = true;
insert_after_current = true;
focus_removed_window = true;
drag_into_group = "2";
merge_groups_on_drag = true;
merge_groups_on_groupbar = true;
group_on_movetoworkspace = true;
groupbar = {
enabled = true;
};
};
decoration = {
active_opacity = "0.85";
inactive_opacity = "0.65";
fullscreen_opacity = "1.0";
rounding = "10";
dim_inactive = true;
dim_strength = "0.15";
dim_special = "0.0";
dim_around = "0.05";
shadow = {
enabled = true;
render_power = "4";
range = "4";
ignore_window = false;
};
blur = {
enabled = true;
size = "10";
passes = "5";
};
};
exec-once = [
"${pkgs.systemd}/bin/systemctl --user start hyprpaper.service"
"${pkgs.systemd}/bin/systemctl --user start hypridle.service"
"${pkgs.systemd}/bin/systemctl --user start hyprpolkitagent.service"
"${pkgs.systemd}/bin/systemctl --user start hyprpanel.service"
];
bind = [
"ALT, return, exec, ${pkgs.ghostty}/bin/ghostty"
"ALT, Q, killactive,"
"ALT, S, exec, ${pkgs.fuzzel}/bin/fuzzel"
"ALT, F, fullscreen, 0"
"ALT, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
"ALT SHIFT, E, exit,"
"ALT SHIFT, space, togglefloating, active"
"ALT SHIFT, S, exec, ${pkgs.grimblast}/bin/grimblast --notify --freeze copysave area /home/hand7s/Pictures/Screenshots/$(date '+%y%m%d_%H-%M-%s').png"
"ALT, left, movefocus, l"
"ALT, right, movefocus, r"
"ALT, up, movefocus, u"
"ALT, down, movefocus, d"
"ALT, 1, workspace, 1"
"ALT, 2, workspace, 2"
"ALT, 3, workspace, 3"
"ALT, 4, workspace, 4"
"ALT, 5, workspace, 5"
"ALT, 6, workspace, 6"
"ALT, 7, workspace, 7"
"ALT, 8, workspace, 8"
"ALT, 9, workspace, 9"
"ALT, 0, workspace, 0"
"ALT, H, togglespecialworkspace, special"
"ALT SHIFT, 1, movetoworkspace, 1"
"ALT SHIFT, 2, movetoworkspace, 2"
"ALT SHIFT, 3, movetoworkspace, 3"
"ALT SHIFT, 4, movetoworkspace, 4"
"ALT SHIFT, 5, movetoworkspace, 5"
"ALT SHIFT, 6, movetoworkspace, 6"
"ALT SHIFT, 7, movetoworkspace, 7"
"ALT SHIFT, 8, movetoworkspace, 8"
"ALT SHIFT, 9, movetoworkspace, 9"
"ALT SHIFT, 0, movetoworkspace, 0"
"ALT SHIFT, H, movetoworkspace, special"
"ALT, mouse_down, workspace, e+1"
"ALT, mouse_up, workspace, e-1"
];
bindel = [
", XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +5%"
];
bindl = [
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
", XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous"
", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next"
", XF86AudioMute, exec, ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
"ALT, TAB, hyprexpo:expo, toggle"
];
bindm = [
"ALT, mouse:272, movewindow"
"ALT, mouse:273, resizewindow"
];
animation = [
"enabled = true"
"bezier = bez, 0.05, 0.9, 0.1, 1.05"
"animation = windows, 1, 7, bez"
"animation = windowsOut, 1, 7, default, popin 80%"
"animation = border, 1, 10, default"
"animation = borderangle, 1, 10, default"
"animation = fade, 1, 7, default"
"animation = workspaces, 1, 7, default"
];
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
middle_click_paste = false;
animate_manual_resizes = true;
animate_mouse_windowdragging = true;
focus_on_activate = true;
close_special_on_empty = true;
initial_workspace_tracking = "2";
};
binds = {
workspace_back_and_forth = true;
allow_workspace_cycles = true;
workspace_center_on = true;
};
xwayland = {
enabled = true;
use_nearest_neighbor = true;
force_zero_scaling = false;
};
ecosystem = {
no_update_news = true;
no_donation_nag = true;
};
debug = {
suppress_errors = true;
};
plugin = {
hyprexpo = {
columns = 3;
gap_size = 5;
enable_gesture = true;
gesture_fingers = 3;
gesture_distance = 300;
gesture_positive = false;
};
};
};
plugins = with inputs; [
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo
];
};
};
};
}

113
hand7s/wayland/river.nix Normal file
View file

@ -0,0 +1,113 @@
{
config,
pkgs,
lib,
...
}: {
wayland = {
windowManager = {
river = {
enable = lib.mkIf (
config.home.gui.sessionType == "River"
) true;
settings = {
default-layout = "rivertile";
focus-follows-cursor = "normal";
border-width = 2;
declare-mod = [
"locked"
"normal"
];
xwayland = {
enable = true;
};
map = {
normal = {
"Alt Q" = "close";
"Alt S" = "spawn fuzzel";
"Alt Return" = "spawn ghostty";
"Alt L" = "spawn hyprlock";
"Alt F" = "toggle-fullscreen";
"Alt+Shift S" = "spawn wayshot --clipboard";
"Alt+Shift E" = "exit";
"Alt+Shift Space" = "toggle-float";
"Alt Up" = "send-to-output next";
"Alt Down" = "send-to-output previous";
"Alt Right" = "send-to-output next";
"Alt Left" = "send-to-output previous";
"Alt 1" = "set-focused-tags 0";
"Alt 2" = "set-focused-tags 1";
"Alt 3" = "set-focused-tags 2";
"Alt 4" = "set-focused-tags 3";
"Alt 5" = "set-focused-tags 4";
"Alt 6" = "set-focused-tags 5";
"Alt 7" = "set-focused-tags 6";
"Alt 8" = "set-focused-tags 7";
"Alt 9" = "set-focused-tags 8";
"Alt H" = "toggle-focused-tags 20";
"Alt+Shift 1" = "set-view-tags 0";
"Alt+Shift 2" = "set-view-tags 1";
"Alt+Shift 3" = "set-view-tags 2";
"Alt+Shift 4" = "set-view-tags 3";
"Alt+Shift 5" = "set-view-tags 4";
"Alt+Shift 6" = "set-view-tags 5";
"Alt+Shift 7" = "set-view-tags 6";
"Alt+Shift 8" = "set-view-tags 7";
"Alt+Shift 9" = "set-view-tags 8";
"Alt+Shift H" = "set-view-tags 20";
"Alt+Control 1" = "toggle-focused-tags 0";
"Alt+Control 2" = "toggle-focused-tags 1";
"Alt+Control 3" = "toggle-focused-tags 2";
"Alt+Control 4" = "toggle-focused-tags 3";
"Alt+Control 5" = "toggle-focused-tags 4";
"Alt+Control 6" = "toggle-focused-tags 5";
"Alt+Control 7" = "toggle-focused-tags 6";
"Alt+Control 8" = "toggle-focused-tags 7";
"Alt+Control 9" = "toggle-focused-tags 8";
"Alt+Control H" = "toggle-focused-tags 20";
"Alt+Shift+Control 1" = "toggle-view-tags 0";
"Alt+Shift+Control 2" = "toggle-view-tags 1";
"Alt+Shift+Control 3" = "toggle-view-tags 2";
"Alt+Shift+Control 4" = "toggle-view-tags 3";
"Alt+Shift+Control 5" = "toggle-view-tags 4";
"Alt+Shift+Control 6" = "toggle-view-tags 5";
"Alt+Shift+Control 7" = "toggle-view-tags 6";
"Alt+Shift+Control 8" = "toggle-view-tags 7";
"Alt+Shift+Control 9" = "toggle-view-tags 8";
"Alt+Shift+Control H" = "toggle-view-tags 20";
};
spawn = [
"${pkgs.systemd}/bin/systemctl --user start hyprpaper.service"
"${pkgs.systemd}/bin/systemctl --user start hyprpolkitagent.service"
"${pkgs.yambar}/bin/yambar"
"${pkgs.wayidle}/bin/wayidle -t=300 ${pkgs.brightnessctl}/bin/brightnessctl -s set 10"
"${pkgs.wayidle}/bin/wayidle -t=600 ${pkgs.waylock}/bin/waylock"
];
map-pointer = {
normal = {
"Alt BTN_LEFT" = "move-view";
"Alt BTN_RIGHT" = "resize-view";
};
};
};
};
extraConfig = ''
riverctl keyboard-layout -options "grp:caps_toggle" "us,ru"
'';
};
};
};
}

183
hand7s/wayland/sway.nix Normal file
View file

@ -0,0 +1,183 @@
{
config,
pkgs,
lib,
...
}: {
wayland = {
windowManager = {
sway = {
enable = lib.mkIf (
config.home.gui.sessionType == "Sway"
) true;
package = pkgs.sway;
config = {
bindkeysToCode = true;
defaultWorkspace = "workspace number 1";
workspaceAutoBackAndForth = true;
bars = [];
window = {
border = 2;
titlebar = false;
hideEdgeBorders = "both";
};
floating = {
border = 2;
titlebar = false;
modifier = "Mod1";
};
focus = {
forceWrapping = true;
mouseWarping = true;
followMouse = "always";
newWindow = "smart";
wrapping = "yes";
};
gaps = {
vertical = null;
horizontal = null;
outer = null;
inner = null;
top = null;
bottom = null;
left = null;
right = null;
smartGaps = false;
smartBorders = "no_gaps";
};
startup = [
{
command = "${pkgs.systemd}/bin/systemctl --user start hyprpaper.service";
}
{
command = "${pkgs.systemd}/bin/systemctl --user start hypridle.service";
}
{
command = "${pkgs.systemd}/bin/systemctl --user start hyprpolkitagent.service";
}
{
command = "${pkgs.sway-audio-idle-inhibit}/bin/sway-audio-idle-inhibit";
}
{
command = "${pkgs.autotiling-rs}/bin/autotiling-rs";
}
{
command = "${pkgs.swaykbdd}/bin/swaykbdd";
}
{
command = "${pkgs.yambar}/bin/yambar";
}
];
keybindings = lib.mkOptionDefault {
"Mod1+q" = "kill";
"Mod1+s" = "exec ${pkgs.fuzzel}/bin/fuzzel";
"Mod1+Return" = "exec ${pkgs.ghostty}/bin/ghostty";
"Mod1+l" = "exec ${pkgs.swaylock}/bin/swaylock";
"Mod1+f" = "fullscreen toggle";
"Mod1+Shift+s" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot --notify copy area /home/hand7s/Pictures/Screenshots/$(date '+%y%m%d_%H-%M-%s').png";
"Mod1+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
"Mod1+Space" = "floating toggle";
"Mod1+r" = "mode resize";
"Mod1+Left" = "focus left";
"Mod1+Right" = "focus right";
"Mod1+Up" = "focus up";
"Mod1+Down" = "focus down";
"Mod1+1" = "workspace number 1";
"Mod1+2" = "workspace number 2";
"Mod1+3" = "workspace number 3";
"Mod1+4" = "workspace number 4";
"Mod1+5" = "workspace number 5";
"Mod1+6" = "workspace number 6";
"Mod1+7" = "workspace number 7";
"Mod1+8" = "workspace number 8";
"Mod1+9" = "workspace number 9";
"Mod1+0" = "workspace number 10";
"Mod1+h" = "scratchpad show";
"Mod1+Shift+1" = "move container to workspace number 1";
"Mod1+Shift+2" = "move container to workspace number 2";
"Mod1+Shift+3" = "move container to workspace number 3";
"Mod1+Shift+4" = "move container to workspace number 4";
"Mod1+Shift+5" = "move container to workspace number 5";
"Mod1+Shift+6" = "move container to workspace number 6";
"Mod1+Shift+7" = "move container to workspace number 7";
"Mod1+Shift+8" = "move container to workspace number 8";
"Mod1+Shift+9" = "move container to workspace number 9";
"Mod1+Shift+0" = "move container to workspace number 10";
"Mod1+Shift+h" = "move scratchpad";
"XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioLowerVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%";
};
modes = {
resize = {
"Left" = "resize shrink width 10px";
"Right" = "resize shrink width 10px";
"Up" = "resize shrink height 10px";
"Down" = "resize shrink height 10px";
"Shift+Left" = "resize grow width 10px";
"Shift+Right" = "resize grow width 10px";
"Shift+Up" = "resize grow height 10px";
"Shift+Down" = "resize grow height 10px";
"Escape" = "mode default";
"Return" = "mode default";
};
};
input = {
"type:pointer" = {
accel_profile = "flat";
pointer_accel = "0";
};
"type:keyboard" = {
xkb_layout = "us,ru";
xkb_options = "grp:caps_toggle";
};
"type:touchpad" = {
natural_scroll = "enabled";
tap = "enabled";
};
};
};
extraConfig = ''
bindswitch lid:on exec swaylock
'';
};
};
};
}