1#!/bin/sh 2#- 3# Copyright (c) 2012-2013 Devin Teske 4# All Rights Reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/usr.sbin/bsdconfig/mouse/type 251236 2013-06-01 23:58:44Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." "$0" 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/mustberoot.subr --- 46 unchanged lines hidden (view full) --- 82 logitech) defaultitem="5 $msg_logitech" ;; 83 microsoft) defaultitem="6 $msg_microsoft" ;; 84 mmseries) defaultitem="7 $msg_mm_series" ;; 85 mouseman) defaultitem="8 $msg_mouseman" ;; 86 mousesystems) defaultitem="9 $msg_mousesystems" ;; 87 thinkingmouse) defaultitem="A $msg_thinkingmouse" ;; 88 esac 89 |
90 local menu_choice 91 menu_choice=$( eval $DIALOG \ |
92 --title \"\$DIALOG_TITLE\" \ 93 --backtitle \"\$DIALOG_BACKTITLE\" \ 94 --hline \"\$hline\" \ 95 --ok-label \"\$msg_ok\" \ 96 --cancel-label \"\$msg_cancel\" \ 97 --default-item \"\$defaultitem\" \ 98 --menu \"\$prompt\" \ 99 $height $width $rows \ 100 $menu_list \ 101 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 102 ) 103 local retval=$? |
104 f_dialog_menutag_store -s "$menu_choice" |
105 return $retval 106} 107 108############################################################ MAIN 109 110# Incorporate rc-file if it exists 111[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" 112 --- 13 unchanged lines hidden (view full) --- 126f_dialog_title "$msg_select_a_protocol_type_for_your_mouse" 127f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" 128f_mustberoot_init 129 130# 131# Launch application main menu 132# 133while :; do |
134 dialog_menu_main || f_die 135 f_dialog_menutag_fetch mtag |
136 |
137 case "$mtag" in 138 "1 $msg_auto") # Bus mouse, PS/2 style mouse or PnP serial mouse 139 f_sysrc_set moused_type "auto" || f_die 140 break ;; 141 "2 $msg_glidepoint") # ALPS GlidePoint pad (serial) 142 f_sysrc_set moused_type "glidepoint" || f_die 143 break ;; 144 "3 $msg_hitachi") # Hitachi tablet (serial) --- 32 unchanged lines hidden --- |