summaryrefslogtreecommitdiffstats
path: root/move/data/totem.list
diff options
context:
space:
mode:
Diffstat (limited to 'move/data/totem.list')
-rw-r--r--move/data/totem.list136
1 files changed, 68 insertions, 68 deletions
diff --git a/move/data/totem.list b/move/data/totem.list
index b1c5306b1..ab0adbbee 100644
--- a/move/data/totem.list
+++ b/move/data/totem.list
@@ -1,68 +1,68 @@
-/tmp/live_tree/bin/sleep
-/tmp/live_tree/etc/gnome-vfs-mime-magic
-/tmp/live_tree/usr/X11R6/lib/libXi.so.6.0
-/tmp/live_tree/usr/X11R6/lib/libXrandr.so.2.0
-/tmp/live_tree/usr/X11R6/lib/libXtst.so.6.1
-/tmp/live_tree/usr/bin/mdk_behind_totem
-/tmp/live_tree/usr/bin/totem
-/tmp/live_tree/usr/lib/GConf/2/libgconfbackend-xml.so
-/tmp/live_tree/usr/lib/gconfd-2
-/tmp/live_tree/usr/lib/gnome-vfs-2.0/modules/libfile.so
-/tmp/live_tree/usr/lib/gtk-2.0/2.2.0/engines/libgalaxy.so
-/tmp/live_tree/usr/lib/gtk-2.0/2.2.0/loaders/libpixbufloader-png.so
-/tmp/live_tree/usr/lib/kde3/libkshorturifilter.so
-/tmp/live_tree/usr/lib/kde3/libkuriikwsfilter.so
-/tmp/live_tree/usr/lib/kde3/libkurisearchfilter.so
-/tmp/live_tree/usr/lib/kde3/liblocaldomainurifilter.so
-/tmp/live_tree/usr/lib/libSDL-1.2.so.0.7.0
-/tmp/live_tree/usr/lib/libORBit-2.so.0.0.0
-/tmp/live_tree/usr/lib/libORBitCosNaming-2.so.0.0.0
-/tmp/live_tree/usr/lib/libartsc.so.0.0.0
-/tmp/live_tree/usr/lib/libartscbackend.so.0.0.0
-/tmp/live_tree/usr/lib/libatk-1.0.so.0.400.1
-/tmp/live_tree/usr/lib/libbonobo-2.so.0.0.0
-/tmp/live_tree/usr/lib/libbonobo-activation.so.4.0.0
-/tmp/live_tree/usr/lib/libbonoboui-2.so.0.0.0
-/tmp/live_tree/usr/lib/libcdio.so.0.0.0
-/tmp/live_tree/usr/lib/libcrypto.so.0.9.7
-/tmp/live_tree/usr/lib/libcurl.so.2.0.2
-/tmp/live_tree/usr/lib/libgconf-2.so.4.1.0
-/tmp/live_tree/usr/lib/libgdk-x11-2.0.so.0.200.4
-/tmp/live_tree/usr/lib/libgdk_pixbuf-2.0.so.0.200.4
-/tmp/live_tree/usr/lib/libglade-2.0.so.0.0.1
-/tmp/live_tree/usr/lib/libglade/2.0/libbonobo.so
-/tmp/live_tree/usr/lib/libglade/2.0/libgnome.so
-/tmp/live_tree/usr/lib/libgnome-2.so.0.400.0
-/tmp/live_tree/usr/lib/libgnome-desktop-2.so.2.1.9
-/tmp/live_tree/usr/lib/libgnomecanvas-2.so.0.400.0
-/tmp/live_tree/usr/lib/libgnomeui-2.so.0.400.0
-/tmp/live_tree/usr/lib/libgnomevfs-2.so.0.400.2
-/tmp/live_tree/usr/lib/libgobject-2.0.so.0.200.3
-/tmp/live_tree/usr/lib/libgtk-x11-2.0.so.0.200.4
-/tmp/live_tree/usr/lib/libiso9660.so.0.0.0
-/tmp/live_tree/usr/lib/liblirc_client.so.0.0.0
-/tmp/live_tree/usr/lib/libpango-1.0.so.0.200.5
-/tmp/live_tree/usr/lib/libpangoft2-1.0.so.0.200.5
-/tmp/live_tree/usr/lib/libpangox-1.0.so.0.200.5
-/tmp/live_tree/usr/lib/libpangoxft-1.0.so.0.200.5
-/tmp/live_tree/usr/lib/libpng12.so.0.1.2.5
-/tmp/live_tree/usr/lib/libspeex.so.1.1.0
-/tmp/live_tree/usr/lib/libssl.so.0.9.7
-/tmp/live_tree/usr/lib/libstartup-notification-1.so.0.0.0
-/tmp/live_tree/usr/lib/libvcd.so.0.0.0
-/tmp/live_tree/usr/lib/libvcdinfo.so.0.0.0
-/tmp/live_tree/usr/lib/libxine.so.1.8.1
-/tmp/live_tree/usr/lib/libxml2.so.2.6.6
-/tmp/live_tree/usr/lib/pango/1.2.0/modules/pango-basic-xft.so
-/tmp/live_tree/usr/lib/xine
-/tmp/live_tree/usr/share/alsa
-/tmp/live_tree/usr/share/totem
-/tmp/live_tree/usr/lib/gnome-vfs-2.0/modules/libcdda.so
-/tmp/live_tree/usr/lib/libcdda_interface.so.0
-/tmp/live_tree/usr/lib/libcdda_interface.so.0.9.8
-/tmp/live_tree/usr/lib/libcdda_paranoia.so.0
-/tmp/live_tree/usr/lib/libcdda_paranoia.so.0.9.8
-/tmp/live_tree/sbin/ifplugd
-/tmp/live_tree/sbin/dhcpcd
-/tmp/live_tree/sbin/dhclient
-/tmp/live_tree/sbin/zcip
+/bin/sleep
+/etc/gnome-vfs-mime-magic
+/usr/X11R6/lib/libXi.so.6.0
+/usr/X11R6/lib/libXrandr.so.2.0
+/usr/X11R6/lib/libXtst.so.6.1
+/usr/bin/mdk_behind_totem
+/usr/bin/totem
+/usr/lib/GConf/2/libgconfbackend-xml.so
+/usr/lib/gconfd-2
+/usr/lib/gnome-vfs-2.0/modules/libfile.so
+/usr/lib/gtk-2.0/2.2.0/engines/libgalaxy.so
+/usr/lib/gtk-2.0/2.2.0/loaders/libpixbufloader-png.so
+/usr/lib/kde3/libkshorturifilter.so
+/usr/lib/kde3/libkuriikwsfilter.so
+/usr/lib/kde3/libkurisearchfilter.so
+/usr/lib/kde3/liblocaldomainurifilter.so
+/usr/lib/libSDL-1.2.so.0.7.0
+/usr/lib/libORBit-2.so.0.0.0
+/usr/lib/libORBitCosNaming-2.so.0.0.0
+/usr/lib/libartsc.so.0.0.0
+/usr/lib/libartscbackend.so.0.0.0
+/usr/lib/libatk-1.0.so.0.400.1
+/usr/lib/libbonobo-2.so.0.0.0
+/usr/lib/libbonobo-activation.so.4.0.0
+/usr/lib/libbonoboui-2.so.0.0.0
+/usr/lib/libcdio.so.0.0.0
+/usr/lib/libcrypto.so.0.9.7
+/usr/lib/libcurl.so.2.0.2
+/usr/lib/libgconf-2.so.4.1.0
+/usr/lib/libgdk-x11-2.0.so.0.200.4
+/usr/lib/libgdk_pixbuf-2.0.so.0.200.4
+/usr/lib/libglade-2.0.so.0.0.1
+/usr/lib/libglade/2.0/libbonobo.so
+/usr/lib/libglade/2.0/libgnome.so
+/usr/lib/libgnome-2.so.0.400.0
+/usr/lib/libgnome-desktop-2.so.2.1.9
+/usr/lib/libgnomecanvas-2.so.0.400.0
+/usr/lib/libgnomeui-2.so.0.400.0
+/usr/lib/libgnomevfs-2.so.0.400.2
+/usr/lib/libgobject-2.0.so.0.200.3
+/usr/lib/libgtk-x11-2.0.so.0.200.4
+/usr/lib/libiso9660.so.0.0.0
+/usr/lib/liblirc_client.so.0.0.0
+/usr/lib/libpango-1.0.so.0.200.5
+/usr/lib/libpangoft2-1.0.so.0.200.5
+/usr/lib/libpangox-1.0.so.0.200.5
+/usr/lib/libpangoxft-1.0.so.0.200.5
+/usr/lib/libpng12.so.0.1.2.5
+/usr/lib/libspeex.so.1.1.0
+/usr/lib/libssl.so.0.9.7
+/usr/lib/libstartup-notification-1.so.0.0.0
+/usr/lib/libvcd.so.0.0.0
+/usr/lib/libvcdinfo.so.0.0.0
+/usr/lib/libxine.so.1.8.1
+/usr/lib/libxml2.so.2.6.6
+/usr/lib/pango/1.2.0/modules/pango-basic-xft.so
+/usr/lib/xine
+/usr/share/alsa
+/usr/share/totem
+/usr/lib/gnome-vfs-2.0/modules/libcdda.so
+/usr/lib/libcdda_interface.so.0
+/usr/lib/libcdda_interface.so.0.9.8
+/usr/lib/libcdda_paranoia.so.0
+/usr/lib/libcdda_paranoia.so.0.9.8
+/sbin/ifplugd
+/sbin/dhcpcd
+/sbin/dhclient
+/sbin/zcip
href='#n344'>344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
package Xconfig::xfree; # $Id$

use diagnostics;
use strict;

use common;
use Xconfig::parse;

#- mostly internal only
sub new {
    my ($class, $val) = @_;
    bless $val, $class;
}

sub _conf_files() {
    map { "$::prefix/etc/X11/$_" } 'xorg.conf', 'XF86Config-4', 'XF86Config';
}

################################################################################
# I/O ##########################################################################
################################################################################
sub read {
    my ($class) = @_;
    my $file = find { -f $_ } _conf_files();
    my $raw_X = $class->new(Xconfig::parse::read_XF86Config($file));

    if (my ($Keyboard) = $raw_X->get_InputDevices('Keyboard')) {
	$Keyboard->{Driver}{val} = 'keyboard';
    }
    $raw_X;
}
sub write {
    my ($raw_X, $o_file) = @_;
    my $file = $o_file || first(_conf_files());
    if (!$o_file) {
	foreach (_conf_files()) {
	    if (-l $_) {
		unlink $_;
	    } else {
		rename $_, "$_.old"; #- there will not be any XF86Config nor XF86Config-4 anymore, we want this!
	    }
	}
	#- keep it for old programs still using this name
	symlink basename($file), "$::prefix/etc/X11/XF86Config";
    }
    Xconfig::parse::write_XF86Config($raw_X, $file);
}
sub prepare_write {
    my ($raw_X) = @_;
    join('', Xconfig::parse::prepare_write_XF86Config($raw_X));
}
sub empty_config {
    my ($class) = @_;
    $class->new(Xconfig::parse::read_XF86Config_from_string(our $default_header));
}

