summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-05-07 03:16:34 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-05-07 03:16:34 +0200
commitc4d529e5f67c4766ab5dad9f68aacaa1ccbc6382 (patch)
tree1a7ffaac81557e82a98a08faaa746d80e15086bf
parent98b0356d05253fdc76813256dd508761a635052e (diff)
reorganized.
-rwxr-xr-xbin/extra/aivpn38
-rw-r--r--config/essentials/shell/aliases.sh9
-rw-r--r--config/essentials/zsh/.zshrc9
3 files changed, 9 insertions, 47 deletions
diff --git a/bin/extra/aivpn b/bin/extra/aivpn
deleted file mode 100755
index 21436ed..0000000
--- a/bin/extra/aivpn
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-err() { printf "%s\n" "$@"; }
-
-if [ "$1" = "-k" ]
-then
- pgrep -f -- "ssh.*-L.*vm" | xargs kill
- exit
-fi
-
-err "I: Waiting for connectivity..."
-while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep "Permission denied" > /dev/null
-do sleep 1
-done
-
-
-export SSH_ASKPASS="sshpass"
-export SSH_ASKPASS_REQUIRE="prefer"
-export PASSWORD="zot/qemu"
-
-err "I: Activating vpn"
-ssh vm "rasdial \"vpn.student.ehb.be\""
-
-keyadd ehb/ai
-ssh -f -N \
- -L 2222:10.2.160.41:22 \
- vm
-
-keyadd ehb/vm_int
-ssh -f -N \
- -L 2223:10.2.160.9:22 \
- vm
-ssh -f -N \
- -L 2224:10.2.160.10:22 \
- vm
-ssh -f -N \
- -L 2225:10.2.160.11:22 \
- vm
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh
index eb48416..de441a5 100644
--- a/config/essentials/shell/aliases.sh
+++ b/config/essentials/shell/aliases.sh
@@ -169,7 +169,14 @@ alias wgdown='doas wg-quick down wg0'
alias npi="npm init --yes"
# Python
-alias penv='python3 -m venv env'
+
+if which uv > /dev/null 2>&1
+then
+ alias penv='uv venv env'
+ alias pip='uv pip'
+else
+ alias penv='python3 -m venv env'
+fi
alias phttp='python3 -m http.server'
alias pipreq='pip install -r requirements.txt'
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index ab66fcb..91a1618 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -110,19 +110,12 @@ bindkey -M menuselect '^xh' accept-and-hold # Hold
bindkey -M menuselect '^xn' accept-and-infer-next-history # Next
bindkey -M menuselect '^xu' undo # Undo
-space-expand-alias() {
- zle _expand_alias
- zle self-insert
-}
-zle -N space-expand-alias
-bindkey -M main ' ' space-expand-alias
-
## window title hooks
add-zsh-hook -Uz preexec () { print -n "\e]0;$1\a\033[0m"; }
add-zsh-hook -Uz precmd set_wt (){ print -Pn "\e]0;%n@%m on %~\a"; }
## automatic ls after cd
-add-zsh-hook -Uz chpwd (){ [ "$PWD" = "$HOME" ] || ls -a; }
+add-zsh-hook -Uz chpwd (){ [ "$PWD" = "$HOME" ] || ls -A; }
### Variables
## Run menuscripts with fzf