mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 22:51:54 -05:00
home/hyprland: remove monitor + tablet config from module (#30)
* home: moved hyprland monitors to config.ar.home.desktop.hyprland.monitors and config.ar.home.desktop.desktop.hyprland.laptopMonitors * nix fmt * home/options: update formatting * home/hyprland: move laptop montiors to hosts/hostname/home.nix * home/hyprland: move external non-desktop displays to user home configs * home/hyprland: move monitors to host + home configs * home/hyprland: add ar.home.desktop.hyprland.tabletMode.tabletSwitches for automatically setting up a list of tablet switches * nix fmt
This commit is contained in:
parent
68058f33cd
commit
3899be29c3
|
@ -15,8 +15,6 @@ in {
|
||||||
inherit
|
inherit
|
||||||
(import ./vars.nix)
|
(import ./vars.nix)
|
||||||
defaultWorkspaces
|
defaultWorkspaces
|
||||||
externalMonitors
|
|
||||||
laptopMonitors
|
|
||||||
layerRules
|
layerRules
|
||||||
modifier
|
modifier
|
||||||
windowManagerBinds
|
windowManagerBinds
|
||||||
|
@ -111,11 +109,9 @@ in {
|
||||||
fi
|
fi
|
||||||
elif [ "$1" == "off" ]; then
|
elif [ "$1" == "off" ]; then
|
||||||
${
|
${
|
||||||
lib.strings.concatLines
|
lib.strings.concatMapStringsSep "\n"
|
||||||
(
|
(monitor: ''${hyprctl} keyword monitor "${monitor}"'')
|
||||||
lib.attrsets.mapAttrsToList (name: monitor: ''${hyprctl} keyword monitor "${monitor}"'')
|
cfg.desktop.hyprland.laptopMonitors
|
||||||
laptopMonitors
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
@ -173,20 +169,24 @@ in {
|
||||||
'';
|
'';
|
||||||
in ''
|
in ''
|
||||||
${
|
${
|
||||||
lib.strings.concatLines
|
lib.strings.concatMapStringsSep "\n"
|
||||||
(
|
(monitor: ''monitor = ${monitor}'')
|
||||||
lib.attrsets.mapAttrsToList (name: value: "monitor = ${value}")
|
(cfg.desktop.hyprland.laptopMonitors
|
||||||
(laptopMonitors // externalMonitors)
|
++ cfg.desktop.hyprland.monitors)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor = ,preferred,auto,auto
|
monitor = ,preferred,auto,auto
|
||||||
|
|
||||||
# Turn off the internal display when lid is closed.
|
# Turn off the internal display when lid is closed.
|
||||||
bindl=,switch:on:Lid Switch,exec,${clamshell} on
|
bindl = ,switch:on:Lid Switch,exec,${clamshell} on
|
||||||
bindl=,switch:off:Lid Switch,exec,${clamshell} off
|
bindl = ,switch:off:Lid Switch,exec,${clamshell} off
|
||||||
|
|
||||||
# Enable virtual keyboard in tablet mode
|
# Enable virtual keyboard in tablet mode
|
||||||
bindl=,switch:Lenovo Yoga Tablet Mode Control switch,exec,${tablet}
|
${
|
||||||
|
lib.strings.concatMapStringsSep "\n"
|
||||||
|
(switch: ''bindl = ,switch:${switch},exec,${tablet}'')
|
||||||
|
cfg.desktop.hyprland.tabletMode.tabletSwitches
|
||||||
|
}
|
||||||
|
|
||||||
# unscale XWayland apps
|
# unscale XWayland apps
|
||||||
xwayland {
|
xwayland {
|
||||||
|
@ -231,9 +231,7 @@ in {
|
||||||
border_size = 2
|
border_size = 2
|
||||||
col.active_border = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}EE) 45deg
|
col.active_border = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}EE) 45deg
|
||||||
col.inactive_border = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}AA)
|
col.inactive_border = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}AA)
|
||||||
|
|
||||||
layout = dwindle
|
layout = dwindle
|
||||||
|
|
||||||
allow_tearing = false
|
allow_tearing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,10 +246,7 @@ in {
|
||||||
shadow_range = 4
|
shadow_range = 4
|
||||||
shadow_render_power = 3
|
shadow_render_power = 3
|
||||||
col.shadow = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.shadow}EE)
|
col.shadow = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.shadow}EE)
|
||||||
|
|
||||||
dim_special = 0.5
|
dim_special = 0.5
|
||||||
|
|
||||||
# Window-specific rules
|
|
||||||
${layerRules}
|
${layerRules}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,6 @@
|
||||||
{
|
{
|
||||||
defaultWorkspaces = [1 2 3 4 5 6 7 8 9];
|
defaultWorkspaces = [1 2 3 4 5 6 7 8 9];
|
||||||
|
|
||||||
externalMonitors = {
|
|
||||||
homeOffice0 = "desc:LG Electronics LG ULTRAWIDE 311NTAB5M720,preferred,auto,1.25,vrr,2";
|
|
||||||
homeOffice1 = "desc:LG Electronics LG IPS QHD 109NTWG4Y865,preferred,-2560x0,auto";
|
|
||||||
homeOffice3 = "desc:LG Electronics LG ULTRAWIDE 207NTHM9F673, preferred,auto,1.25,vrr,2";
|
|
||||||
homeOffice4 = "desc:LG Electronics LG IPS QHD 207NTVSE5615,preferred,-1152x0,1.25,transform,1";
|
|
||||||
workShop = "desc:Guangxi Century Innovation Display Electronics Co. Ltd 27C1U-D 0000000000001,preferred,-2400x0,1.6";
|
|
||||||
weWork = "desc:HP Inc. HP 24mh 3CM037248S,preferred,-1920x0,auto";
|
|
||||||
};
|
|
||||||
|
|
||||||
laptopMonitors = {
|
|
||||||
framework = "desc:BOE 0x095F,preferred,auto,1.566667";
|
|
||||||
t440p = "desc:LG Display 0x0569,preferred,auto,1.0";
|
|
||||||
yoga9i = "desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0";
|
|
||||||
};
|
|
||||||
|
|
||||||
layerRules = ''
|
layerRules = ''
|
||||||
# Window-specific rules
|
# Window-specific rules
|
||||||
layerrule = blur, waybar
|
layerrule = blur, waybar
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.ar.home;
|
cfg = config.ar.home;
|
||||||
|
@ -105,6 +104,18 @@ in {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMonitors = lib.mkOption {
|
||||||
|
description = "List of internal laptop monitors.";
|
||||||
|
default = [];
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
monitors = lib.mkOption {
|
||||||
|
description = "List of external monitors.";
|
||||||
|
default = [];
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
};
|
||||||
|
|
||||||
randomWallpaper = lib.mkOption {
|
randomWallpaper = lib.mkOption {
|
||||||
description = "Whether to enable random wallpaper script.";
|
description = "Whether to enable random wallpaper script.";
|
||||||
default = cfg.desktop.hyprland.enable;
|
default = cfg.desktop.hyprland.enable;
|
||||||
|
@ -132,6 +143,12 @@ in {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tabletSwitches = lib.mkOption {
|
||||||
|
description = "Switches to activate tablet mode when toggled.";
|
||||||
|
default = [];
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
};
|
||||||
|
|
||||||
virtKeyboard = lib.mkOption {
|
virtKeyboard = lib.mkOption {
|
||||||
description = "Whether to enable dynamic virtual keyboard.";
|
description = "Whether to enable dynamic virtual keyboard.";
|
||||||
default = cfg.desktop.hyprland.tabletMode.enable;
|
default = cfg.desktop.hyprland.tabletMode.enable;
|
||||||
|
|
|
@ -54,4 +54,11 @@
|
||||||
# windowrulev2 = workspace special:notes,class:(obsidian)
|
# windowrulev2 = workspace special:notes,class:(obsidian)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ar.home.desktop.hyprland.monitors = [
|
||||||
|
"desc:Guangxi Century Innovation Display Electronics Co. Ltd 27C1U-D 0000000000001,preferred,-2400x0,1.6"
|
||||||
|
"desc:HP Inc. HP 24mh 3CM037248S,preferred,-1920x0,auto"
|
||||||
|
"desc:LG Electronics LG IPS QHD 109NTWG4Y865,preferred,-2560x0,auto"
|
||||||
|
"desc:LG Electronics LG IPS QHD 207NTVSE5615,preferred,-1152x0,1.25,transform,1"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,17 @@ self: {
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultApps.enable = true;
|
defaultApps.enable = true;
|
||||||
desktop.hyprland.randomWallpaper = true;
|
|
||||||
|
desktop.hyprland = {
|
||||||
|
monitors = [
|
||||||
|
"desc:Guangxi Century Innovation Display Electronics Co. Ltd 27C1U-D 0000000000001,preferred,-2400x0,1.6"
|
||||||
|
"desc:HP Inc. HP 24mh 3CM037248S,preferred,-1920x0,auto"
|
||||||
|
"desc:LG Electronics LG IPS QHD 109NTWG4Y865,preferred,-2560x0,auto"
|
||||||
|
"desc:LG Electronics LG IPS QHD 207NTVSE5615,preferred,-1152x0,1.25,transform,1"
|
||||||
|
];
|
||||||
|
|
||||||
|
randomWallpaper = true;
|
||||||
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -4,4 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
{
|
||||||
|
ar.home.desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,14 @@
|
||||||
}: {
|
}: {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
ar.home.services.easyeffects = {
|
ar.home = {
|
||||||
|
desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
|
||||||
|
|
||||||
|
services.easyeffects = {
|
||||||
enable = true;
|
enable = true;
|
||||||
preset = "framework13";
|
preset = "framework13";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,11 @@
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
{
|
{
|
||||||
xdg.userDirs.music = "/mnt/Media/Music";
|
xdg.userDirs.music = "/mnt/Media/Music";
|
||||||
ar.home.desktop.hyprland.autoSuspend = false;
|
|
||||||
|
ar.home.desktop.hyprland = {
|
||||||
|
autoSuspend = false;
|
||||||
|
monitors = ["desc:LG Electronics LG ULTRAWIDE 311NTAB5M720,preferred,auto,1.25,vrr,2"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,13 @@
|
||||||
exec-once = ${lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default} "desc:Samsung Display Corp. 0x4152"
|
exec-once = ${lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default} "desc:Samsung Display Corp. 0x4152"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ar.home.desktop.hyprland.tabletMode.enable = true;
|
ar.home.desktop.hyprland = {
|
||||||
|
laptopMonitors = ["desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0"];
|
||||||
|
tabletMode = {
|
||||||
|
enable = true;
|
||||||
|
tabletSwitches = ["Lenovo Yoga Tablet Mode Control switch"];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,18 +6,18 @@
|
||||||
}: {
|
}: {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
programs.vscode.userSettings = {
|
|
||||||
"editor.fontSize" = lib.mkForce "16";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.pointerCursor.size = lib.mkForce 24;
|
|
||||||
|
|
||||||
gtk.font.size = lib.mkForce 14;
|
gtk.font.size = lib.mkForce 14;
|
||||||
|
home.pointerCursor.size = lib.mkForce 24;
|
||||||
|
programs.vscode.userSettings."editor.fontSize" = lib.mkForce "16";
|
||||||
|
|
||||||
ar.home.services.easyeffects = {
|
ar.home = {
|
||||||
|
desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.0"];
|
||||||
|
|
||||||
|
services.easyeffects = {
|
||||||
enable = true;
|
enable = true;
|
||||||
preset = "LoudnessEqualizer";
|
preset = "LoudnessEqualizer";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue