vfmg: VFMG/aewm_out.pm (NEW) - aewm backend

sparky sparky at pld-linux.org
Fri Dec 1 23:04:25 CET 2006


Author: sparky                       Date: Fri Dec  1 22:04:25 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- aewm backend

---- Files affected:
vfmg/VFMG:
   aewm_out.pm (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: vfmg/VFMG/aewm_out.pm
diff -u /dev/null vfmg/VFMG/aewm_out.pm:1.1
--- /dev/null	Fri Dec  1 23:04:25 2006
+++ vfmg/VFMG/aewm_out.pm	Fri Dec  1 23:04:20 2006
@@ -0,0 +1,28 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub aewm {
+	my ($no, $level)=@_;
+	my $apps = "";
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		( my $name = $$d{Name} ) =~ s/\"/\\\"/g;
+		if($main::menu[$no]{$entry} < 0) {
+			( my $exec = $$d{Exec} ) =~ s/\"/\\\"/g;
+			$apps .= qq(${level}cmd "$name" "$exec"\n);
+		} else {
+			print qq(${level}menu "$name"\n);
+			aewm($main::menu[$no]{$entry}, $level."\t");
+			print "${level}end\n";
+		}
+	}
+	print $apps;
+}
+
+sub do_menu() {
+	aewm($main::opt{strip},"");
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list