diff options
| author | Paul Buetow <paul@buetow.org> | 2012-05-01 12:27:45 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2012-05-01 12:27:45 +0200 |
| commit | 673067fd0d1cda4c06659e9c4dd909a786098deb (patch) | |
| tree | 84df1f29121e1db4676faaf09545b2f2ae676eef /lib | |
| parent | b7416c5136a2b021473fb09843aa012b943ddde4 (diff) | |
some fixes and also introduce --hasagent param
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Loadbars/Config.pm | 28 | ||||
| -rw-r--r-- | lib/Loadbars/HelpDispatch.pm | 6 | ||||
| -rw-r--r-- | lib/Loadbars/Shared.pm | 1 | ||||
| -rw-r--r-- | lib/Loadbars/Utils.pm | 1 |
4 files changed, 9 insertions, 27 deletions
diff --git a/lib/Loadbars/Config.pm b/lib/Loadbars/Config.pm index 57fad2f..2c91739 100644 --- a/lib/Loadbars/Config.pm +++ b/lib/Loadbars/Config.pm @@ -4,6 +4,7 @@ use strict; use warnings; use Loadbars::Utils; +use Loadbars::Shared; use Exporter; @@ -11,33 +12,6 @@ use base 'Exporter'; our @EXPORT = qw ( %C %I ); -# Global configuration hash -our %C : shared; - -# Global configuration hash for internal settings (not configurable) -our %I : shared; - -# Setting defaults -%C = ( - average => 15, - barwidth => 35, - extended => 0, - factor => 1, - height => 230, - maxwidth => 1280, - samples => 1000, - showcores => 0, - showmem => 0, - showtext => 1, - showtexthost => 0, - sshopts => '', -); - -%I = ( - cpuregexp => 'cpu', - showtextoff => 0, -); - sub read () { return unless -f Loadbars::Constants->CONFFILE; diff --git a/lib/Loadbars/HelpDispatch.pm b/lib/Loadbars/HelpDispatch.pm index dfee7f5..8d008da 100644 --- a/lib/Loadbars/HelpDispatch.pm +++ b/lib/Loadbars/HelpDispatch.pm @@ -155,6 +155,12 @@ END mode => 1 }, + hasagent => { + menupos => 10, + help => 'SSH key is already known by the SSH agent (0 or 1)', + mode => 6, + type => 'i' + }, height => { menupos => 10, help => 'Set windows height', diff --git a/lib/Loadbars/Shared.pm b/lib/Loadbars/Shared.pm index 0f02b7e..fbaea54 100644 --- a/lib/Loadbars/Shared.pm +++ b/lib/Loadbars/Shared.pm @@ -35,6 +35,7 @@ our %I : shared; barwidth => 35, extended => 0, factor => 1, + hasagent => 0, height => 230, maxwidth => 1280, samples => 1000, diff --git a/lib/Loadbars/Utils.pm b/lib/Loadbars/Utils.pm index df5e0f7..050ff89 100644 --- a/lib/Loadbars/Utils.pm +++ b/lib/Loadbars/Utils.pm @@ -53,6 +53,7 @@ sub get_version () { my $version = <$fh>; close $fh; + chomp $version; return $version; } |
