Just a basic programmer living in California

  • 2 Posts
  • 36 Comments
Joined 1 year ago
cake
Cake day: February 23rd, 2024

help-circle
  • hallettj@leminal.spacetoLinux@lemmy.mlLinux Users- Why?
    link
    fedilink
    English
    arrow-up
    6
    ·
    21 days ago

    I also use Niri. Previously I basically used maximimized windows on dual monitors. But I really liked the idea of switching to one ultrawide display. Maximized windows wouldn’t work well in that setup. Tiling hadn’t really worked for me because you end up with a screen full of awkwardly skinny or short windows, or windows hidden away in tabs. I also didn’t like the idea of managing floating windows with… a mouse.

    So I looked for a better option. I found PaperWM, and I loved it! Exactly what I needed! But it has a number of quirks, being an extension that entirely reworks Gnome’s window management. For a long time I wished for a native scrolling wm. And then Niri came along! And it’s so polished!


  • hallettj@leminal.spacetoLinux@lemmy.mlOkay why is your distro the best?
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    29 days ago

    Some more points about Nix:

    • It’s a fast way to get to a specific setup, like a particular DE or Vulkan gaming support, thanks to abstraction that NixOS modules provide
    • There are tons of packages
    • Because packages are installed by adding a config entry you don’t accumulate random software you forgot you installed
    • Immutable updates and rollbacks - this is similar to benefits of atomic ostree distros, but the nix solutions are more general, so you have one system that does more things with a consistent interface
      • in addition to updating the base system, rollbacks also roll back user-installed packages, and configurations if those are managed via Nix
      • devshells provide per-directory packages and configuration using the same package repos as the host system, without needing to manage docker images
    • Nix is portable - much of what it does on NixOS can also be used in other distros, or even on Macos or Windows with the Linux subsystem
      • Configurations often combine NixOS and Home Manager parts. The Home Manager part can be used à la carte on other OSes is a way that is fully isolated from the host OS package management. For example on Macos this is a much nicer alternative to Homebrew.
      • devshells also work on other OSes
    • similar to Guix - but NixOS uses systemd, and is (from what I understand) more tolerant of non-free software (whether these are pros or cons is up to individual interpretation)




  • That’s a helpful one! I also add a function that creates a tmp directory, and cds to it which I frequently use to open a scratch space. I use it a lot for unpacking tar files, but for other stuff too.

    (These are nushell functions)

    # Create a directory, and immediately cd into it.
    # The --env flag propagates the PWD environment variable to the caller, which is
    # necessary to make the directory change stick.
    def --env dir [dirname: string] {
      mkdir $dirname
      cd $dirname
    }
    
    # Create a temporary directory, and cd into it.
    def --env tmp [
      dirname?: string # the name of the directory - if omitted the directory is named randomly
    ] {
      if ($dirname != null) {
        dir $"/tmp/($dirname)"
      } else {
        cd (mktemp -d)
      }
    }
    




  • This is a big reason for me. Also because if anything breaks - even if my system becomes unbootable - I can select the previous generation from the boot menu, and everything is back to working.

    It’s very empowering, the combination of knowing that I won’t irrevocably break things, and that I won’t build up cruft from old packages and hand-edited config files. It’s given me confidence to tinker more than I did in other distros.




  • hallettj@leminal.spacetoLinux@lemmy.mlHow do you backup?
    link
    fedilink
    English
    arrow-up
    3
    ·
    5 months ago

    My conclusion after researching this a while ago is that the good options are Borg and Restic. Both give you incremental backups with cheap timewise snapshots. They are quite similar to each other, and I don’t know of a compelling reason to pick one over the other.


  • hallettj@leminal.spacetoLinux@lemmy.mlSWAY desktop
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    5 months ago

    Are you using swayidle? It’s supposed to automatically keep the screen on when there is full-screen video playing. It’s the same in Gnome: you generally don’t need caffeine if a full-screen video is going.

    How are you playing videos? Maybe the player doesn’t correctly implement the idle inhibit protocol. Or if you’re using sway bindings to make the window fullscreen instead of using the app’s own fullscreen mode then maybe the player doesn’t know it’s fullscreen, and doesn’t set up the idle inhibit.

    If you do want manual idle inhibit control, if you use Waybar it has an idle inhibitor module that mimics caffeine. If you don’t use Waybar there is a little Python script you can run. Kill it when you want to stop inhibiting idle. actually wib looks like a better option


  • I’m gonna take a couple of stabs in the dark.

    According to this Stack Overflow answer using tee can prevent the prompt from drawing which makes it appear that a script has not terminated. The answerer’s workaround is to put a very short sleep command after the tee command.

    If this is what happened to you maybe the reason the script works in bash but not in zsh is because you have different prompts configured in those two shells.

    Another idea is to replace tee with sponge from moreutils. The difference is that sponge waits for the end of stdin before it starts writing which can avoid problems in some situations.


  • hallettj@leminal.spacetoLinux@lemmy.mlPlug-and-play development environment
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    6 months ago

    Oh yeah, and Nix has the advantage that you don’t need containers. If you want to run a graphical app in a container it might be tricky to access the window manager on the host system. Maybe that’s why you were setting up i3? Yeah, containers are great and flexible, but they also have a variety of downsides so Nix is better ;)