dotfiles/dot_config/broot/conf.hjson

300 lines
9.6 KiB
Plaintext
Raw Normal View History

2024-12-25 07:45:16 +01:00
###############################################################
# This configuration file lets you
# - define new commands
# - change the shortcut or triggering keys of built-in verbs
# - change the colors
# - set default values for flags
# - set special behaviors on specific paths
# - and more...
#
# Configuration documentation is available at
# https://dystroy.org/broot
#
# This file's format is Hjson ( https://hjson.github.io/ ). Some
# properties are commented out. To enable them, remove the `#`.
#
###############################################################
###############################################################
# Default flags
# You can set up flags you want broot to start with by
# default, for example `default_flags="-ihp"` if you usually want
# to see hidden and gitignored files and the permissions (then
# if you don't want the hidden files at a specific launch,
# you can launch broot with `br -H`).
# A popular flag is the `g` one which displays git related info.
#
# default_flags:
###############################################################
# Terminal's title
# If you want the terminal's title to be updated when you change
# directory, set a terminal_title pattern by uncommenting one of
# the examples below and tuning it to your taste.
#
# terminal_title: "[broot] {git-name}"
# terminal_title: "{file} 🐄"
# terminal_title: "-= {file-name} =-"
###############################################################
# Date/Time format
# If you want to change the format for date/time, uncomment the
# following line and change it according to
# https://docs.rs/chrono/0.4.11/chrono/format/strftime/index.html
#
# date_time_format: %Y/%m/%d %R
###############################################################
# uncomment to activate modal mode
#
# (you really should read https://dystroy.org/broot/modal/
# before as it may not suit everybody even among vim users)
#
# You may start either in 'command' mode, or in 'input' mode
#
# modal: true
# initial_mode: command
###############################################################
# Whether to mark the selected line with a triangle
#
show_selection_mark: true
###############################################################
# Column order
# cols_order, if specified, must be a permutation of the following
# array. You should keep the name column at the end as it has a
# variable length.
#
# cols_order: [
# mark
# git
# size
# permission
# date
# count
# branch
# name
# ]
###############################################################
# True Colors
# If this parameter isn't set, broot tries to automatically
# determine whether true colors (24 bits) are available.
# As this process is unreliable, you may uncomment this setting
# and set it to false or true if you notice the colors in
# previewed images are too off.
#
# true_colors: false
###############################################################
# Icons
# If you want to display icons in broot, uncomment this line
# (see https://dystroy.org/broot/icons for installation and
# troubleshooting)
#
# icon_theme: vscode
###############################################################
# Special paths
# If some paths must be handled specially, uncomment (and change
# this section as per the examples)
# Setting "list":"never" on a dir prevents broot from looking at its
# children when searching, unless the dir is the selected root.
# Setting "sum":"never" on a dir prevents broot from looking at its
# children when computing the total size and count of files.
# Setting "show":"always" makes a file visible even if its name
# starts with a dot.
# Setting "list":"always" may be useful on a link to a directory
# (they're otherwise not entered by broot unless selected)
#
special_paths: {
"/media" : {
list: "never"
sum: "never"
}
"~/.config": { "show": "always" }
"trav": {
show: always
list: "always",
sum: "never"
}
# "~/useless": { "show": "never" }
# "~/my-link-I-want-to-explore": { "list": "always" }
}
###############################################################
# Quit on last cancel
# You can usually cancel the last state change on escape.
# If you want the escape key to quit broot when there's nothing
# to cancel (for example when you just opened broot), uncomment
# this parameter
#
# quit_on_last_cancel: true
###############################################################
# Search modes
#
# broot allows many search modes.
# A search mode is defined by
# - the way to search: 'fuzzy', 'exact', 'regex', or 'tokens'.
# - where to search: file 'name', 'path', or file 'content'
# A search pattern may for example be "fuzzy path" (default),
# "regex content" or "exact path".
#
# The search mode is selected from its prefix. For example, if
# you type "abc", the default mode is "fuzzy path". If you type
# "/abc", the mode is "regex path". If you type "rn/abc", the mode
# is "regex name".
#
# This mapping may be modified. You may want to dedicate the
# empty prefix (the one which doesn't need a '/') to the
# search mode you use most often. The example below makes it
# easy to search on name rather than on the subpath.
#
# More information on
# https://dystroy.org/broot/input/#the-filtering-pattern
#
# search_modes: {
# <empty>: fuzzy name
# /: regex name
# }
###############################################################
# File Extension Colors
#
# uncomment and modify the next section if you want to color
# file name depending on their extension
#
# ext_colors: {
# png: rgb(255, 128, 75)
# rs: yellow
# }
###############################################################
# Max file size for content search
#
# Bigger files are ignored when searching their content. You
# can specify this size either in ISO units (eg 5GB) or in
# the old binary units (eg 44Kib)
content_search_max_file_size: 10MB
###############################################################
# Max Panels Count
#
# Change this if you sometimes want to have more than 2 panels
# open
# max_panels_count: 2
###############################################################
# Update work dir
#
# By default, broot process' work dir is kept in sync with the
# current's panel root. If you want to keep it unchanged,
# uncomment this setting
#
# update_work_dir: false
###############################################################
# Kitty Keyboard extension
#
# If you want to use advanced keyboard shortcuts in Kitty
# compatible terminals (Kitty, Wezterm), set this to true.
#
# This makes it possible to use shortcuts like 'space-n',
# 'ctrl-alt-a-b', 'shift-space', etc.
#
enable_kitty_keyboard: false
###############################################################
# lines around matching line in filtered preview
#
# When searching the content of a file, you can have either
# only the matching lines displayed, or some of the surrounding
# ones too.
#
lines_before_match_in_preview: 1
lines_after_match_in_preview: 1
###############################################################
# transformations before preview
#
# It's possible to define transformations to apply to some files
# before calling one of the default preview renderers in broot.
# Below are two examples that you may uncomment and adapt:
#
preview_transformers: [
// # Use mutool to render any PDF file as an image
// # In this example we use placeholders for the input and output files
// {
// input_extensions: [ "pdf" ] // case doesn't matter
// output_extension: png
// mode: image
// command: [ "mutool", "draw", "-w", "1000", "-o", "{output-path}", "{input-path}" ]
// }
// # Use LibreOffice to render Office files as images
// # In this example, {output-dir} is used to specify where LibreOffice must write the result
// {
// input_extensions: [ "xls", "xlsx", "doc", "docx", "ppt", "pptx", "ods", "odt", "odp" ]
// output_extension: png
// mode: image
// command: [
// "libreoffice", "--headless",
// "--convert-to", "png",
// "--outdir", "{output-dir}",
// "{input-path}"
// ]
// }
// # Use jq to beautify JSON
// # In this example, the command refers to neither the input nor the output,
// # so broot pipes them to the stdin and stdout of the jq process
// {
// input_extensions: [ "json" ]
// output_extension: json
// mode: text
// command: [ "jq" ]
// }
]
###############################################################
# Imports
#
# While it's possible to have all configuration in one file,
# it's more convenient to split it in several ones.
# Importing also allows to set a condition on the terminal's
# color, which makes it possible to have a different skin
# chosen when your terminal has a light background and when
# it has a light one.
imports: [
# Verbs are better configured in verbs.hjson. But you
# can also add another files for your personal verbs
verbs.hjson
# This file contains the skin to use when the terminal
# is dark (or when this couldn't be determined)
{
luma: [
dark
unknown
]
# (un)comment to choose your preferred skin
//file: skins/dark-blue.hjson
//file: skins/catppuccin-macchiato.hjson
file: skins/catppuccin-mocha.hjson
//file: skins/dark-gruvbox.hjson
//file: skins/dark-orange.hjson
//file: skins/solarized-dark.hjson
}
# This skin is imported when your terminal is light
{
luma: light
# (un)comment to choose your preferred skin
//file: skins/solarized-light.hjson
file: skins/white.hjson
}
]