Add fisher and pure to fish

This commit is contained in:
Phantop 2018-11-14 20:10:13 -05:00
parent 94b558a822
commit ff527b1770
8 changed files with 44 additions and 18 deletions

View File

@ -0,0 +1 @@
fisher copy-user-key-bindings

View File

@ -1,18 +0,0 @@
switch (tty)
case "/dev/tty1"
tbsm
end
# THEME PURE #
set fish_function_path /home/glados/.config/fish/functions/theme-pure $fish_function_path
set -U fish_user_paths /usr/local/bin
set -Ux ANDROID_HOME /mnt/LocalDiskD/Source/android/sdk
set -Ux EDITOR nvim
set -Ux D /mnt/LocalDiskD
set -Ux FZF_DEFAULT_COMMAND 'ff'
set -Ux PAGER "nvim -c 'set ft=man' -"
source /usr/share/autojump/autojump.fish
xrdb ~/.Xresources

1
.config/fish/fishfile Normal file
View File

@ -0,0 +1 @@
rafaelrinaldi/pure

View File

@ -0,0 +1,27 @@
function __format_time -d "Format milliseconds to a human readable format"
set -l milliseconds $argv[1]
set -l seconds (math "$milliseconds / 1000 % 60")
set -l minutes (math "$milliseconds / 60000 % 60")
set -l hours (math "$milliseconds / 3600000 % 24")
set -l days (math "$milliseconds / 86400000")
set -l time
set -l threshold $argv[2]
if test $days -gt 0
set time (command printf "$time%sd " $days)
end
if test $hours -gt 0
set time (command printf "$time%sh " $hours)
end
if test $minutes -gt 0
set time (command printf "$time%sm " $minutes)
end
if test $seconds -gt $threshold
set time (command printf "$time%ss " $seconds)
end
echo -e $time
end

View File

@ -0,0 +1,3 @@
function __parse_current_folder -d "Replace '$HOME' with '~'"
string replace $HOME '~' $PWD
end

View File

@ -0,0 +1,4 @@
function __parse_git_branch -d "Parse current Git branch name"
command git symbolic-ref --short HEAD ^/dev/null;
or echo (command git show-ref --head -s --abbrev HEAD)[1]
end

View File

@ -0,0 +1,5 @@
function __pure_set_default -S -a var default
if not set -q $var
set -g $var $default
end
end

View File

@ -0,0 +1,3 @@
# Removes right prompt
function fish_right_prompt
end