feat(hyprland): add autostart for hyprland

This commit is contained in:
Mohammad Rafiq 2025-05-18 18:11:01 +08:00
parent 1b8b7f35e9
commit d57c65efb9
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,6 @@
{config, lib, osConfig, ...}:
{
xdg.configFile."uwsm/env".text = # sh
''

View file

@ -2,6 +2,14 @@
{
config = lib.mkMerge [
(lib.mkIf (config.desktop.windowManager == "hyprland") {
environment.loginShellInit = # sh
''
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
if uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
fi
'';
environment.variables = {
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";