mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
Move all functions into seperate folder and source them
This commit is contained in:
parent
ebcab5a04d
commit
76c9a4a447
5
conf.d/lean_source.fish
Normal file
5
conf.d/lean_source.fish
Normal file
@ -0,0 +1,5 @@
|
||||
if not test -e "$__fish_config_dir/functions/fish_prompt.fish"
|
||||
for file in $__fish_config_dir/lean_theme/*
|
||||
source $file
|
||||
end
|
||||
end
|
11
install.fish
11
install.fish
@ -1,12 +1,15 @@
|
||||
echo "Installing lean theme..."
|
||||
|
||||
# -----------------Download Functions-----------------
|
||||
set fns fish_prompt lean_git_prompt lean_pwd lean_uninstall user_ask
|
||||
set githubFnsDir "https://raw.githubusercontent.com/IlanCosman/lean/master/functions"
|
||||
set tempDir "/tmp/lean_theme"
|
||||
set deleteThese install.fish README.md
|
||||
|
||||
for fn in $fns
|
||||
wget -q "$githubFnsDir/$fn.fish" -O "$__fish_config_dir/functions/$fn.fish"
|
||||
rm -rf $tempDir
|
||||
git clone -q --depth=1 https://github.com/IlanCosman/lean.git $tempDir
|
||||
for file in $deleteThese
|
||||
rm "$tempDir/$file"
|
||||
end
|
||||
cp -r $tempDir $__fish_config_dir
|
||||
|
||||
# ----------------Set Theme Variables----------------
|
||||
# --------------Colors--------------
|
||||
|
@ -1,13 +1,10 @@
|
||||
function lean_uninstall
|
||||
if user_ask "Unininstall lean theme?" y/N
|
||||
echo "Uninstalling lean theme..."
|
||||
|
||||
# ------------------Remove Functions------------------
|
||||
set fns fish_prompt lean_git_prompt lean_pwd lean_uninstall user_ask
|
||||
|
||||
for fn in $fns
|
||||
rm "$__fish_config_dir/functions/$fn.fish"
|
||||
end
|
||||
# ------------------Remove Functions------------------
|
||||
rm "$__fish_config_dir/conf.d/lean_source.fish"
|
||||
rm -r "$__fish_config_dir/lean_theme/"
|
||||
|
||||
# ---------------Erase Theme Variables---------------
|
||||
# --------------Colors--------------
|
Loading…
Reference in New Issue
Block a user