From ab1deabbf14e0a25b8a716217fc0ba130709358e Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Tue, 18 Jul 2000 09:39:27 +0000 Subject: * bin/DrakWM: Add -i options to launch with xinit. add -a option to provide alias for bash. --- bin/DrakWM | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'bin/DrakWM') diff --git a/bin/DrakWM b/bin/DrakWM index 469d752..2af7b18 100755 --- a/bin/DrakWM +++ b/bin/DrakWM @@ -4,6 +4,7 @@ # MandrakeSoft Inc. # Redistribution of this file is permitted under the terms of the GNU # Public License (GPL) +# $Id$ ###################### # Description: Launch window manager according to # /etc/X11/window-manager with various options. @@ -14,6 +15,8 @@ my ($wm, $command, $window_mgr_file); my (@lf); my @getopt_args = ('l|list-active-session', + 'i|xinit', + 'a|alias', 'm|window-manager-file=s', 'g|with-file-manager=s', 'p|picture=s', @@ -34,6 +37,8 @@ if ($options{l}){ exit(0); } +if ($options{a}) {print "alias $_=\'$0 -i $_\';" for @lf; exit 0;} + unless ($ARGV[0]) { print STDERR "\n\t\tYou need to specify a Window Manager\n\n"; usage(1); @@ -79,8 +84,12 @@ if ($options{x}) { } # END -$command = $script{$wm} ? $script{$wm} : $script{shift @lf}; -exec ("/bin/sh", "-c", "$command"); +if (!$options{i}) { + $command = $script{$wm} ? $script{$wm} : $script{shift @lf}; + exec ("/bin/sh", "-c", "$command"); +} else { + exec ("xinit $exec{$wm}"); +} sub parse_file { my $f=shift @_; @@ -104,9 +113,11 @@ sub usage { my $e = shift @_; (my $basename = $0) =~ s|.*/||; print { $e ? STDERR : STDOUT } << "EOF"; -Usage: $0 [-Fxh] [ -b color ] [ window-manager session] +Usage: $0 [-Faixh] [ -b color ] [ window-manager session] Window-Manager launcher + -i --xinit: Launch with xinit. + -a --alias: Product alias for bourne shell. -b=COLOR --background=COLOR: Specify a background color. -g --with-file-manager: Launch with a filemanager [ KFM | GMC ] -x --with-xtermM: Display an xterm. -- cgit v1.2.1