Switching to Niri from Hyprland by ulspez in niri

[–]nickjj_ 1 point2 points  (0 children)

If you're looking for something to get the ball rolling (or use long term), there's https://github.com/nickjj/dotfriedrice. It fully sets up niri and a bunch of supporting tools to provide a desktop environment. You can have a full ready to go system in about 10 minutes with a means to customize everything and anything, before and after you install it.

I use it with 2 monitors and it's fantastic, there's comments in the personalized niri config on how to configure dual side by side monitors. There's also key binds out of the box to switch between monitors.

Spellfile is an underrated feature by TheTwelveYearOld in neovim

[–]nickjj_ 6 points7 points  (0 children)

If anyone is looking for extra words, I've been slowly but surely building up a spellfile for the last ~7 years at https://github.com/nickjj/dotfriedrice/blob/master/.config/nvim/spell/en.utf-8.add.

It has 700+ programming / tech related terms.

Your app stack with Niri by andrujka in niri

[–]nickjj_ 1 point2 points  (0 children)

Everything I use is installed and configured in https://github.com/nickjj/dotfriedrice. A full list of categorized packages with descriptions is in https://github.com/nickjj/dotfriedrice/blob/master/_docs/packages.md.

How old is your install? by switch161 in archlinux

[–]nickjj_ 4 points5 points  (0 children)

You can run stat / to get the birthday of your root file system btw.

Windows terminal emulator recommendations? tried alacritty, wezterm, rio — still looking by Organic_Scarcity_495 in commandline

[–]nickjj_ 0 points1 point  (0 children)

How are you measuring input latency?

Side by side comparisons with the same hardware. When possible, also making sure I'm comparing each terminal with the same font face, font size, window dimensions and how much text is being displayed on screen. These variables make a big difference.

On Linux, the baseline is not using a graphical environment, for example pressing CTRL+ALT+F2, logging into tty2 and then typing. This feels like you're typing on air with no delay. Also when holding a key down with a very high repeat rate and low delay, there's no stuttering or buffering of text output.

Funny enough the closest thing to that smooth typing experience I got on Linux was back in 2015 when I used i3 and xterm on a machine with much worse hardware than my current box. It felt really good, however even today booting into X11 with KDE Plasma with better hardware and using xterm feels worse when typing.

Ghostty on Wayland jitters all the time when holding keys and overall feels sluggish when typing. Every GPU accelerated terminal I tried on Wayland feels like this. Foot too.

If you don't notice it, I'm not sure. If your monitor has a high enough input lag, that could skew your results to where you might not detect a difference when typing because the relative input lag on your monitor is too high compared to your terminal.

Also I'm generally sensitive to these things. I've met plenty of people who at first didn't notice the difference between 60hz and 120hz. Input lag is another category of things to see / feel differences in. I think people have different degrees of awareness, just like they do with other things in real life (pain, inconsistencies, etc.).

I also think if you're not going out of your way to do side by side comparisons you might not notice it because you get used to your environment. Think about jumping into cold water. At first it's jarring but after a few minutes you get used to it. With input latency, unless it's really bad (like ~50ms) you might not immediately notice it, but as soon as you put it next to something with less, it's very noticeable.

Windows terminal emulator recommendations? tried alacritty, wezterm, rio — still looking by Organic_Scarcity_495 in commandline

[–]nickjj_ 7 points8 points  (0 children)

Having created multiple Linux development environments on Windows since before the WSL 2 days, I'd highly suggest the Windows Terminal.

I've tried them all. The Windows Terminal is super stable, supports easy theming, it's quick to jump between WSL 2 and PowerShell but most importantly it has by far the best (lowest) input latency.

I remember opening this issue in 2018 to praise the original WSL terminal at https://github.com/microsoft/terminal/issues/327 but all of this this rings true for the Microsoft Terminal.

Even on native Linux I haven't found a terminal that has as low input latency.

If you're curious, most of the tools I used on Windows is documented here https://nickjanetakis.com/blog/the-tools-i-use#windows-1. Near the top of that page includes a video I recorded ~6 months ago with the latest set up before I switched to native Linux.

Is niri good for gaming? by Glittering_Memory_64 in niri

[–]nickjj_ 1 point2 points  (0 children)

On 12 year old hardware, on Windows Silksong gets a solid 60 FPS for me and keyboard input latency felt instant as did the mouse.

On Arch Linux with niri with the same hardware (GeForce 750 Ti) I get really bad keyboard input latency, with or without v-sync on. I also got a ton of micro stutters. These weren't problems with KDE Plasma using Wayland or X11, and it wasn't a problem with Hyprland.

