From 9b8855688aff1ee354fbaa7430f03209692ee0d0 Mon Sep 17 00:00:00 2001 From: ryo Date: Sun, 2 Mar 2025 14:18:20 +0000 Subject: Removed nvim and alacritty configs setup.sh: read package names from a file shell: clean up in aliases to keep it simple tmux: added two shortcuts --- config/shell/funcs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'config/shell/funcs') diff --git a/config/shell/funcs b/config/shell/funcs index 7788689..d1231bd 100644 --- a/config/shell/funcs +++ b/config/shell/funcs @@ -1,24 +1,31 @@ #!/usr/bin/env zsh -proxy_connect=0 +reload() { + source ~/.zprofile + source $ZDOTDIR/.zshrc +} + +proxy_enabled=0 +PS2=$PS1 toggle_proxy() { if [[ "$proxy_connect" -eq 0 ]]; then - export http_proxy="http://127.0.0.1:2081" + export http_proxy="http://127.0.0.1:2080" export https_proxy=$http_proxy proxy_connect=1 - echo "vpn activated" + echo "proxy enabled" + PS2=$PS1 + PS1="%{$fg[red]%}[v] $PS1" else unset http_proxy unset https_proxy proxy_connect=0 - echo "vpn deactivated" + echo "proxy disabled" + PS1=$PS2 fi } generate_pass() { local len=8 - if [ $# -eq 1 ]; then - len=$1 - fi + [ $# -eq 1 ] && len=$1 tr -cd '[:graph:]' < /dev/urandom | head -c $len | xargs -0 } -- cgit v1.2.3