Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2016
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. #! /bin/bash
  2. # +------------------------------------------------------------+
  3. # | MerMouY mermouy[at]gmail[dot]com
  4. # |
  5. # | This program is free software; you can redistribute it and/or
  6. # | modify it under the terms of the GNU General Public License
  7. # | as published by the Free Software Foundation; either version
  8. # | 3 of the License, or (at your option) any later version.
  9. # |
  10. # | This program is distributed in the hope that it will be useful,
  11. # | but WITHOUT ANY WARRANTY; without even the implied warranty
  12. # | of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. # | See the GNU General Public License for more details.
  14. # |
  15. # | You should have received a copy of the GNU General Public
  16. # | License along with this program; if not, write to the
  17. # | Free Software Foundation, Inc., 51 Franklin St,
  18. # | Fifth Floor, Boston, MA 02110-1301 USA
  19. # +------------------------------------------------------------+
  20. #Simple man command layout with yad
  21. brows="x-www-browser -new-tab"
  22. asked="$1"
  23. help="Yaman need an argument to open a page"
  24. while [ ! -n "$asked" ]
  25. do asked=$(yad --text="$help enter the command you'd like to read: " --entry --title="Yaman" --width=300 --height=150 --image=gtk-help --image-on-top --center --window-icon="gtk-help" --separator="\n")
  26. if [ "$?" = "1" ]
  27. then
  28. exit 1
  29. fi
  30. done
  31. man $asked | yad --text-info --title="Yaman: $asked, page de manuel" --width=900 --height=800 --button=Quit:0 --button="Send to browser":1 --image=gtk-help --image-on-top --center --window-icon="gtk-help"
  32. case $? in
  33. 1) $brows "man $asked" & exit 0 ;;
  34. 252|0) exit 0 ;;
  35. esac
  36. done
  37. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement