Dynamic accent color

This commit is contained in:
agryphus 2024-01-08 23:23:33 -05:00
parent 4dc1a98098
commit dade3f53f2
3 changed files with 88 additions and 0 deletions

1
.config/colors/accent Normal file
View file

@ -0,0 +1 @@
blue

73
.config/starship.toml Normal file
View file

@ -0,0 +1,73 @@
# Use starship.def.toml to edit the starship configuration. There should be an entr daemon
# running which, upon changes to the file, will replace each instance of blue with
# the appropriate environment variable. This hack was cobbled together because starship currently
# does not allow environment variables to be used as a style (which is dumb)
# Inserts a blank line between shell prompts
add_newline = false
format = '''[\([$username@$hostname](bold blue)\)-\[$directory\](-\[$git_branch$git_metrics$git_status\])(-\[$nix_shell\])](blue) $cmd_duration
[](blue)[$shell](bold blue) '''
# format = '''
# [\[$directory\](-\[$git_branch$git_metrics$git_status\])(-\[$nix_shell\])](blue)[λ ](blue bold)
# '''
right_format = '$status'
[line_break]
disabled = false
[username]
format = '$user'
disabled = false
show_always = true
[nix_shell]
symbol = '❄️'
format = '[$symbol$name](bold purple)'
[hostname]
ssh_only = false
format = '[$ssh_symbol](bold blue)$hostname'
trim_at = '.companyname.com'
disabled = false
[git_branch]
style = 'bold green'
symbol = ''
format = '[$symbol$branch(hello$banch)](bold green)'
[git_status]
modified = '[✘](bold red)'
up_to_date = 'up'
format = '$up_to_date$modified$up_to_date'
[directory]
truncation_length = 3
truncation_symbol = '…/'
truncate_to_repo = true
style = 'bold white'
format = '[$path]($style)[$read_only]($read_only_style)'
[character]
success_symbol = '[λ](bold blue)'
error_symbol = '[λ](bold red)'
# success_symbol = '[](bold blue)'
# error_symbol = '[](bold red)'
[cmd_duration]
min_time = 1_000
style = "bold dimmed yellow"
format = '◷[$duration]($style) '
[shell]
fish_indicator = '󰈺'
powershell_indicator = '_'
bash_indicator = '\$'
zsh_indicator = 'λ'
unknown_indicator = '?'
disabled = false
format = '$indicator'
[status]
disabled = false

14
.local/bin/menu-accent Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env zsh
accent=$(echo "black
red
green
yellow
blue
purple
cyan
white" | rofi -no-fixed-num-lines -dmenu -p "Choose an accent color:")
[ -z "$accent" ] && exit 0
echo "$accent" > ~/.config/colors/accent
source ~/.config/zsh/.zshrc