init
This commit is contained in:
27
scripts/.local/bin/direnv-create
Normal file
27
scripts/.local/bin/direnv-create
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
echo "only supply the name of the shell you want to use"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
echo "use flake ~/.flake/shells#$1" > .envrc && direnv allow
|
||||
else
|
||||
echo "using local flake"
|
||||
echo "use flake" > .envrc && direnv allow
|
||||
fi
|
||||
|
||||
if [ -d "$PWD/.git" ]; then
|
||||
echo "git dir detected..."
|
||||
grep -q ".direnv" .git/info/exclude
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "adding .direnv to exclude"
|
||||
echo ".direnv" >> .git/info/exclude
|
||||
fi
|
||||
grep -q ".envrc" .git/info/exclude
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "adding .envrc to exclude"
|
||||
echo ".envrc" >> .git/info/exclude
|
||||
fi
|
||||
fi
|
||||
7
scripts/.local/bin/tmuxpopup
Executable file
7
scripts/.local/bin/tmuxpopup
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$(tmux display-message -p -F "#{session-name}")" = "popup" ]; then
|
||||
tmux detach-client
|
||||
else
|
||||
tmux popup -d "#{pane_current_path}" -xC -yC -w90% -h90% -E "tmux attach -t popup || tmux new -s popup"
|
||||
fi
|
||||
Reference in New Issue
Block a user