Skip to content

Instantly share code, notes, and snippets.

@radgeRayden
Last active January 24, 2026 10:08
Show Gist options
  • Select an option

  • Save radgeRayden/fe24c7eaf073b98faa7ed8c8d1844c60 to your computer and use it in GitHub Desktop.

Select an option

Save radgeRayden/fe24c7eaf073b98faa7ed8c8d1844c60 to your computer and use it in GitHub Desktop.

Most stuff is handled by Noctalia Shell. My configuration sort of assumes you have KDE plasma installed already, otherwise you have to install a handful of utilities individually. Stuff I had to fix:

Discord big cursor
environment {
    ELECTRON_OZONE_PLATFORM_HINT "auto"
    ELECTRON_OZONE_PLATFORM "wayland;xcb"
}
Keyboard layouts + compose key
        xkb {
            // You can set rules, model, layout, variant and options.
            // For more information, see xkeyboard-config(7).
            layout "us,us"
            variant "colemak_dh,"
            options "grp:win_space_toggle,compose:ralt,lv5:rctrl_switch"
        }
Dolphin is broken and can't find default applications

(Not Really) A Guide To Setup Dolphin & KDE File Picker On Niri - Arch Linux

OBS can't see my screen

"It doesn't work" Troubleshooting Checklist · emersion/xdg-desktop-portal-wlr Wiki

Add this to ~/.config/xdg-desktop-portal/niri-portals.conf (needs the respective xdg-desktop-portal-* packages)

[preferred]
default=kde;gnome;gtk;
org.freedesktop.impl.portal.Access=kde;gtk;
org.freedesktop.impl.portal.ScreenCast=gnome
org.freedesktop.impl.portal.Screenshot=gnome
org.freedesktop.impl.portal.Notification=kde;gtk;
org.freedesktop.impl.portal.Secret=gnome-keyring;

This also fixes firefox not using the KDE file picker. Might need to set widget.use-xdg-desktop-portal.file-picker in about:config (firefox) to 2.

Password prompts don't work

Added this to my niri config:

spawn-at-startup "/usr/lib/polkit-kde-authentication-agent-1"

(can substitute the polkit agent by a different one depending on what you want to use, as per https://wiki.archlinux.org/title/Polkit)

Steam has a different cursor from everything else

To solve this and also otherwise tweak gtk stuff look and feel: install nwg-look and tweak the settings.

Configuring sleep behaviour

Using swayidle with a basic configuration at ~/.config/swayidle/config. Also add spawn-at-startup swayidle to your niri config.

timeout 300 "niri msg action power-off-monitors"
timeout 900 "systemctl suspend"
before-sleep "qs -c noctalia-shell ipc call lockScreen lock"
Inhibit idle/sleep when audio is playing (useful for games)

if-audio-inhibit-idle (somewhere in your path)

#!/usr/bin/env fish

function get_active_streams
    # get stream info, join each 3 lines into a single stream info, grep the active ones
    wpctl status | rg -U --multiline-dotall "Streams:\n(.+?\n\n)" -or '$1' | paste -d' ' - - - | rg "\d+\. (\S+).+\[active\]" -or '$1'
end

set ignore_list "Solanum"

function check_audio
    for s in (get_active_streams)
        if not contains $s $ignore_list
            return 0
        end
    end
    return 1
end

while true
    if check_audio;
        # we use idle instead of sleep because I don't want the screen to turn off either
        systemd-inhibit --what=idle --why="Audio playback active" --mode=block sleep infinity &
        set inhibit_pid $last_pid
        while check_audio;
            sleep 5
        end
        kill $inhibit_pid
        wait $inhibit_pid
    end
    sleep 5
end

then add this to your niri config: spawn-at-startup "if-audio-inhibit-idle"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment