Include toolbox name in status
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
c42953c551
commit
f5a3e0a2ea
3 changed files with 18 additions and 0 deletions
|
@ -30,3 +30,16 @@
|
|||
template:
|
||||
src: templates/starship.toml.j2
|
||||
dest: ~/.config/starship.toml
|
||||
|
||||
- name: Create directories in `~/.local`
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
loop:
|
||||
- ~/.local/bin
|
||||
- ~/.local/share
|
||||
|
||||
- name: Install script for toolbox name retrieval
|
||||
template:
|
||||
src: templates/scripts/toolbox_name.sh
|
||||
dest: ~/.local/bin/toolbox_name.sh
|
||||
|
|
3
playbooks/roles/shell/templates/scripts/toolbox_name.sh
Normal file
3
playbooks/roles/shell/templates/scripts/toolbox_name.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
cat /run/.containerenv | grep -E '^name=' | sed -e 's/name=\"\(.*\)\"/\1/'
|
|
@ -35,6 +35,8 @@ format = "[$path]($style)[$read_only]($read_only_style) "
|
|||
[custom.toolbox]
|
||||
when = "ls /run/.containerenv"
|
||||
symbol = " "
|
||||
command = "~/.local/bin/toolbox_name.sh"
|
||||
format = "[$symbol($output )]($style)"
|
||||
style = "bold purple"
|
||||
|
||||
[character]
|
||||
|
|
Loading…
Reference in a new issue