aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--install.conf.yaml5
-rw-r--r--zprofile15
-rw-r--r--zsh/plugins.zsh14
-rw-r--r--zsh/wsl.zsh30
-rwxr-xr-xzshrc18
5 files changed, 40 insertions, 42 deletions
diff --git a/install.conf.yaml b/install.conf.yaml
index 2443926..a7d9cb9 100644
--- a/install.conf.yaml
+++ b/install.conf.yaml
@@ -13,9 +13,6 @@
- link:
~/.zsh:
~/.zshrc:
- ~/.zprofile:
~/.p10k.zsh:
~/.gitconfig:
- ~/.ssh/config:
- path: ssh/config
- force: false
+ ~/.ssh/config: "ssh/config"
diff --git a/zprofile b/zprofile
deleted file mode 100644
index 4094814..0000000
--- a/zprofile
+++ /dev/null
@@ -1,15 +0,0 @@
-# YubiKey - SSH
-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:$HOME/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
-fi
-
-# YubiKey - GPG
-export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent
-ss -a | grep -q $GPG_AGENT_SOCK
-if [ $? -ne 0 ]; then
- rm -rf $GPG_AGENT_SOCK
- (setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"$HOME/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
-fi
diff --git a/zsh/plugins.zsh b/zsh/plugins.zsh
new file mode 100644
index 0000000..bc2ebe4
--- /dev/null
+++ b/zsh/plugins.zsh
@@ -0,0 +1,14 @@
+source $ZSH_BASE/antigen/antigen.zsh
+
+antigen use oh-my-zsh
+antigen bundle git
+antigen bundle fzf
+antigen bundle dotnet
+antigen bundle docker
+antigen bundle docker-compose
+antigen bundle command-not-found
+antigen bundle zsh-users/zsh-syntax-highlighting
+antigen bundle zsh-users/zsh-autosuggestions
+antigen bundle memark/zsh-dotnet-completion
+antigen theme romkatv/powerlevel10k.git
+antigen apply \ No newline at end of file
diff --git a/zsh/wsl.zsh b/zsh/wsl.zsh
index 5a8c10f..d9e07d9 100644
--- a/zsh/wsl.zsh
+++ b/zsh/wsl.zsh
@@ -2,6 +2,10 @@ export PATH="${HOME}/.local/bin.win:$PATH"
hash -d w=/mnt/c/Users/$USER
alias cb=clip.exe
+antigen use oh-my-zsh
+antigen bundle ssh-agent
+antigen apply
+
function winget() {
if [[ "$1" == "install" || "$1" == "upgrade" ]]; then
powershell.exe -NoProfile -c "gsudo.exe 'winget.exe $@'"
@@ -14,15 +18,25 @@ function wt() {
powershell.exe -NoProfile -c "wt.exe $@"
}
-# YubiKey - SSH
-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:$HOME/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
-fi
+function r-copy() {
+ if ((REGION_ACTIVE)) then
+ zle copy-region-as-kill
+ (( ${+aliases[cb]} )) && printf "$CUTBUFFER" | cb
+ else
+ zle kill-whole-line
+ fi
+}
+
+function r-cut() {
+ if ((REGION_ACTIVE)) then
+ zle kill-region
+ else
+ zle kill-whole-line
+ fi
+ (( ${+aliases[cb]} )) && printf "$CUTBUFFER" | cb
+}
-# YubiKey - GPG
+# YubiKey - GPG: https://github.com/benpye/wsl-ssh-pageant
export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent
ss -a | grep -q $GPG_AGENT_SOCK
if [ $? -ne 0 ]; then
diff --git a/zshrc b/zshrc
index 8eb5ec4..23b8bf2 100755
--- a/zshrc
+++ b/zshrc
@@ -13,23 +13,11 @@ hash -d d=${HOME}/docker
[[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] && source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
-[ -n "${WSL_DISTRO_NAME+1}" ] && source $ZSH_BASE/zsh/wsl.zsh
-
source $ZSH_BASE/zsh/setopt.zsh
source $ZSH_BASE/zsh/prompt.zsh
source $ZSH_BASE/zsh/aliases.zsh
source $ZSH_BASE/zsh/keybindings.zsh
-source $ZSH_BASE/antigen/antigen.zsh
+source $ZSH_BASE/zsh/plugins.zsh
-antigen use oh-my-zsh
-antigen bundle git
-antigen bundle fzf
-antigen bundle dotnet
-antigen bundle docker
-antigen bundle docker-compose
-antigen bundle command-not-found
-antigen bundle zsh-users/zsh-syntax-highlighting
-antigen bundle zsh-users/zsh-autosuggestions
-antigen bundle memark/zsh-dotnet-completion
-antigen theme romkatv/powerlevel10k.git
-antigen apply \ No newline at end of file
+
+[ -n "${WSL_DISTRO_NAME+1}" ] && source $ZSH_BASE/zsh/wsl.zsh