fish: add dracula theme

Amolith created

Change summary

dot_config/private_fish/config.fish.tmpl         |  19 ++
dot_config/private_fish/themes/dracula-pro.theme | 130 ++++++++++++++++++
2 files changed, 149 insertions(+)

Detailed changes

dot_config/private_fish/config.fish.tmpl 🔗

@@ -1,6 +1,25 @@
 set -x BAT_THEME "ansi"
 set -x DFT_BACKGROUND "light"
 
+# Let fish keep the light/dark variant in sync with terminals that report
+# their background preference. The theme's [unknown] variant remains light for
+# clients that never report a preference.
+if status is-interactive
+    set -l color_theme
+
+    if set -q SSH_CONNECTION[1]
+        set -l ssh_source_ip (string split ' ' -- $SSH_CONNECTION)[1]
+        set -l ssh_source_host (getent hosts $ssh_source_ip 2>/dev/null | awk '{ print $2; exit }')
+
+        switch $ssh_source_host
+            case 'gc7.*' 'na3c.*'
+                set color_theme --color-theme=light
+        end
+    end
+
+    fish_config theme choose dracula-pro $color_theme
+end
+
 # XDG variables
 set -x XDG_DATA_HOME "$HOME/.local/share"
 set -x XDG_CONFIG_HOME "$HOME/.config"

dot_config/private_fish/themes/dracula-pro.theme 🔗

@@ -0,0 +1,130 @@
+# name: 'Dracula PRO'
+# url: 'https://draculatheme.com/pro'
+#
+# Buffy and Alucard variants adapted for fish's light/dark/unknown theme
+# support. The unknown variant intentionally tracks Alucard so SSH sessions
+# from light terminals remain readable when the terminal cannot report its
+# color preference.
+
+[light]
+# preferred_background: f5f5f5
+fish_color_normal 1f1f1f
+fish_color_autosuggestion 635d97
+fish_color_cancel cb3a2a --reverse
+fish_color_command 036a96
+fish_color_comment 635d97
+fish_color_cwd 14710a
+fish_color_cwd_root cb3a2a
+fish_color_end 846e15
+fish_color_error cb3a2a
+fish_color_escape a3144d
+fish_color_history_current --bold
+fish_color_host 644ac9
+fish_color_host_remote 644ac9
+fish_color_keyword a3144d
+fish_color_match --background=cfcfde
+fish_color_operator 14710a
+fish_color_option 846e15
+fish_color_param 644ac9
+fish_color_quote 14710a
+fish_color_redirection 1f1f1f
+fish_color_search_match --background=cfcfde --bold
+fish_color_selection --background=cfcfde --bold
+fish_color_status cb3a2a
+fish_color_user 036a96
+fish_color_valid_path --underline
+fish_pager_color_background
+fish_pager_color_completion 1f1f1f
+fish_pager_color_description 635d97
+fish_pager_color_prefix 036a96
+fish_pager_color_progress 635d97
+fish_pager_color_secondary_background
+fish_pager_color_secondary_completion 1f1f1f
+fish_pager_color_secondary_description 635d97
+fish_pager_color_secondary_prefix 036a96
+fish_pager_color_selected_background --background=cfcfde
+fish_pager_color_selected_completion 1f1f1f
+fish_pager_color_selected_description 635d97
+fish_pager_color_selected_prefix 036a96
+
+[dark]
+# preferred_background: 2a212c
+fish_color_normal f8f8f2
+fish_color_autosuggestion b58ac0
+fish_color_cancel ff9580 --reverse
+fish_color_command 80ffea
+fish_color_comment b58ac0
+fish_color_cwd 8aff80
+fish_color_cwd_root ff9580
+fish_color_end ffca80
+fish_color_error ff9580
+fish_color_escape ff80bf
+fish_color_history_current --bold
+fish_color_host 9580ff
+fish_color_host_remote 9580ff
+fish_color_keyword ff80bf
+fish_color_match --background=544158
+fish_color_operator 8aff80
+fish_color_option ffca80
+fish_color_param 9580ff
+fish_color_quote ffff80
+fish_color_redirection f8f8f2
+fish_color_search_match --background=544158 --bold
+fish_color_selection --background=544158 --bold
+fish_color_status ff9580
+fish_color_user 80ffea
+fish_color_valid_path --underline
+fish_pager_color_background
+fish_pager_color_completion f8f8f2
+fish_pager_color_description b58ac0
+fish_pager_color_prefix 80ffea
+fish_pager_color_progress b58ac0
+fish_pager_color_secondary_background
+fish_pager_color_secondary_completion f8f8f2
+fish_pager_color_secondary_description b58ac0
+fish_pager_color_secondary_prefix 80ffea
+fish_pager_color_selected_background --background=544158
+fish_pager_color_selected_completion f8f8f2
+fish_pager_color_selected_description b58ac0
+fish_pager_color_selected_prefix 80ffea
+
+[unknown]
+# preferred_background: f5f5f5
+fish_color_normal 1f1f1f
+fish_color_autosuggestion 635d97
+fish_color_cancel cb3a2a --reverse
+fish_color_command 036a96
+fish_color_comment 635d97
+fish_color_cwd 14710a
+fish_color_cwd_root cb3a2a
+fish_color_end 846e15
+fish_color_error cb3a2a
+fish_color_escape a3144d
+fish_color_history_current --bold
+fish_color_host 644ac9
+fish_color_host_remote 644ac9
+fish_color_keyword a3144d
+fish_color_match --background=cfcfde
+fish_color_operator 14710a
+fish_color_option 846e15
+fish_color_param 644ac9
+fish_color_quote 14710a
+fish_color_redirection 1f1f1f
+fish_color_search_match --background=cfcfde --bold
+fish_color_selection --background=cfcfde --bold
+fish_color_status cb3a2a
+fish_color_user 036a96
+fish_color_valid_path --underline
+fish_pager_color_background
+fish_pager_color_completion 1f1f1f
+fish_pager_color_description 635d97
+fish_pager_color_prefix 036a96
+fish_pager_color_progress 635d97
+fish_pager_color_secondary_background
+fish_pager_color_secondary_completion 1f1f1f
+fish_pager_color_secondary_description 635d97
+fish_pager_color_secondary_prefix 036a96
+fish_pager_color_selected_background --background=cfcfde
+fish_pager_color_selected_completion 1f1f1f
+fish_pager_color_selected_description 635d97
+fish_pager_color_selected_prefix 036a96