summaryrefslogtreecommitdiffstats
path: root/docs/configuration/joshuto.toml.md
blob: d7af43aca9c2ace5d84498f93ca48ae418b098de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# joshuto.toml

This file is for general configurations.

All options available and their default values:

```toml
# Enables mouse support (true by default)
mouse_support = true
# This is for configuring how many items to reach before 'scrolling' the view
scroll_offset = 6

# If joshuto does not know how to open the file, it can resort to opening it via xdg settings
xdg_open = false

# Fork xdg_open so you can continue using joshuto with application open
xdg_open_fork = false

# If true, all file extensions checks will be case sensitive.
# Applies to `[extension]` in `mimetype.toml` and `[ext]` in `theme.toml` and `icons.toml`
case_insensitive_ext = false

# Use system trash can instead of permanently removing files
use_trash = true

# Watch for filesystem changes and update directory listings accordingly
watch_files = true

# If true the cursor will focus newly created files or directories with `:touch` or `:mkdir`
# Even if true, the behavior can be avoided prefixing the new file/dir with "./"
# E.g.:
# - `:mkdir a` moves the cursor to the new directory `a`
# - `:mkdir ./b` keeps the cursor where it was
focus_on_create = true

# The maximum file size to show a preview for
max_preview_size = 2097152 # 2MB

# Define custom commands (using shell) with parameters like %text, %s etc.
custom_commands = [
   { name = "rgfzf", command = "/home/<USER>/.config/joshuto/rgfzf '%text' %s" },
   { name = "rg", command = "/home/<USER>/.config/joshuto/rg '%text' %s" }
]

# Configurations related to the display
[display]
# Different view layouts
# Options include
# - default
# - hsplit
mode = "default"

# Collapse the preview window when there is no preview available
collapse_preview = true

# Ratios for parent view, current view and preview. You can specify 0 for
# parent view or omit it (So there are only 2 nums) and it won't be displayed
column_ratio = [1, 3, 4]

# Show borders around different views
show_borders = true

# Show hidden files
show_hidden = false

# Show file icons (requires a supporting font)
show_icons = true

# Shorten /home/$USER to ~
tilde_in_titlebar = true

# Options include
# - none
# - absolute
# - relative
line_number_style = "none"

# Options include
# - size
# - mtime
# - user
# - group
# - perm
# - none (can't be combined with other options)
# - all (can't be combined with other options)
linemode = "size"

# Configurations related to file sorting
[display.sort]
# Options include
# - lexical  (10.txt comes before 2.txt)
# - natural  (2.txt comes before 10.txt)
# - mtime
# - size
# - ext
sort_method = "natural"

# case sensitive sorting
case_sensitive = false

# show directories first
directories_first = true

# sort in reverse
reverse = false

# Configurations related to preview
[preview]

# Maximum preview file size in bytes
max_preview_size = 2097152

# Executable script for previews
preview_script = "~/.config/joshuto/preview_file.sh"

# Configurations related to searching and selecting files
[search]
# Different case sensitivities for operations using substring matching
# - insensitive
# - sensitive
# - smart: when the pattern contains at least one uppercase letter, joshuto can search
#   files case-sensitively, otherwise it will ignore the difference between lowercase
#   and uppercase
# Note that to apply changes after changing configurations at runtime, re-executing
# the search command is required.
# For substring matching
string_case_sensitivity = "insensitive"
# For glob matching
glob_case_sensitivity = "sensitive"
# For regex matching
regex_case_sensitivity = "sensitive"
# For matching with fzf
fzf_case_sensitivity = "insensitive"

# Optional list of command aliases (empty by default)
[cmd_aliases]
# q = "quit"
# ...

[tab]
# inherit, home, root
home_page = "home"

```