Advertisement
Dj_Dexter

.zshrc

Nov 26th, 2011
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.41 KB | None | 0 0
  1. # Created by newuser for 4.3.10
  2. autoload -U compinit
  3. compinit
  4. #promptinit; prompt elite2
  5. setopt correct hist_ignore_all_dups hist_ignore_space
  6. #fortune | cowsay -f ~/themes/cows/ren.cow -W 55
  7. alias instalados='cd /var/db/pkg/ && for i in */*; do ls -d $i; done'
  8. function recal () {
  9.   if [ -z "$1" ]; then
  10.     echo "Uso: recal <cadena>, para buscar <cadena> en el historial de zsh."
  11.   else
  12.     history | grep "$1" | grep -v recal
  13.   fi
  14. }
  15. function radgnu () {
  16. #mplayer http://radiognu.org:8000/radiognu.ogg
  17. # mplayer http://radio.gnu.org.ve/radiognu.ogg
  18. mplayer http://audio.radiognu.org:8000/radiognu.ogg
  19. }
  20. #function radgnup () {
  21. #mplayer http://radiognu.org:8000/pruebas.ogg
  22. #}
  23. function radgnumet () {
  24. mplayer http://audio.radiognu.org/radiometagnu.ogg
  25. }
  26. function xtvradio () {
  27. mplayer http://87.117.197.145:34160/
  28. }
  29. function cooperativa () {
  30. mplayer http://209.88.205.240:80
  31. }
  32. function elconquistador () {
  33. mplayer http://72.9.254.235:8000/cqfm
  34. }
  35. function hardradio () {
  36. mplayer http://66.90.91.59:80/hardradio.mp3
  37. }
  38. function newage () {
  39. mplayer http://217.118.24.169:8006/listen.pls
  40. }
  41. function newage2 () {
  42. mplayer http://91.121.89.153:9900
  43. }
  44. function vtv () {
  45. #mplayer -vo x11 http://www.telepuertovirtual2.tv/vtvdsl
  46. mplayer -cache 9000 rtmp://movipbox.streamguys.net/vtvdsl/vtvdsl.sdp
  47. }
  48. function konatastation () {
  49. mplayer http://87.117.205.144:8320
  50. }
  51. function cleanclip () {
  52. echo Limpiando el portapapeles.....
  53. touch blank
  54. xclip -selection clipboard blank
  55. echo Portapapeles Limpio
  56. rm blank
  57. }
  58.  
  59. function canal13 () {
  60. mplayer http://streaming.entelchile.net/canal13
  61. }
  62. function aricatv () {
  63. mplayer mms://wms.digitalproserver.com/aricatv
  64. }
  65. function mp3 () {
  66. echo "Escriba la ruta en donde estan los .mp3 para reproducir"  
  67. echo "Recuerde poner *.mp3 en el la ruta de los mp3 ej: /home/foo/*.mp3"  
  68. read xD2
  69. mpg123 -C $xD2
  70. }
  71. function nmapeo () {
  72. if [ -z "$1" ]; then
  73.     echo "Uso: nmapeo <url o host>, escanea una url o host invocando a nmap ^_^"
  74.   else
  75.     nmap -T4 -A -v -PN "$1"
  76.   fi
  77. }
  78. function shot () {
  79. if [ -z "$1" ]; then
  80.    echo "Uso: shot <cadena>, saca una captura de pantalla con scrot en intervalos de 2 segundos,
  81. especificando un fichero de imagen."
  82.   else
  83.    scrot -c -d2 "$1"
  84.   fi
  85. }
  86. function compactafox () {
  87. for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM;'; done
  88. }
  89.  
  90. function screencast () {
  91. echo "Escriba el nombre de fichero para hacer el screencast"
  92. echo "Ej: screencast.avi"
  93. read rec
  94. ffmpeg -f x11grab -r 24 -s 1366x768 -i :0.0 -vcodec huffyuv -sameq $rec
  95. }
  96.  
  97. function encodear () {
  98. echo "Escriba el nombre de fichero para el encoding. Ej: xDD.avi"
  99. read origen
  100. echo "Escriba el fichero de salida. Ej: xD2.avi"
  101. read destino
  102. ffmpeg -i $origen -sameq $destino
  103. }
  104.  
  105. export HISTSIZE=2000
  106. export HISTFILE="$HOME/.history"
  107. export SAVEHIST=$HISTSIZE
  108.  
  109. echo "Quote of day: $(/usr/bin/fortune -s)"      
  110.    
  111. alias ls='ls --color=auto'
  112. # Change the window title of X terminals
  113. chpwd (){
  114.  
  115. [[ -t 1 ]] || return
  116. case ${TERM} in
  117.     xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)
  118.         echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD/$HOME/~}\007"
  119.         ;;
  120.     screen)
  121.         echo -ne "\033_${USER}@${HOST%%.*}:${PWD/$HOME/~}\033\\"
  122.         ;;
  123. esac
  124.  
  125. }
  126. use_color=false
  127. chpwd
  128. safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
  129. match_lhs=""
  130. # Try to keep environment pollution down, EPA loves us.
  131. unset use_color safe_term match_lhs
  132. #PS1
  133. PS1='%B[%n@%m:%~]%#%b '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement