mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 14:05:41 +00:00
fix(linux): detect Niri as a tiling window manager (#1127)
This commit is contained in:
@@ -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.
|
* 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
|
## [1.48.1] - 2026-06-15
|
||||||
|
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ pub(crate) fn toggle_tray_icon(
|
|||||||
|
|
||||||
pub(crate) use crate::audio::stop_audio_engine;
|
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
|
/// bspwm, AwesomeWM, Openbox, etc.). Detection is based on environment variables
|
||||||
/// set by the compositor / DE.
|
/// set by the compositor / DE.
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
@@ -423,6 +423,7 @@ pub(crate) fn is_tiling_wm() -> bool {
|
|||||||
// Direct compositor signatures (most reliable).
|
// Direct compositor signatures (most reliable).
|
||||||
let direct = [
|
let direct = [
|
||||||
"HYPRLAND_INSTANCE_SIGNATURE", // Hyprland
|
"HYPRLAND_INSTANCE_SIGNATURE", // Hyprland
|
||||||
|
"NIRI_SOCKET", // Niri
|
||||||
"SWAYSOCK", // Sway
|
"SWAYSOCK", // Sway
|
||||||
"I3SOCK", // i3
|
"I3SOCK", // i3
|
||||||
]
|
]
|
||||||
@@ -437,7 +438,7 @@ pub(crate) fn is_tiling_wm() -> bool {
|
|||||||
if let Ok(desktop) = std::env::var("XDG_CURRENT_DESKTOP") {
|
if let Ok(desktop) = std::env::var("XDG_CURRENT_DESKTOP") {
|
||||||
let desktop = desktop.to_lowercase();
|
let desktop = desktop.to_lowercase();
|
||||||
let tiling_wms = [
|
let tiling_wms = [
|
||||||
"hyprland", "sway", "i3", "bspwm", "awesome", "openbox",
|
"hyprland", "niri", "sway", "i3", "bspwm", "awesome", "openbox",
|
||||||
"xmonad", "dwm", "qtile", "herbstluftwm", "leftwm",
|
"xmonad", "dwm", "qtile", "herbstluftwm", "leftwm",
|
||||||
];
|
];
|
||||||
if tiling_wms.iter().any(|&wm| desktop.contains(wm)) {
|
if tiling_wms.iter().any(|&wm| desktop.contains(wm)) {
|
||||||
|
|||||||
@@ -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)',
|
'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)',
|
'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)',
|
'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)',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user