################################################################################
# keyboard #####################################################################
################################################################################
my @keyboard_fields = qw(XkbLayout XkbModel XkbDisable XkbOptions XkbCompat);
sub get_keyboard {
    my ($raw_X) = @_;
    my $raw_kbd = first(map { $raw_X->get_InputDevices($_) } 'keyboard', 'kbd') or die "no keyboard section";
    raw_export_section($raw_kbd, \@keyboard_fields);
}
sub set_keyboard {
    my ($raw_X, $kbd) = @_;
    my $raw_kbd = first(map { $raw_X->get_InputDevices($_) } 'keyboard', 'kbd') || _new_keyboard_section($raw_X);
    raw_import_section($raw_kbd, $kbd);
    _set_Option('keyboard', $raw_kbd, keys %$kbd);
}
sub _new_keyboard_section {
    my ($raw_X) = @_;
    my $raw_kbd = { Identifier => { val => 'Keyboard1' }, Driver => { val => 'keyboard' } };
    $raw_X->add_Section('InputDevice', $raw_kbd);

    my $layout = get_ServerLayout($raw_X)->{InputDevice} ||= [];
    push @$layout, { val => '"Keyboard1" "CoreKeyboard"' };

    $raw_kbd;
}


################################################################################
# mouse ########################################################################
################################################################################
#- example: { Protocol => 'IMPS/2', Device => '/dev/psaux', Emulate3Buttons => undef, Emulate3Timeout => 50, ZAxisMapping => [ '4 5', '6 7' ] }
my @mouse_fields = qw(Protocol Device ZAxisMapping Emulate3Buttons Emulate3Timeout); #-);
sub get_mice {
    my ($raw_X) = @_;
    my @raw_mice = $raw_X->get_InputDevices('mouse');
    map { raw_export_section($_, \@mouse_fields) } @raw_mice;
}
sub set_mice {
    my ($raw_X, @mice) = @_;
    my @raw_mice = _new_mouse_sections($raw_X, int @mice);
    mapn { 
	my ($raw_mouse, $mouse) = @_;
	raw_import_section($raw_mouse, $mouse);
	_set_Option('mouse', $raw_mouse, keys %$mouse);
    } \@raw_mice, \@mice;
}
sub _new_mouse_sections {
    my ($raw_X, $nb_new) = @_;
    $raw_X->remove_InputDevices('mouse');
    
    my $layout = get_ServerLayout($raw_X)->{InputDevice} ||= [];
    @$layout = grep { $_->{val} !~ /^"Mouse/ } @$layout;
    
    $nb_new or return;
    
    my @l = map {
	my $h = { Identifier => { val => "Mouse$_" }, Driver => { val => 'mouse' } };
	$raw_X->add_Section('InputDevice', $h);
    } (1 .. $nb_new);
    
    push @$layout, { val => qq("Mouse1" "CorePointer") };
    push @$layout, { val => qq("Mouse$_" "SendCoreEvents") } foreach 2 .. $nb_new;
    
    @l;
}


################################################################################
# resolution ###################################################################
################################################################################
sub get_resolution {
    my ($raw_X, $o_Screen) = @_;
    my $Screen = $o_Screen || $raw_X->get_default_screen or return {};
    
    my $depth = val($Screen->{DefaultColorDepth});
    my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return {};
    $Display->{l}{Virtual} && val($Display->{l}{Virtual}) =~ /(\d+)\s+(\d+)/ or
      val($Display->{l}{Modes}) =~ /(\d+)x(\d+)/ or return {};
    { X => $1, Y => $2, Depth => val($Display->{l}{Depth}) };
}
sub set_resolution {
    my ($raw_X, $resolution, $o_Screen_) = @_;
    
    foreach my $Screen ($o_Screen_ ? $o_Screen_ : $raw_X->get_Sections('Screen')) {
	$Screen ||= $raw_X->get_default_screen or internal_error('no screen');
	
	$Screen->{DefaultColorDepth} = { val => $resolution->{Depth} eq '32' ? 24 : $resolution->{Depth} };
	$Screen->{Display} = [ map {
	    { l => { Depth => { val => $_ }, Virtual => { val => join(' ', @$resolution{'X', 'Y'}) } } };
	} 8, 15, 16, 24 ];
    }
    add_gtf_ModeLines($raw_X, $resolution);
}


################################################################################
# device #######################################################################
################################################################################
my @device_fields = qw(VendorName BoardName Driver VideoRam Screen BusID); #-);
sub get_device {
    my ($raw_X) = @_;
    first(get_devices($raw_X));
}
sub get_devices {
    my ($raw_X) = @_;
    my @raw_devices = $raw_X->get_Sections('Device');
    map {
	my $raw_device = $_;
	my $device = raw_export_section($raw_device, [ 'Identifier', @device_fields ]);
	$device->{Options} = raw_export_section($raw_device, [ grep { (deref_array($raw_device->{$_}))[0]->{Option} } keys %$raw_device ]);
	$device;
    } @raw_devices;
}
sub set_devices {
    my ($raw_X, @devices) = @_;
    my @raw_devices = _new_device_sections($raw_X, int @devices);
    mapn { 
	my ($raw_device, $device) = @_;
	my %Options  = %{$device->{Options} || {}};
	raw_import_section($raw_device, $device, \@device_fields);
	raw_import_section($raw_device, \%Options);
	$_->{Option} = 1 foreach map { deref_array($raw_device->{$_}) } keys %Options;
	$raw_device->{''} = [ { post_comment => $device->{raw_LINES} } ] if $device->{raw_LINES};
    } \@raw_devices, \@devices;
}
sub _new_device_sections {
    my ($raw_X, $nb_new) = @_;
    $raw_X->remove_Section('Device');
    map { $raw_X->add_Section('Device', { Identifier => { val => "device$_" }, DPMS => { Option => 1 } }) } (1 .. $nb_new);
}
sub get_Driver {
    my ($raw_X) = @_;
    my $card = eval { $raw_X->get_device };
    $card && $card->{Driver};
}

################################################################################
# wacoms #######################################################################
################################################################################
sub set_wacoms {
    my ($raw_X, @wacoms) = @_;
    $raw_X->remove_InputDevices('wacom');
    
    my $layout = get_ServerLayout($raw_X)->{InputDevice} ||= [];
    @$layout = grep { $_->{val} !~ /^"(Stylus|Eraser|Cursor)/ } @$layout;
    
    @wacoms or return;
    
    my %Modes = (Stylus => 'Absolute', Eraser => 'Absolute', Cursor => 'Relative');
    
    each_index {
	my $wacom = $_;
	foreach (keys %Modes) {
	    my $identifier = $_ . ($::i + 1);
	    my $h = { Identifier => { val => $identifier }, 
		      Driver => { val => 'wacom' },
		      Type => { val => lc $_, Option => 1 },
		      Device => { val => $wacom->{Device}, Option => 1 },
		      Mode => { val => $Modes{$_}, Option => 1 },
		      if_($wacom->{USB}, USB => { Option => 1 })
		    };
	    $raw_X->add_Section('InputDevice', $h);
	    push @$layout, { val => qq("$identifier" "AlwaysCore") };
	}
    } @wacoms;
}


################################################################################
# synaptics ####################################################################
################################################################################
sub set_synaptics {
    my ($raw_X, @synaptics) = @_;
    $raw_X->remove_InputDevices('synaptics');

    my $layout = get_ServerLayout($raw_X)->{InputDevice} ||= [];
    @$layout = grep { $_->{val} !~ /^"SynapticsMouse/ } @$layout;

    @synaptics or return;
    add_load_module($raw_X, "synaptics");

    each_index {
	my $synaptics_mouse = $_;
        my $identifier = "SynapticsMouse" . ($::i + 1);
        my $pointer_type = $synaptics_mouse->{Primary} ? "CorePointer" : "AlwaysCore";
        my $h = { Identifier => { val => $identifier },
                  Driver => { val => "synaptics" },
                  Device => { val => $synaptics_mouse->{Device}, Option => 1 },
                  Protocol => { val => $synaptics_mouse->{Protocol}, Option => 1 },
                  LeftEdge => { val => 1700, Option => 1 },
                  RightEdge => { val => 5300, Option => 1 },
                  TopEdge => { val => 1700, Option => 1 },
                  BottomEdge => { val => 4200, Option => 1 },
                  FingerLow => { val => 25, Option => 1 },
                  FingerHigh => { val => 30, Option => 1 },
                  MaxTapTime => { val => 180, Option => 1 },
                  MaxTapMove => { val => 220, Option => 1 },
                  VertScrollDelta => { val => 100, Option => 1 },
                  MinSpeed => { val => '0.06', Option => 1 },