80 lines
2.0 KiB
Fish
80 lines
2.0 KiB
Fish
|
#
|
||
|
# 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
|
||
|
|
||
|
#}}}
|
||
|
# start sway if using tty1 {{{
|
||
|
#
|
||
|
function esway
|
||
|
clear
|
||
|
# export XDG_CURRENT_DESKTOP=Unity
|
||
|
export QT_SCALE_FACTOR=1
|
||
|
export QPA_PLATFORM=wayland
|
||
|
export QT_QPA_PLATFORM=wayland
|
||
|
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 SWAY=1
|
||
|
exec sway
|
||
|
end
|
||
|
if test $XDG_VTNR -eq 1 #faster like this
|
||
|
if systemctl -q is-active graphical.target && test ! $DISPLAY
|
||
|
esway
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# }}}
|
||
|
# use tmux{{{
|
||
|
|
||
|
if test -z "$TMUX" && test "$TERM" != "xterm-kitty"
|
||
|
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{{{
|
||
|
set SPACEFISH_PROMPT_ADD_NEWLINE false
|
||
|
set SPACEFISH_CHAR_SYMBOL '$'
|
||
|
set SPACEFISH_CHAR_SYMBOL_ROOT '#'
|
||
|
#}}}
|
||
|
# Color man pages{{{
|
||
|
# function man
|
||
|
# env \
|
||
|
# LESS_TERMCAP_md='\e[01;31m' \
|
||
|
# LESS_TERMCAP_me='\e[0m' \
|
||
|
# LESS_TERMCAP_se='\e[0m' \
|
||
|
# LESS_TERMCAP_so='\e[01;44;33m' \
|
||
|
# LESS_TERMCAP_ue='\e[0m' \
|
||
|
# LESS_TERMCAP_us='\e[01;32m' \
|
||
|
# command man "$argv"
|
||
|
# end
|
||
|
#}}}
|
||
|
# vim:foldmethod=marker
|