This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Ripe Grape - A fzf-based wrapper around ripgrep. | |
set -o errexit -o nounset -o pipefail | |
rg --color=always --line-number --with-filename "$@" \ | |
| fzf --ansi --reverse \ | |
--delimiter=: \ | |
--bind 'ctrl-v:execute(vim +{2} {1})' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
# Check for the remains of a program in the most likely places. | |
# Useful when testing new software or removing no longer used one. | |
if command -v exa > /dev/null | |
set ls exa | |
else | |
set ls ls --color=auto | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Print to stdout each new X11 selection value. By default operates | |
# on "xsel -b". Any passed arguments are used instead of | |
# "-b" verbatim. | |
set -o errexit -o nounset -o pipefail | |
# Set argv to -b (operating on the CLIPBOARD selection) if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
finish() { | |
rm -rf "$TMP" | |
exit | |
}; trap finish EXIT INT TERM | |
TMP="$(mktemp -d -t prefix.XXXXXX --tmpdir=/tmp)" | |
env HOME="$TMP" firefox -no-remote "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Patched from ranger commit 8d4808fc | |
class shell(Command): | |
escape_macros_for_shell = True | |
def execute(self): | |
if self.arg(1) and self.arg(1)[0] == '-': | |
flags = self.arg(1)[1:] | |
command = self.rest(2) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
for file in "$@"; do | |
if [[ "$file:t" = .* ]]; then | |
mv -v -- "$file" "${file:h}/${${file:t}#.}" | |
else | |
mv -v -- "$file" "${file:h}/.${file:t}" | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use 5.010; | |
use constant INDENT_WIDTH => 2; | |
my $indent_level = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: b/ranger/gui/widgets/view_base.py | |
=================================================================== | |
--- a/ranger/gui/widgets/view_base.py | |
+++ b/ranger/gui/widgets/view_base.py | |
@@ -112,15 +112,17 @@ class ViewBase(Widget, DisplayableContai | |
self.color_reset() | |
self.need_clear = True | |
hints = [] | |
- for key, value in self.fm.ui.keybuffer.pointer.items(): | |
- key = key_to_string(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from jinja2 import Template | |
import argparse | |
import os | |
def main(argv=None): | |
parser = argparse.ArgumentParser() | |
parser.add_argument('input_file', type=argparse.FileType('r')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
=head1 Fix lsblk on Linux 4.8 | |
On Linux 4.8 the order of devices is screwed up. Let's sort it manually. | |
=cut | |
use warnings; | |
use strict; |
NewerOlder