Jump to content

Talk:Hyprland: Difference between revisions

From Official NixOS Wiki
Latest comment: Wednesday at 14:22 by Whitebow in topic Update to Hyprland 0.55
Pigeon (talk | contribs)
 
 
Line 22: Line 22:
}|name=configuration.nix|lang=nix}}
}|name=configuration.nix|lang=nix}}
I am afraid of committing a stupid change because don't know the potential caveats with configuring this in the OS conf file rather than in Hyprland conf. Perhaps applying changes requires config rebuild? [[User:Pigeon|Pigeon]] ([[User talk:Pigeon|talk]]) 20:29, 26 June 2025 (UTC)
I am afraid of committing a stupid change because don't know the potential caveats with configuring this in the OS conf file rather than in Hyprland conf. Perhaps applying changes requires config rebuild? [[User:Pigeon|Pigeon]] ([[User talk:Pigeon|talk]]) 20:29, 26 June 2025 (UTC)
== Update to Hyprland 0.55 ==
Currently, the configuration using home-manager shows a hyprlang config. We should replace it with a proper Lua config, but I don't know the exact syntax when configuring in Nix. The output of the current configuration shown is something along these lines :
{{File|3=local mainMod = "SUPER"
hl.bind(mainMod .. " + Super_L", hl.dsp.exec_cmd("pkill rofi {{!}}{{!}} rofi -show drun"))
hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("librewolf"))
hl.bind("CTRL + ALT + T", hl.dsp.exec_cmd("wezterm"))
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + ALT + mouse:272", hl.dsp.window.resize(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
hl.config({
    decoration = {
        shadow = {
            offset = {0,5},
            color = "rgba(00000099)"
        }
    }
})
hl.on("hyprland.start", function()
    hl.exec_cmd("hyprpanel")
end)|name=hyprland.lua|lang=Lua}}
[[User:Whitebow|Whitebow]] ([[User talk:Whitebow|talk]]) 14:22, 27 May 2026 (UTC)

Latest revision as of 14:22, 27 May 2026

#Theme_Support: update method for configuring theme with dconf

Currently NixOS Wiki suggests this:

≡︎ hyprland.conf
exec-once=dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'"
exec-once = dconf write /org/gnome/desktop/interface/icon-theme "'Flat-Remix-Red-Dark'"
exec-once = dconf write /org/gnome/desktop/interface/document-font-name "'Noto Sans Medium 11'"
exec-once = dconf write /org/gnome/desktop/interface/font-name "'Noto Sans Medium 11'"
exec-once = dconf write /org/gnome/desktop/interface/monospace-font-name "'Noto Sans Mono Medium 11'"

This looks somewhat clumsy. Maybe we should replace it with the approach mentioned in Hyprland Wiki?

❄︎ configuration.nix
{
  programs.dconf.profiles.user.databases=[
    {
      settings."org/gnome/desktop/interface" = {
        gtk-theme = "Adwaita";
        icon-theme = "Flat-Remix-Red-Dark";
        font-name = "Noto Sans Medium 11";
        document-font-name = "Noto Sans Medium 11";
        monospace-font-name = "Noto Sans Mono Medium 11";
      };
    }
  ];
}

I am afraid of committing a stupid change because don't know the potential caveats with configuring this in the OS conf file rather than in Hyprland conf. Perhaps applying changes requires config rebuild? Pigeon (talk) 20:29, 26 June 2025 (UTC)Reply

Update to Hyprland 0.55

Currently, the configuration using home-manager shows a hyprlang config. We should replace it with a proper Lua config, but I don't know the exact syntax when configuring in Nix. The output of the current configuration shown is something along these lines :

≡︎ hyprland.lua
local mainMod = "SUPER"

hl.bind(mainMod .. " + Super_L", hl.dsp.exec_cmd("pkill rofi || rofi -show drun"))
hl.bind(mainMod .. " + F", hl.dsp.exec_cmd("librewolf"))
hl.bind("CTRL + ALT + T", hl.dsp.exec_cmd("wezterm"))
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + ALT + mouse:272", hl.dsp.window.resize(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })

hl.config({
    decoration = {
        shadow = {
            offset = {0,5},
            color = "rgba(00000099)"
        }
    }
})

hl.on("hyprland.start", function()
    hl.exec_cmd("hyprpanel")
end)

Whitebow (talk) 14:22, 27 May 2026 (UTC)Reply