2020-02-17 13:13:34 +00:00
|
|
|
# Start X at login
|
|
|
|
if status is-login
|
|
|
|
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg -x SXHKD_SHELL '/usr/bin/sh'
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
exec startx -- -keeptty
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function fish_greeting
|
2020-03-04 21:08:58 +00:00
|
|
|
# Enable numberlock
|
|
|
|
if [ -x /usr/bin/numlockx ]
|
|
|
|
/usr/bin/numlockx on
|
|
|
|
end
|
|
|
|
|
2020-03-04 21:03:40 +00:00
|
|
|
setxkbmap -option caps:escape
|
2020-03-04 14:24:53 +00:00
|
|
|
cat ~/.cache/wal/sequences &
|
2020-08-07 08:47:34 +00:00
|
|
|
neofetch
|
2020-02-17 13:13:34 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function path_if_exists
|
|
|
|
if [ -d "$argv" ]
|
|
|
|
set PATH $PATH "$argv"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Add paths
|
2020-11-15 14:16:05 +00:00
|
|
|
path_if_exists ~/.local/share/yarn/global/node_modules/.bin
|
2020-02-17 13:13:34 +00:00
|
|
|
path_if_exists ~/.local/bin
|
2021-06-25 17:14:45 +00:00
|
|
|
path_if_exists ~/.local/share/doom/bin
|
2020-06-07 18:17:21 +00:00
|
|
|
path_if_exists ~/.local/share/cargo/bin
|
2020-08-25 15:21:18 +00:00
|
|
|
path_if_exists ~/.local/share/go/bin
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
# Set GPG TTY
|
|
|
|
set GPG_TTY (tty)
|
|
|
|
|
|
|
|
# Set default browser
|
2021-03-13 14:32:31 +00:00
|
|
|
if [ -e "/sbin/brave" ]
|
2020-12-06 09:50:25 +00:00
|
|
|
set -xg BROWSER "brave"
|
2021-03-13 14:32:31 +00:00
|
|
|
else if [ -e "/sbin/firefox" ]
|
2020-12-06 09:50:25 +00:00
|
|
|
set -xg BROWSER "firefox"
|
2020-02-17 13:13:34 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Set default terminal
|
2020-12-06 09:50:25 +00:00
|
|
|
set -xg TERMINAL "st"
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
# pkg editor
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg VISUAL "nvim"
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
# editor
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg EDITOR "nvim"
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
# Enable password store extensions
|
2020-04-14 14:33:29 +00:00
|
|
|
set -g PASSWORD_STORE_ENABLE_EXTENSIONS "true"
|
2020-02-17 13:13:34 +00:00
|
|
|
|
2020-03-29 17:12:00 +00:00
|
|
|
# Make sure pass uses the proper directory
|
2020-04-14 14:33:29 +00:00
|
|
|
set -g PASSWORD_STORE_DIR ~/.local/share/pass
|
2020-03-29 17:12:00 +00:00
|
|
|
|
2022-06-11 13:16:45 +00:00
|
|
|
# Make sure pass ignores throw-keyids config
|
|
|
|
set -g PASSWORD_STORE_GPG_OPTS "--no-throw-keyids"
|
|
|
|
|
2020-02-17 13:13:34 +00:00
|
|
|
# Use alternative muhome
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg MU_HOME ~/.cache/mu
|
2020-03-29 17:12:00 +00:00
|
|
|
|
|
|
|
# Load xinit from the proper directory
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xgg XINITRC ~/.config/X11/xinitrc
|
2020-03-29 17:12:00 +00:00
|
|
|
|
2020-02-17 13:13:34 +00:00
|
|
|
# bobthefish
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg theme_nerd_fonts yes
|
|
|
|
set -xg theme_color_scheme gruvbox
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
# sudope
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg sudope_sequence \e\e
|
2020-02-17 13:13:34 +00:00
|
|
|
|
2020-03-29 17:12:00 +00:00
|
|
|
# Set tmux tmpdir to proper directory
|
2020-05-18 19:12:24 +00:00
|
|
|
set -xg TMUX_TMPDIR "$XDG_RUNTIME_DIR"
|
2020-03-29 17:12:00 +00:00
|
|
|
|
2020-06-07 18:17:21 +00:00
|
|
|
# Rust
|
|
|
|
set -xg CARGO_HOME ~/.local/share/cargo
|
|
|
|
set -xg RUSTUP_HOME ~/.local/share/rustup
|
|
|
|
|
|
|
|
# Golang
|
|
|
|
set -xg GOPATH ~/.local/share/go
|
2020-06-01 15:34:40 +00:00
|
|
|
|
2020-09-10 22:51:07 +00:00
|
|
|
# User
|
|
|
|
set -xg XDG_CACHE_HOME $HOME/.cache
|
|
|
|
set -xg XDG_CONFIG_HOME $HOME/.config
|
|
|
|
set -xg XDG_DATA_HOME $HOME/.local/share
|
|
|
|
set -xg XDG_DESKTOP_DIR $HOME/Desktop
|
|
|
|
set -xg XDG_DOWNLOAD_DIR $HOME/Downloads
|
|
|
|
set -xg XDG_DOCUMENTS_DIR $HOME/Documents
|
|
|
|
set -xg XDG_MUSIC_DIR $HOME/Music
|
|
|
|
set -xg XDG_PICTURES_DIR $HOME/Pictures
|
|
|
|
set -xg XDG_VIDEOS_DIR $HOME/Videos
|
|
|
|
|
|
|
|
# Npm
|
|
|
|
set -xg NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc
|
|
|
|
|
2021-03-13 14:32:31 +00:00
|
|
|
# Set qt theme
|
2022-06-11 13:16:45 +00:00
|
|
|
set -xg QT_QPA_PLATFORMTHEME qt5ct
|
2021-03-13 14:32:31 +00:00
|
|
|
|
2020-02-17 13:13:34 +00:00
|
|
|
# nvim alias
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add v 'nvim'
|
|
|
|
abbr --add sv 'sudo nvim'
|
2020-02-17 13:13:34 +00:00
|
|
|
|
|
|
|
# ls alias
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add ls 'exa'
|
|
|
|
abbr --add l 'exa -al'
|
2020-02-17 13:13:34 +00:00
|
|
|
|
2020-03-29 17:12:00 +00:00
|
|
|
# wget alias
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add wget 'wget --hsts-file="~/.config/wget-hsts"'
|
2020-03-29 17:12:00 +00:00
|
|
|
|
|
|
|
# weechat
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add weechat "weechat -d ~/.config/weechat"
|
2020-03-29 17:12:00 +00:00
|
|
|
|
|
|
|
# tmux
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add tmux "tmux -f ~/.config/tmux/tmux.conf"
|
2020-03-29 17:12:00 +00:00
|
|
|
|
|
|
|
# pass
|
2022-06-11 13:16:45 +00:00
|
|
|
abbr --add pass "PASSWORD_STORE_DIR=$PASSWORD_STORE_DIR PASSWORD_STORE_GPG_OPTS=$PASSWORD_STORE_GPG_OPTS /usr/bin/pass"
|
2020-03-29 17:12:00 +00:00
|
|
|
|
2020-02-17 13:13:34 +00:00
|
|
|
# pacman aliases
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add pacrmorphans "sudo pacman -Rs (pacman -Qtdq)"
|
|
|
|
abbr --add pacrem "sudo pacman -Rns"
|
2020-02-19 13:47:30 +00:00
|
|
|
|
|
|
|
# git alaises
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add gpoat "git push origin --all && git push origin --tags"
|
|
|
|
abbr --add gs "git status"
|
|
|
|
abbr --add gd "git diff"
|
|
|
|
abbr --add g "git"
|
2020-04-11 11:16:08 +00:00
|
|
|
|
|
|
|
# Prevent mv & rm oopsies
|
2020-06-22 14:45:40 +00:00
|
|
|
abbr --add mv "mv -i"
|
|
|
|
abbr --add rm "rm -i"
|
2020-02-17 13:13:34 +00:00
|
|
|
|
2020-08-24 19:07:02 +00:00
|
|
|
# Colorize diff
|
|
|
|
abbr --add diff "diff --color"
|
|
|
|
|
2021-06-25 17:14:45 +00:00
|
|
|
# Doom Emacs alias
|
|
|
|
abbr --add demacs "emacs --with-profile doom"
|
|
|
|
|
2020-04-06 10:07:12 +00:00
|
|
|
# Load lfcd wiith proper icons
|
|
|
|
function lf
|
|
|
|
set -lx LF_ICONS "\
|
|
|
|
di=:\
|
|
|
|
fi=:\
|
|
|
|
ln=:\
|
|
|
|
or=:\
|
|
|
|
ex=:\
|
|
|
|
*.c=:\
|
|
|
|
*.cc=:\
|
|
|
|
*.clj=:\
|
|
|
|
*.coffee=:\
|
|
|
|
*.cpp=:\
|
|
|
|
*.css=:\
|
|
|
|
*.d=:\
|
|
|
|
*.dart=:\
|
|
|
|
*.erl=:\
|
|
|
|
*.exs=:\
|
|
|
|
*.fs=:\
|
|
|
|
*.go=:\
|
|
|
|
*.h=:\
|
|
|
|
*.hh=:\
|
|
|
|
*.hpp=:\
|
|
|
|
*.hs=:\
|
|
|
|
*.html=:\
|
|
|
|
*.java=:\
|
|
|
|
*.jl=:\
|
|
|
|
*.js=:\
|
|
|
|
*.json=:\
|
|
|
|
*.lua=:\
|
|
|
|
*.md=:\
|
|
|
|
*.php=:\
|
|
|
|
*.pl=:\
|
|
|
|
*.pro=:\
|
|
|
|
*.py=:\
|
|
|
|
*.rb=:\
|
|
|
|
*.rs=:\
|
|
|
|
*.scala=:\
|
|
|
|
*.ts=:\
|
|
|
|
*.vim=:\
|
|
|
|
*.cmd=:\
|
|
|
|
*.ps1=:\
|
|
|
|
*.sh=:\
|
|
|
|
*.bash=:\
|
|
|
|
*.zsh=:\
|
|
|
|
*.fish=:\
|
|
|
|
*.tar=:\
|
|
|
|
*.tgz=:\
|
|
|
|
*.arc=:\
|
|
|
|
*.arj=:\
|
|
|
|
*.taz=:\
|
|
|
|
*.lha=:\
|
|
|
|
*.lz4=:\
|
|
|
|
*.lzh=:\
|
|
|
|
*.lzma=:\
|
|
|
|
*.tlz=:\
|
|
|
|
*.txz=:\
|
|
|
|
*.tzo=:\
|
|
|
|
*.t7z=:\
|
|
|
|
*.zip=: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ob=:\
|
|
|
|
*.qt=:\
|
|
|
|
*.nuv=:\
|
|
|
|
*.wmv=:\
|
|
|
|
*.asf=:\
|
|
|
|
*.rm=:\
|
|
|
|
*.rmvb=:\
|
|
|
|
*.flc=:\
|
|
|
|
*.avi=:\
|
|
|
|
*.fli=:\
|
|
|
|
*.flv=:\
|
|
|
|
*.gl=:\
|
|
|
|
*.dl=:\
|
|
|
|
*.xcf=:\
|
|
|
|
*.xwd=:\
|
|
|
|
*.yuv=:\
|
|
|
|
*.cgm=:\
|
|
|
|
*.emf=:\
|
|
|
|
*.ogv=:\
|
|
|
|
*.ogx=:\
|
|
|
|
*.aac=:\
|
|
|
|
*.au=:\
|
|
|
|
*.flac=:\
|
|
|
|
*.m4a=:\
|
|
|
|
*.mid=:\
|
|
|
|
*.midi=:\
|
|
|
|
*.mka=:\
|
|
|
|
*.mp3=:\
|
|
|
|
*.mpc=:\
|
|
|
|
*.ogg=:\
|
|
|
|
*.ra=:\
|
|
|
|
*.wav=:\
|
|
|
|
*.oga=:\
|
|
|
|
*.opus=:\
|
|
|
|
*.spx=:\
|
|
|
|
*.xspf=:\
|
|
|
|
*.pdf=:\
|
|
|
|
*.nix=:\
|
|
|
|
"
|
|
|
|
|
|
|
|
/usr/bin/lf
|
|
|
|
end
|
|
|
|
|
2020-02-17 13:13:34 +00:00
|
|
|
# Refresh gpg-agent tty in case user switches into an X session
|
|
|
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
|
|
|
|
|
|
|
# Set fzf keybindings here for now as they don't work with stable version of omf https://github.com/jethrokuan/fzf/issues/109
|
|
|
|
bind \co '__fzf_find_file'
|
|
|
|
bind \cr '__fzf_reverse_isearch'
|
|
|
|
bind \ec '__fzf_cd'
|
|
|
|
bind \eC '__fzf_cd --hidden'
|
|
|
|
bind \eO '__fzf_open'
|
|
|
|
bind \eo '__fzf_open --editor'
|
|
|
|
|
|
|
|
if bind -M insert >/dev/null 2>/dev/null
|
|
|
|
bind -M insert \co '__fzf_find_file'
|
|
|
|
bind -M insert \cr '__fzf_reverse_isearch'
|
|
|
|
bind -M insert \ec '__fzf_cd'
|
|
|
|
bind -M insert \eC '__fzf_cd --hidden'
|
|
|
|
bind -M insert \eO '__fzf_open'
|
|
|
|
bind -M insert \eo '__fzf_open --editor'
|
|
|
|
end
|
|
|
|
|
|
|
|
if set -q FZF_COMPLETE
|
|
|
|
bind \t '__fzf_complete'
|
|
|
|
if bind -M insert >/dev/null 2>/dev/null
|
|
|
|
bind -M insert \t '__fzf_complete'
|
|
|
|
end
|
|
|
|
end
|
2020-08-18 13:42:11 +00:00
|
|
|
|
|
|
|
# Make fzf use ripgrep if available
|
|
|
|
if type rg &> /dev/null
|
|
|
|
export FZF_DEFAULT_COMMAND='rg --files'
|
|
|
|
export FZF_DEFAULT_OPTS='-m --height 50% --border'
|
|
|
|
end
|
2020-12-06 09:50:25 +00:00
|
|
|
|
|
|
|
# Enable starfish prompt
|
|
|
|
starship init fish | source
|