The nx-zen nx-tools are the tools to organize your nx-zen garden. Relax and make it your new home.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
local 742be7b79e keep it short 1 week ago
home_.config/fish/conf.d nx-tools 1.0-rc1 1 week ago
home_bin minor fix 1 week ago
.nx-tools.info nx-tools version 0.9 2 weeks ago
LICENSE nx-tools version 0.9 2 weeks ago
OPTIONAL nx-tools version 0.9 2 weeks ago
OS_DEPENDENCIES minor fix 1 week ago
README keep it short 1 week ago
RECOMMENDED minor edits 1 week ago

README

#GPL-3 - See LICENSE file for copyright and license details.

#REMEMBER:
#All programs in this repository come with ABSOLUTELY NO WARRANTY.
#This is free software, and you are welcome to redistribute it.

#DEPENDENCIES:
#In fact there are none, because every tool can be replaced. This nx-zen garden is written in fish-script and
#uses some typical *nix tools. Check the OS_DEPENDENCIES list.
#Then you should decide which tools you don't like and replace them by editing the scripts.

#NOTE:
#argparse ist part of fish since version 2.7.0. If it is missing you need to build fish by yourself.

#ATTENTION: The default shebang points to /usr/local/bin/fish. To change it globally you can use for example:
#find $NX_HOME -name "*.fish" -exec sed -i '1 s:^#!.*$:#!/usr/bin/env fish:g' {} \;

#INSTALLATION:
mkdir -p <my nx-zen garden path>
cd <my nx-zen garden path>
git clone https://libregit.org/nx-zen/nx-tools

#Change the NX_HOME to <my nx-zen garden path> with a closing / (like: set -x NX_HOME "/home/<user>/garden/").
#It needs to be the full path beginning at / (not ~/...)
#Edit: home_.config/fish/conf.d/nx-rc.fish
mkdir -p ~/bin #create a home bin directory

#Add an empty home folder.
mkdir -p home

#Link the nx fish config. If you have one already you need to resolve this manually.
mkdir -p ~/.config
ln -s nx-tools/home_.config/fish ~/.config

#Start your fish shell and check out if there is something to fix. The first time you need to enter the full path.
"$NX_HOME"nx-tools/home_bin/nx-inspect.fish

#Then you should set your $EDITOR variable (and other enviroment varibles if needed).
#Replace nano with your editor of choice.
nx-project-dir.fish "$NX_HOME"local-tools ; touch "$NX_HOME"local-tools/local-rc.fish
echo 'set -x EDITOR "nano"' >> "$NX_HOME"local-tools/local-rc.fish ; source "$NX_HOME"local-tools/local-rc.fish

#USAGE EXAMPLE:

#Create a new project folder.
nx-project-dir.fish "$NX_HOME"test-tools

#Write a script and put into test-tools/home_bin and run nx-inspect.fish.
printf "#!/usr/local/bin/fish\necho hello\nexit 0" > "$NX_HOME"test-tools/home_bin/test-script1.fish
chmod 755 "$NX_HOME"test-tools/home_bin/test-script1.fish
nx-inspect.fish

#Run the script.
test-script1.fish

#Let's move the nvim config in your nx-zen garden.
mv ~/.config/nvim "$NX_HOME"test-tools/home_.config
nx-inspect.fish

#Check your folder.
nx-overview.fish

#You can just move your folders and files around and run nx-inspect.fish.
#Don't forget nx-inspect.fish will only have a maxdepth of 1 when searching for files and folders to link.
nx-project-dir.fish "$NX_HOME"editor-tools
mv "$NX_HOME"test-tools/home_.config/nvim "$NX_HOME"editor-tools/home_.config/

#Now you can remove the test-tools folder and fix everything.
rm -Rf "$NX_HOME"test-tools
nx-inspect.fish

#If you want to move a script to another tools-folder and want to change the prefix you can use the nx-mv-bins.fish srcipt.
#Remember to give the link location as the argument.

#DONATIONS
#BTC: bc1qx7cp9s6py4479ypq2jjps6qc9mxw97zds4je84