fix(linux): detect Niri as a tiling window manager (#1127)

This commit is contained in:
cucadmuh
2026-06-18 22:16:23 +03:00
committed by GitHub
parent ee044ece1a
commit 99c0b6cdac
3 changed files with 10 additions and 2 deletions
+6
View File
@@ -73,6 +73,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* The Live header badge only refreshed `getNowPlaying` while the "Who is listening?" popover was open, so the listener count could stay stale or hidden until opened. Poll every 30 s while the window is visible (10 s while the popover is open); background fetches are silent so the header does not flash a loading state.
### Niri compositor tiling WM detection
**By [@cucadmuh](https://github.com/cucadmuh), PR [#1127](https://github.com/Psychotoxical/psysonic/pull/1127)**
* Niri is now recognized as a tiling window manager (`NIRI_SOCKET`, `XDG_CURRENT_DESKTOP=niri`), so it gets the same custom title bar, window decorations, and mini-player behavior as Hyprland and Sway instead of being treated like a floating desktop.
## [1.48.1] - 2026-06-15
+3 -2
View File
@@ -415,7 +415,7 @@ pub(crate) fn toggle_tray_icon(
pub(crate) use crate::audio::stop_audio_engine;
/// Returns `true` if running under a tiling window manager (Hyprland, Sway, i3,
/// Returns `true` if running under a tiling window manager (Hyprland, Niri, Sway, i3,
/// bspwm, AwesomeWM, Openbox, etc.). Detection is based on environment variables
/// set by the compositor / DE.
#[cfg(target_os = "linux")]
@@ -423,6 +423,7 @@ pub(crate) fn is_tiling_wm() -> bool {
// Direct compositor signatures (most reliable).
let direct = [
"HYPRLAND_INSTANCE_SIGNATURE", // Hyprland
"NIRI_SOCKET", // Niri
"SWAYSOCK", // Sway
"I3SOCK", // i3
]
@@ -437,7 +438,7 @@ pub(crate) fn is_tiling_wm() -> bool {
if let Ok(desktop) = std::env::var("XDG_CURRENT_DESKTOP") {
let desktop = desktop.to_lowercase();
let tiling_wms = [
"hyprland", "sway", "i3", "bspwm", "awesome", "openbox",
"hyprland", "niri", "sway", "i3", "bspwm", "awesome", "openbox",
"xmonad", "dwm", "qtile", "herbstluftwm", "leftwm",
];
if tiling_wms.iter().any(|&wm| desktop.contains(wm)) {
+1
View File
@@ -167,6 +167,7 @@ const CONTRIBUTOR_ENTRIES = [
'Playback speed follow-up — Semitones varispeed strategy, two-decimal speed label, per-strategy tooltips, and Advanced fine-step toggle (PR #1084)',
'Streamed Opus/Ogg seeking via on-demand HTTP Range fetches — seek mid-stream without a full pre-download (PR #1110)',
'AutoDJ — content-aware crossfade: waveform-driven silence trim, content-driven overlap, scenario-A self-fade, readiness gate + engine auto-crossfade suppression (PR #1122)',
'Niri compositor tiling WM detection (PR #1127)',
],
},
{