vfmg: VFMG/wmii_out.pm (NEW) - (old ?) wmii backend
sparky
sparky at pld-linux.org
Sat Dec 2 00:44:10 CET 2006
Author: sparky Date: Fri Dec 1 23:44:10 2006 GMT
Module: vfmg Tag: HEAD
---- Log message:
- (old ?) wmii backend
---- Files affected:
vfmg/VFMG:
wmii_out.pm (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: vfmg/VFMG/wmii_out.pm
diff -u /dev/null vfmg/VFMG/wmii_out.pm:1.1
--- /dev/null Sat Dec 2 00:44:10 2006
+++ vfmg/VFMG/wmii_out.pm Sat Dec 2 00:44:05 2006
@@ -0,0 +1,35 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub wmii {
+ my ($no, $level) = @_;
+ my @apps;
+ foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+ my $d = $main::desktop[$entry];
+ (my $name = main::encode($main::opt{encoding}, $$d{Name})) =~ s#/#:#g;
+ if ($main::menu[$no]{$entry} < 0) {
+ push @apps, [$name, $$d{Exec}];
+ } else {
+ system("wmiir", "create",
+ "/menu/items/menu$level/items/$name [>",
+ "wmiir write /menu/lookup /items/menu$level/$$d{file}/items; "
+ ."wmiir write /menu/ctl 'display 1'");
+
+ wmii( $main::menu[$no]{$entry}, $level ."/". $$d{file} );
+ }
+ }
+ foreach my $app (@apps) {
+ system("wmiir", "create",
+ "/menu/items/menu" . $level . "/items/" . $$app[0],
+ $$app[1]);
+ }
+}
+
+sub do_menu() {
+ system(qw(wmiir remove /menu/items/menu));
+ wmii($main::opt{strip}, "");
+}
+
+1;
================================================================
More information about the pld-cvs-commit
mailing list