Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- # +------------------------------------------------------------+
- # | MerMouY mermouy[at]gmail[dot]com
- # |
- # | This program is free software; you can redistribute it and/or
- # | modify it under the terms of the GNU General Public License
- # | as published by the Free Software Foundation; either version
- # | 3 of the License, or (at your option) any later version.
- # |
- # | This program is distributed in the hope that it will be useful,
- # | but WITHOUT ANY WARRANTY; without even the implied warranty
- # | of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- # | See the GNU General Public License for more details.
- # |
- # | You should have received a copy of the GNU General Public
- # | License along with this program; if not, write to the
- # | Free Software Foundation, Inc., 51 Franklin St,
- # | Fifth Floor, Boston, MA 02110-1301 USA
- # +------------------------------------------------------------+
- #Simple man command layout with yad
- brows="x-www-browser -new-tab"
- asked="$1"
- help="Yaman need an argument to open a page"
- while [ ! -n "$asked" ]
- 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")
- if [ "$?" = "1" ]
- then
- exit 1
- fi
- done
- 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"
- case $? in
- 1) $brows "man $asked" & exit 0 ;;
- 252|0) exit 0 ;;
- esac
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement