From f2411a1dac9dd4336b897b91223413221430951e Mon Sep 17 00:00:00 2001 From: ulve Date: Fri, 19 Jun 2026 14:16:32 +0200 Subject: [PATCH] add xwayland-satellite service, override steam.desktop with DISPLAY=:0 --- config/applications/steam.desktop | 48 +++++++++++++++++++++++++++++++ niri.nix | 14 +++++++++ 2 files changed, 62 insertions(+) create mode 100644 config/applications/steam.desktop diff --git a/config/applications/steam.desktop b/config/applications/steam.desktop new file mode 100644 index 0000000..f251b2b --- /dev/null +++ b/config/applications/steam.desktop @@ -0,0 +1,48 @@ +[Desktop Entry] +Name=Steam +Comment=Application for managing and playing games on Steam +Exec=env DISPLAY=:0 steam %U +Icon=steam +Terminal=false +Type=Application +Categories=Network;FileTransfer;Game; +MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink; +Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends; +PrefersNonDefaultGPU=true +X-KDE-RunOnDiscreteGpu=true + +[Desktop Action Store] +Name=Store +Exec=env DISPLAY=:0 steam steam://store + +[Desktop Action Community] +Name=Community +Exec=env DISPLAY=:0 steam steam://url/CommunityHome/ + +[Desktop Action Library] +Name=Library +Exec=env DISPLAY=:0 steam steam://open/games + +[Desktop Action Servers] +Name=Servers +Exec=env DISPLAY=:0 steam steam://open/servers + +[Desktop Action Screenshots] +Name=Screenshots +Exec=env DISPLAY=:0 steam steam://open/screenshots + +[Desktop Action News] +Name=News +Exec=env DISPLAY=:0 steam steam://openurl/https://store.steampowered.com/news + +[Desktop Action Settings] +Name=Settings +Exec=env DISPLAY=:0 steam steam://open/settings + +[Desktop Action BigPicture] +Name=Big Picture +Exec=env DISPLAY=:0 steam steam://open/bigpicture + +[Desktop Action Friends] +Name=Friends +Exec=env DISPLAY=:0 steam steam://open/friends diff --git a/niri.nix b/niri.nix index 3da3bd5..0a6628e 100644 --- a/niri.nix +++ b/niri.nix @@ -22,6 +22,20 @@ xdg.dataFile."applications/switch-wallpaper.desktop".source = ./config/applications/switch-wallpaper.desktop; xdg.dataFile."applications/signal.desktop".source = ./config/applications/signal.desktop; xdg.dataFile."applications/vesktop.desktop".source = ./config/applications/vesktop.desktop; + xdg.dataFile."applications/steam.desktop".source = ./config/applications/steam.desktop; + + systemd.user.services.xwayland-satellite = { + Unit = { + Description = "Xwayland for niri"; + BindsTo = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite"; + Restart = "on-failure"; + }; + Install.WantedBy = [ "graphical-session.target" ]; + }; services.mako = { enable = true;