mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 14:25:59 +01:00
Setting wayland environment variables at startup (#1045)
* Nix modules: removed GDK_BACKEND env variable * setting wayland environment variables at startup setting XDG_BACKEND and _JAVA_AWT_WM_NONREPARENTING in main.cpp removed these variables from nix modules recommended environemnt removed XCURSOR_SIZE from nix modules as it is already set * Making _JAVA_AWT_WM_NONREPARENTING not overwritten
This commit is contained in:
parent
5530cf6e79
commit
c03e4c36b0
3 changed files with 2 additions and 8 deletions
|
@ -92,11 +92,7 @@ in {
|
||||||
++ lib.optional cfg.xwayland.enable pkgs.xwayland;
|
++ lib.optional cfg.xwayland.enable pkgs.xwayland;
|
||||||
|
|
||||||
home.sessionVariables = lib.mkIf cfg.recommendedEnvironment {
|
home.sessionVariables = lib.mkIf cfg.recommendedEnvironment {
|
||||||
GDK_BACKEND = "wayland,x11";
|
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
XCURSOR_SIZE = toString config.home.pointerCursor.size or "24";
|
|
||||||
XDG_SESSION_TYPE = "wayland";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."hypr/hyprland.conf" = {
|
xdg.configFile."hypr/hyprland.conf" = {
|
||||||
|
|
|
@ -47,11 +47,7 @@ in {
|
||||||
systemPackages = lib.optional (cfg.package != null) cfg.package;
|
systemPackages = lib.optional (cfg.package != null) cfg.package;
|
||||||
|
|
||||||
sessionVariables = mkIf cfg.recommendedEnvironment {
|
sessionVariables = mkIf cfg.recommendedEnvironment {
|
||||||
GDK_BACKEND = "wayland,x11";
|
|
||||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
XCURSOR_SIZE = "24";
|
|
||||||
XDG_SESSION_TYPE = "wayland";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
fonts.enableDefaultFonts = mkDefault true;
|
fonts.enableDefaultFonts = mkDefault true;
|
||||||
|
|
|
@ -19,6 +19,8 @@ int main(int argc, char** argv) {
|
||||||
for (auto i = 0; i < argc; ++i)
|
for (auto i = 0; i < argc; ++i)
|
||||||
cmd += std::string(i == 0 ? "" : " ") + argv[i];
|
cmd += std::string(i == 0 ? "" : " ") + argv[i];
|
||||||
setenv("HYPRLAND_CMD", cmd.c_str(), 1);
|
setenv("HYPRLAND_CMD", cmd.c_str(), 1);
|
||||||
|
setenv("XDG_BACKEND", "wayland", 1);
|
||||||
|
setenv("_JAVA_AWT_WM_NONREPARENTING", "1", 0);
|
||||||
|
|
||||||
// parse some args
|
// parse some args
|
||||||
std::string configPath;
|
std::string configPath;
|
||||||
|
|
Loading…
Reference in a new issue