From 709542f2011784e2da48405a0972ee46705033b8 Mon Sep 17 00:00:00 2001 From: ryo Date: Thu, 31 Oct 2024 17:08:48 +0000 Subject: Fixed: major bugs and bad file names --- config/shell/alias | 60 ---------------------------------------------------- config/shell/aliases | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ config/shell/func | 24 --------------------- config/shell/funcs | 24 +++++++++++++++++++++ 4 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 config/shell/alias create mode 100644 config/shell/aliases delete mode 100644 config/shell/func create mode 100644 config/shell/funcs (limited to 'config/shell') diff --git a/config/shell/alias b/config/shell/alias deleted file mode 100644 index 0b6287a..0000000 --- a/config/shell/alias +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env zsh - -# Ryo aliases -# https://ryo.nopwd.lol -# -# fork of Luke's config -# https://github.com/lukesmithxyz/voidrice - -# only if variables exists -[ -f "$XINITRC" ] && alias startx="startx $XINITRC" -[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" - -# be careful -alias \ - cp="cp -i" \ - mv="mv -i" \ - rm="rm -I" \ - bc="bc -ql" \ - d='doas' - -# colorize commands when possible. -alias \ - ls="ls -hN --color=auto --group-directories-first" \ - grep="grep --color=auto" \ - diff="diff --color=auto" \ - ccat="highlight --out-format=ansi" \ - ip="ip -color=auto" - -# Arch pacman -alias \ - p="pacman" \ - pacins='doas pacman -S' \ - pacinf='pacman -Si' \ - pacsch='pacman -Ss' - -# Void xbps -alias \ - xi="doas xbps-install" \ - xr="sudo xbps-remove -R" \ - xq="xbps-query" - - -alias \ - ll='ls -lh' \ - g="git" \ - i='nsxiv' \ - v="$EDITOR" \ - re='source $ZDOTDIR/.zshrc' \ - a='mpv --no-video' \ - mkd="mkdir -pv" \ - hmpv='mpv --really-quiet' \ - hcurl='curl -L -O' \ - hgit='git clone --depth=1 --no-tags --single-branch' \ - hfont='fc-list | grep -i' \ - hfind='find . -name' \ - xclip='xclip -selection clipboard -r' \ - idate='TZ=Iran date' \ - hxkb='setxkbmap -option caps:swapescape -layout us,ir -option grp:shifts_toggle' \ - ffmpeg="ffmpeg -hide_banner" - diff --git a/config/shell/aliases b/config/shell/aliases new file mode 100644 index 0000000..0b6287a --- /dev/null +++ b/config/shell/aliases @@ -0,0 +1,60 @@ +#!/usr/bin/env zsh + +# Ryo aliases +# https://ryo.nopwd.lol +# +# fork of Luke's config +# https://github.com/lukesmithxyz/voidrice + +# only if variables exists +[ -f "$XINITRC" ] && alias startx="startx $XINITRC" +[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" + +# be careful +alias \ + cp="cp -i" \ + mv="mv -i" \ + rm="rm -I" \ + bc="bc -ql" \ + d='doas' + +# colorize commands when possible. +alias \ + ls="ls -hN --color=auto --group-directories-first" \ + grep="grep --color=auto" \ + diff="diff --color=auto" \ + ccat="highlight --out-format=ansi" \ + ip="ip -color=auto" + +# Arch pacman +alias \ + p="pacman" \ + pacins='doas pacman -S' \ + pacinf='pacman -Si' \ + pacsch='pacman -Ss' + +# Void xbps +alias \ + xi="doas xbps-install" \ + xr="sudo xbps-remove -R" \ + xq="xbps-query" + + +alias \ + ll='ls -lh' \ + g="git" \ + i='nsxiv' \ + v="$EDITOR" \ + re='source $ZDOTDIR/.zshrc' \ + a='mpv --no-video' \ + mkd="mkdir -pv" \ + hmpv='mpv --really-quiet' \ + hcurl='curl -L -O' \ + hgit='git clone --depth=1 --no-tags --single-branch' \ + hfont='fc-list | grep -i' \ + hfind='find . -name' \ + xclip='xclip -selection clipboard -r' \ + idate='TZ=Iran date' \ + hxkb='setxkbmap -option caps:swapescape -layout us,ir -option grp:shifts_toggle' \ + ffmpeg="ffmpeg -hide_banner" + diff --git a/config/shell/func b/config/shell/func deleted file mode 100644 index 7788689..0000000 --- a/config/shell/func +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env zsh - -proxy_connect=0 -toggle_proxy() { - if [[ "$proxy_connect" -eq 0 ]]; then - export http_proxy="http://127.0.0.1:2081" - export https_proxy=$http_proxy - proxy_connect=1 - echo "vpn activated" - else - unset http_proxy - unset https_proxy - proxy_connect=0 - echo "vpn deactivated" - fi -} - -generate_pass() { - local len=8 - if [ $# -eq 1 ]; then - len=$1 - fi - tr -cd '[:graph:]' < /dev/urandom | head -c $len | xargs -0 -} diff --git a/config/shell/funcs b/config/shell/funcs new file mode 100644 index 0000000..7788689 --- /dev/null +++ b/config/shell/funcs @@ -0,0 +1,24 @@ +#!/usr/bin/env zsh + +proxy_connect=0 +toggle_proxy() { + if [[ "$proxy_connect" -eq 0 ]]; then + export http_proxy="http://127.0.0.1:2081" + export https_proxy=$http_proxy + proxy_connect=1 + echo "vpn activated" + else + unset http_proxy + unset https_proxy + proxy_connect=0 + echo "vpn deactivated" + fi +} + +generate_pass() { + local len=8 + if [ $# -eq 1 ]; then + len=$1 + fi + tr -cd '[:graph:]' < /dev/urandom | head -c $len | xargs -0 +} -- cgit v1.2.3