diff options
Diffstat (limited to 'fluxbox/debian/update-init.pl')
-rw-r--r-- | fluxbox/debian/update-init.pl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/fluxbox/debian/update-init.pl b/fluxbox/debian/update-init.pl new file mode 100644 index 0000000..dcbf70c --- /dev/null +++ b/fluxbox/debian/update-init.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +my ($init) = $ARGV[0]; + +die "init not found!" unless $init; + +open my $file, '+<', $init + or die "Can not open file `$init': $!\n"; + +my @data= + map { chomp; $_ } + grep !/\.strftimeFormat:/, + grep !/\.toolbar\.tools:/, + grep !/toolbar\.widthPercent:/, <$file>; + + +push @data, +( + 'session.screen0.toolbar.widthPercent: 100', + 'session.screen0.strftimeFormat: %d %b, %a %02k:%M:%S', + 'session.screen0.toolbar.tools: ' . + 'prevworkspace, workspacename, nextworkspace, ' . + 'clock, prevwindow, nextwindow, iconbar, systemtray', +); + +truncate $file, 0; +seek $file, 0, 0; +print $file join "\n", @data; |