mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-17 20:52:09 -08:00
feat: add vault quick access script
This commit is contained in:
parent
39f97db4cc
commit
4751bb8358
1 changed files with 19 additions and 0 deletions
|
@ -60,4 +60,23 @@
|
|||
text/html; ${pkgs.w3m}/bin/w3m %s; nametemplate=%s.html; needsterminal
|
||||
text/html; ${pkgs.w3m}/bin/w3m -v -F -T text/html -dump %s; copiousoutput
|
||||
'';
|
||||
|
||||
programs.fish.functions = {
|
||||
vault = ''
|
||||
set vault_dir $HOME/Documents/vaults/vault
|
||||
|
||||
if test -d $vault_dir
|
||||
cd $vault_dir
|
||||
git pull
|
||||
vim
|
||||
else
|
||||
echo "Vault is not yet cloned. Cloning repository now."
|
||||
mkdir -p $HOME/Documents/vaults
|
||||
cd $HOME/Documents/vaults
|
||||
git clone git@code.youwen.dev:youwen5/vault.git
|
||||
cd $vault_dir
|
||||
vim
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue