X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-quickconfig;h=e3293f71e95818655ceeb56595b868bc49368381;hb=3ea919536020cb5fcfac3e044bddf9b720d0ee04;hp=aef071a60689382d118cf1e0762d47bdbadf1d43;hpb=4b2b3142ab74d280149780a3e466db0038291054;p=grml-scripts-core.git diff --git a/usr_sbin/grml-quickconfig b/usr_sbin/grml-quickconfig index aef071a..e3293f7 100755 --- a/usr_sbin/grml-quickconfig +++ b/usr_sbin/grml-quickconfig @@ -4,13 +4,12 @@ # Authors: Michael Schierl , Alexander Wirt # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Apr 12 13:47:04 CEST 2007 [mika] +# Latest change: Fre Jun 22 23:05:01 CEST 2007 [mika] ################################################################################ # menu with quick config options use Term::ReadKey; -use Time::HiRes; # enable alternate charset support (needed for screen) print "\e(B\e)0"; @@ -57,8 +56,8 @@ $HLINE=$B."x".$N; # A single horizontal line drawing character v => 'fvwm', 2 => 'fvwm2', c => 'fvwm-crystal', - i => 'ion3', j => 'jwm', + o => 'openbox', p => 'pekwm', 3 => 'pwm3', r => 'ratpoison', @@ -100,10 +99,9 @@ while(1) { EOF print "Press a key: ".$M; ReadMode 4; # Turn off controls keys - while (not defined ($x = ReadKey(-1))) { - # No key yet - Time::HiRes::sleep(0.5); - } + $flags = fcntl(STDIN, F_GETFL, 0) or die "Can't get flags for STDIN: $!\n"; + $flags = fcntl(STDIN, F_SETFL, $flags & ~O_NONBLOCK) or die "Can't set flags for STDIN: $!\n"; + while (not defined ($x = ReadKey(0))) {} ReadMode 0; # Reset tty mode before exiting print $N.$/.$/; @@ -118,18 +116,17 @@ EOF $HLINE Select a window manager (unsorted list): $HLINE $HLINE Press any other key to return to the main menu. $HLINE ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N} - $HLINE ${W}d${N}wm ${W}e${N}vilwm ${W}f${N}luxbox f${W}v${N}wm fvwm${W}2${N} fvwm-${W}c${N}rystal ion${W}3 ${N}$HLINE - $HLINE ${W}j${N}wm pe${W}k${N}wm ${W}p${N}wm3 ${W}t${N}wm ${W}r${N}atpoison w${W}9${N}wm ${W}w${N}indowlab ${N}$HLINE + $HLINE ${W}d${N}wm ${W}e${N}vilwm ${W}f${N}luxbox f${W}v${N}wm fvwm${W}2${N} fvwm-${W}c${N}rystal ${W}d${N}wm ${N}$HLINE + $HLINE ${W}o${N}penbox pe${W}k${N}wm ${W}p${N}wm3 ${W}t${N}wm ${W}r${N}atpoison w${W}9${N}wm ${W}w${N}indowlab ${N}$HLINE $HLINE wm${W}i${N}i wmi-${W}n${N}g ${N}$HLINE ${B}mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj${N} EOF print "Press a key: ".$M; ReadMode 4; # Turn off controls keys - while (not defined ($x = ReadKey(-1))) { - # No key yet - Time::HiRes::sleep(0.5); - } + $flags = fcntl(STDIN, F_GETFL, 0) or die "Can't get flags for STDIN: $!\n"; + $flags = fcntl(STDIN, F_SETFL, $flags & ~O_NONBLOCK) or die "Can't set flags for STDIN: $!\n"; + while (not defined ($x = ReadKey(0))) {} ReadMode 0; # Reset tty mode before exiting print $N.$/.$/;