Refactored configuration

This commit is contained in:
2024-06-25 13:11:30 +02:00
parent 3ead6d13d8
commit 726b059e5e
9 changed files with 198 additions and 319 deletions

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, hostName, ... }:
{ config, pkgs, lib, ... }:
{
imports = [
@@ -24,12 +24,10 @@
wayland.windowManager.hyprland = {
enable = true;
settings = {
monitor = if hostName == "xv-laptop" then [
monitor = lib.mkIf (config.host == "xv-laptop") [
"eDP-1,preferred,3840x0,1.333"
"DP-10,preferred,0x0,1"
"DP-9,preferred,1920x0,1"
] else [
",preferred,auto,auto"
];
exec-once = [
@@ -81,7 +79,10 @@
force_zero_scaling = true;
};
workspace = if hostName == "xv-desktop" then [
workspace = lib.mkMerge [[
]
(lib.mkIf (config.host == "xv-desktop") [
"1, monitor:DP-2"
"2, monitor:DP-2"
"3, monitor:DP-2"
@@ -92,7 +93,8 @@
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
"10, monitor:HDMI-A-1"
] else [
])
(lib.mkIf (config.host == "xv-laptop") [
"1, monitor:DP-10"
"2, monitor:DP-10"
"3, monitor:DP-10"
@@ -103,7 +105,7 @@
"8, monitor:eDP-1"
"9, monitor:eDP-1"
"10, monitor:eDP-1"
];
])];
bind = [
"$mod, Q, exec, alacritty"
@@ -156,19 +158,7 @@
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
] ++ (if hostName == "xv-desktop" then [
",code:194,workspace, 6"
",code:195,workspace, 7"
",code:196,workspace, 8"
",code:197,workspace, 9"
",code:198,workspace, 10"
"SHIFT, code:194, movetoworkspace, 6"
"SHIFT, code:195, movetoworkspace, 7"
"SHIFT, code:196, movetoworkspace, 8"
"SHIFT, code:197, movetoworkspace, 9"
"SHIFT, code:198, movetoworkspace, 10"
] else [ ]);
];
bindle = [
# Volume control

View File

@@ -1,4 +1,4 @@
{ hostName, pkgs, ... }:
{ pkgs, lib, config, ... }:
{
programs.waybar = {
@@ -28,14 +28,14 @@
"on-scroll-up" = "hyprctl dispatch workspace e+1";
"on-scroll-down" = "hyprctl dispatch workspace e-1";
"on-click" = "activate";
"persistent-workspaces" = if hostName == "xv-laptop" then {
"persistent-workspaces" = lib.mkMerge [{
}
(lib.mkIf (config.host == "xv-laptop") {
"DP-10" = [ 1 2 3 4 ];
"DP-9" = [ 5 6 7 ];
"eDP-1" = [ 8 9 10 ];
} else {
"DP-2" = [ 1 2 3 4 5 ];
"HDMI-A-1" = [ 6 7 8 9 10 ];
};
})];
"format-icons" = {
"default" = "";
"empty" = "";