LF + NIX: Simple Setup for Extreme Productivity

Sdílet
Vložit
  • čas přidán 29. 09. 2023
  • Discord server: / discord
    Donations: ko-fi.com/vimjoyer
    Code: github.com/vimjoyer/lf-nix-video
    Download the icons file command:
    $ nix run nixpkgs#wget -- "raw.githubusercontent.com/gok..." -O icons
  • Věda a technologie

Komentáře • 30

  • @lil_peepka
    @lil_peepka Před 8 měsíci +22

    Dude huge thank you for making all these nix videos please don't stop

  • @Muaahaa
    @Muaahaa Před 8 měsíci +25

    Nix syntax for escaping characters is definitely a syntax

    • @vimjoyer
      @vimjoyer  Před 8 měsíci +12

      One of the syntaxes ever made

    • @TomasSandven
      @TomasSandven Před 6 měsíci

      Can confirm. I assumed ChatGPT was making up dumb shit again.

  • @QWERD195
    @QWERD195 Před 8 měsíci +8

    you're my go-to youtuber when it comes to nix stuff, keep them coming

  • @eldarcfrov8707
    @eldarcfrov8707 Před 8 měsíci +7

    I didn't know about LF before. Definitely going to check out. Rewrote my whole NixOS config from scratch thanks to you, it was a copy-paste mess before. Thank you, have a nice day.

  • @THEMithrandir09
    @THEMithrandir09 Před 24 dny +1

    3:56 the more I learn about nix, the more I feel like IPFS seems made for it. Not only to get packages more efficiently but also to version any for you want with a hash and get it from anywhere. You'd have to host your own instance for everything you want to provide that others don't but just having ipfs paths to blobs life the icons file would make everything runable in a single command.

  • @akibahmed229
    @akibahmed229 Před 7 měsíci +3

    While exploring Nix, I found your video to be extremely helpful.

  • @lennylizowzskiy
    @lennylizowzskiy Před 8 měsíci +7

    1:49 There's a modern replacement for xdragon called ripdrag. It's based on GTK 4 and being actively developed while xdragon is outdated and not beign developed at all

    • @vimjoyer
      @vimjoyer  Před 8 měsíci +3

      Nice! I'll check it out

    • @vaisakhkm783
      @vaisakhkm783 Před 8 měsíci +2

      Ripdrag is really cool, it even can act as a place to drop things into

  • @shifteleven
    @shifteleven Před 8 měsíci +6

    My previewer of choice is ctpv
    ```
    settings = {
    previewer = "${pkgs.ctpv}/bin/ctpv";
    cleaner = "${pkgs.ctpv}/bin/ctpvclear";
    }
    ```
    It handles image previews, video previews, and a bunch of other previews that you can configure. Works with Kitty, but also terminals as well

    • @vimjoyer
      @vimjoyer  Před 8 měsíci +1

      This is amazing!

    • @xorlop
      @xorlop Před 4 měsíci +1

      thank you
      edit: darn. not on macos. I was happy to find it works well on linux. strange that you can't do it on mac even though it works fine through ssh... 😖

  • @RichardJActon
    @RichardJActon Před 6 měsíci +2

    Shame that the image preview stuff does not seem to work in tmux as I used that all the time for terminal window management

  • @hary6416
    @hary6416 Před 8 měsíci +4

    🔥

  • @dude9501
    @dude9501 Před 7 měsíci +3

    Thanks!

  • @slavkaeroxin9927
    @slavkaeroxin9927 Před 8 měsíci +5

    A better solution to display images on wayland is the sixel protocol which is not kitty-proprietary and thus supported by more terminals (xterm, konsole, xfce-terminal, patched st, iterm2, vscode terminal and ofc the wonderful wayland-native foot, as well as has PRs for many others such as alacritty) and now even supported by tmux in the latest master branch.
    IIRC lf has a way to use chafa as image preview tool which supports both sixel and kitty protocols, as well as a fallback to ascii art when none available

    • @TheOwntageCrew
      @TheOwntageCrew Před 8 měsíci +1

      Do you have an example of using chafa for previews? I tried to use the example from the wiki, but I could not get it to work.

    • @sfuentesojeda
      @sfuentesojeda Před 11 dny

      @@TheOwntageCrew Maybe a little late but what worked for me was the following, I only changed the file and chafa with their pkgs/bin/... and this was the result in my configuration of lf:
      settings = {
      preview = true;
      sixel = true;
      };
      extraConfig = ''
      set previewer ${
      pkgs.writeShellScript "lf-previewer.sh" ''
      case "$(${pkgs.file}/bin/file -Lb --mime-type -- "$1")" in
      image/*)
      ${pkgs.chafa}/bin/chafa -f sixel -s "$2x$3" --animate off --polite on "$1"
      exit 1
      ;;
      *)
      cat "$1"
      ;;
      esac
      ''
      }
      '';
      Also, you might need to check if your terminal has Sixel support: www.arewesixelyet.com/

  • @kairavb
    @kairavb Před 8 měsíci +2

    i am new, i just want linux that just works, with high productivity
    I cannot use windows as it constantly breaks, security issues and I am doing CS degree that wants me to use linux and I am also thinking of making a career out of it

  • @Microphunktv-jb3kj
    @Microphunktv-jb3kj Před 8 měsíci +2

    what's the difference of LF and Ranger for example?

    • @vimjoyer
      @vimjoyer  Před 8 měsíci

      LF is more minimal and quick.

  • @der.Schtefan
    @der.Schtefan Před 8 měsíci +3

    Demo? :)

    • @vimjoyer
      @vimjoyer  Před 8 měsíci

      Totally forgot about showing actual footage in the video 😅. It's nothing special, just a regular lf experience (which is quite good), but configured in a special way.

    • @der.Schtefan
      @der.Schtefan Před 8 měsíci +1

      @@vimjoyer I would argue that this would have been kinda the point of the video, to show how nicer it is ;) Maybe make a follow-up video? :)

    • @vimjoyer
      @vimjoyer  Před 8 měsíci +1

      @@der.Schtefan The follow up video would only showcase the result itself, and I like to include as much useful information in these videos as possible. I might make a video comparing different terminal file managers in the future, and maybe feature this configuration there.

    • @encapsulatio
      @encapsulatio Před 7 měsíci

      @@vimjoyer YES, please do it.

  • @pergollubits2393
    @pergollubits2393 Před 3 měsíci +1

    If I need to install a file manually it kinda negates the whole automation process, no?

    • @vimjoyer
      @vimjoyer  Před 3 měsíci +1

      You don't need to "install it manually", you need to copy it from the internet and then link it to .config from nix files.
      It will stay with your configuration, just not in .nix format. You don't have to download it every time.
      If you want, you can still just fetch it declaratively with fetchurl or flake's inputs.