host-gray (1188B) - raw


      1 # vim: filetype=zsh
      2 
      3 alias dbanc="cd /run/media/oscar/banc && ls"
      4 alias dg="cd $HOME/Git && ls"
      5 
      6 alias vw="(cd $HOME/Documents/wiki; vim index.md)"
      7 alias dvw="cd $HOME/Documents/wiki && ls"
      8 
      9 alias autoremove="sudo pacman -Qtdq | sudo pacman -Rns -; yes | sudo pacman -Scc"
     10 alias volume="pasystray"
     11 alias display="arandr"
     12 
     13 # update system
     14 up() {
     15     if ps aux | grep -q '[c]heckupdates'; then
     16         echo "checkupdates in progress, exiting..."
     17     else
     18         yay -Syu && yes | sudo pacman -Scc
     19         pkill -RTMIN+4 dwmblocks
     20     fi
     21 }
     22 
     23 rwd() {
     24   while true; do
     25     curl -Is http://oscarbenedito.com > /dev/null || { rw; sleep 30; }
     26     sleep 30
     27   done
     28 }
     29 
     30 rw() {
     31     printf "Restarting wifi...";
     32     nmcli radio wifi off;
     33     sleep 1;
     34     nmcli radio wifi on;
     35     printf " done:  ";
     36     date +"%a %d %b, %H:%M";
     37 }
     38 
     39 mount-banc() {
     40     sudo mkdir -p /run/media/oscar/banc || return
     41     sudo chown oscar:oscar /run/media/oscar/banc
     42     sshfs maroon:/media/banc /run/media/oscar/banc
     43     echo "ls /run/media/oscar"
     44     ls /run/media/oscar
     45 }
     46 
     47 umount-banc() {
     48     sudo umount /run/media/oscar/banc
     49     sudo rmdir /run/media/oscar/banc
     50     echo "ls /run/media/oscar"
     51     ls /run/media/oscar
     52 }