mirror of
https://github.com/Phantop/dotfiles
synced 2025-04-01 07:16:59 +00:00
Add fisher and pure to fish
This commit is contained in:
parent
94b558a822
commit
ff527b1770
1
.config/fish/conf.d/fisher.fish
Normal file
1
.config/fish/conf.d/fisher.fish
Normal file
|
@ -0,0 +1 @@
|
|||
fisher copy-user-key-bindings
|
|
@ -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
1
.config/fish/fishfile
Normal file
|
@ -0,0 +1 @@
|
|||
rafaelrinaldi/pure
|
27
.config/fish/functions/__format_time.fish
Normal file
27
.config/fish/functions/__format_time.fish
Normal 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
|
3
.config/fish/functions/__parse_current_folder.fish
Normal file
3
.config/fish/functions/__parse_current_folder.fish
Normal file
|
@ -0,0 +1,3 @@
|
|||
function __parse_current_folder -d "Replace '$HOME' with '~'"
|
||||
string replace $HOME '~' $PWD
|
||||
end
|
4
.config/fish/functions/__parse_git_branch.fish
Normal file
4
.config/fish/functions/__parse_git_branch.fish
Normal 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
|
5
.config/fish/functions/__pure_set_default.fish
Normal file
5
.config/fish/functions/__pure_set_default.fish
Normal file
|
@ -0,0 +1,5 @@
|
|||
function __pure_set_default -S -a var default
|
||||
if not set -q $var
|
||||
set -g $var $default
|
||||
end
|
||||
end
|
3
.config/fish/functions/fish_right_prompt.fish
Normal file
3
.config/fish/functions/fish_right_prompt.fish
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Removes right prompt
|
||||
function fish_right_prompt
|
||||
end
|
Loading…
Reference in a new issue