-
Notifications
You must be signed in to change notification settings - Fork 46
/
ls++.conf
245 lines (197 loc) · 4.95 KB
/
ls++.conf
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# vim:ft=perl:fdm=marker:fmr=#<,#>:fen:et:sw=2:
# ls++ configuration file
# location: $XDG_CONFIG_HOME/ls++/ls++.conf
use utf8;
#< do not modify this ok?
use vars qw(
@ignores
@d
@c
$colorscheme
%ls_colors
$symlink_delim
$symlink_color
$symlink_attr
);
@c = (0 .. 16);
#>
# Colorscheme to use. You can define your own further down this file.
$colorscheme = 'trapd00r';
# delimiters used in the file listing
@d = qw(▕ - │ ▏);
#$d[0] = '├';
#$d[1] = ' ';
#$d[2] = '▕▏';
#$d[3] = '┤';
# How should symlinks be displayed?
$symlink_delim = '=>';
$symlink_color = 1;
$symlink_attr = 'bold';
# Here you can define your own custom LS_COLORS rules, much more
# powerful than the regular LS_COLORS that'll only match on an
# extension.
#
# To color (all) directories differently, match a trailing slash
# like so:
#
# '/$' => 'bold blue8 underline'
#
# Available attributes are:
# - 0-255 color index
# - any valid X color name
# - bold, underline, italic...
#
# And you can nest them too:
#
# 'README.(md|pod)$' => 'bold italic 197 underline',
#
# Remember, these rules are powerful! Match a season premiere and have
# it stand out:
#
# '(?i)(s[0-9]{2}-s[0-9]{2}|s([0-9]{1,2})[eEx]01)|([Ss]?([0-9]{1,2}))[Eex]01' => 'underline bold 196',
%ls_colors = (
'\.un~$' => 'IGNORE',
'\.sw[o-z]$' => 'IGNORE',
'README$' => 'bold 220 underline',
'Makefile$' => $c[15],
'(=:.+)?\..*rc' => $c[3],
# '/$' => 'blue8',
);
#< colorschemes
# extended colors
if($colorscheme eq '') {
$c[0] = 208;
$c[1] = 197;
$c[2] = 190;
$c[3] = 196;
$c[4] = 242;
$c[5] = 209;
$c[6] = 185;
$c[7] = 215;
$c[8] = 032;
$c[9] = 061;
$c[10] = 142;
$c[11] = 197;
$c[12] = 106;
$c[13] = 060;
$c[14] = 236;
$c[15] = 215;
}
elsif($colorscheme eq 'greyscale') {
$c[0] = 252;
$c[1] = 251;
$c[2] = 250;
$c[3] = 249;
$c[4] = 239;
$c[5] = 244;
$c[6] = 240;
$c[7] = 242;
$c[8] = 244;
$c[9] = 244;
$c[10] = 243;
$c[11] = 241;
$c[12] = 240;
$c[13] = 239;
$c[14] = 236;
$c[15] = 242;
}
elsif($colorscheme eq 'early') {
$c[0] = 233;
$c[1] = 245;
$c[2] = 250;
$c[3] = 201;
$c[4] = 239;
$c[5] = 209;
$c[6] = 185;
$c[7] = 216;
$c[8] = 244;
$c[9] = 254;
$c[10] = 243;
$c[11] = 241;
$c[12] = 240;
$c[13] = 239;
$c[14] = 237;
$c[15] = 220;
}
elsif($colorscheme eq 'trapd00r') {
$c[0] = 237;
$c[1] = 131;
$c[2] = 107; # K
$c[3] = 075; # G, sec
$c[4] = 240; # day
$c[5] = 209; # +x
$c[6] = 185; # +r
$c[7] = 216; # +w, M
$c[8] = 220;
$c[9] = 208; # hour
$c[10] = 243;
$c[11] = 161;
$c[12] = 240;
$c[13] = 025;
$c[14] = 248; # Bytes, month
$c[15] = 196; # Min
$c[16] = 30 ; # directory
}
#>
=pod
=head1 NAME
ls++.conf - ls++ configuration file
=head1 DESCRIPTION
ls++.conf is the configuration file for ls++(1). ls++ first searches for it at
~/.config/ls++/ls++.conf then at ~/.ls++.conf then at ./ls++.conf and finally at
/etc/ls++.conf.
Lines beginning with a '#' character are comments. All other non-empty lines
are live Perl code. This gives a lot of power to the end user, but it also
allows for fuckups.
Please don't fuckup.
=head1 ENVIRONMENT
=over 8
=item @d
Array containting the characters to use for delimiting the columns.
=item @c
Array containing the colors to be used.
=item $colorscheme
Colorscheme to be used.
=item %ls_colors
A hash where its keys are patterns (possibly valid regular expressions) to be
matched against the files. The values should be attributes or colors which will
be added to the output.
This does the same thing as LS_COLORS, except that you can match against the
full filname, and not only the extension. Using LS_COLORS, you could never match
README or Makefile for example. Those two are matched by default.
The special value IGNORE will ignore all files matching the key pattern.
=back
=head1 COLORS
The default colortable left here for reference (ANSI colors).
0 NULL black
1 NULL bright black
2 K red
3 G, sec bright red
4 day green
5 +x bright green
6 +r yellow
7 +w, M bright yellow
8 other blue
9 hour bright blue
10 magenta
11 +s bright magenta
12 cyan
13 link bright cyan
14 B, month, delim white
15
16 reset
17 bold
=head1 AUTHOR
Magnus Woldrich
CPAN ID: WOLDRICH
m@japh.se
http://japh.se
=head1 REPORTING BUGS
Report bugs and/or feature requests on L<https://github.com/trapd00r/ls--/issues>
or to L<m@japh.se>
=head1 COPYRIGHT
Copyright (C) 2010, 2011, 2018- Magnus Woldrich. All right reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
=cut
1;