Added starship
This commit is contained in:
@@ -222,7 +222,8 @@ inventory = ~/ansible/inventory/hosts.yaml
|
||||
;remote_user=
|
||||
|
||||
# (pathspec) Colon separated paths in which Ansible will search for Roles.
|
||||
;roles_path=/home/lkraven/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
|
||||
#;roles_path=/home/lkraven/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
|
||||
roles_path=/home/lkraven/ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
|
||||
|
||||
# (string) Set the main callback used to display Ansible output. You can only have one at a time.
|
||||
# You can have many other callbacks, but just one can be in charge of stdout.
|
||||
|
||||
@@ -9,5 +9,7 @@
|
||||
- btop
|
||||
- htop
|
||||
- neofetch
|
||||
- curl
|
||||
- wget
|
||||
update_cache: true
|
||||
state: latest
|
||||
|
||||
3
playbooks/starship.yaml
Normal file
3
playbooks/starship.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
- hosts: "all"
|
||||
roles:
|
||||
- starship
|
||||
195
roles/starship/files/starship.toml
Normal file
195
roles/starship/files/starship.toml
Normal file
@@ -0,0 +1,195 @@
|
||||
format = """
|
||||
[╭](fg:#6272A4)\
|
||||
$os\
|
||||
$username \
|
||||
$hostname \
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
$nodejs\
|
||||
$rust\
|
||||
$golang\
|
||||
$php\
|
||||
$conda\
|
||||
\n[╰──](fg:#6272A4)\
|
||||
$time$cmd_duration\
|
||||
[─](fg:#6272A4)\
|
||||
$character"""
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%I:%M" # Hour:Minute Format
|
||||
format = ' [$time ]($style)'
|
||||
style = "#6272A4"
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
ssh_symbol = ""
|
||||
format = '[$ssh_symbol $hostname]($style)'
|
||||
trim_at = '.companyname.com'
|
||||
disabled = false
|
||||
style = "#8BE9FD"
|
||||
|
||||
[os]
|
||||
format = " [$symbol($os)]($style)"
|
||||
disabled = false
|
||||
style = "bold #D6ACFF"
|
||||
|
||||
[aws]
|
||||
symbol = " "
|
||||
style = "bold #ffb86c"
|
||||
|
||||
[buf]
|
||||
symbol = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
read_only_style = '#ff5555'
|
||||
style = "bold #50fa7b"
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[fossil_branch]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
style = "bold #ff79c6"
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[guix_shell]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[haxe]
|
||||
symbol = "⌘ "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[lua]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = "喝 "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Gentoo = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
Redox = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[pijul_channel]
|
||||
symbol = "🪺 "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[rlang]
|
||||
symbol = "ﳒ "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[spack]
|
||||
symbol = "🅢 "
|
||||
|
||||
[character]
|
||||
success_symbol = '[](bold #6272A4)'
|
||||
error_symbol = '[](bold #ff5555)'
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 100
|
||||
style = "bold #6272A4"
|
||||
format = '[─ $duration]($style) '
|
||||
|
||||
[git_status]
|
||||
style = "bold #ff5555"
|
||||
|
||||
[username]
|
||||
format = "[$user]($style)"
|
||||
style_user = "#BD93F9"
|
||||
style_root = "#FFFFA5"
|
||||
32
roles/starship/tasks/main.yaml
Normal file
32
roles/starship/tasks/main.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
- name: create config directory
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/.config/"
|
||||
state: directory
|
||||
|
||||
- name: copy configuration
|
||||
copy:
|
||||
src: starship.toml
|
||||
dest: "{{ ansible_user_dir }}/.config/starship.toml"
|
||||
|
||||
- name: Get starship install script
|
||||
get_url:
|
||||
url: https://starship.rs/install.sh
|
||||
dest: /tmp/starship_install.sh
|
||||
mode: '0755'
|
||||
|
||||
- name: Install starship
|
||||
shell:
|
||||
cmd: /tmp/starship_install.sh --yes
|
||||
executable: /bin/sh
|
||||
become: yes
|
||||
|
||||
- name: Update bashrc
|
||||
vars:
|
||||
bashrcpath: "{{ ansible_user_dir }}/.bashrc"
|
||||
blockinfile:
|
||||
path: "{{ bashrcpath }}"
|
||||
block: |
|
||||
eval "$(starship init bash)"
|
||||
state: present
|
||||
create: true
|
||||
Reference in New Issue
Block a user