2019-12-02 19:54:25 +01:00
|
|
|
#
|
|
|
|
# LEL
|
|
|
|
# __ _ _
|
|
|
|
# / _(_)___| |__
|
|
|
|
# | |_| / __| '_ \
|
|
|
|
# | _| \__ \ | | |
|
|
|
|
# |_| |_|___/_| |_|
|
|
|
|
|
|
|
|
# Environment Vairables {{{
|
|
|
|
set -x QT_QPA_PLATFORMTHEME qt5ct
|
|
|
|
set -x PATH $PATH ~/.local/bin
|
|
|
|
|
|
|
|
set -x EDITOR nvim
|
|
|
|
set -x VISUAL nvim
|
|
|
|
# set -x BROWSER=qutebrowser
|
|
|
|
set -x PAGER less
|
|
|
|
|
2020-04-30 04:34:35 +02:00
|
|
|
if test -n "$XDG_VTRN"; and test -z "$DISPLAY"
|
|
|
|
or command -qs systemctl;and systemctl -q is-enabled ly
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
|
|
export GTK_CSD=0
|
|
|
|
export LD_PRELOAD=/usr/lib/libgtk3-nocsd.so.0
|
|
|
|
export XCURSOR_THEME=capitaine-cursors
|
|
|
|
export GTK_THEME=materia-custom-accent:dark
|
2020-04-25 19:08:34 +02:00
|
|
|
|
2020-04-30 04:34:35 +02:00
|
|
|
# export XDG_CURRENT_DESKTOP=Unity
|
|
|
|
export QT_SCALE_FACTOR=1
|
|
|
|
export QPA_PLATFORM=wayland
|
|
|
|
export QT_QPA_PLATFORM=wayland
|
|
|
|
end
|
2019-12-02 19:54:25 +01:00
|
|
|
#}}}
|
2020-04-19 21:17:46 +02:00
|
|
|
# Aliases{{{
|
|
|
|
abbr rv sudo nvim
|
|
|
|
|
|
|
|
command -qs exa &&
|
|
|
|
alias ls exa
|
|
|
|
|
|
|
|
abbr gs git status
|
|
|
|
abbr gp 'git pull; git push'
|
|
|
|
|
2020-04-25 01:21:12 +02:00
|
|
|
function edit-config #{{{
|
2020-04-19 21:17:46 +02:00
|
|
|
cd ~/.config
|
|
|
|
set file ~/.config/( fzf )
|
|
|
|
cd -
|
|
|
|
|
|
|
|
if test -f "$file"
|
2020-04-25 01:21:12 +02:00
|
|
|
commandline -r nvim\ $file
|
2020-04-19 21:17:46 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
abbr ec edit-config
|
2020-04-25 01:21:12 +02:00
|
|
|
#}}}
|
|
|
|
# alias mutt #{{{
|
2020-04-22 00:36:45 +02:00
|
|
|
function mutt --wraps=neomutt --description 'alias mutt=neomutt'
|
|
|
|
neomutt $argv;
|
2020-04-22 19:34:34 +02:00
|
|
|
pkill -RTMIN+4 waybar
|
2020-04-22 00:36:45 +02:00
|
|
|
end
|
|
|
|
abbr neomutt mutt
|
2020-04-25 01:21:12 +02:00
|
|
|
#}}}
|
|
|
|
function rcd #{{{
|
2020-04-24 23:17:08 +02:00
|
|
|
set file (mktemp)
|
|
|
|
|
|
|
|
ranger $argv --choosedir=$file
|
|
|
|
cd (cat $file)
|
|
|
|
|
|
|
|
rm $file
|
2020-04-25 01:21:12 +02:00
|
|
|
clear
|
|
|
|
ls
|
|
|
|
fish_prompt
|
2020-04-24 23:17:08 +02:00
|
|
|
end
|
|
|
|
|
2020-04-25 01:21:12 +02:00
|
|
|
# force-repaint to redraw prompt
|
|
|
|
bind -M insert \co rcd
|
|
|
|
#}}}
|
|
|
|
function etc #{{{
|
|
|
|
cd /etc/
|
|
|
|
set file /etc/(fzf)
|
|
|
|
cd -
|
|
|
|
test -f "$file"
|
|
|
|
and sudo nvim $file
|
|
|
|
end
|
|
|
|
#}}}
|
2020-04-19 21:17:46 +02:00
|
|
|
# }}}
|
2019-12-04 04:03:28 +01:00
|
|
|
# start window manager if using tty1 {{{
|
2019-12-02 19:54:25 +01:00
|
|
|
#
|
2020-04-14 16:26:40 +02:00
|
|
|
function esway
|
|
|
|
clear
|
|
|
|
# export XDG_CURRENT_DESKTOP=Unity
|
2020-04-22 00:36:45 +02:00
|
|
|
pgrep sway || exec sway
|
2020-04-14 16:26:40 +02:00
|
|
|
end
|
|
|
|
if test "$XDG_VTNR" = 1 -a -z "$DISPLAY" #faster like this
|
|
|
|
if command -v systemctl -a systemctl -q is-active graphical.target
|
2020-04-17 06:54:35 +02:00
|
|
|
esway &> .swaylog
|
|
|
|
# ei3 &> .i3log
|
|
|
|
# ebsp &> .bsplog
|
2020-04-14 16:26:40 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-12-02 19:54:25 +01:00
|
|
|
# }}}
|
|
|
|
# use tmux{{{
|
2020-04-23 23:59:39 +02:00
|
|
|
# set TMUX 1
|
2020-04-22 20:36:07 +02:00
|
|
|
if test -z "$TMUX" -a -n "$DISPLAY" &&
|
|
|
|
not string match -qr kitty "$TERM" &&
|
|
|
|
test -z "$GNOME_TERMINAL_SCREEN" &&
|
|
|
|
status is-interactive
|
2019-12-02 19:54:25 +01:00
|
|
|
set attach_session (tmux 2> /dev/null ls -F \
|
|
|
|
'#{session_attached} #{?#{==:#{session_last_attached},},1,#{session_last_attached}} #{session_id}' |
|
|
|
|
awk '/^0/ { if ($2 > t) { t = $2; s = $3 } }; END { if (s) printf "%s", s }')
|
|
|
|
if test -n "$attach_session"
|
|
|
|
exec tmux attach -t "$attach_session"
|
|
|
|
else
|
|
|
|
exec tmux
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# }}}
|
|
|
|
# Install fisher{{{
|
|
|
|
if not functions -q fisher
|
|
|
|
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
|
|
|
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
|
|
|
|
fish -c fisher
|
|
|
|
end
|
|
|
|
#}}}
|
|
|
|
# Prompt customization{{{
|
2020-03-23 02:28:09 +01:00
|
|
|
set SPACEFISH_USER_SHOW always
|
|
|
|
set SPACEFISH_USER_COLOR "#cc5757"
|
|
|
|
set SPACEFISH_DIR_COLOR "#cc5757"
|
2019-12-02 19:54:25 +01:00
|
|
|
set SPACEFISH_PROMPT_ADD_NEWLINE false
|
2020-03-23 02:28:09 +01:00
|
|
|
|
2020-04-26 08:43:54 +02:00
|
|
|
set SPACEFISH_CHAR_COLOR_SUCCESS white
|
|
|
|
|
2020-03-23 02:28:09 +01:00
|
|
|
set SPACEFISH_CHAR_PREFIX ""
|
2020-03-29 19:40:44 +02:00
|
|
|
set SPACEFISH_CHAR_SYMBOL '$'
|
|
|
|
set SPACEFISH_CHAR_SYMBOL_ROOT '#'
|
2020-03-23 02:28:09 +01:00
|
|
|
|
2020-04-26 08:43:54 +02:00
|
|
|
set SPACEFISH_VI_MODE_COLOR "#cc5757"
|
|
|
|
|
2020-04-25 01:21:12 +02:00
|
|
|
set SPACEFISH_VI_MODE_PREFIX "\e[1 q"
|
2020-03-23 02:28:09 +01:00
|
|
|
set SPACEFISH_VI_MODE_SUFIX ""
|
2020-04-25 01:21:12 +02:00
|
|
|
set SPACEFISH_VI_MODE_INSERT "I\e[5 q"
|
2020-03-23 02:28:09 +01:00
|
|
|
set SPACEFISH_VI_MODE_NORMAL "N"
|
|
|
|
set SPACEFISH_VI_MODE_VISUAL "V"
|
|
|
|
set SPACEFISH_VI_MODE_REPLACE "R"
|
|
|
|
set SPACEFISH_VI_MODE_REPLACE_ONE "S"
|
|
|
|
|
2020-04-25 01:21:12 +02:00
|
|
|
set fish_cursor_default block blink
|
|
|
|
set fish_cursor_insert line blink
|
|
|
|
set fish_cursor_replace_one underscore blink
|
|
|
|
set fish_cursor_visual block
|
|
|
|
|
2020-04-25 19:08:34 +02:00
|
|
|
# set -l cnf /usr/share/doc/pkgfile/command-not-found.fish
|
2020-04-20 04:27:35 +02:00
|
|
|
test -f "$cnf" &&
|
2020-04-24 21:37:17 +02:00
|
|
|
source "$cnf"
|
|
|
|
|
2019-12-02 19:54:25 +01:00
|
|
|
#}}}
|
|
|
|
# Color man pages{{{
|
2019-12-03 04:38:10 +01:00
|
|
|
|
|
|
|
set -xU LESS_TERMCAP_md (printf "\e[01;31m")
|
|
|
|
set -xU LESS_TERMCAP_me (printf "\e[0m")
|
|
|
|
set -xU LESS_TERMCAP_se (printf "\e[0m")
|
|
|
|
set -xU LESS_TERMCAP_so (printf "\e[01;44;33m")
|
|
|
|
set -xU LESS_TERMCAP_ue (printf "\e[0m")
|
|
|
|
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
|
|
|
|
|
2019-12-02 19:54:25 +01:00
|
|
|
#}}}
|
|
|
|
# vim:foldmethod=marker
|