-- Monitors, environment, look and feel, input. -- API reference: the official example (hyprland.lua) shipped with Hyprland. local nix = require("nixvars") ------------------ ---- MONITORS ---- ------------------ -- Any output, native mode, placed automatically. Use mode = "highrr" to prefer -- the highest refresh rate instead. -- hl.env("AQ_DRM_DEVICES", "/dev/dri/card1:/dev/dri/card0") hl.monitor({ output = "DP-1", mode = "preferred", position = "0x0", scale = "1", bitdepth = 10, supports_wide_color = 1, supports_hdr = 0, sdrbrightness = "1.25", sdrsaturation = "1.2", vrr = 1, cm = "auto", sdr_min_luminance = 0, sdr_max_luminance = 200, -- icc = "/home/faumaray/Documents/ICC Profile_20240726/CxxG5xT.icm", sdr_eotf = "gamma22", }) -- monitor = DP-2, preferred, -2560x0, 1, bitdepth, 10, vrr, 1, icc, /home/faumaray/Documents/ICC Profile_20240726/ASUS_Display_sRGB.icc hl.monitor({ output = "DP-2", mode = "2560x1440@144", position = "-2560x0", -- position = -1440x0 scale = "1", -- transform = 1 bitdepth = 10, supports_wide_color = 1, supports_hdr = 0, -- sdrbrightness = 1.0, -- sdrsaturation = 1.1, vrr = 1, sdr_eotf = "gamma22", cm = "auto", -- icc = "/home/faumaray/Documents/ICC Profile_20240726/ASUS_Display_sRGB.icm", -- sdr_min_luminance = 0, -- sdr_max_luminance = 50 }) ------------------------------- ---- ENVIRONMENT VARIABLES ---- ------------------------------- -- The Wayland toolkit variables (GDK_BACKEND, QT_QPA_PLATFORM, ...) are exported -- for the whole session by UWSM (uwsm/env-hyprland, see default.nix), not here. -- hl.env sets a variable for Hyprland and what it starts. With true as the third -- argument it also exports it to the systemd user manager and the D-Bus -- activation environment (systemctl --user import-environment and -- dbus-update-activation-environment --systemd), so apps started by Noctalia, -- the portals or D-Bus activation use the same cursor. hl.env("XCURSOR_SIZE", tostring(nix.cursorSize), true) hl.env("HYPRCURSOR_SIZE", tostring(nix.cursorSize), true) if nix.cursorTheme ~= "" then hl.env("XCURSOR_THEME", nix.cursorTheme, true) end ----------------------- ---- LOOK AND FEEL ---- ----------------------- -- Gaps, rounding, shadow and blur follow the Noctalia documentation so the -- shell's bar and panels sit well on top of the windows. hl.config({ cursor = { no_hardware_cursors = 0, }, xwayland = { force_zero_scaling = false, create_abstract_socket = true, }, render = { send_content_type = true, direct_scanout = 0, -- cm_fs_passthrough = 1, cm_auto_hdr = 0, cm_sdr_eotf = 1, }, quirks = { prefer_hdr = 0, }, general = { gaps_in = 5, gaps_out = 10, border_size = 2, col = { -- Catppuccin Mocha: mauve to blue, surface1 when unfocused. active_border = "rgba(33ccffee)", inactive_border = "rgba(595959aa)", }, resize_on_border = true, -- Only windows with the `immediate` rule (see 30-rules.lua) tear. allow_tearing = true, layout = "dwindle", }, decoration = { rounding = 20, rounding_power = 2, shadow = { enabled = true, range = 4, render_power = 3, color = 0xee1a1a1a, }, blur = { enabled = true, size = 3, passes = 2, vibrancy = 0.1696, }, }, animations = { enabled = true, }, dwindle = { preserve_split = true, }, master = { new_status = "master", }, misc = { -- Noctalia draws the wallpaper. force_default_wallpaper = 0, disable_hyprland_logo = true, }, ecosystem = { no_update_news = true, no_donation_nag = true, }, }) --------------- ---- INPUT ---- --------------- hl.config({ input = { kb_layout = nix.kbLayout, kb_options = nix.kbOptions, numlock_by_default = true, follow_mouse = 1, sensitivity = 0, }, }) -- Persistent workspaces keep the empty ones visible in Noctalia's indicator. for i = 1, 5 do hl.workspace_rule({ workspace = tostring(i), persistent = true }) end for i = 1, 10 do if i % 2 == 0 then if i <= 5 then hl.workspace_rule({ workspace = tostring(i), persistent = true, monitor = "DP-2" }) else hl.workspace_rule({ workspace = tostring(i), persistent = false, monitor = "DP-2" }) end else if i <= 5 then hl.workspace_rule({ workspace = tostring(i), persistent = true, monitor = "DP-1" }) else hl.workspace_rule({ workspace = tostring(i), persistent = false, monitor = "DP-1" }) end end end