mirror of
https://github.com/librephoenix/nixos-config
synced 2025-11-30 14:43:59 +05:30
Cleanup old ranger config
This commit is contained in:
parent
cd339f647c
commit
fe829f69c2
3 changed files with 0 additions and 51 deletions
|
|
@ -12,7 +12,6 @@
|
||||||
xdg.enable = false;
|
xdg.enable = false;
|
||||||
|
|
||||||
# programs
|
# programs
|
||||||
ranger.enable = true;
|
|
||||||
yazi.enable = true;
|
yazi.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super:
|
|
||||||
{
|
|
||||||
ranger = super.ranger.overrideAttrs (oldAttrs: {
|
|
||||||
preConfigure = ''
|
|
||||||
substituteInPlace ranger/__init__.py \
|
|
||||||
--replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.bat}/bin/bat'"
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# adds this patch: https://github.com/ranger/ranger/pull/1758
|
|
||||||
# fixes a bug for kitty users that use image previews
|
|
||||||
substituteInPlace ranger/ext/img_display.py \
|
|
||||||
--replace "self.image_id -= 1" "self.image_id = max(0, self.image_id - 1)"
|
|
||||||
|
|
||||||
# fixes the .desktop file
|
|
||||||
substituteInPlace doc/ranger.desktop \
|
|
||||||
--replace "Icon=utilities-terminal" "Icon=user-desktop"
|
|
||||||
substituteInPlace doc/ranger.desktop \
|
|
||||||
--replace "Terminal=true" "Terminal=false"
|
|
||||||
substituteInPlace doc/ranger.desktop \
|
|
||||||
--replace "Exec=ranger" "Exec=kitty -e ranger %U"
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -532,21 +532,6 @@ in
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
hyprctl monitors -j | jq ".[$1] | .activeWorkspace.id"
|
hyprctl monitors -j | jq ".[$1] | .activeWorkspace.id"
|
||||||
'')
|
'')
|
||||||
(pkgs.writeScriptBin "open-under-ranger" ''
|
|
||||||
#!/bin/sh
|
|
||||||
command="$1"
|
|
||||||
echo $command
|
|
||||||
file="''${*:2}"
|
|
||||||
file=''${file// /\\ }
|
|
||||||
echo $file
|
|
||||||
workspace=$(hyprctl monitors -j | jq ".[] | select(.specialWorkspace.name == \"special:scratch_yazi\") | .activeWorkspace.id")
|
|
||||||
if [ -z "''${workspace}" ]; then
|
|
||||||
hyprctl dispatch exec -- "$command";
|
|
||||||
else
|
|
||||||
hyprctl dispatch exec "[workspace $workspace]" -- "$command" "$file";
|
|
||||||
fi
|
|
||||||
hyprctl dispatch togglespecialworkspace scratch_yazi
|
|
||||||
'')
|
|
||||||
(pkgs.writeScriptBin "sct" ''
|
(pkgs.writeScriptBin "sct" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
killall wlsunset &> /dev/null;
|
killall wlsunset &> /dev/null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue