fish
This commit is contained in:
parent
3d721047d9
commit
e4581635db
8 changed files with 157 additions and 0 deletions
35
.config/fish/conf.d/0001-profile.fish
Normal file
35
.config/fish/conf.d/0001-profile.fish
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
ulimit -c unlimited
|
||||||
|
|
||||||
|
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||||
|
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
export PATH="$HOME/go/bin:$PATH"
|
||||||
|
export PATH="$PNPM_HOME:$PATH"
|
||||||
|
|
||||||
|
export ZEIT_DB=~/Sync/zeit.db
|
||||||
|
|
||||||
|
export EDITOR=hx
|
||||||
|
|
||||||
|
export FZF_DEFAULT_COMMAND='rg -L --hidden --files'
|
||||||
|
export FZF_DEFAULT_OPTS='--multi --layout=reverse --preview-window=down:60%'
|
||||||
|
export FZF_CTRL_T_COMMAND='rg -L --hidden --files'
|
||||||
|
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||||
|
|
||||||
|
export XKB_DEFAULT_LAYOUT=us
|
||||||
|
export XKB_DEFAULT_VARIANT=altgr-intl
|
||||||
|
export XKB_DEFAULT_OPTIONS=caps:escape
|
||||||
|
|
||||||
|
export XCURSOR_THEME=Adwaita
|
||||||
|
|
||||||
|
export SVDIR="$HOME/.local/share/service"
|
||||||
|
|
||||||
|
if test (hostname) = x69
|
||||||
|
set -gx REMOTE false
|
||||||
|
end
|
||||||
|
|
||||||
|
if test "$REMOTE" = ""
|
||||||
|
set -gx REMOTE true
|
||||||
|
end
|
23
.config/fish/conf.d/git-alias.fish
Normal file
23
.config/fish/conf.d/git-alias.fish
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
alias g='git'
|
||||||
|
alias gc='git commit'
|
||||||
|
alias gcp='git commit -p'
|
||||||
|
alias gr='git restore'
|
||||||
|
alias grp='git restore -p'
|
||||||
|
alias gco='git checkout'
|
||||||
|
alias gl='git log'
|
||||||
|
alias gs='git status'
|
||||||
|
alias ga='git add'
|
||||||
|
alias gap='git add -p'
|
||||||
|
alias gt='git tag'
|
||||||
|
alias gp='git push'
|
||||||
|
alias gpo='git push origin' # Para tags: git push origin 1.0.2 / gpo 1.0.2
|
||||||
|
|
||||||
|
alias gitdf='git --git-dir=$HOME/.config/dotfiles/ --work-tree=$HOME'
|
||||||
|
alias gd='gitdf'
|
||||||
|
alias gdc='gitdf commit'
|
||||||
|
alias gdcp='gitdf commit -p'
|
||||||
|
alias gdl='git log'
|
||||||
|
alias gda='gitdf add'
|
||||||
|
alias gdap='gitdf add -p'
|
||||||
|
alias gds='gitdf status'
|
||||||
|
alias gdp='gitdf push'
|
8
.config/fish/conf.d/gpg-ssh.fish
Normal file
8
.config/fish/conf.d/gpg-ssh.fish
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
if ! "$REMOTE"
|
||||||
|
set --erase SSH_AGENT_PID
|
||||||
|
# if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
|
# Start if not started
|
||||||
|
gpg-agent --daemon 2>/dev/null
|
||||||
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
# fi
|
||||||
|
end
|
17
.config/fish/conf.d/sway.fish
Normal file
17
.config/fish/conf.d/sway.fish
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
if ! "$REMOTE" && test "$(tty)" = /dev/tty1
|
||||||
|
doas mkdir -p /run/user
|
||||||
|
doas chmod 777 /run/user
|
||||||
|
set -gx XDG_RUNTIME_DIR "/run/user/$(id -u)"
|
||||||
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
|
chmod 700 "$XDG_RUNTIME_DIR"
|
||||||
|
mkdir -p "$HOME/.local/share/sway"
|
||||||
|
set log "$HOME/.local/share/sway/$(date +%Y-%m-%d@%H:%M:%S).log"
|
||||||
|
|
||||||
|
pgrep -U "$(id -u)" runsv >/dev/null || { nohup runsvdir ~/.local/share/service ............. >/dev/null & }
|
||||||
|
|
||||||
|
exec env \
|
||||||
|
XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" \
|
||||||
|
XDG_CURRENT_DESKTOP=sway \
|
||||||
|
XDG_SESSION_DESKTOP=sway \
|
||||||
|
dbus-run-session sway >"$log" 2>&1
|
||||||
|
end
|
10
.config/fish/config.fish
Normal file
10
.config/fish/config.fish
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
source /usr/share/fzf/fzf-key-bindings.fish
|
||||||
|
fzf_key_bindings
|
||||||
|
|
||||||
|
if status is-interactive
|
||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
end
|
||||||
|
|
||||||
|
# tabtab source for packages
|
||||||
|
# uninstall by removing these lines
|
||||||
|
[ -f ~/.config/tabtab/fish/__tabtab.fish ]; and . ~/.config/tabtab/fish/__tabtab.fish; or true
|
31
.config/fish/fish_variables
Normal file
31
.config/fish/fish_variables
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR __fish_initialized:3400
|
||||||
|
SETUVAR fish_color_autosuggestion:555\x1ebrblack
|
||||||
|
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:\x2d\x2dbackground\x3d111
|
||||||
|
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:B3A06D\x1eyellow\x1e\x2di
|
||||||
|
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR fish_pager_color_selected_background:\x2dr
|
3
.config/fish/functions/e.fish
Normal file
3
.config/fish/functions/e.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function e --wraps=$EDITOR --description 'alias e=$EDITOR'
|
||||||
|
$EDITOR $argv;
|
||||||
|
end
|
30
.config/fish/functions/fish_prompt.fish
Normal file
30
.config/fish/functions/fish_prompt.fish
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
function fish_prompt --description 'Write out the prompt'
|
||||||
|
set -l last_status $status
|
||||||
|
set -l normal (set_color normal)
|
||||||
|
set -l status_color (set_color brgreen)
|
||||||
|
set -l cwd_color (set_color $fish_color_cwd)
|
||||||
|
set -l vcs_color (set_color brpurple)
|
||||||
|
set -l prompt_status ""
|
||||||
|
|
||||||
|
# Since we display the prompt on a new line allow the directory names to be longer.
|
||||||
|
set -q fish_prompt_pwd_dir_length
|
||||||
|
or set -lx fish_prompt_pwd_dir_length 0
|
||||||
|
|
||||||
|
# Color the prompt differently when we're root
|
||||||
|
set -l suffix '❯'
|
||||||
|
if functions -q fish_is_root_user; and fish_is_root_user
|
||||||
|
if set -q fish_color_cwd_root
|
||||||
|
set cwd_color (set_color $fish_color_cwd_root)
|
||||||
|
end
|
||||||
|
set suffix '#'
|
||||||
|
end
|
||||||
|
|
||||||
|
# Color the prompt in red on error
|
||||||
|
if test $last_status -ne 0
|
||||||
|
set status_color (set_color $fish_color_error)
|
||||||
|
set prompt_status $status_color "[" $last_status "]" $normal
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status
|
||||||
|
echo -n -s $status_color $suffix ' ' $normal
|
||||||
|
end
|
Loading…
Reference in a new issue