From 277c9c6540e76247e02e7434b076b4682ce60cfc Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 24 May 2022 00:12:39 +0200 Subject: remove ranger settings --- %HOME%/.config/ranger/commands.py | 40 --------------------------------------- %HOME%/.config/ranger/rc.conf | 15 --------------- 2 files changed, 55 deletions(-) delete mode 100644 %HOME%/.config/ranger/commands.py delete mode 100644 %HOME%/.config/ranger/rc.conf diff --git a/%HOME%/.config/ranger/commands.py b/%HOME%/.config/ranger/commands.py deleted file mode 100644 index bcf0642..0000000 --- a/%HOME%/.config/ranger/commands.py +++ /dev/null @@ -1,40 +0,0 @@ -# This I borrowed from the default Manjaro setup, which in turn borrowed it -# from somewhere else. - -from ranger.api.commands import Command - -class paste_as_root(Command): - def execute(self): - if self.fm.do_cut: - self.fm.execute_console('shell sudo mv %c .') - else: - self.fm.execute_console('shell sudo cp -r %c .') - -class fzf_select(Command): - def execute(self): - import subprocess - import os.path - if self.quantifier: - # Trigger this by prefixing the command hotkey with e.g. a number. - command = "find -L . \ - \( -fstype 'dev' -o -fstype 'proc' \) -prune \ - -o -type d -print 2> /dev/null \ -| sed 1d \ -| cut -b3- \ -| fzf +m --reverse" - else: - # Match files and directories. - command = "find -L . \ - \( -fstype 'dev' -o -fstype 'proc' \) -prune \ - -o -print 2> /dev/null \ -| sed 1d \ -| cut -b3- \ -| fzf +m --reverse" - fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE) - stdout, stderr = fzf.communicate() - if fzf.returncode == 0: - fzf_file = os.path.abspath(stdout.rstrip('\n')) - if os.path.isdir(fzf_file): - self.fm.cd(fzf_file) - else: - self.fm.select_file(fzf_file) diff --git a/%HOME%/.config/ranger/rc.conf b/%HOME%/.config/ranger/rc.conf deleted file mode 100644 index 47ddc8e..0000000 --- a/%HOME%/.config/ranger/rc.conf +++ /dev/null @@ -1,15 +0,0 @@ -set automatically_count_files false -set confirm_on_delete never -set draw_borders true -set preview_images false -set show_hidden true -set tilde_in_titlebar true -set vcs_aware true - -default_linemode filename - -map console delete -map console delete - -map pr paste_as_root -map fzf_select -- cgit v1.2.3