vfmg: VFMG/blackbox_out.pm (NEW), VFMG/fluxbox_out.pm (NEW) - blac...

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


Author: sparky                       Date: Fri Dec  1 22:30:04 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- blackbox/fluxbox backend

---- Files affected:
vfmg/VFMG:
   blackbox_out.pm (NONE -> 1.1)  (NEW), fluxbox_out.pm (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: vfmg/VFMG/blackbox_out.pm
diff -u /dev/null vfmg/VFMG/blackbox_out.pm:1.1
--- /dev/null	Fri Dec  1 23:30:04 2006
+++ vfmg/VFMG/blackbox_out.pm	Fri Dec  1 23:29:59 2006
@@ -0,0 +1,30 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub blackbox {
+	my ($no, $level) = @_;
+	my $apps = "";
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		if($main::menu[$no]{$entry} < 0) {
+			$apps .= "$level"."[exec] ($$d{Name}) {$$d{Exec}}\n";
+		} else {
+			print "$level"."[submenu] ($$d{Name})\n";
+			blackbox($main::menu[$no]{$entry}, $level."\t");
+			print "$level\[end]\n";
+		}
+	}
+	print $apps;
+}
+
+sub do_menu() {
+	my $wm = $main::o_output eq "fluxbox" ? "Fluxbox" : "Blackbox";
+
+	print "[begin] ($wm)\n" unless $main::opt{nomenu};
+	blackbox($main::opt{strip}, "");
+	print "[end]\n" unless $main::opt{nomenu};
+}
+
+1;

================================================================
Index: vfmg/VFMG/fluxbox_out.pm
diff -u /dev/null vfmg/VFMG/fluxbox_out.pm:1.1
--- /dev/null	Fri Dec  1 23:30:04 2006
+++ vfmg/VFMG/fluxbox_out.pm	Fri Dec  1 23:29:59 2006
@@ -0,0 +1,30 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub blackbox {
+	my ($no, $level) = @_;
+	my $apps = "";
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		if($main::menu[$no]{$entry} < 0) {
+			$apps .= "$level"."[exec] ($$d{Name}) {$$d{Exec}}\n";
+		} else {
+			print "$level"."[submenu] ($$d{Name})\n";
+			blackbox($main::menu[$no]{$entry}, $level."\t");
+			print "$level\[end]\n";
+		}
+	}
+	print $apps;
+}
+
+sub do_menu() {
+	my $wm = $main::o_output eq "fluxbox" ? "Fluxbox" : "Blackbox";
+
+	print "[begin] ($wm)\n" unless $main::opt{nomenu};
+	blackbox($main::opt{strip}, "");
+	print "[end]\n" unless $main::opt{nomenu};
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list