mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
81 lines
3.7 KiB
Text
81 lines
3.7 KiB
Text
# vim: ft=cfg
|
|
#== Websites
|
|
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
|
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
|
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
|
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
|
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
|
ext x?html?, has w3m, terminal = w3m "$@"
|
|
|
|
#== Misc
|
|
mime ^text, label editor = ${EDITOR} -- "$@"
|
|
mime ^text, label pager = "$PAGER" -- "$@"
|
|
!mime ^text, label editor, ext json|csv|tex|py|rb|js|sh = ${EDITOR} -- "$@"
|
|
!mime ^text, label pager, ext json|csv|tex|py|rb|js|sh = "$PAGER" -- "$@"
|
|
name ^[mM]akefile$ = make
|
|
|
|
#== Scripts
|
|
ext py = python -- "$1"
|
|
ext rb = ruby -- "$1"
|
|
ext js = node -- "$1"
|
|
ext sh = sh -- "$1"
|
|
|
|
#== Video/Audio
|
|
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
|
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
|
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
|
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
|
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
|
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
|
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
|
|
|
|
#== Documents
|
|
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
|
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
|
ext djvu, has zathura, X, flag f = zathura -- "$@"
|
|
ext epub, has zathura, X, flag f = zathura -- "$@"
|
|
|
|
#== Images
|
|
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
|
mime ^image, has feh, X, flag f = feh -- "$@"
|
|
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
|
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
|
ext xcf, X, flag f = gimp -- "$@"
|
|
|
|
#== Archives
|
|
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
|
|
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
|
|
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
|
|
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
|
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
|
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
|
|
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
|
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
|
ext zip, has unzip = unzip -l "$1" | less
|
|
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
|
ext rar, has unrar = unrar l "$1" | less
|
|
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
|
|
|
#== Fonts
|
|
mime ^font, has fontforge, X, flag f = fontforge "$@"
|
|
|
|
#== Terminals
|
|
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
|
|
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
|
|
|
|
#== Misc
|
|
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
|
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
|
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
|
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
|
|
|
#== Generic file openers
|
|
label open, has xdg-open = xdg-open -- "$@"
|
|
label open, has open = open -- "$@"
|
|
|
|
!mime ^text, !ext json|csv|tex|py|rb|js|sh = ask
|
|
label editor, !mime ^text, !ext json|csv|tex|py|rb|js|sh = ${EDITOR} -- "$@"
|
|
label pager, !mime ^text, !ext json|csv|tex|py|rb|js|sh = "$PAGER" -- "$@"
|
|
mime application/x-executable = "$1"
|
|
label trash, has trash-put = trash-put -- "$@"
|
|
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash
|