fish: install fish, remove blesh, starship

This commit is contained in:
Jozef Steinhübl 2024-08-09 15:27:48 +02:00
parent 3da7e93e18
commit 520e72b31a
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
7 changed files with 96 additions and 173 deletions

View file

@ -10,10 +10,6 @@ alias s="kitten ssh"
PS1='[\u@\h \W]\$ '
eval "$(starship init bash)"
source ~/.local/share/blesh/ble.sh
complete -cf doas # doas completions
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH=$BUN_INSTALL/bin:$PATH:~/.local/bin:~/go/bin:~/.wakatime

1
.config/fish/config.fish Normal file
View file

@ -0,0 +1 @@
set -g fish_greeting

View file

@ -0,0 +1,31 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:brblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:blue
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:green
SETUVAR fish_color_error:brred
SETUVAR fish_color_escape:brcyan
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:brcyan
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:yellow\x1e\x2di
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr

View file

@ -0,0 +1,60 @@
# Modified theme beloglazov
# https://github.com/oh-my-fish/theme-beloglazov
function _git_branch_name
echo (command git symbolic-ref HEAD 2> /dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty 2> /dev/null)
end
function _git_ahead_count -a branch_name
echo (command git log origin/$branch_name..HEAD 2> /dev/null | \
grep '^commit' | wc -l | tr -d ' ')
end
function fish_prompt
set -l last_status $status
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l green (set_color green)
set -l red (set_color red)
set -l brightred (set_color -o red)
set -l blue (set_color -o blue)
set -l normal (set_color normal)
if [ $last_status != 0 ]
set failed "$brightred$normal "
end
if [ 'root' = (whoami) ]
set arrow "$brightred$normal "
else
set arrow ''
end
set -l time $red(date '+%I:%M')$normal
set -l cwd $cyan(prompt_pwd)$normal
if [ (_git_branch_name) ]
set -l git_branch_name (_git_branch_name)
set -l git_branch $brightred$git_branch_name$normal
set git_info "$blue ($git_branch$blue)$normal"
set -l git_ahead_count (_git_ahead_count $git_branch_name)
if [ $git_ahead_count != 0 ]
set -l ahead_count "$green+$git_ahead_count$normal"
set git_info "$git_info $ahead_count"
end
if [ (_is_git_dirty) ]
set -l dirty "$yellow$normal"
set git_info "$git_info$dirty"
end
end
echo -n -s $failed $arrow $time ' ' $cwd $git_info $normal ' '
end

View file

@ -1,167 +0,0 @@
"$schema" = 'https://starship.rs/config-schema.json'
format = """
[](color_orange)\
$os\
$username\
[](bg:color_yellow fg:color_orange)\
$directory\
[](fg:color_yellow bg:color_aqua)\
$git_branch\
$git_status\
[](fg:color_aqua bg:color_blue)\
$c\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
[](fg:color_bg3 bg:color_bg1)\
$time\
[ ](fg:color_bg1)\
$line_break$character"""
palette = 'gruvbox_dark'
[palettes.gruvbox_dark]
color_fg0 = '#fbf1c7'
color_bg1 = '#3c3836'
color_bg3 = '#665c54'
color_blue = '#458588'
color_aqua = '#689d6a'
color_green = '#98971a'
color_orange = '#d65d0e'
color_purple = '#b16286'
color_red = '#cc241d'
color_yellow = '#d79921'
[os]
disabled = false
style = "bg:color_orange fg:color_fg0"
[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
Arch = "󰣇"
Artix = "󰣇"
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"
[username]
show_always = true
style_user = "bg:color_orange fg:color_fg0"
style_root = "bg:color_orange fg:color_fg0"
format = '[ $user ]($style)'
[directory]
style = "fg:color_fg0 bg:color_yellow"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = "󰝚 "
"Pictures" = " "
"Developer" = "󰲋 "
[git_branch]
symbol = ""
style = "bg:color_aqua"
format = '[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)'
[git_status]
style = "bg:color_aqua"
format = '[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)'
[nodejs]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[c]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[rust]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[golang]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[php]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[java]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[kotlin]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[haskell]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[python]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
[conda]
style = "bg:color_bg3"
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
[time]
disabled = false
time_format = "%R"
style = "bg:color_bg1"
format = '[[  $time ](fg:color_fg0 bg:color_bg1)]($style)'
[line_break]
disabled = false
[character]
disabled = false
success_symbol = '[](bold fg:color_green)'
error_symbol = '[](bold fg:color_red)'
vimcmd_symbol = '[](bold fg:color_green)'
vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
vimcmd_replace_symbol = '[](bold fg:color_purple)'
vimcmd_visual_symbol = '[](bold fg:color_yellow)'

View file

@ -21,6 +21,9 @@ bindsym XF86AudioMicMute exec \
bindsym XF86MonBrightnessUp exec xbacklight -inc 10
bindsym XF86MonBrightnessDown exec xbacklight -dec 10
# capture screen
bindsym Mod4+Shift+s exec grim -g "$(slurp)" '/tmp/$(date +%F_%T)_${WIDTH}x${HEIGHT}.png' && wl-copy < '/tmp/$(date +%F_%T)_${WIDTH}x${HEIGHT}.png'
# kill, reload
bindsym {
$mod+Shift+c kill

3
goog
View file

@ -8,8 +8,7 @@ from common.sync import sync
from common.util import expand
stuff: list[str] = [
*expand("~/.config/{kitty,nvim,pipewire,sway,swaylock,zed}/**"),
"~/.config/starship.toml",
*expand("~/.config/{fish,kitty,nvim,pipewire,sway,swaylock,zed}/**"),
"~/.icons/**",
*expand("~/.local/bin/{yarn}"),
"~/.bashrc",