mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 06:33:56 -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
|
||||
(import ./vars.nix)
|
||||
defaultWorkspaces
|
||||
externalMonitors
|
||||
laptopMonitors
|
||||
layerRules
|
||||
modifier
|
||||
windowManagerBinds
|
||||
|
@ -111,11 +109,9 @@ in {
|
|||
fi
|
||||
elif [ "$1" == "off" ]; then
|
||||
${
|
||||
lib.strings.concatLines
|
||||
(
|
||||
lib.attrsets.mapAttrsToList (name: monitor: ''${hyprctl} keyword monitor "${monitor}"'')
|
||||
laptopMonitors
|
||||
)
|
||||
lib.strings.concatMapStringsSep "\n"
|
||||
(monitor: ''${hyprctl} keyword monitor "${monitor}"'')
|
||||
cfg.desktop.hyprland.laptopMonitors
|
||||
}
|
||||
fi
|
||||
'';
|
||||
|
@ -173,12 +169,12 @@ in {
|
|||
'';
|
||||
in ''
|
||||
${
|
||||
lib.strings.concatLines
|
||||
(
|
||||
lib.attrsets.mapAttrsToList (name: value: "monitor = ${value}")
|
||||
(laptopMonitors // externalMonitors)
|
||||
)
|
||||
lib.strings.concatMapStringsSep "\n"
|
||||
(monitor: ''monitor = ${monitor}'')
|
||||
(cfg.desktop.hyprland.laptopMonitors
|
||||
++ cfg.desktop.hyprland.monitors)
|
||||
}
|
||||
|
||||
monitor = ,preferred,auto,auto
|
||||
|
||||
# Turn off the internal display when lid is closed.
|
||||
|
@ -186,7 +182,11 @@ in {
|
|||
bindl = ,switch:off:Lid Switch,exec,${clamshell} off
|
||||
|
||||
# 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
|
||||
xwayland {
|
||||
|
@ -231,9 +231,7 @@ in {
|
|||
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.inactive_border = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}AA)
|
||||
|
||||
layout = dwindle
|
||||
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
|
@ -248,10 +246,7 @@ in {
|
|||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(${lib.strings.removePrefix "#" cfg.theme.colors.shadow}EE)
|
||||
|
||||
dim_special = 0.5
|
||||
|
||||
# Window-specific rules
|
||||
${layerRules}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,6 @@
|
|||
{
|
||||
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 = ''
|
||||
# Window-specific rules
|
||||
layerrule = blur, waybar
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
cfg = config.ar.home;
|
||||
|
@ -105,6 +104,18 @@ in {
|
|||
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 {
|
||||
description = "Whether to enable random wallpaper script.";
|
||||
default = cfg.desktop.hyprland.enable;
|
||||
|
@ -132,6 +143,12 @@ in {
|
|||
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 {
|
||||
description = "Whether to enable dynamic virtual keyboard.";
|
||||
default = cfg.desktop.hyprland.tabletMode.enable;
|
||||
|
|
|
@ -54,4 +54,11 @@
|
|||
# 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;
|
||||
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 = {
|
||||
enable = true;
|
||||
|
|
|
@ -4,4 +4,9 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
ar.home.desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -6,10 +6,14 @@
|
|||
}: {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
ar.home.services.easyeffects = {
|
||||
ar.home = {
|
||||
desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
|
||||
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
preset = "framework13";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -9,7 +9,11 @@
|
|||
sharedModules = [
|
||||
{
|
||||
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"
|
||||
'';
|
||||
|
||||
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 = [
|
||||
{
|
||||
programs.vscode.userSettings = {
|
||||
"editor.fontSize" = lib.mkForce "16";
|
||||
};
|
||||
|
||||
home.pointerCursor.size = lib.mkForce 24;
|
||||
|
||||
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;
|
||||
preset = "LoudnessEqualizer";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue