Setup niri xwayland support

This commit is contained in:
Curt Spark 2024-08-06 14:58:25 +01:00
parent 80f5726dc0
commit a9e1c26974
3 changed files with 54 additions and 6 deletions

View File

@ -36,7 +36,14 @@ in
mako &
swaybg -i ${config.home.homeDirectory}/Pictures/Wallpapers/ourdream.png &
wlsunset -l 51.5 -L 0.1 &
xwayland-satellite & # Xwayland support via xwayland-satellite-flake
# Xwayland support via xwayland-satellite-flake
export DISPLAY=":0"
xwayland-satellite &
'')
(writeShellScriptBin "fuzzel-xwayland"
''
DISPLAY=:0 fuzzel --background=fbf1c7ff --border-color=d79921ff --text-color=3c3836ff --match-color=f9f5d7ff --selection-color=d79921ff --selection-text-color=fbf1c7ff
'')
(writeShellScriptBin "fuzzel-pass"
''
@ -83,6 +90,11 @@ fi
# Xwayland support via xwayland-satellite-flake
DISPLAY = ":0";
};
programs.bash = {
initExtra = ''
export DISPLAY=":0"
'';
};
# Start sway after login if on TTY1 (Default Linux TTY upon boot/login)
#programs.bash.profileExtra = ''

View File

@ -41,13 +41,33 @@ in
lxappearance # Manage GTK Themes
kdePackages.polkit-kde-agent-1 # Polkit Prompt for password prompts etc
lxqt.lxqt-openssh-askpass # GUI to query passwords on behalf of SSH agents
(writeShellScriptBin "niri-start-session"
''
export TERM="foot"
export QT_QPA_PLATFORM="wayland"
export QT_QPA_PLATFORMTHEME="qt6ct"
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export SDL_VIDEODRIVER="wayland,x11,windows"
export _JAVA_AWT_WM_NONREPARENTING="1"
export SSH_ASKPASS_REQUIRE="force"
export SSH_ASKPASS="/run/current-system/sw/bin/lxqt-openssh-askpass"
export MOZ_ENABLE_WAYLAND="1"
# Enable native wayland support for chromium and electron based applications
export NIXOS_OZONE_WL="1"
# Xwayland support via xwayland-satellite-flake
export DISPLAY=":0"
DISPLAY=":0" niri-session
'')
];
# The minimal login manager I'm using for niri
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd niri-session";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd niri-start-session";
user = "greeter";
};
};
@ -59,13 +79,16 @@ in
xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-gnome xdg-desktop-portal-gtk ];
# Whether to enable Qt configuration, including theming.
qt.enable = true;
# Enable xwayland support
programs.xwayland.enable = true;
# Enable polkit
security.polkit.enable = true;
# For udiskie
services.udisks2.enable = true;
# Xwayland setup
programs.xwayland.enable = true;
services.xserver.display = 0;
services.xserver.enable = true;
# Whether to enable GNOME Keyring daemon, a service designed to take care of the users security credentials, such as user names and passwords.
services.gnome.gnome-keyring.enable = true;
@ -143,6 +166,19 @@ in
# Xwayland support via xwayland-satellite-flake
DISPLAY = ":0";
};
environment.extraInit = ''
export DISPLAY=:0
'';
environment.shellInit = ''
export DISPLAY=:0
'';
environment.profileRelativeSessionVariables = {
DISPLAY = [
":0"
];
};
};
}

View File

@ -257,7 +257,7 @@ binds {
// Suggested binds for running programs: terminal, app launcher, screen locker.
Alt+Return { spawn "foot"; }
Alt+D { spawn "fuzzel" "--background=fbf1c7ff" "--border-color=d79921ff" "--text-color=3c3836ff" "--match-color=f9f5d7ff" "--selection-color=d79921ff" "--selection-text-color=fbf1c7ff"; }
Alt+D { spawn "fuzzel-xwayland"; }
Super+L { spawn "swaylock"; }
Ctrl+Alt+P { spawn "fuzzel-pass"; }