feat(rafiq/hyprland): set monitor resolution
This commit is contained in:
parent
ee129ea287
commit
182dd20f88
3 changed files with 21 additions and 0 deletions
|
@ -1,4 +1,7 @@
|
||||||
{config, lib, osConfig, ...}:
|
{config, lib, osConfig, ...}:
|
||||||
|
let
|
||||||
|
mainMonitor = osConfig.desktop.mainMonitor;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
xdg.configFile."uwsm/env".text = # sh
|
xdg.configFile."uwsm/env".text = # sh
|
||||||
''
|
''
|
||||||
|
@ -9,6 +12,12 @@
|
||||||
systemd.enable = false;
|
systemd.enable = false;
|
||||||
settings = {
|
settings = {
|
||||||
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
|
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
|
||||||
|
|
||||||
|
monitor = [
|
||||||
|
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||||
|
", preferred, auto, 1"
|
||||||
|
];
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
"$hypr, Q, exec, uwsm stop"
|
"$hypr, Q, exec, uwsm stop"
|
||||||
"SUPER, W, killactive"
|
"SUPER, W, killactive"
|
||||||
|
|
|
@ -5,6 +5,12 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
options.desktop = {
|
options.desktop = {
|
||||||
|
mainMonitor = {
|
||||||
|
id = lib.pantheon.mkStrOption;
|
||||||
|
scale = lib.pantheon.mkStrOption;
|
||||||
|
resolution = lib.pantheon.mkStrOption;
|
||||||
|
refresh-rate = lib.pantheon.mkStrOption;
|
||||||
|
};
|
||||||
windowManager = lib.pantheon.mkStrOption;
|
windowManager = lib.pantheon.mkStrOption;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
hardware.gpu = "nvidia";
|
hardware.gpu = "nvidia";
|
||||||
|
|
||||||
desktop.windowManager = "hyprland";
|
desktop.windowManager = "hyprland";
|
||||||
|
desktop.mainMonitor = {
|
||||||
|
id = "HDMI-A-1";
|
||||||
|
scale = "2";
|
||||||
|
resolution = "3840x2160";
|
||||||
|
refresh-rate = "60";
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue