2 # Filename: grml-quickconfig
3 # Purpose: get fast access to some basic grml-scripts
4 # Authors: Michael Schierl <schierlm-public@gmx.de>, Alexander Wirt <formorer@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 # Latest change: Sam Mär 17 12:42:50 CET 2007 [mika]
8 ################################################################################
10 # menu with quick config options
12 # enable alternate charset support (needed for screen)
15 # variables for nice display
16 $W = "\e[0;32;1m"; # White
17 $N = "\x0f\e[0m"; # Normal
18 $M = "\e[0;35;1m"; # Magenta (for commands)
19 $B = "\e[0;34;1m\x0e"; # Blue, line drawing characters
20 $HLINE=$B."x".$N; # A single horizontal line drawing character
34 # x and Return are handled manually
61 # disable input buffering, see
62 # man perlfunc | less '+/ getc'
64 system "stty", '-icanon', 'eol', "\001";
68 while($command eq "") {
71 ${B}lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk${N}
72 $HLINE Welcome to ${M}grml-quickconfig${M} $HLINE
73 $HLINE Press a highlighted key to perform an action, or press $HLINE
74 $HLINE ${W}Return${N} or ${W}q${N} to go back to the shell. $HLINE
75 ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N}
76 $HLINE Set keyboard layout (${M}grml-lang${N}): ${W}d${N}e ${W}a${N}t ${W}c${N}h ${W}u${N}s $HLINE
77 $HLINE Configure ${W}n${N}etwork (${M}grml-network${N}) $HLINE
78 $HLINE -> Configure ${W}e${N}thernet card directly (${M}netcardconfig${N}) $HLINE
79 ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N}
80 $HLINE Show ${W}i${N}nformation about grml (${M}grml-info${N}) $HLINE
81 $HLINE Start ${W}x${N} (${M}grml-x${N}) $HLINE
82 $HLINE Show an application ${W}m${N}enu (${M}pdmenu${N}) $HLINE
83 $HLINE Install grml to ${W}h${N}ard disk (${M}grml2hd${N}) $HLINE
84 ${B}mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj${N}
87 print "Press a key: ".$M;
90 if (defined($menu_commands{$x})) {
91 $command = $menu_commands{$x};
92 } elsif ($x eq "\n") {
97 ${B}lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk${N}
98 $HLINE Select a window manager (unsorted list): $HLINE
99 $HLINE Press any other key to return to the main menu. $HLINE
100 ${B}tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu${N}
101 $HLINE ${W}f${N}luxbox ${W}d${N}wm ${W}e${N}vilwm ion${W}3${N} ${W}j${N}wm pe${W}k${N}wm ${W}p${N}wm3 ${W}t${N}wm ${W}r${N}atpoison $HLINE
102 $HLINE f${W}v${N}wm fvwm${W}2${N} fvwm-${W}c${N}rystal w${W}9${N}wm ${W}w${N}indowlab w${W}m${N}i wm${W}i${N}i wm-${W}n${N}g $HLINE
103 ${B}mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj${N}
106 print "Press a key: ".$M;
109 if (defined($windowmanagers{$x})) {
110 $command = "su - grml -c 'grml-x ".$windowmanagers{$x}."'";
112 print "Unknown key.\n";
115 print "Unknown key.\n";
119 # reenable input buffering
120 system "stty", 'icanon', 'eol', '^@';
122 if ($command eq "exit") {
125 print $W . "Running command: " . $M . $command . $N . $/;
129 print "Happy hacking!\n";
131 ## END OF FILE #################################################################