hyprland nix conf.. maybe

This commit is contained in:
2024-04-01 23:46:55 +01:00
parent 843e16497a
commit 514d030485
+190 -81
View File
@@ -5,82 +5,89 @@
osConfig, osConfig,
... ...
}: }:
let
home = builtins.getEnv "HOME";
in
{ {
home.packages = with pkgs; [ hyprpicker ]; home.packages = with pkgs; [
wayland.windowManager.hyprland = { hyprpicker
# hyprlock
# hypridle
];
programs.hyprland = {
enable = true; enable = true;
# plugins = []; xwayland.enable = true;
systemd = { systemdIntegration = true;
enable = true;
# extraCommands = [];
# variables = ["-all"];
};
settings = { settings = {
monitor = [ monitor = [
(lib.mkIf (osConfig.networking.hostName == "nixlaptop") "eDP-1,1920x1080@60,0x0,1") "eDP-1,1920x1080@60,0x0,1"
(lib.mkIf (osConfig.networking.hostName == "nixgamer") "DP-1,2560x1440@144,1920x0,1") "HDMI-A-1,1920x1080@60,auto,1,mirror, eDP-1 "
",preferred,auto,1" ",preferred,auto,1,mirror,eDP-1"
];
exec-once = [
"wl-clipboard-history -t"
"wl-paste -p --watch wl-copy -p ''"
];
env = [
"HYPRCURSOR_THEME,${config.gtk.cursorTheme.name}"
"HYPRCURSOR_SIZE,24"
]; ];
# Trays and similar are systemd service bound to graphical-session.target
exec-once = [ "hyprctl setcursor ${config.gtk.cursorTheme.name} 24" ];
env = [ "XCURSOR_SIZE,24" ];
input = { input = {
kb_layout = "ie"; kb_layout = "us";
kb_variant = ""; kb_variant = "";
kb_model = "pc104"; kb_model = "";
kb_options = ""; kb_options = "";
kb_rules = ""; kb_rules = "";
follow_mouse = 1; follow_mouse = 1;
numlock_by_default = true;
touchpad = { touchpad = {
disable_while_typing = true;
natural_scroll = true; natural_scroll = true;
middle_button_emulation = true;
drag_lock = false;
tap-to-click = true;
}; };
sensitivity = 0;
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
}; };
general = { general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 2;
gaps_out = 4;
gaps_in = config.variables.gaps.inner.int; border_size = 2;
gaps_out = config.variables.gaps.outer.int; "col.active_border" = "rgba(00ffb2ff) rgba(00ff66ff) 90deg";
border_size = config.variables.border.width.wide.int; "col.inactive_border" = "rgba(595959ff)";
"col.active_border" = "rgb(${config.colorScheme.palette.base09})";
# "col.active_border" = "rgb(${config.colorScheme.palette.base09}) rgb(${config.colorScheme.palette.base06}) 45deg";
"col.inactive_border" = "rgb(${config.colorScheme.palette.base00})";
layout = "dwindle"; layout = "dwindle";
}; };
misc = { misc = {
# Get rid of anime girl jumpscare disable_hyprland_logo = false;
disable_hyprland_logo = true; disable_splash_rendering = false;
disable_splash_rendering = true;
mouse_move_enables_dpms = true; mouse_move_enables_dpms = true;
key_press_enables_dpms = true; key_press_enables_dpms = true;
}; };
decoration = { decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10;
rounding = config.variables.border.radius.int;
blur = { blur = {
enabled = true; enabled = true;
size = 3; size = 3;
passes = 1; passes = 1;
xray = true;
new_optimizations = "on";
}; };
drop_shadow = true; drop_shadow = true;
shadow_range = 4; shadow_range = 4;
shadow_render_power = 3; shadow_render_power = 3;
"col.shadow" = "rgb(${config.colorScheme.palette.base00})"; col.shadow = "rgba(1a1a1aee)";
}; };
animations = { animations = {
enabled = true; enabled = true;
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [ animation = [
"windows, 1, 7, myBezier" "windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%" "windowsOut, 1, 7, default, popin 80%"
@@ -91,62 +98,87 @@
]; ];
}; };
dwindle = {
pseudotile = true;
preserve_split = true;
};
master = { master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true; new_is_master = true;
}; };
gestures = { gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true; workspace_swipe = true;
workspace_swipe_numbered = true;
}; };
# Example windowrule v1 windowrule = [
# windowrule = float, ^(kitty)$ "idleinhibit fullscreen, firefox"
# Example windowrule v2 "idleinhibit focus, firefox"
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ "idleinhibit fullscreen, floorp"
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more "idleinhibit fullscreen, ghostty"
"idleinhibit focus, mpv"
"idleinhibit focus, ^(emacs)$"
"idleinhibit focus, ^(Emacs)$"
"idleinhibit focus, ^(discord)$"
"idleinhibit focus, ^(Discord)$"
"float, polkit-kde-authentication-agent-1"
"float, ^(praat)$"
"float, ^(network)$"
"float, ^(nm-)$"
"float, ^(Network)$"
"float, Rofi"
"float, Gimp"
"float, Nautilus"
"float, notification"
"float, ^(launcher)$"
"tile, Spotify"
"tile, Minecraft"
"workspace 2, KeePassXC"
"workspace 3, firefox"
"workspace 3, floorp"
"workspace 4, Spotify"
"workspace 6, discord"
"workspace 6, Signal"
"workspace 10, Minecraft"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more bind = [
"$mainMod" = "SUPER"; "$altMod, Return, exec, ${home}/.local/bin/ghostty"
"$mainMod, Return, exec, ${home}/.local/bin/ghostty" # for apps that yoink alt- binds
"$altMod SHIFT, Return, exec, alacritty"
"$mainMod SHIFT, D, exec, discord --enable-blink-features=MiddleClickAutoscroll"
"$mainMod SHIFT, E, exec, emacsclient -c -a 'emacs'"
"$mainMode SHIFT, F, exec, focus-linux"
"$mainMod, SPACE, exec, pkill wofi || wofi"
"$mainMod, E, exec, nautilus"
"$mainMod, S, exec, spotify"
"$mainMod, P, pseudo," # dwindle
"$mainMod, C, killactive,"
"$mainMod control, Q, exec, $lock"
"$mainMod, F4, exit,"
"$mainMod, V, togglefloating, "
"$mainMod SHIFT, S, togglesplit," # dwindle
"$mainMod, F, fullscreen,"
bind = "$mainMod, H, movefocus, l"
let "$mainMod, L, movefocus, r"
scriptDir = ./scripts; "$mainMod, K, movefocus, u"
in "$mainMod, J, movefocus, d"
[ "$mainMod, comma, focusmonitor, -1"
",XF86MonBrightnessUp , exec, ${scriptDir}/brightness.sh increase" "$mainMod, period, focusmonitor, +1"
",XF86MonBrightnessDown, exec, ${scriptDir}/brightness.sh decrease"
",XF86AudioRaiseVolume , exec, ${scriptDir}/volume.sh increase"
",XF86AudioLowerVolume , exec, ${scriptDir}/volume.sh decrease"
",XF86AudioMute , exec, ${scriptDir}/volume.sh toggle"
",XF86AudioMicMute , exec, ${scriptDir}/mic.sh toggle"
",Caps_Lock , exec, ${scriptDir}/capsLock.sh"
"$mainMod, t, exec, wezterm" "$mainMod SHIFT, H, movewindow, l"
"$mainMod, Space, exec, anyrun" "$mainMod SHIFT, L, movewindow, r"
"$mainMod, p, exec, ${scriptDir}/screencap.sh" "$mainMod SHIFT, K, movewindow, u"
"$mainMod, w, exec, ${scriptDir}/win-vm.sh" "$mainMod SHIFT, J, movewindow, d"
"$mainMod, i, exec, ${scriptDir}/sleep-toggle.sh" "$mainMod SHIFT, comma, movecurrentworkspacetomonitor, -1"
"$mainMod, r, exec, ${pkgs.ironbar}/bin/ironbar reload" "$mainMod SHIFT, period, movecurrentworkspacetomonitor, +1"
"$mainMod, b, exec, flatpak run org.mozilla.firefox"
"$mainMod, e, exec, flatpak run org.mozilla.Thunderbird"
"$mainMod, l, exec, swaylock"
"$mainMod, c, killactive,"
"$mainMod, m, exit,"
"$mainMod, v, togglefloating,"
"$mainMod, f, fullscreen, # fullscreen"
"$mainMod, s, togglesplit, # dwindle"
"$mainMod, left, movefocus, l" "$mainMod, right, resizeactive, 10 0"
"$mainMod, right, movefocus, r" "$mainMod, left, resizeactive, -10 0"
"$mainMod, up, movefocus, u" "$mainMod, up, resizeactive, 0 -10"
"$mainMod, down, movefocus, d" "$mainMod, down, resizeactive, 0 10"
"$mainMod, h, movefocus, l"
"$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d"
"$mainMod, 1, workspace, 1" "$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2" "$mainMod, 2, workspace, 2"
@@ -168,10 +200,37 @@
"$mainMod SHIFT, 7, movetoworkspace, 7" "$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8" "$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9" "$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
"$mainMod SHIFT CTRL, right, movetoworkspace, +1"
"$mainMod SHIFT CTRL, left, movetoworkspace, -1"
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1" "$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1" "$mainMod, mouse_up, workspace, e-1"
# Tab through existing workspaces
"$mainMod, Tab, workspace, e+1"
"$mainMod SHIFT, Tab, workspace, e-1"
"$mainMod CTRL, right, workspace, +1"
"$mainMod CTRL, left, workspace, -1"
];
bindl = [
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous"
];
bindel = [
", XF86AudioRaiseVolume, exec, pamixer -i 5"
", XF86AudioLowerVolume, exec, pamixer -d 5"
", XF86AudioMute, exec, pamixer -t"
];
binde = [
", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
", XF86MonBrightnessUp, exec, brightnessctl set 10%+"
]; ];
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
@@ -180,8 +239,58 @@
"$mainMod, mouse:273, resizewindow" "$mainMod, mouse:273, resizewindow"
]; ];
# Helps ensure that workspace 1 is always on main monitor for each pc # Screenshots and Submaps
extraConfig = ''
$screenshotarea = hyprctl keyword animation "fadeOut,0,0,default"; grimblast --notify copy area; hyprctl keyword animation "fadeOut,1,4,default"
bind = , Print, exec, $screenshotarea
bind = SHIFT, Print, exec, grimblast --notify --cursor copy output
bind = $mainMod, R, submap, resize
submap = resize
bind=, escape,submap,reset
binde=, left, resizeactive, -10 0
bindr=, left, submap, reset
binde=, right, resizeactive, 10 0
bindr=, right, submap, reset
binde=, up, resizeactive, 0 10
bindr=, up, submap, reset
binde=, down, resizeactive, 0 -10
bindr=, down, submap, reset
binde=, H, resizeactive, -10 0
bindr=, H, submap, reset
binde=, J, resizeactive, 0 -10
bindr=, J, submap, reset
binde=, K, resizeactive, 0 10
bindr=, K, submap, reset
binde=, L, resizeactive, 10 0
bindr=, L, submap, reset
submap=reset
bind = $mainMod, B, submap, browser_select
submap = browser_select
bind =, B, exec, brave --enable-blink-features=MiddleClickAutoscroll
bind =, B, submap, reset
bind =, F, exec, firefox
bind =, F, submap, reset
bind=, escape,submap,reset
submap=reset
bind = $mainMod SHIFT, V, submap, video_stuff
submap = video_stuff
bind = , O, exec, obs
bind = , O, submap, reset
bind = , V, exec , kdenlive
bind = , V, submap, reset
bind=, escape,submap,reset
submap = reset
'';
}; };
xwayland.enable = true;
}; };
} }