Merge branch 'master' of gitee.com:klesh/dotfiles into master
This commit is contained in:
commit
3a57636111
|
@ -5,7 +5,7 @@ set -gx EDITOR nvim
|
||||||
# enable fzf completion hotkey
|
# enable fzf completion hotkey
|
||||||
set -U FZF_COMPLETE 0
|
set -U FZF_COMPLETE 0
|
||||||
# no line-wrapping, good for `docker ps`
|
# no line-wrapping, good for `docker ps`
|
||||||
set -gx LESS "-SXF"
|
set -gx LESS "-SRXF"
|
||||||
# nvm plugin
|
# nvm plugin
|
||||||
set -gx nvm_mirror http://npm.taobao.org/mirrors/node
|
set -gx nvm_mirror http://npm.taobao.org/mirrors/node
|
||||||
# change OTHER-WRITABLE color for `ls` command
|
# change OTHER-WRITABLE color for `ls` command
|
||||||
|
@ -14,15 +14,15 @@ set -gx LS_COLORS 'ow=34;42;40'
|
||||||
set -gx HIGHLIGHT_OPTIONS --style=solarized-dark
|
set -gx HIGHLIGHT_OPTIONS --style=solarized-dark
|
||||||
|
|
||||||
# tune git icon for nerdfont
|
# tune git icon for nerdfont
|
||||||
set -g __fish_git_prompt_char_upstream_ahead ">"
|
set -g __fish_git_prompt_char_upstream_ahead '>'
|
||||||
set -g __fish_git_prompt_char_upstream_behind "<"
|
set -g __fish_git_prompt_char_upstream_behind '<'
|
||||||
set -g __fish_git_prompt_char_upstream_prefix ""
|
set -g __fish_git_prompt_char_upstream_prefix ''
|
||||||
|
|
||||||
set -g __fish_git_prompt_char_stagedstate "●"
|
set -g __fish_git_prompt_char_stagedstate '●'
|
||||||
set -g __fish_git_prompt_char_dirtystate "*"
|
set -g __fish_git_prompt_char_dirtystate '*'
|
||||||
set -g __fish_git_prompt_char_untrackedfiles "+"
|
set -g __fish_git_prompt_char_untrackedfiles '+'
|
||||||
set -g __fish_git_prompt_char_conflictedstate "x"
|
set -g __fish_git_prompt_char_conflictedstate 'x'
|
||||||
set -g __fish_git_prompt_char_cleanstate "✔ "
|
set -g __fish_git_prompt_char_cleanstate '✔ '
|
||||||
|
|
||||||
function append-path-if-exists
|
function append-path-if-exists
|
||||||
if test -e $argv
|
if test -e $argv
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
|
|
||||||
function fish_right_prompt
|
function fish_right_prompt
|
||||||
set s $status
|
set s $status
|
||||||
|
set duration (math $CMD_DURATION / 1000)s
|
||||||
|
test $s -ne 0 && echo -n (set_color red) '✗' (set_color normal)
|
||||||
|
test $CMD_DURATION -gt 100 && echo -n $duration
|
||||||
|
|
||||||
|
# send desktop notification if duration greater than 3s when window is inactive
|
||||||
test -z $CMD_DURATION -o \( $CMD_DURATION -lt 3000 \) && return
|
test -z $CMD_DURATION -o \( $CMD_DURATION -lt 3000 \) && return
|
||||||
test -z $WINDOWID && return
|
test -z $WINDOWID && return
|
||||||
set active_window (xdotool getactivewindow 2>/dev/null)
|
set active_window (xdotool getactivewindow 2>/dev/null)
|
||||||
test $active_window -eq $WINDOWID && return
|
test $active_window -eq $WINDOWID && return
|
||||||
set duration (math $CMD_DURATION / 1000)s
|
|
||||||
set message (history --max=1) [$duration]
|
set message (history --max=1) [$duration]
|
||||||
notify-send (test "$s" -ne 0 && echo '--icon' error) $message
|
notify-send (test "$s" -ne 0 && echo '--icon' error) $message
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user