diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/aliases.sh | 10 | ||||
-rw-r--r-- | shell/gpg.sh | 44 | ||||
-rw-r--r-- | shell/profile.sh | 6 | ||||
-rw-r--r-- | shell/wsl.sh | 30 |
4 files changed, 0 insertions, 90 deletions
diff --git a/shell/aliases.sh b/shell/aliases.sh deleted file mode 100644 index 6505a39..0000000 --- a/shell/aliases.sh +++ /dev/null @@ -1,10 +0,0 @@ -# Aliases -alias update="sudo apt update && apt list --upgradable" -alias upgrade="sudo apt upgrade -y" -alias ipa="ip -s -c -h a" -alias untar="tar -zxvf " -alias py=python3 -alias python=python3 -alias pip=pip3 -alias dsh="dce sh" -alias dps="docker ps" diff --git a/shell/gpg.sh b/shell/gpg.sh deleted file mode 100644 index ea87d05..0000000 --- a/shell/gpg.sh +++ /dev/null @@ -1,44 +0,0 @@ -# https://github.com/benpye/wsl-ssh-pageant -# https://github.com/drduh/YubiKey-Guide#remote-host-configuration -# https://dev.to/dzerycz/series/11353 - -# SSH Socket -# Removing Linux SSH socket and replacing it by link to wsl2-ssh-pageant socket -export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock -ss -a | grep -q $SSH_AUTH_SOCK -if [ $? -ne 0 ]; then - rm -f $SSH_AUTH_SOCK - (setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$DOTFILES/ssh/wsl2-ssh-pageant.exe" &>/dev/null &) -fi - - -# GPG Socket -# Removing Linux GPG Agent socket and replacing it by link to wsl2-ssh-pageant GPG socket -export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent - -export GPG_SOCKETS=("${GPG_AGENT_SOCK}" "${GPG_AGENT_SOCK}.extra" "${GPG_AGENT_SOCK}.ssh") - -for socket in "${GPG_SOCKETS[@]}"; do - ss -a | grep -q $socket - if [ $? -ne 0 ]; then - rm -rf $socket - (setsid nohup socat UNIX-LISTEN:$socket,fork EXEC:"$DOTFILES/ssh/wsl2-ssh-pageant.exe --gpg $(basename $socket)" &>/dev/null &) - fi -done - - -alias gpgrst=gpg-reset -# Reload -function gpg-reset() { - gpg-connect-agent.exe KILLAGENT /bye &>/dev/null - - for socket in "${GPG_SOCKETS[@]}"; do - [ -e $socket ] && rm $socket - done - pkill -f 'socat.*wsl2-ssh-pageant.exe' - gpg-connect-agent.exe /bye &>/dev/null - - for socket in "${GPG_SOCKETS[@]}"; do - (setsid nohup socat UNIX-LISTEN:$socket,fork EXEC:"$DOTFILES/ssh/wsl2-ssh-pageant.exe --gpg $(basename $socket)" &>/dev/null &) - done -} diff --git a/shell/profile.sh b/shell/profile.sh deleted file mode 100644 index bde5867..0000000 --- a/shell/profile.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Path -PATH=$PATH:$HOME/.local/bin:$HOME/.dotnet/tools:$HOME/.cargo/bin - -# Exports -export DOTFILES="${HOME}/dotfiles" -export FZF_BASE="${HOME}/dotfiles/fzf"
\ No newline at end of file diff --git a/shell/wsl.sh b/shell/wsl.sh deleted file mode 100644 index 4a876df..0000000 --- a/shell/wsl.sh +++ /dev/null @@ -1,30 +0,0 @@ -export EDITOR=code - -alias cb=clip.exe -alias wsl=wsl.exe -alias ykman="/mnt/c/Program\ Files/Yubico/YubiKey\ Manager/ykman.exe" - -function wt() { powershell.exe -NoProfile -c "wt $@" } - -function winget() { - cmd="winget.exe $1" - shift # past cmd - - while [[ $# -gt 0 ]] - do - key="$1" - case $key in - -*) # key value pair - cmd+=" $key '$2'" - shift # past argument - shift # past value - ;; - *) # positional argument - cmd+=" '$1'" # add it to the list - shift # past argument - ;; - esac - done - - powershell.exe -NoProfile -c "$cmd" -}
\ No newline at end of file |