dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

welcome.zsh (586B)


      1 # WELCOME
      2 
      3 PTS=$(ps -U $USER | awk '{ print $2 }' | grep "pts/" | uniq | wc -l)
      4 
      5 audio_vol() {
      6 	_master="Master"
      7 	_usb="Dell USB Audio"
      8 	
      9 	if amixer | grep "$_master" >/dev/null ; then
     10 	  amixer sset "$_master" 40% >/dev/null
     11 	elif amixer | grep "$_usb" >/dev/null ; then
     12 	  amixer sset "$_usb" 25% >/dev/null
     13 	fi
     14 }
     15 
     16 # script run on first terminal
     17 script() {
     18 	cat ~/tmp/pyratebeard_ansi_md
     19 	if [[ ${PTS} -eq "2" ]] ; then
     20 		audio_vol
     21 		tmux new -s main -n '~'
     22 		hashwall -f '#131313' -b '#1e1b1c'  -s 12
     23 		if [[ ${TMUX_PANE} == '%0' ]] ; then
     24 			~/bin/ahoy
     25 		fi
     26 	fi
     27 }
     28 
     29 set -o vi
     30 script