mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
fish: update prompt; don't be fancy in tty
This commit is contained in:
@@ -1,28 +1,31 @@
|
||||
function fish_prompt -d "Write out the prompt"
|
||||
# This shows up as USER@HOST /home/user/ >, with the directory colored
|
||||
# $USER and $hostname are set by fish, so you can just use them
|
||||
# instead of using `whoami` and `hostname`
|
||||
printf '%s@%s %s%s%s > ' $USER $hostname \
|
||||
(set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
end
|
||||
|
||||
if status is-interactive # Commands to run in interactive sessions can go here
|
||||
|
||||
# Commands to run in interactive sessions can go here
|
||||
if status is-interactive
|
||||
# No greeting
|
||||
set fish_greeting
|
||||
|
||||
# Use starship
|
||||
starship init fish | source
|
||||
function starship_transient_prompt_func
|
||||
starship module character
|
||||
end
|
||||
if test "$TERM" != "linux"
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
end
|
||||
|
||||
# Colors
|
||||
if test -f ~/.local/state/quickshell/user/generated/terminal/sequences.txt
|
||||
cat ~/.local/state/quickshell/user/generated/terminal/sequences.txt
|
||||
end
|
||||
|
||||
# Aliases
|
||||
alias clear "printf '\033[2J\033[3J\033[1;1H'" # fix: kitty doesn't clear properly
|
||||
# kitty doesn't clear properly so we need to do this weird printing
|
||||
alias clear "printf '\033[2J\033[3J\033[1;1H'"
|
||||
alias celar "printf '\033[2J\033[3J\033[1;1H'"
|
||||
alias claer "printf '\033[2J\033[3J\033[1;1H'"
|
||||
alias ls 'eza --icons'
|
||||
alias pamcan pacman
|
||||
alias q 'qs -c ii'
|
||||
if test "$TERM" != "linux"
|
||||
alias ls 'eza --icons'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -23,5 +23,27 @@ cursor #$term7 #
|
||||
|
||||
foreground #$term7 #
|
||||
|
||||
selection_background #$term7 #
|
||||
selection_foreground #$term0 #
|
||||
selection_background #$onSecondaryContainer #
|
||||
selection_foreground #$secondaryContainer #
|
||||
|
||||
# Override obscure colors for starship prompt (these are greys at the end)
|
||||
color255 #$primary #
|
||||
color254 #$primaryContainer #
|
||||
color253 #$secondary #
|
||||
color252 #$secondaryContainer #
|
||||
color251 #$tertiary #
|
||||
color250 #$tertiaryContainer #
|
||||
color249 #$error #
|
||||
color248 #$errorContainer #
|
||||
|
||||
color232 #$onPrimary #
|
||||
color233 #$onPrimaryContainer #
|
||||
color234 #$onSecondary #
|
||||
color235 #$onSecondaryContainer #
|
||||
color236 #$onTertiary #
|
||||
color237 #$onTertiaryContainer #
|
||||
color238 #$onError #
|
||||
color239 #$onErrorContainer #
|
||||
|
||||
color244 #$outline #
|
||||
color245 #$outlineVariant #
|
||||
|
||||
+21
-18
@@ -7,28 +7,31 @@ add_newline = false
|
||||
# Cool stuff
|
||||
|
||||
# format = """
|
||||
# $cmd_duration$username$hostname $directory $git_branch
|
||||
# $character
|
||||
# """
|
||||
# $directory $fill $git_branch $cmd_duration
|
||||
# $character"""
|
||||
format = """
|
||||
$cmd_duration $directory $git_branch
|
||||
$character"""
|
||||
$cmd_duration $directory$git_branch
|
||||
$character"""
|
||||
|
||||
[fill]
|
||||
symbol = '-'
|
||||
style = 'fg:245'
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
success_symbol = "[ ](bold fg:blue)"
|
||||
error_symbol = "[ ](bold fg:red)"
|
||||
success_symbol = "[ ](bold fg:255)"
|
||||
error_symbol = "[ ](bold fg:249)"
|
||||
|
||||
# Disable the package module, hiding it from the prompt completely
|
||||
[package]
|
||||
disabled = true
|
||||
|
||||
[git_branch]
|
||||
style = "bg: cyan"
|
||||
style = "bg: 252"
|
||||
symbol = ""
|
||||
truncation_length = 12
|
||||
truncation_symbol = ""
|
||||
format = " [](bold fg:cyan)[$symbol $branch(:$remote_branch)](fg:black bg:cyan)[ ](bold fg:cyan)"
|
||||
format = " [](bold fg:252)[$symbol $branch(:$remote_branch)](fg:235 bg:252)[ ](bold fg:252)"
|
||||
|
||||
[git_commit]
|
||||
commit_hash_length = 4
|
||||
@@ -52,7 +55,7 @@ deleted = " 🗑 "
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
format = "[•$hostname](bg:cyan bold fg:black)[](bold fg:cyan)"
|
||||
format = "[•$hostname](bg:252 bold fg:235)[](bold fg:252)"
|
||||
trim_at = ".companyname.com"
|
||||
disabled = false
|
||||
|
||||
@@ -71,19 +74,19 @@ format = '🕙[\[ $time \]]($style) '
|
||||
time_format = "%T"
|
||||
|
||||
[username]
|
||||
style_user = "bold bg:cyan fg:black"
|
||||
style_user = "bold bg:252 fg:235"
|
||||
style_root = "red bold"
|
||||
format = "[](bold fg:cyan)[$user]($style)"
|
||||
format = "[](bold fg:252)[$user]($style)"
|
||||
disabled = false
|
||||
show_always = true
|
||||
|
||||
[directory]
|
||||
home_symbol = " "
|
||||
home_symbol = " "
|
||||
read_only = " "
|
||||
style = "bg:green fg:black"
|
||||
truncation_length = 6
|
||||
truncation_symbol = " ••/"
|
||||
format = '[](bold fg:green)[ $path]($style)[](bold fg:green)'
|
||||
style = "bg:255 fg:black"
|
||||
truncation_length = 2
|
||||
truncation_symbol = ".../"
|
||||
format = '[](bold fg:255)[ → $path]($style)[](bold fg:255)'
|
||||
|
||||
|
||||
[directory.substitutions]
|
||||
@@ -97,4 +100,4 @@ format = '[](bold fg:green)[ $path]($style)[](bold fg:green)'
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 0
|
||||
format = '[](bold fg:yellow)[ $duration](bold bg:yellow fg:black)[](bold fg:yellow)'
|
||||
format = '[](bold fg:252)[ $duration](bold bg:252 fg:235)[](bold fg:252)'
|
||||
|
||||
Reference in New Issue
Block a user