dotfiles

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

welcome.zsh (612B)


      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 	if [[ ${PTS} -eq "2" ]] ; then
     19 		audio_vol
     20 		hashwall -f '#131313' -b '#1e1b1c'  -s 12
     21 		xrandr --output HDMI-2 --primary --output DVI-D-1 --rotate left
     22 		tmux new -s main -n 'vim'
     23 		[[ ${TMUX_PANE} == "%0" ]] && $HOME/bin/ahoy
     24 	fi
     25 }
     26 
     27 set -o vi
     28 script