From 073a40631be071b2fc61b6f50f87af38f3ceff1a Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Tue, 10 Nov 2020 10:30:27 -0500 Subject: [PATCH] lsd --- lsd/config.yaml | 16 ++++++++++++++++ playbooks/roles/common/tasks/main.yml | 6 ++++++ playbooks/roles/rust/files/config | 3 +++ playbooks/roles/rust/tasks/main.yml | 6 +++--- zsh/funcs/ls | 9 +++++++++ 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 lsd/config.yaml create mode 100644 zsh/funcs/ls diff --git a/lsd/config.yaml b/lsd/config.yaml new file mode 100644 index 0000000..7b90521 --- /dev/null +++ b/lsd/config.yaml @@ -0,0 +1,16 @@ +blocks: + - permission + - user + - group + - size + - date + - name + +date: +%Y-%m-%d %H:%M + +icons: + theme: unicode + +layout: oneline + +symlink-arrow: ⇒ diff --git a/playbooks/roles/common/tasks/main.yml b/playbooks/roles/common/tasks/main.yml index 46ca137..a176fdb 100644 --- a/playbooks/roles/common/tasks/main.yml +++ b/playbooks/roles/common/tasks/main.yml @@ -76,3 +76,9 @@ dest: ~/.config/topgrade.toml state: link +- name: Lay down lsd/config.yaml + file: + src: ~/.dotfiles/lsd/config.yaml + dest: ~/.config/lsd/config.yaml + state: link + diff --git a/playbooks/roles/rust/files/config b/playbooks/roles/rust/files/config index bc6c6c0..473f038 100644 --- a/playbooks/roles/rust/files/config +++ b/playbooks/roles/rust/files/config @@ -1,3 +1,6 @@ +[net] +git-fetch-with-cli = true + [profile.release] lto = true opt-level = 3 diff --git a/playbooks/roles/rust/tasks/main.yml b/playbooks/roles/rust/tasks/main.yml index 12d4acc..690ee9b 100644 --- a/playbooks/roles/rust/tasks/main.yml +++ b/playbooks/roles/rust/tasks/main.yml @@ -23,10 +23,10 @@ when: - rust_extras == true -- name: Install exa - shell: ~/.cargo/bin/cargo install exa +- name: Install lsd + shell: ~/.cargo/bin/cargo install lsd args: - creates: ~/.cargo/bin/exa + creates: ~/.cargo/bin/lsd when: - rust_extras == true diff --git a/zsh/funcs/ls b/zsh/funcs/ls new file mode 100644 index 0000000..6a705e9 --- /dev/null +++ b/zsh/funcs/ls @@ -0,0 +1,9 @@ +function ls { + if [[ $(whence -p lsd 2> /dev/null) ]]; then + lsd $@ + elif [[ $(whence -p exa 2> /dev/null) ]]; then + exa $@ + else + ls $@ + fi +}