void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.15k forks source link

Package request: Niri #48456

Open Jipok opened 9 months ago

Jipok commented 9 months ago

Package name

niri

Package homepage

https://github.com/YaLTeR/niri

Description

Very cool window manager concept. If you add such binds:

    Mod+A     { focus-column-left; }
    Mod+S     { focus-window-or-workspace-down; }
    Mod+W     { focus-window-or-workspace-up; }
    Mod+D     { focus-column-right; }

then moving through windows and workspaces can be represented as moving along a grid using WASD (as in games). Which is very convenient and the animation makes everything amazing. However, the authors' attitude towards X11(X11 is very cursed) and the lack of Xwayland support makes it unsuitable for my use. Despite the fact that the readme clearly mentions a systemd dependency, I was able to build and run it under void without any problems. For those interested, I will leave my template here:

# Template file for 'niri'
pkgname=niri
version=0.1.0
revision=1
#archs="i686 x86_64"
build_style=cargo
hostmakedepends="pkg-config"
makedepends="eudev-libudev-devel libxkbcommon-devel libinput-devel pipewire-devel pango-devel libseat-devel clang libgbm-devel"
depends="eudev-libudev libxkbcommon libinput libpipewire pango libseat libgbm"
short_desc="scrollable-tiling Wayland compositor"
maintainer="Jipok <void@jipok.ru>"
license="GPL-3.0-or-later"
homepage="https://github.com/YaLTeR/niri"
changelog="https://github.com/YaLTeR/niri/releases"
distfiles="https://github.com/YaLTeR/niri/archive/refs/tags/v${version}.tar.gz"
checksum=b26d39e6855de6de581b253d06cbaa375709b00a276626326b745e0d10b0ac70

post_install() {
        vmkdir etc/niri
        vcopy resources/default-config.kdl etc/niri/config.kdl
}

Does the requested package meet the package requirements?

Compiled

Is the requested package released?

Yes

Eloitor commented 9 months ago

Wow! I wanted something like this for ages!

Nextcloud did not work for me. I solved it by running

#! /usr/bin/sh
export XDG_CURRENT_DESKTOP=niri

# Ensure the session type is set to Wayland for xdg-autostart apps.
export XDG_SESSION_TYPE=wayland

dbus-run-session niri

to start niri.

Edit: And adding resources/niri-portals.conf to /usr/share/xdg-desktop-portal/

Eloitor commented 9 months ago

I did not figure out how to get screenshots working...

From the default configuration file:

// The path is formatted with strftime(3) to give you the screenshot date and time.

Maybe there is some missing dependency in the template, but I don't know which...

lidgnulinux commented 9 months ago

Do you use musl or glibc ? @Jipok

Jipok commented 9 months ago

glibc

YaLTeR commented 8 months ago

Hi! Does this help running without systemd? https://github.com/YaLTeR/niri/pull/217

Eloitor commented 8 months ago

Nice, I think so. I can package it one this is merged :)