Skip to content

Commit f74cf8a

Browse files
committed
Add Guix prompt.
1 parent 332f23a commit f74cf8a

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ set -g theme_display_docker_machine no
8383
set -g theme_display_k8s_context yes
8484
set -g theme_display_hg yes
8585
set -g theme_display_virtualenv no
86+
set -g theme_display_guix no
8687
set -g theme_display_nix no
8788
set -g theme_display_ruby no
8889
set -g theme_display_node yes

functions/__bobthefish_colors.fish

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
3737
set -x color_virtualfish brblue $colorfg --bold
3838
set -x color_virtualgo brblue $colorfg --bold
3939
set -x color_desk brblue $colorfg --bold
40+
set -x color_guix brblue $colorfg --bold
4041
set -x color_nix brblue $colorfg --bold
4142

4243
case 'terminal-light*'
@@ -72,6 +73,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
7273
set -x color_virtualfish brblue $colorfg --bold
7374
set -x color_virtualgo brblue $colorfg --bold
7475
set -x color_desk brblue $colorfg --bold
76+
set -x color_guix brblue $colorfg --bold
7577
set -x color_nix brblue $colorfg --bold
7678

7779
case 'terminal2' 'terminal2-dark*'
@@ -107,6 +109,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
107109
set -x color_virtualfish brblue $colorfg --bold
108110
set -x color_virtualgo brblue $colorfg --bold
109111
set -x color_desk brblue $colorfg --bold
112+
set -x color_guix brblue $colorfg --bold
110113
set -x color_nix brblue $colorfg --bold
111114

112115
case 'terminal2-light*'
@@ -142,6 +145,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
142145
set -x color_virtualfish brblue $colorfg --bold
143146
set -x color_virtualgo brblue $colorfg --bold
144147
set -x color_desk brblue $colorfg --bold
148+
set -x color_guix brblue $colorfg --bold
145149
set -x color_nix brblue $colorfg --bold
146150

147151
case 'zenburn'
@@ -183,6 +187,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
183187
set -x color_virtualfish $blue $grey --bold
184188
set -x color_virtualgo $blue $grey --bold
185189
set -x color_desk $blue $grey --bold
190+
set -x color_guix $blue $grey --bold
186191
set -x color_nix $blue $grey --bold
187192

188193
case 'base16-light'
@@ -235,6 +240,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
235240
set -x color_virtualfish $base0D $colorfg --bold
236241
set -x color_virtualgo $base0D $colorfg --bold
237242
set -x color_desk $base0D $colorfg --bold
243+
set -x color_guix $base0D $colorfg --bold
238244
set -x color_nix $base0D $colorfg --bold
239245

240246
case 'base16' 'base16-dark'
@@ -287,6 +293,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
287293
set -x color_virtualfish $base0D $colorfg --bold
288294
set -x color_virtualgo $base0D $colorfg --bold
289295
set -x color_desk $base0D $colorfg --bold
296+
set -x color_guix $base0D $colorfg --bold
290297
set -x color_nix $base0D $colorfg --bold
291298

292299
case 'solarized-light'
@@ -339,6 +346,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
339346
set -x color_virtualfish $cyan $colorfg --bold
340347
set -x color_virtualgo $cyan $colorfg --bold
341348
set -x color_desk $cyan $colorfg --bold
349+
set -x color_guix $cyan $colorfg --bold
342350
set -x color_nix $cyan $colorfg --bold
343351

344352
case 'solarized' 'solarized-dark'
@@ -391,6 +399,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
391399
set -x color_virtualfish $cyan $colorfg --bold
392400
set -x color_virtualgo $cyan $colorfg --bold
393401
set -x color_desk $cyan $colorfg --bold
402+
set -x color_guix $cyan $colorfg --bold
394403
set -x color_nix $cyan $colorfg --bold
395404

396405
case 'light'
@@ -436,6 +445,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
436445
set -x color_virtualfish $blue[2] $grey[1] --bold
437446
set -x color_virtualgo $blue[2] $grey[1] --bold
438447
set -x color_desk $blue[2] $grey[1] --bold
448+
set -x color_guix $blue[2] $grey[1] --bold
439449
set -x color_nix $blue[2] $grey[1] --bold
440450

441451
case 'gruvbox'
@@ -480,6 +490,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
480490
set -x color_virtualfish $blue[2] $fg[2] --bold
481491
set -x color_virtualgo $blue[2] $fg[2] --bold
482492
set -x color_desk $blue[2] $fg[2] --bold
493+
set -x color_guix $blue[2] $fg[2] --bold
483494
set -x color_nix $blue[2] $fg[2] --bold
484495

485496
case 'dracula' # https://draculatheme.com
@@ -526,6 +537,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
526537
set -x color_virtualfish $comment $bg --bold
527538
set -x color_virtualgo $cyan $bg --bold
528539
set -x color_desk $comment $bg --bold
540+
set -x color_guix $cyan $bg --bold
529541
set -x color_nix $cyan $bg --bold
530542

531543
case 'nord'
@@ -623,6 +635,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
623635
set -x color_virtualfish $blue[2] $grey[1] --bold
624636
set -x color_virtualgo $go_blue $black --bold
625637
set -x color_desk $blue[2] $grey[1] --bold
638+
set -x color_guix $blue[2] $grey[1] --bold
626639
set -x color_nix $blue[2] $grey[1] --bold
627640
end
628641
end
@@ -650,6 +663,7 @@ function __bobthefish_user_color_scheme_deprecated
650663
set -q __color_virtualfish; or set -l __color_virtualfish 005faf cccccc --bold
651664
set -q __color_virtualgo; or set -l __color_virtualgo 005faf cccccc --bold
652665
set -q __color_desk; or set -l __color_desk 005faf cccccc --bold
666+
set -q __color_guix; or set -l __color_guix 005faf cccccc --bold
653667
set -q __color_nix; or set -l __color_nix 005faf cccccc --bold
654668

655669
set_color black -b red --bold
@@ -690,6 +704,7 @@ function __bobthefish_user_color_scheme_deprecated
690704
set -x color_virtualfish $__color_virtualfish
691705
set -x color_virtualgo $__color_virtualgo
692706
set -x color_desk $__color_desk
707+
set -x color_guix $__color_guix
693708
set -x color_nix $__color_nix
694709
end"
695710

functions/__bobthefish_glyphs.fish

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function __bobthefish_glyphs -S -d 'Define glyphs used by bobthefish'
2222

2323
set -x ruby_glyph ''
2424
set -x go_glyph ''
25+
set -x guix_glyph ''
2526
set -x nix_glyph ''
2627

2728
# Desk glyphs

functions/bobthefish_display_colors.fish

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ function bobthefish_display_colors -a color_scheme -d 'Print example prompt colo
141141
echo -ns $desk_glyph desk ' '
142142
__bobthefish_finish_segments
143143

144+
__bobthefish_start_segment $color_guix
145+
echo -ns $guix_glyph 'guix '
146+
__bobthefish_finish_segments
147+
144148
__bobthefish_start_segment $color_aws_vault
145149
echo -ns aws-vault ' (' active ') '
146150
__bobthefish_finish_segments

functions/fish_prompt.fish

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
# set -g theme_display_aws_vault_profile yes
3434
# set -g theme_display_hg yes
3535
# set -g theme_display_virtualenv no
36+
# set -g theme_display_guix no
3637
# set -g theme_display_nix no
3738
# set -g theme_display_ruby no
3839
# set -g theme_display_user ssh
@@ -926,6 +927,16 @@ function __bobthefish_prompt_node -S -d 'Display current node version'
926927
set_color normal
927928
end
928929

930+
function __bobthefish_prompt_guix -S -d 'Display current Guix environment'
931+
[ "$theme_display_guix" = 'no' -o -z "$GUIX_ENVIRONMENT" ]
932+
and return
933+
934+
__bobthefish_start_segment $color_guix
935+
echo -ns $guix_glyph 'guix '
936+
937+
set_color normal
938+
end
939+
929940
function __bobthefish_prompt_nix -S -d 'Display current nix environment'
930941
[ "$theme_display_nix" = 'no' -o -z "$IN_NIX_SHELL" ]
931942
and return
@@ -1136,6 +1147,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
11361147
__bobthefish_prompt_aws_vault_profile
11371148

11381149
# Virtual environments
1150+
__bobthefish_prompt_guix
11391151
__bobthefish_prompt_nix
11401152
__bobthefish_prompt_desk
11411153
__bobthefish_prompt_rubies

0 commit comments

Comments
 (0)