Open tbodt opened 5 years ago
I would like this too. One suggestion would be to adhere to the XDG specification so our Dotfiles don't get so cluttered. With XDG, we could have this instead: ~/.config/exa/configuration.yml
. :tada:
NOTE: Doesn't have to be a YAML configuration but can be any configuration format that makes sense.
Here’s a suggested, hypothetical config file, inspired by ui_styles.rs/default_theme.rs:
~/.config/exa/exa.toml
I’m not sure about some names (I’m totally not sure what’s special_user_file
and special_other
, and if the same distinction between ux_file
and ux_other
).
But mostly I think it’s an interesting draft. Any thoughts?
nice draft ariasuni. where would the file extension icon fit into this config? maybe colors.custom
could be replaced by something like [[file_extension]]
? Also, how would you define filekinds
like the group of extensions behind image
? in a separate config file? I would suggest not to put too much effort into color definitions per file extension. These can already be defined by LS_COLORS and there already is an excellent tool that handles configuring these with config files: Vivid. See config file examples for vivid here: https://github.com/sharkdp/vivid/blob/master/themes/jellybeans.yml and there https://github.com/sharkdp/vivid/blob/master/config/filetypes.yml
Well a great first step would be to be able to have a configuration file at all.
More advanced features, like colors based on file glob/pattern and custom file icons mapping, should probably be handled separately afterwards — e.g. to discuss if things like vivid
are the way we want to handle colors.
Is there currently any way to do this? I always run
exa -l -s modified --no-permissions --icons --no-user
Is there a way to set those defaults so I just need to type exa
?
It could be a config file supporting simple options at first step, and after that extend to complex options/features.
My workaround before official conf file (with zsh & exa installed by homebrew on macos):
~/.bin/exa
(~/.bin/
should be placed before /opt/homebrew/bin
in PATH
)
#!/usr/bin/env zsh
args=($@)
opts_file=$HOME/.exarc [[ -f $opts_file ]] || touch $opts_file
opts=(${(@f)$(<$opts_file)})
/opt/homebrew/bin/exa $opts $args
2. create `~/.exarc` with desired exa options
--sort=Name --git --time-style=long-iso
Having to configure exa using a shell alias is less than convenient. ripgrep allows you to set a RIPGREP_CONFIG_PATH environment variable to point to a file that contains a list of default options, one per line (https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file). I think exa should do this too.