justopen

command module
v0.0.0-...-e73ac38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: Unlicense Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Justopen

Just opens the **** location.

Config

Config location: ~/.config/justopen/config.yaml

Example content:

# This is false by default, which means it'll convert the path to lowercase
casesensitive: false
# This list gets evaluated in order
filetypes:
  # Locations starting with http:// or https:// open with firefox
  - { regex: '^https?://', exec: firefox -- %f }
  # Starting with ftp:// -> open with gftp
  - { prefix: 'ftp://', exec: gftp -- %f }
  # Open all kinds of extensions with nvim
  - { regex: '\.(ac|c|cc|cpp|css|cxx|diff|go|h|hpp|in|java|js|json|jsx|mk|pl|py|rb|rs|xml|zig)$', exec: nvim -- %f }
  # If `exectty` exists, `exectty` gets run when in a terminal, and `exec` otherwise.
  # If `exectty` is missing, it uses `exec` in both cases.
  # Open playlists with 'mpv --playlist=...' if inside a terminal,
  # or if not in a terminal open the st terminal with the same command
  - { regex: '\.(m3u|pls)$', exec: st -e mpv --playlist=%f, exectty: mpv --playlist=%f }
  # Same but for non-playlist audio/video files
  - { regex: '\.(aac|flac|m4a|mp3|mpeg3|ogg|wav)$', exec: st -e mpv -- %f, exectty: mpv -- %f }
  - { regex: '\.(avi|flv|m4v|mkv|mov|mp4|mpeg|mpg|ogm|ogv|ts|vob|wmv)$', exec: mpv -- %f }
  # Open certain image extensions with gimp
  - { regex: '\.(xcf|tif|tiff|xbm|xpm)$', exec: gimp -- %f }
  # Open other ones with qiv
  - { regex: '\.(bmp|gif|jpeg|jpg|png|svg)$', exec: qiv --readonly --transparency --autorotate --scale_down -- %f }
  # You can also use suffix for single extensions
  - { suffix: '.pdf', exec: zathura -- %f }
  - { suffix: '.dia', exec: dia -- %f }
  # HTML and various office files
  - { regex: '\.(htm|html)$', exec: firefox -- %f }
  - { regex: '\.(odb|xlsx|xls|xlt|ods|ots|sxc|sdc|odg|otg|sxd|sda|vsd|vss|vst|odp|otp|sxi|pptx|ppt|pps|pot|sdi|odf|sxm|smf|ott|odt|sxw|rtf|sdw|wbk|doc|docx|dot|wri)$', exec: loffice %f }
  # Directories get the `inode/directory` mimetype
  - { mime: '^inode/directory$', exec: xfe -- %f }
  # fallback
  - { mime: '^text/.*', exectty: nano -- %f, exec: leafpad -- %f }
  # This would catch everything
  # - { regex: '.', exec: leafpad }

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址