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
# Ranger plugin for storing metadata in extended file attributes | |
# Requires Python 3.3 | |
# drop it in ~/.config/ranger/plugins | |
from ranger.ext.openstruct import DefaultOpenStruct as ostruct | |
import ranger.core.metadata | |
import os | |
def get_metadata(_, filename): |
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
import base64 | |
import argparse | |
import subprocess | |
parser = argparse.ArgumentParser() | |
parser.add_argument("file") | |
args = parser.parse_args() | |
mime_args = ("mimetype", "-b", args.file) | |
mime_type = subprocess.run(mime_args, capture_output=True).stdout.decode().strip() |
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 | |
sleep .1 | |
scrot --select /tmp/ocr.png | |
tesseract -c page_separator="" /tmp/ocr.png /tmp/ocr-out | |
xclip -selection clipboard -i < /tmp/ocr-out.txt | |
rm /tmp/ocr.png | |
rm /tmp/ocr-out.txt |
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
RPROMPT='$(git_prompt_info)%F{yellow}%n%{$reset_color%}%F{240}@%F{blue}%m%{$reset_color%}%(?,,%F{red} [%?]%{$reset_color%})' | |
PROMPT='%F{240}%25<...<%F{cyan}%~%F{yellow}%B>%b%{$reset_color%}%f ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%F{240}(%F{246}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%F{240})%F{red}x%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%F{240})%{$reset_color%}" |
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
[Thumbnailer Entry] | |
TryExec=mutool | |
Exec=mutool draw -w %s -h %s -o %o %i 1 | |
MimeType=application/pdf;application/x-pdf;image/pdf; |
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 | |
# South Park download script | |
# | |
# Uses youtube-dl and ffmpeg | |
# | |
# Downloads the whole series | |
# and joins the multipart | |
# episodes into single files | |
for season in `seq 1 22`: |
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
[Thumbnailer Entry] | |
TryExec=convert | |
Exec=convert -alpha deactivate %i[0] -thumbnail %s %o | |
MimeType=application/pdf;application/x-pdf;image/pdf; |
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
[Thumbnailer Entry] | |
TryExec=convert | |
Exec=convert %i -thumbnail %s %o | |
MimeType=image/x-ilbm; |
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
/* ~/.mozilla/firefox/XXXXXX.default/chrome/userContent.css */ | |
input { | |
border: 2px inset white; | |
background-color: white; | |
color: black; | |
-moz-appearance: none !important; | |
} | |
textarea { | |
border: 2px inset white; |