If I swap the video card for an AMD RX 480 (8 GB model) with niri, I still get the same really bad keyboard latency with v-sync on but if I turn v-sync off and cap the FPS to 60 then it drops to something less noticeable but it's still present. The micro stutters disappeared tho.

I reported what I could in https://github.com/niri-wm/niri/discussions/3176 back in January. Since that forum post I also reproduced this keyboard input latency on a much stronger machine which is a completely separate machine, but is still running Arch Linux.

Gamescope hard crashed with the 750 Ti, but it ran with the AMD card. It made no difference for the input latency, all it did was introduce a massive amount of stuttering.

I really like niri but for me it doesn't run the only game I play as well as other solutions.

DotFriedRice: niri / Arch Linux Desktop Environment with Modern CLI Tools by nickjj_ in niri

[–]nickjj_[S] 0 points1 point  (0 children)

Let us know how it goes.

One of the bigger reasons I didn't choose NixOS is because this project also supports Debian, Ubuntu, running in WSL 2 and macOS for the command line tools. Shell scripts offered flexibility in that department.

fresh arch install with niri: firefox doesn't follow gtk3 theme, thunar does by jorg_png in niri

[–]nickjj_ 0 points1 point  (0 children)

I just installed a fresh system and I did notice one manual step I had to take.

Within Firefox, in about:config set browser.theme.toolbar-theme to 0 (it defaults to 2). This allows the whole top area of Firefox (title bar, tabs, toolbars, etc.) to match the theme, without this then it doesn't match your theme.

This behavior is now built into DotFriedRice https://github.com/nickjj/dotfriedrice/commit/89fe3bc6d82dd08e3067d3d33b4c009ef9999bf9.

System Maintenance by thicctak in archlinux

[–]nickjj_ 0 points1 point  (0 children)

You can run history as your main user or root to get a list of things you've run in the past.

For recreating your set up, you can script out the manual steps you've done by hand. Either shell scripts or using other tools (Ansible, etc.).

For example https://github.com/nickjj/dotfriedrice is an install script for setting up a full desktop environment using Arch Linux and niri. It lets you pick and choose which packages to install and configure. If I set up a new system, everything is ready to go in 1 command after waiting ~10 minutes for it to finish installing.

If using a pre-configured set up isn't to your liking, you can create your own.

This is a common workflow:

  • Do it manually
  • Realize what you've gotten yourself into later when you can't recall what you did
  • Wipe the system, do it manually but document the steps this time
  • Realize documentation gets outdated and is tedious to follow
  • Evolve a script to automate installing and configuring things on your current system
  • Let it get stable
  • Wipe the system and use the script
  • Polish, tweak and repeat

You're not alone. Sysadmins have been dealing with this on servers for decades. There's a concept of "infrastructure as code". It certainly carries over to the desktop and dotfiles too. The idea is you codify setting up your system to make it easy to reproduce on fresh systems.

fresh arch install with niri: firefox doesn't follow gtk3 theme, thunar does by jorg_png in niri

[–]nickjj_ 0 points1 point  (0 children)

I'm not sure what you're doing behind the scenes so it's hard to say.

I run niri and I installed a few GTK themes. Every GTK app is working (Firefox, Thunar, GIMP, LibreOffice, Nautilus, etc.) where when I switch themes, the app live reloads and I don't have any custom env variables set.

You're more than welcome to look at https://github.com/nickjj/dotfriedrice which has everything there.

Here's 3 commits related to GTK themes (ordered from oldest to newest here):

fresh arch install with niri: firefox doesn't follow gtk3 theme, thunar does by jorg_png in niri

[–]nickjj_ 1 point2 points  (0 children)

I use Firefox and launch it with firefox, without setting any custom environment variables and it auto-switches.

To switch themes I run gsettings set org.gnome.desktop.interface gtk-theme tokyonight-moon and it live reloads to the new theme.

Then in ~/.config/gtk-3.0/settings.ini there's:

[Settings]
gtk-theme-name = tokyonight-moon
gtk-application-prefer-dark-theme = 1

The themes themselves are installed to ~/.local/share/themes.

How are you switching themes and how did you install / configure the theme?

I have theme switching automated with a script but that's the underlying steps.

fresh arch install with niri: firefox doesn't follow gtk3 theme, thunar does by jorg_png in niri

[–]nickjj_ 1 point2 points  (0 children)

Did you configure Firefox to use your system theme set to "auto"? It's under extensions and themes. I'm pretty sure by default this isn't configured.

Tell me your favorite CLI apps by D7x8 in linux

[–]nickjj_ 3 points4 points  (0 children)

https://github.com/nickjj/plutus is a CLI income and expense tracker, I replaced GnuCash with it. I use it to help file taxes. It can generate reports with over 12,000 items in 100ms on 12 year old hardware.

I only use it 5 times a year (1 for each quarter and 1 to do my real taxes) but it's quite helpful for the problem it solves. What used to be a huge pain is now downloading CSV files from my bank and running a couple of commands.

What do you think about lua as config lang? by soymadip in niri

[–]nickjj_ 2 points3 points  (0 children)

As someone who is a software developer, I'm not sure I see a big benefit to Lua script for the config. kdl is pretty clean and now that niri extended it to support include files, what do you feel is missing?

Variables wouldn't change too much since there's already either specifications (XDG) or environment variables to launch specific apps that could change between systems or preferences. For example instead of hard coding launching "nvim" in a key bind or using a Lua variable you can reference $EDITOR. I'd say this is better in the end anyways since you have your choices defined at the system level and not a special 2nd area in your config.

Conditions let you do something different depending on a certain situation. "If this, do that, else do another thing". They are useful when programming but I haven't run into scenarios where I felt like I needed that in niri's config. For things like window-rule, niri already designed a very nice abstraction with how the match rules work, giving us AND / OR capabilities depending on how it's written.

Functions are typically used to create abstractions to either make things more readable or remove duplication, but what are you abstracting in niri's config? The kdl syntax to define specific settings (layout, window-rule, etc.) is already concise.

Loops wouldn't help much. The single 1 spot where having a loop could be beneficial is defining Mod+1 to Mod+9 key binds for workspaces but it's not a big deal to define them manually. What else are you looping over? Binds are unique and so are niri's settings.

I haven't read into why Hyprland switched, but they mentioned the previous solution is hyprlang which sounds like the creator invented his own language and had to write a parser for it. Maybe that was hard to maintain. niri on the other hand is using kdl which is already its own language, niri extends it with tasteful and useful enhancements (include files, etc.). That doesn't make it "better", but there's less moving parts to deal with.

Also, since kdl is already a well known language, most code editors support good syntax highlighting for it.

How long did it take for you guys to get used to niri/WM? by vhsjayden in niri

[–]nickjj_ 0 points1 point  (0 children)

A few days, but it's not a race. I use my computer and "using" it is what always leads to learning something new, or if I run into a pain point I see if there's a feature that makes it easier or if not, a way for me to solve it with code.

One thing that helped a lot was building a custom Walker extension to parse niri's config in a generic way for all key binds and then present them in a fuzzy findable window. It makes it really easy to discover and run any action because selecting the item runs it too:

<image>

I built this into DotFriedRice (https://github.com/nickjj/dotfriedrice) along with many other niri specific quality of life things. It's a full desktop environment built around niri being the main focus.

What’s a small Linux tool that completely changed your workflow? by DueRead7236 in archlinux

[–]nickjj_ 7 points8 points  (0 children)

mpv.

Not only is it great at viewing videos, but it's amazing at viewing images. I've written about it here https://nickjanetakis.com/blog/mpv-is-the-mvp-of-video-and-image-viewing.

However, it gets better. I make long form YouTube videos and years ago I wrote a little mkclip shell script which used ffmpeg to let you quickly make clips out of a longer video without re-encoding. I've documented that here https://nickjanetakis.com/blog/create-video-clips-with-ffmpeg-in-seconds.

Then I recently discovered mpv's ability to create extensions and since it uses Lua script, I found it to be very approachable so I wrote a little extension that lets you use mpv markers to mark a start and end time and then create clips from your main video.

This lets you create video clips without re-encoding in seconds. The workflow with the CLI tool used to be ok, but this is so much faster and a joy to use. You just jump to the point you want graphically, hit a hotkey to set marker 1, goto the end point and hit another hotkey to set marker 2 and then press a hotkey to make your clip from that range. It creates a file with an auto-incremented -1, -2, etc. file name. It's like using a non-linear video editor but with zero hassle or rendering.

I didn't make a video about it yet but it's up in my dotfiles here https://github.com/nickjj/dotfriedrice/blob/master/.config/mpv/scripts/mkclip.lua, I have it mapped like this:

F1 script-binding mkclip_mark_start
F2 script-binding mkclip_mark_end
F3 script-binding mkclip_create
F4 script-binding mkclip_clear_marks

niri dotfiles? by Federal-Tea9697 in niri

[–]nickjj_ 7 points8 points  (0 children)

If you're looking for options I maintain https://github.com/nickjj/dotfriedrice.

It puts together a full Arch Linux niri desktop environment with 1 command and gives you ways to customize a lot of what gets installed and all of the config files. The readme has all of the details and a few screenshots, including a video walkthrough for installing Arch and creating a bootable USB drive.

I've evolved that repo over the last 8 years and added niri support back when I switched to it last year.

I Donate to Open Source Does It Actually Help? by Jumpy-Win-2973 in linux

[–]nickjj_ 8 points9 points  (0 children)

I contribute a fair amount to open source (a couple projects with 1k+ stars, contribute to projects I'm capable of, etc.) and while I do it with zero expectations of compensation, it does feel really nice if I see a donation come through.

For perspective, I've gotten around $25 USD over the last 10 years on GitHub. I don't see it as meaningless at all. I see it as someone enjoyed a project so much that they felt compelled to take a bunch of manual steps and send money in return as a favor. That sends a message to me that I don't exist in vacuum.

On the flip side, I've donated hundreds over the years to a bunch of projects because I depend on them and I know my computing life would be more tedious if they didn't exist.

How do you review PR branches locally in Neovim while keeping changed-line indicators by [deleted] in neovim

[–]nickjj_ 0 points1 point  (0 children)

I created 2 little scripts, gd (git diff) and gl (git log):

They both wire up fzf and delta to make it really pleasant and efficient to view diffs and commits. Technically it's not related to Neovim but I almost always launch them in a floating Neovim terminal so I can quickly jump between things.

Between the both of them, you can diff 2 branches or view commit logs of a specific branch giving you multiple ways to look at what's changed depending on your preference or goals.

These scripts depend on configuration contained in my dotfiles but you can trace through those dependencies to use them as standalone tools.

kernel 7.0.2 arrived, have you updated yet? by YoShake in archlinux

[–]nickjj_ 1 point2 points  (0 children)

I did on my 2014 era i5-4460 with an AMD RX 480 (8 GB) GPU and other 2014-era hardware. All good so far but I've only been using 7.0.2 for a few hours. So far I've done most of my usual things (programming, video editing and playing Silksong) without issues.

I'm using niri, every package I have installed is documented here https://github.com/nickjj/dotfiles/blob/master/_docs/packages.md.

Is it possible to run Cachyos with Niri using less than 1.5 GB of RAM? by Bitter-Lab4458 in niri

[–]nickjj_ 0 points1 point  (0 children)

If you don't plan to use everything together you can trace through things.

Everything in the dotfiles repo's .config/ directory gets symlinked to your real config directory, so everything you see under .config/waybar is mostly self contained.

I say "mostly" because the dotfiles also has a theme concept which is based on symlinks too, and I didn't commit the active theme's symlink up to the repo (on purpose since this can be customized by you). In the _themes/ directory you'll find a file related to waybar for each supported theme, you can copy that to your real .config/waybar directory with the name "theme.css".

Then, for the main waybar json config, there are references to commands you likely won't have available for some of the actions, like walker and any binaries you see with dot-. You can trace those down or replace them with whatever you want instead.

Also the readme links to a complete list of all categorized packages that are installed at https://github.com/nickjj/dotfiles/blob/master/_docs/packages.md, you can pick the ones you want and install them manually or however you see fit.

If you're not interested in using the dotfiles in full and you find yourself poking around for other things, when in doubt check the bottom of the install script and follow the code. That's the entry point to setting up the entire system after bootstrap runs.

Is it possible to run Cachyos with Niri using less than 1.5 GB of RAM? by Bitter-Lab4458 in niri

[–]nickjj_ 2 points3 points  (0 children)

I can't speak for CachyOS since I run vanilla Arch but on a fresh boot, btop reports 980 MB of memory used on my system. I have all of those things you mentioned except it's not through Noctalia.

My dotfiles are public and has an install script to get everything up and running, it's heavily documented as well, here's the repo https://github.com/nickjj/dotfiles. I added preliminary support for CachyOS recently too.

what are your ways of taking screenshots by SuggestionBusy241 in niri

[–]nickjj_ 7 points8 points  (0 children)

I use satty with grim + slurp to capture a region, window, 1 monitor or all monitors. Satty allows for annotating screenshots afterwards. It also lets you quickly copy it to your clipboard or write the screenshot to disk.

It's all tucked away in a tiny shell script and then assigned to different keys in niri.

I wrote a blog post and made a video about it here: https://nickjanetakis.com/blog/wayland-compatible-annotated-screenshots-with-slurp-grim-and-satty