From f5c787af2cd45d080dc28f6c1dfa2d277fd1ed4b Mon Sep 17 00:00:00 2001 From: Luna Komorebi Date: Sat, 8 Apr 2023 00:35:03 +0200 Subject: [PATCH] Add maskedpw script and move nvidia-vsync and touchpad.sh scripts to bin directory, and install all executables in bin directory to $HOME/.local/bin directory --- bin/maskedpw | 6 ++++++ {.local/scripts => bin}/nvidia-vsync | 0 {.local/scripts => bin}/touchpad.sh | 0 install.zsh | 6 ++++++ 4 files changed, 12 insertions(+) create mode 100644 bin/maskedpw rename {.local/scripts => bin}/nvidia-vsync (100%) rename {.local/scripts => bin}/touchpad.sh (100%) diff --git a/bin/maskedpw b/bin/maskedpw new file mode 100644 index 0000000..6003002 --- /dev/null +++ b/bin/maskedpw @@ -0,0 +1,6 @@ +#!/bin/zsh +read -r pass +exec <&2 +while echo -n '$ '; read idx; do + echo "${pass[$idx]}" +done diff --git a/.local/scripts/nvidia-vsync b/bin/nvidia-vsync similarity index 100% rename from .local/scripts/nvidia-vsync rename to bin/nvidia-vsync diff --git a/.local/scripts/touchpad.sh b/bin/touchpad.sh similarity index 100% rename from .local/scripts/touchpad.sh rename to bin/touchpad.sh diff --git a/install.zsh b/install.zsh index c3fe7f1..01d9104 100755 --- a/install.zsh +++ b/install.zsh @@ -28,4 +28,10 @@ if [ -n "${NPM_CONFIG_PREFIX}" ]; then sed -i "s%\# export NPM_CONFIG_PREFIX=\"\"%export NPM_CONFIG_PREFIX=\"$NPM_CONFIG_PREFIX\"%g" $HOME/.zsh/env.zsh fi cp -v .tmux.conf ~/.tmux.conf + +echo "[*] installing executables" +find bin -type f | while read -r file; do + install $file $(echo $file | sed "s|bin|$HOME/.local/bin|") +done + source $HOME/.zshrc