move hyprland config to hyprland.nix
This commit is contained in:
parent
1927bebfc4
commit
2d59425a38
2 changed files with 71 additions and 68 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
imports = [
|
||||
inputs.anyrun.homeManagerModules.default
|
||||
./hyprland.nix
|
||||
];
|
||||
|
||||
# States home manager version that config was originally compatible with, do not change without reading all patch notes since this version and altering as needed
|
||||
|
@ -26,74 +27,6 @@
|
|||
programs.home-manager.enable = true;
|
||||
|
||||
programs.tmux.enable = true;
|
||||
|
||||
# Enable Hyprland compositor
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
xwayland.enable = true;
|
||||
# Autostart using systemd
|
||||
systemd.enable = true;
|
||||
extraConfig = ''
|
||||
exec-once = waybar
|
||||
|
||||
# Monitor settings
|
||||
monitor = eDP-2, 2560x1600@165, 0x0, auto # main laptop monitor
|
||||
monitor = DP-3, 1920x1080@119.98, -1280x-1080, auto # left external monitor
|
||||
monitor = DP-2, 1920x1080@119.98, 640x-1080, auto # right external monitor
|
||||
|
||||
debug:disable_logs = false
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mod, mouse:272, movewindow
|
||||
bindm = $mod, mouse:273, resizewindow
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
env = GDK_SCALE,1
|
||||
env = XCUERSOR_SIZE,32
|
||||
'';
|
||||
};
|
||||
# Hyprland configuration
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
input = { kb_layout = "gb"; };
|
||||
bind =
|
||||
[
|
||||
# Keybinds for starting programs
|
||||
"$mod, F, exec, firefox"
|
||||
"$mod, 1, exec, alacritty"
|
||||
"$mod, D, exec, vesktop"
|
||||
"$mod, space, exec, anyrun"
|
||||
|
||||
# Screenshot tool
|
||||
", Print, exec, grimblast copy area"
|
||||
|
||||
# Screen locking tool
|
||||
"$mod, l, exec, hyprlock"
|
||||
|
||||
# Window management
|
||||
"$mod, x, killactive"
|
||||
"$mod, tab, togglefloating"
|
||||
]
|
||||
++ (
|
||||
# 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}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10)
|
||||
);
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Enable Hyprland compositor
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
xwayland.enable = true;
|
||||
# Autostart using systemd
|
||||
systemd.enable = true;
|
||||
extraConfig = ''
|
||||
exec-once = waybar
|
||||
|
||||
# Monitor settings
|
||||
monitor = eDP-2, 2560x1600@165, 0x0, auto # main laptop monitor
|
||||
monitor = DP-3, 1920x1080@119.98, -1280x-1080, auto # left external monitor
|
||||
monitor = DP-2, 1920x1080@119.98, 640x-1080, auto # right external monitor
|
||||
|
||||
debug:disable_logs = false
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mod, mouse:272, movewindow
|
||||
bindm = $mod, mouse:273, resizewindow
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
env = GDK_SCALE,1
|
||||
env = XCURSOR_SIZE,32
|
||||
'';
|
||||
};
|
||||
# Hyprland configuration
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
input = { kb_layout = "gb"; };
|
||||
bind =
|
||||
[
|
||||
# Keybinds for starting programs
|
||||
"$mod, F, exec, firefox"
|
||||
"$mod, 1, exec, alacritty"
|
||||
"$mod, D, exec, vesktop"
|
||||
"$mod, space, exec, anyrun"
|
||||
|
||||
# Screenshot tool
|
||||
", Print, exec, grimblast copy area"
|
||||
|
||||
# Screen locking tool
|
||||
"$mod, l, exec, hyprlock"
|
||||
|
||||
# Window management
|
||||
"$mod, x, killactive"
|
||||
"$mod, tab, togglefloating"
|
||||
]
|
||||
++ (
|
||||
# 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}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10)
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue