Advertisement
due204

Notas

Jul 28th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. #! /bin/bash
  2. #
  3. # Notas Simples
  4. # Autor Original: Victor Ananjevsky <ananasik@gmail.com>, 2010
  5. # Modificado por: Due204 <due204@mail.com>, 2013
  6.  
  7. function notas_simples () {
  8.     [[ -e /tmp/notas.lock ]] && return
  9.     touch /tmp/notas.lock
  10.     yad --text-info --show-uri --geometry=400x200-0-0 --name="notas" --window-icon="text-editor" \
  11.         --title=$"Notas" --button="Guardar:0" --button="Cerrar:1" \
  12.         --editable --filename=${XDG_CACHE_HOME:-$HOME/.cache}/notas > /tmp/.notas
  13.     [[ $? -eq 0 ]] && mv /tmp/.notas ${XDG_CACHE_HOME:-$HOME/.cache}/notas
  14.     rm -f /tmp/notas.lock
  15. }
  16. export -f notas_simples
  17.  
  18. mkdir -p ${XDG_CACHE_HOME:-$HOME/.cache}
  19. touch ${XDG_CACHE_HOME:-$HOME/.cache}/notas
  20.  
  21. exec yad --notification --text=$"Notas" --image="text-editor" --command "bash -c notas_simples"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement