1
0
forked from extern/nix-config

Add attempt at using pistol with lf

Unfortunately, this doesn't work, so it's much simpler to stick with
ranger for now.
This commit is contained in:
Donovan Glover 2023-05-14 14:06:09 -04:00
parent b518a28f46
commit 23c05a122f
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -17,6 +17,13 @@
"browser.tabs.insertAfterCurrent" = true; "browser.tabs.insertAfterCurrent" = true;
}; };
}; };
xdg.configFile."lf/kitty_clean.sh" = {
executable = true;
text = ''
#!/usr/bin/env bash
kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
'';
};
xdg.configFile."hypr/hyprland.conf".text = '' xdg.configFile."hypr/hyprland.conf".text = ''
env=XCURSOR_SIZE,24 env=XCURSOR_SIZE,24
env=BROWSER,librewolf env=BROWSER,librewolf
@ -798,6 +805,25 @@
}; };
programs.lf = { programs.lf = {
enable = true; enable = true;
previewer.source = pkgs.writeShellScript "kitty_preview.sh" ''
#!/usr/bin/env bash
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$( file -Lb --mime-type "$file")" =~ ^image ]]; then
kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
exit 1
fi
pistol "$file"
'';
extraConfig = ''
set cleaner ~/.config/lf/kitty_clean.sh
'';
};
programs.pistol = {
enable = true;
}; };
programs.rofi = { programs.rofi = {