From fe829f69c223955f8de9866608a6061c37e43dc6 Mon Sep 17 00:00:00 2001 From: Emmet Date: Fri, 31 Oct 2025 10:51:29 -0500 Subject: [PATCH] Cleanup old ranger config --- hosts/ori/home.nix | 1 - modules/system/overlays/ranger.nix | 35 ------------------------------ modules/user/hyprland/default.nix | 15 ------------- 3 files changed, 51 deletions(-) delete mode 100644 modules/system/overlays/ranger.nix diff --git a/hosts/ori/home.nix b/hosts/ori/home.nix index d5d547d..5e300f3 100644 --- a/hosts/ori/home.nix +++ b/hosts/ori/home.nix @@ -12,7 +12,6 @@ xdg.enable = false; # programs - ranger.enable = true; yazi.enable = true; git.enable = true; }; diff --git a/modules/system/overlays/ranger.nix b/modules/system/overlays/ranger.nix deleted file mode 100644 index 3c338f8..0000000 --- a/modules/system/overlays/ranger.nix +++ /dev/null @@ -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" - ''; - }); - } - ) - ]; - }; -} diff --git a/modules/user/hyprland/default.nix b/modules/user/hyprland/default.nix index 3d565ed..9ff3170 100644 --- a/modules/user/hyprland/default.nix +++ b/modules/user/hyprland/default.nix @@ -532,21 +532,6 @@ in #!/bin/sh 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" '' #!/bin/sh killall wlsunset &> /dev/null;