mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Updates and patches to ranger + kitty setup
This commit is contained in:
parent
515672d763
commit
0222b95eca
|
@ -10,9 +10,12 @@ let myCbxScript = ''
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [ ../../pkgs/ranger.nix ];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ranger
|
ranger
|
||||||
xdragon
|
xdragon
|
||||||
|
highlight
|
||||||
(pkgs.writeScriptBin "cbx" myCbxScript)
|
(pkgs.writeScriptBin "cbx" myCbxScript)
|
||||||
];
|
];
|
||||||
home.file.".config/ranger/rc.conf".source = ./rc.conf;
|
home.file.".config/ranger/rc.conf".source = ./rc.conf;
|
||||||
|
|
|
@ -130,7 +130,7 @@ ext cbz, has zathura, X, flag f = zathura -- "$@"
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
# Images
|
# Images
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
mime ^image, has nsxiv, X, flag f = nsxiv "$@"
|
mime ^image, has krita, X, flag f = krita "$@"
|
||||||
mime ^image/svg, has inkscape, X, flag f = inkscape "$@"
|
mime ^image/svg, has inkscape, X, flag f = inkscape "$@"
|
||||||
|
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
|
|
23
user/pkgs/ranger.nix
Normal file
23
user/pkgs/ranger.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super:
|
||||||
|
{
|
||||||
|
ranger = super.ranger.overrideAttrs (oldAttrs: rec {
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace ranger/__init__.py \
|
||||||
|
--replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.less}/bin/less'"
|
||||||
|
|
||||||
|
# give image previews out of the box when building with w3m
|
||||||
|
substituteInPlace ranger/config/rc.conf \
|
||||||
|
--replace "set preview_images false" "set preview_images true"
|
||||||
|
|
||||||
|
substituteInPlace ranger/ext/img_display.py \
|
||||||
|
--replace "self.image_id -= 1" "self.image_id = max(0, self.image_id - 1)"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue