Updating PKGBUILD; restructuring some aliases & functions
This commit is contained in:
@@ -1,6 +1,33 @@
|
|||||||
### AniNIX Customizations ###
|
### AniNIX Customizations ###
|
||||||
|
|
||||||
|
IFS="
|
||||||
|
"
|
||||||
|
# Text
|
||||||
|
alias vi=vim
|
||||||
|
alias view="vim -R"
|
||||||
|
alias notepad="vim -c 'set nonumber' -c 'startinsert'"
|
||||||
|
alias sedws='sed -i -e "s/\s\+$//"'
|
||||||
|
|
||||||
|
# Metrics & Tools
|
||||||
alias get-commands='for i in $( echo $PATH | sed "s/:/\n/g"); do ls $i; done | sort | less'
|
alias get-commands='for i in $( echo $PATH | sed "s/:/\n/g"); do ls $i; done | sort | less'
|
||||||
alias whoison='who | grep -v tmux'
|
alias whoison='who | grep -v tmux'
|
||||||
|
alias top="top -o %CPU"
|
||||||
|
alias ethstat='curl rate.sx'
|
||||||
|
alias ncattest='ncat -vti 3 -w 3 -e "/bin/cat /dev/null"'
|
||||||
|
alias rdns="dig +short -x "
|
||||||
|
alias dns="dig +short "
|
||||||
|
|
||||||
|
# Development
|
||||||
|
alias make-entrypoints="grep -E '^[a-zA-Z0-9\-]*:' Makefile"
|
||||||
|
function calc() {
|
||||||
|
echo $(( $@ ))
|
||||||
|
}
|
||||||
|
|
||||||
|
# User environment
|
||||||
|
export WEECHAT_HOME=$HOME/.weechat
|
||||||
|
if [ -x `which torsocks 2>/dev/null` ] && [ `systemctl status tor 2>/dev/null| grep -c running` -eq 1 ]; then
|
||||||
|
alias tor-lynx="torsocks elinks https://check.torproject.org/";
|
||||||
|
fi
|
||||||
function vncdesktop() {
|
function vncdesktop() {
|
||||||
set -x
|
set -x
|
||||||
if [ -z "$@" ]; then
|
if [ -z "$@" ]; then
|
||||||
@@ -14,15 +41,7 @@ function vncdesktop() {
|
|||||||
vncserver -kill "$DISPLAY"
|
vncserver -kill "$DISPLAY"
|
||||||
set +x
|
set +x
|
||||||
}
|
}
|
||||||
alias vi=vim
|
alias stopvnc="vncserver -kill :1"
|
||||||
alias view="vim -R"
|
if [ -n "$DISPLAY" ]; then
|
||||||
alias top="top -o %CPU"
|
alias cb='xclip -i -sel clip'
|
||||||
alias make-entrypoints="grep -E '^[a-zA-Z0-9\-]*:' Makefile"
|
|
||||||
alias rdns="dig +short -x "
|
|
||||||
alias dns="dig +short "
|
|
||||||
export WEECHAT_HOME=$HOME/.weechat
|
|
||||||
if [ -x `which torsocks 2>/dev/null` ] && [ `systemctl status tor 2>/dev/null| grep -c running` -eq 1 ]; then
|
|
||||||
alias tor-lynx="torsocks lynx https://check.torproject.org/";
|
|
||||||
fi
|
fi
|
||||||
IFS="
|
|
||||||
"
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
source /etc/profile.d/shadowarch-shell-environment.sh
|
source /etc/profile.d/shadowarch-shell-environment.sh
|
||||||
export ANSIBLE_VAULT_PASSWORD_FILE=$HOME/password-store/${organization}.vault.password
|
export ANSIBLE_VAULT_PASSWORD_FILE=$HOME/password-store/${organization}.vault.password
|
||||||
export ANSIBLE_VAULT_FILE=$HOME/password-store/${organization}.vault
|
export ANSIBLE_VAULT_FILE=$HOME/password-store/${organization}.vault
|
||||||
alias ansible="/usr/bin/ansible -e @${ANSIBLE_VAULT_FILE}"
|
alias ansible='/usr/bin/ansible -e @${ANSIBLE_VAULT_FILE}'
|
||||||
alias ansible-playbook="/usr/bin/ansible-playbook -e @${ANSIBLE_VAULT_FILE}"
|
alias ansible-playbook='/usr/bin/ansible-playbook -e @${ANSIBLE_VAULT_FILE}'
|
||||||
alias vault="/usr/bin/ansible-vault edit ${ANSIBLE_VAULT_FILE}"
|
alias vault='/usr/bin/ansible-vault edit ${ANSIBLE_VAULT_FILE}'
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ if [ -n "$SSH_CLIENT" ]; then
|
|||||||
tmux list-sessions
|
tmux list-sessions
|
||||||
fi
|
fi
|
||||||
alias tat="exec tmux a -d -t"
|
alias tat="exec tmux a -d -t"
|
||||||
fi;
|
function tssh() {
|
||||||
|
tmux new-window -n "$1" "/bin/bash -i -l -c ssh\ $1"
|
||||||
|
tmux select-window -t "$1"
|
||||||
|
}
|
||||||
|
fi;
|
||||||
|
|
||||||
### XFCE4 ###
|
### XFCE4 ###
|
||||||
elif [ `who -m | grep -E "^$(whoami)" | awk '{ print $2; }' | grep -E -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ] && [ `pgrep -ac xinit` -eq 0 ] && [ `whoami` != 'root' ]; then
|
elif [ `who -m | grep -E "^$(whoami)" | awk '{ print $2; }' | grep -E -c "^tty"` -eq 1 ] && [ -x /usr/sbin/startxfce4 ] && [ `pgrep -ac xinit` -eq 0 ] && [ `whoami` != 'root' ]; then
|
||||||
|
|||||||
@@ -14,11 +14,6 @@ if [ -n "$SSH_AUTH_SOCK" ] && [ `ssh-add -L | grep -c no\ identities` -eq 1 ]; t
|
|||||||
ssh-add -L
|
ssh-add -L
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tmux help
|
|
||||||
function tssh () {
|
|
||||||
tmux new-window -n "$1" "/bin/bash -ilc 'ssh $1'"
|
|
||||||
}
|
|
||||||
|
|
||||||
### GIT ###
|
### GIT ###
|
||||||
source /usr/share/git/completion/git-prompt.sh
|
source /usr/share/git/completion/git-prompt.sh
|
||||||
|
|
||||||
|
|||||||
6
PKGBUILD
6
PKGBUILD
@@ -3,12 +3,8 @@ makedepends=('make>=4.2')
|
|||||||
checkdepends=()
|
checkdepends=()
|
||||||
optdepends=()
|
optdepends=()
|
||||||
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')"
|
pkgname="$(git config remote.origin.url | rev | cut -f 1 -d '/' | rev | sed 's/.git$//')"
|
||||||
pkgver="$(git describe --tag --abbrev=0)"."$(git rev-parse --short HEAD)"
|
pkgver="$(git describe --tag --abbrev=0)"."$(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 ))"."$(git rev-parse --short HEAD)"
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgrel() {
|
|
||||||
echo $(( `git log "$(git describe --tag --abbrev=0)"..HEAD | grep -c commit` + 1 ))
|
|
||||||
}
|
|
||||||
epoch="$(git log | grep -c commit)"
|
|
||||||
pkgdesc="$(head -n 1 README.md)"
|
pkgdesc="$(head -n 1 README.md)"
|
||||||
arch=("x86_64")
|
arch=("x86_64")
|
||||||
url="$(git config remote.origin.url | sed 's/.git$//')"
|
url="$(git config remote.origin.url | sed 's/.git$//')"
|
||||||
|
|||||||
Reference in New Issue
Block a user