Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Niri WM support #3605

Open
Sovenok-Hacker opened this issue May 12, 2024 · 1 comment
Open

Niri WM support #3605

Sovenok-Hacker opened this issue May 12, 2024 · 1 comment
Labels
Enhancement Feature requests and code enhancements

Comments

@Sovenok-Hacker
Copy link

Feature Description

If I run Flameshot on my Arch setup with Niri WM, it fails with "Unable to detect desktop environment (GNOME? KDE? Sway? ...)". Will it be hard to enable Flameshot on Niri? And if it is simple, can I contribute?

@Sovenok-Hacker Sovenok-Hacker added the Enhancement Feature requests and code enhancements label May 12, 2024
@berkentekin
Copy link

berkentekin commented May 14, 2024

It's weird that you get this error, looking at the code I don't see any way a Wayland WM can get to the stage where it prints that error. Worst case scenario your DE should be set as "OTHER" in the code, and you should get a warning about having grim installed.

Maybe try setting your XDG_CURRENT_DESKTOP environment variable to something like "niri" or "niriwm" first, if it's unset.

Adding a WM to the code is actually easy, you just need to modify desktopinfo and screengrabber. But there's some other issue here.

If you want to debug the code yourself, add the following statements to ScreenGrabber::grabEntireDesktop just before the switch statement:

        auto wm = m_info.windowManager();
        AbstractLogger::info() << tr("Detected window manager: %1").arg(static_cast<int>(wm));
        
        switch (wm) { // Change the existing switch statement to this

You should get a number between 0 and 5, each corresponding to an enum value in desktopinfo.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests and code enhancements
Projects
None yet
Development

No branches or pull requests

2 participants