diff options
Diffstat (limited to 'misc/.bashrc')
-rw-r--r-- | misc/.bashrc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/misc/.bashrc b/misc/.bashrc index 4f337ca..e964fbd 100644 --- a/misc/.bashrc +++ b/misc/.bashrc @@ -185,6 +185,7 @@ then alias pQi="pacman -Qi" # local package details alias pQl="pacman -Ql" # local package file lists alias pQo="pacman -Qo" # which package owns this file + alias pQc="pacman -Qc" # show changelog # Remove packages alias pRs="sudo pacman -Rs" # remove package @@ -195,8 +196,24 @@ then # Clear cache alias pcache1="sudo paccache -rk 1" # remove cache except last item alias pcache0="sudo paccache -ruk0" # remove all cache + + # make an aur package + paur () { + pkg_name="${1%.tar.gz}" + tar xvf "$pkg_name.tar.gz" + cd "$pkg_name" + makepkg + } fi +alias systart="sudo systemctl start" +alias systop="sudo systemctl stop" +alias sysnow="sudo systemctl enable --now" +alias sysdis="sudo systemctl disable" +alias systat="systemctl status" +alias sysres="sudo systemctl restart" +alias sysrelo="sudo systemctl reload" + # from ~/.bashrc_local, more aliases if [[ $(type -t my_local_aliases) == function ]]; then my_local_aliases @@ -253,3 +270,15 @@ export CVS_RSH="ssh" if [[ $(type -t my_local_export) == function ]]; then my_local_export fi + +# ghostscript, extract pages into a new file +# gs-extract 4 11 page-4-thru-11.pdf original.pdf +gs-extract() { + gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dFirstPage=$1 -dLastPage=$2 \ + -sOutputFile=$3 $4 +} + +# ghostscript, merge files: gs-merge merged.pdf 1.pdf 2.pdf +gs-merge() { + gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$* +} |