From 4c186c1048229781c65aa515178f47586089891a Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 6 Nov 2008 22:42:49 +0000 Subject: add --auto/--method=/--wm= command line options --- bin/drak3d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/drak3d b/bin/drak3d index 591bd48..ec10a6e 100755 --- a/bin/drak3d +++ b/bin/drak3d @@ -29,11 +29,17 @@ use common; use interactive; use Xconfig::glx; use any; +use Getopt::Long; my $in = interactive->vnew('su'); my $glx = Xconfig::glx::detect_may_install($in) or $in->exit; my $running_wm = any::running_window_manager(); +GetOptions( + "method=s" => \$glx->{method}, + "wm=s" => \$glx->{wm}, +) or warn "invalid options"; + my @advanced_settings = ( [ N_("A graphical server supporting OpenGL compositing should be selected."), 'methods', 'method', \@Xconfig::glx::gl_compositing_servers, 1 ], [ N_("An OpenGL compositing window manager should be selected. It provides 3D desktop and compositing effects in window management, such as translucent windows and moving effects."), 'wms', 'wm', \@Xconfig::glx::gl_compositing_wms, 0 ], @@ -136,7 +142,9 @@ sub choose_gtk { } my $res; -if ($in->isa('interactive::gtk')) { +if ($::auto) { + $res = 1; +} elsif ($in->isa('interactive::gtk')) { $res = choose_gtk($glx); } else { $res = Xconfig::glx::choose_interactive($in, $glx); -- cgit v1.2.1