Ver 1.0
This commit is contained in:
parent
b6b87d5aed
commit
9c72a71585
3546 changed files with 18655 additions and 0 deletions
56
nixosVista/homeManager/hyprland/monitor.nix
Normal file
56
nixosVista/homeManager/hyprland/monitor.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
nixosVista,
|
||||
...
|
||||
}: let
|
||||
cfg = nixosVista;
|
||||
|
||||
############################################################
|
||||
# Generate explicit monitor lines
|
||||
############################################################
|
||||
|
||||
explicitMonitors =
|
||||
lib.mapAttrsToList
|
||||
(
|
||||
name: settings: "monitor = ${name}, ${settings}"
|
||||
)
|
||||
cfg.monitor.list;
|
||||
|
||||
############################################################
|
||||
# Optional fallback monitor
|
||||
############################################################
|
||||
|
||||
fallbackMonitor =
|
||||
lib.optional
|
||||
(cfg.monitor.defaultMonitor != null)
|
||||
"monitor = , ${cfg.monitor.defaultMonitor}";
|
||||
|
||||
############################################################
|
||||
# Final monitor block
|
||||
############################################################
|
||||
|
||||
monitorConfig =
|
||||
explicitMonitors ++ fallbackMonitor;
|
||||
in {
|
||||
config = lib.mkIf (nixosVista.enable && monitorConfig != []) {
|
||||
#warnings = [">>> HYPRLAND MONITOR MODULE ACTIVE <<<"];
|
||||
|
||||
nixosVista.hyprland.fragments.monitors = ''
|
||||
############################################################
|
||||
# Monitors
|
||||
############################################################
|
||||
# Run `hyprctl monitors all` to see available monitor names
|
||||
#
|
||||
# Format:
|
||||
# monitor = NAME, RESOLUTION@REFRESH, POSITION, SCALE
|
||||
#
|
||||
# Example:
|
||||
# monitor = DP-1, 1920x1080@144, 0x0, 1
|
||||
# monitor = , preferred, auto, 1
|
||||
############################################################
|
||||
|
||||
${lib.concatStringsSep "\n" monitorConfig}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue