Oinks

joined 2 years ago
[–] Oinks@lemmy.blahaj.zone 2 points 1 week ago* (last edited 1 week ago)

I have this in my config:

function lastcmd
    echo $history[1]
end

abbr --add "!!" --position anywhere --function lastcmd

I believe I originally got this implementation from the GitHub issues. The key is that abbreviations can also call functions, which can in turn index into the history list. We also need to specify that we want the expansion even if we're in an argument to another command, such as in sudo !!.

[–] Oinks@lemmy.blahaj.zone 16 points 1 week ago* (last edited 1 week ago) (2 children)

This is by no means complete, but the features that I value would be:

  • <Tab> cycles though completions as it should instead of duplicating the prompt.
  • Completions also show help text (if there's a provider for one). For example on git <Tab> it shows a short message describing what the command does. JJ goes further: jj diff -r <Tab> shows part of the commit message for the offered commits.
  • There are just more completions than in any other shell I know. Aside from JJ the new Nix CLI also has great Fish completions and can dynamically complete flake outputs like package names.
  • Entire commands can be history completed with <C-E> or <Right>. This completion is also directory-aware and can usually avoid suggesting commands with paths to files that don't exist. In practice I find that it's really good at suggesting the command I actually want to run, to the point that I rarely invoke FZF anymore.
  • Abbreviations are in most cases better aliases since they do the same thing but don't obscure what you're actually running.
  • No word splitting when expanding variables, because it's never what you intended.
  • Globs that fail to match anything are errors instead of silently doing the wrong thing.
  • Control structures are a bit nicer (but that is subjective).

You can get most of these with liberal use of shell options, installing blesh, or alternatively installing zsh with a bunch of plugins, but Fish just has all of them out of the box. You don't even need bash-completions.

how hard is it to transition?

It has a reputation of being very difficult from the past when it didn't have &&/|| but I think today plenty of Linux users would not even notice. The most notable remaining differences are setting variables (requires the set builtin unless used to modify the environment for a single command), control structures (irrelevant in interactive use) and lack of !! (but you can make an abbreviation to bring it back).

[–] Oinks@lemmy.blahaj.zone 3 points 1 week ago* (last edited 1 week ago) (1 children)

I hear a lot of people talk about the CachyOS kernel, but from this benchmark it seems like the optimizations used for the packages is as relevant (or even more so). It's also interesting that while distro-wide -O3 is basically useless, x86_64-v3 actually makes a significant difference. Unless openSUSE is doing other things that Phoronix doesn't highlight?

[–] Oinks@lemmy.blahaj.zone 2 points 1 week ago* (last edited 1 week ago)

Not sure how you're arriving at that low of a difference unless the US pricing is wildly better than in the EU.

If I follow the most obvious user flow on the Framework website (except for removing components that aren't required) then I end up with a preorder for a Framework 16 with a Ryzen AI 7 350, 8 GB of RAM and no storage for 1,724 €. I can get the same CPU in a Gigabyte Aero X16 with the same CPU and 32GB RAM and storage and an RTX 5060 on top for 1,129 €. If I try to configure the Framework to be actually competitive with that model I end up at 2,384 €. It's not just the Ryzen AI model that's like this either, I did the same comparison with an older Ryzen CPU and it was in the same ballpark.

I'm sure the Framework is nicer in many aspects that don't show up on data sheets like chassis finish and build quality (and of course Linux support) but that's a lot of money.

[–] Oinks@lemmy.blahaj.zone 5 points 1 week ago* (last edited 1 week ago)

I think Matugen is the closest (maintained) thing to what you're asking for.

If you use a standalone Wayland compositor you might also be interested in the newest generation of "shells" (or more accurately, Quickshell dotfiles) like DMS or Noctalia. These usually also use Matugen under the hood to make their theme settings work.

[–] Oinks@lemmy.blahaj.zone 7 points 1 week ago (4 children)

Hardware development is just extremely difficult. The smallest company that I'm aware of that has their own laptop design is Framework, but their laptops are also about twice as expensive as equivalent models from other brands.

In addition, since basically all modern computer manufacturing has to go through Taiwan due to TSMC's near-monopoly on competitive semiconductors, it makes sense to outsource design to Taiwan too. They already have the industry for it, and there's no reason to have a random American company add their own profit margin to the price for no reason.

[–] Oinks@lemmy.blahaj.zone 5 points 1 week ago* (last edited 1 week ago) (1 children)

They do develop Linux drivers for the laptops they sell, so they're not adding literally zero value. Though they also tried to prevent upstreaming with an incompatible (illegal) license so there's that...

[–] Oinks@lemmy.blahaj.zone 17 points 1 week ago* (last edited 1 week ago) (6 children)

They are rebranded (and expensive) Clevos, but they are manufactured (or configured, or integrated - those all amount to the same thing) in Germany.

To be fair to them this applies to many, many other Laptop brands. Including pretty big ones like MSI.

[–] Oinks@lemmy.blahaj.zone 2 points 2 weeks ago* (last edited 2 weeks ago)

But that still leaves the question: How to install Nix in the first place? Without just running the script.

You can download tarballs with the precompiled Nix, though you'll still need to run an install script (but you can at least read it to convince yourself it's not malicious), see the relevant documentation for that.

Something that slipped my mind is that since OpenSUSE uses SELinux now, that means the recommended multi-user mode won't work. Single-user mode should be fine afaik, but it's a bit less convenient.

This command just runs the software once without actually installing it right?

The nix-env -iA does actually install the software locally, not completely unlike how a zypper in would. For running a program without installing you would use something like nix-shell -p yazi --command yazi. Of course that still downloads and "installs" the program, it just won't add it to your PATH or create a GC root, which means the next time Nix does "garbage collection" it will be removed again.

And yeah I would recommend just trying OpenSUSE out and then if you realize you actually really do need stuff from third party package managers, then you can worry about whether getting into Nix is a good idea or not. Or fall back to the Arch/AUR in distrobox idea which is probably simpler to do overall, especially since from what I understand that's what you're supposed to do on the immutable spins like Aeon.

Late edit: I'll also note that there are several OpenSUSE specific third party repos too. Packman has some proprietary codecs that OpenSUSE doesn't want to ship (in case you really don't want your browser to be a Flatpak), and the Open Build Service (OBS) which is basically the AUR for OpenSUSE. They're not as useful because they're nowhere near the size of the AUR, but if you just need one specific package (perhaps one with questionable legality like yt-dlp or something) they might just have it. And of course you can also build stuff from source and put it in your ~/.local/bin, which has been common practice since before Linux was able to run on real hardware.

[–] Oinks@lemmy.blahaj.zone 2 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

Theoretically you could download the .rpm file which quite a few developers provide on and install it on Tumbleweed too? But I am not 100% sure about that so please correct me about that if I'm wrong.

Yeah that's not going to work in the general case. A trivial RPM package might be fine but every additional dependency increases the chance that it depends on some package that OpenSUSE doesn't know. There's a reason OpenSUSE is usually considered an independent distro and not a "Fedora-based" one despite some shared components.

I don't think security wise there's much of a difference between running random software directly or via distrobox. Note that distrobox mounts your entire home directory into its containers, which removes any security benefit that containers could theoretically bring. In both cases you either need to audit the software yourself or you need to trust whoever you're downloading the software from.

Out of the third party repositories you mentioned, I would personally consider Nixpkgs the most trustworthy because package specs are actually code reviewed, unlike the AUR into which anyone can publish packages with zero oversight. That doesn't mean it's impossible for Nixpkgs to end up with malware in it, but the AUR sets a low bar. Using Nix (not NixOS) is also not actually that hard, you can just run nix-env -iA nixpkgs.yazi and it does exactly what you would expect, even if NixOS users would scoff at the "imperativity".

That being said, the OpenSUSE repositories really aren't that bad. Especially if you combine them with Flatpak, and especially if you install Firefox and VLC (or equivalents of your choice) from Flatpak so you don't need proprietary codecs in your base system. I used OpenSUSE Tumbleweed for years and got by just fine without Nix, homebrew or distrobox.

[–] Oinks@lemmy.blahaj.zone 2 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

It's been a while since I last gave it a try, but I remember frequently ending up in strange states where a window wouldn't want to tile properly. Windows would also frequently end up overlapping or extending beyond the screen, in ways they just wouldn't when I was using Sway, Hyperland or Niri. IIRC mouse dragging and mouse resizing windows was extremely jank too.

Most of this is KWin's fault as far as I know, it's built for stacking window management and there's only so much you can fix with scripting around it. It's also the reason for the bad multi-monitor experience; the way it interacts with workspaces in particular is in my opinion not useful and never what I want.

view more: next ›