diff --git a/main.yaml b/main.yaml index 2ab786e4..a6451ed2 100644 --- a/main.yaml +++ b/main.yaml @@ -18,6 +18,8 @@ - role: npm - role: pv - role: ripgrep + - role: starship-prompt + - role: stylua - role: tldr - role: tree - role: tmux diff --git a/roles/starship-prompt/files/starship.toml b/roles/starship-prompt/files/starship.toml new file mode 100644 index 00000000..8a4df4f1 --- /dev/null +++ b/roles/starship-prompt/files/starship.toml @@ -0,0 +1,49 @@ +add_newline = false + +[character] +error_symbol = "[x](bold red)" +success_symbol = "[>](bold green)" +vicmd_symbol = "[<](bold green)" + +[directory] +disabled = false +read_only = " ro" +truncation_length = 8 +truncate_to_repo = true + +[docker_context] +format = 'via [$symbol]($style)' +symbol = "docker " + +[git_branch] +symbol = "git " + +[git_commit] +tag_symbol = " tag " + +[git_status] +ahead = ">" +behind = "<" +deleted = "x" +diverged = "<>" +renamed = "r" + +[memory_usage] +symbol = "memory " + +[nodejs] +format = 'via [$symbol]($style)' +symbol = "nodejs " + +[package] +symbol = "pkg " + +[php] +format = 'via [$symbol]($style)' +symbol = "php " + +[status] +disabled=false + +[sudo] +symbol = "sudo " diff --git a/roles/starship-prompt/tasks/main.yaml b/roles/starship-prompt/tasks/main.yaml new file mode 100644 index 00000000..1e6ca3aa --- /dev/null +++ b/roles/starship-prompt/tasks/main.yaml @@ -0,0 +1,14 @@ +--- +- name: Install + community.general.cargo: + name: + - starship + path: /usr/local + state: latest + become: true + +- name: Config + ansible.builtin.file: + src: "{{ role_path }}/files/starship.toml" + dest: "{{ ansible_user_dir }}/.config/starship.toml" + state: link diff --git a/roles/stylua/tasks/main.yaml b/roles/stylua/tasks/main.yaml new file mode 100644 index 00000000..63a110a9 --- /dev/null +++ b/roles/stylua/tasks/main.yaml @@ -0,0 +1,8 @@ +--- +- name: Install + community.general.cargo: + name: + - stylua + path: /usr/local + state: latest + become: true