diff options
| -rw-r--r-- | docs/BUGS (renamed from share/docs/BUGS) | 0 | ||||
| -rw-r--r-- | docs/CHANGELOG (renamed from share/docs/CHANGELOG) | 0 | ||||
| -rw-r--r-- | docs/COPYING (renamed from share/docs/COPYING) | 0 | ||||
| -rw-r--r-- | docs/COPYING.FONT (renamed from share/docs/COPYING.FONT) | 0 | ||||
| -rw-r--r-- | docs/HELP (renamed from share/docs/HELP) | 0 | ||||
| -rw-r--r-- | docs/README (renamed from share/docs/README) | 0 | ||||
| -rw-r--r-- | docs/WISHLIST (renamed from share/docs/WISHLIST) | 0 | ||||
| -rw-r--r-- | fonts/font.png (renamed from share/fonts/font.png) | bin | 14883 -> 14883 bytes | |||
| -rw-r--r-- | lib/Loadbars/Constants.pm (renamed from share/lib/Loadbars/Constants.pm) | 0 | ||||
| -rw-r--r-- | lib/Loadbars/HelpDispatch.pm (renamed from share/lib/Loadbars/HelpDispatch.pm) | 0 | ||||
| -rw-r--r-- | lib/Loadbars/Main.pm (renamed from share/lib/Loadbars/Main.pm) | 17 | ||||
| -rw-r--r-- | lib/Loadbars/Shared.pm (renamed from share/lib/Loadbars/Shared.pm) | 0 | ||||
| -rwxr-xr-x | loadbars | 8 |
13 files changed, 19 insertions, 6 deletions
diff --git a/share/docs/BUGS b/docs/BUGS index 40b75cd..40b75cd 100644 --- a/share/docs/BUGS +++ b/docs/BUGS diff --git a/share/docs/CHANGELOG b/docs/CHANGELOG index da29f6d..da29f6d 100644 --- a/share/docs/CHANGELOG +++ b/docs/CHANGELOG diff --git a/share/docs/COPYING b/docs/COPYING index d4b4b89..d4b4b89 100644 --- a/share/docs/COPYING +++ b/docs/COPYING diff --git a/share/docs/COPYING.FONT b/docs/COPYING.FONT index d4b4b89..d4b4b89 100644 --- a/share/docs/COPYING.FONT +++ b/docs/COPYING.FONT diff --git a/share/docs/HELP b/docs/HELP index e077c51..e077c51 100644 --- a/share/docs/HELP +++ b/docs/HELP diff --git a/share/docs/README b/docs/README index d839d8d..d839d8d 100644 --- a/share/docs/README +++ b/docs/README diff --git a/share/docs/WISHLIST b/docs/WISHLIST index ea234ff..ea234ff 100644 --- a/share/docs/WISHLIST +++ b/docs/WISHLIST diff --git a/share/fonts/font.png b/fonts/font.png Binary files differindex 02e9eb1..02e9eb1 100644 --- a/share/fonts/font.png +++ b/fonts/font.png diff --git a/share/lib/Loadbars/Constants.pm b/lib/Loadbars/Constants.pm index af242bd..af242bd 100644 --- a/share/lib/Loadbars/Constants.pm +++ b/lib/Loadbars/Constants.pm diff --git a/share/lib/Loadbars/HelpDispatch.pm b/lib/Loadbars/HelpDispatch.pm index dfee7f5..dfee7f5 100644 --- a/share/lib/Loadbars/HelpDispatch.pm +++ b/lib/Loadbars/HelpDispatch.pm diff --git a/share/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm index 210f07a..b44929b 100644 --- a/share/lib/Loadbars/Main.pm +++ b/lib/Loadbars/Main.pm @@ -4,8 +4,6 @@ package Loadbars::Main; use strict; use warnings; -use Loadbars::Config; - use SDL; use SDL::App; use SDL::Rect; @@ -21,9 +19,10 @@ use Proc::ProcessTable; use threads; use threads::shared; +use Loadbars::Config; use Loadbars::Constants; -use Loadbars::Utils; use Loadbars::Shared; +use Loadbars::Utils; $| = 1; @@ -305,7 +304,17 @@ sub main_loop ($@) { -resizeable => 1, ); - SDL::Font->new('font.png')->use(); + my $fontbase = 'fonts/font.png'; + + if ( -f "./$fontbase") { + $C{font} = "./$fontbase"; + + } elsif (-f "/usr/share/loadbars/$fontbase") { + $C{font} = "/usr/share/loadbars/$fontbase"; + } + + say("Foo:".$C{font}); + SDL::Font->new($C{font})->use(); my $rects = {}; my %prev_stats; diff --git a/share/lib/Loadbars/Shared.pm b/lib/Loadbars/Shared.pm index 0f02b7e..0f02b7e 100644 --- a/share/lib/Loadbars/Shared.pm +++ b/lib/Loadbars/Shared.pm @@ -9,15 +9,19 @@ use warnings; use Getopt::Long; +use lib 'lib'; + use Loadbars::Main; use Loadbars::Constants; use Loadbars::HelpDispatch; +use Loadbars::Shared; +use Loadbars::Utils; sub main () { my ( $hosts, $dispatch ) = Loadbars::HelpDispatch::create; my $usage; - Loadbars::Main::say(Loadbars::Constants->VERSION . ' ' . Loadbars::Constants->COPYRIGHT); + say(Loadbars::Constants->VERSION . ' ' . Loadbars::Constants->COPYRIGHT); Loadbars::Config::read; @@ -36,7 +40,7 @@ sub main () { } split ',', $$hosts; if ( @hosts || defined $Loadbars::Main::C{cluster} ) { - push @hosts, Loadbars::Main::get_cluster_hosts $Loadbars::Main::C{cluster} + push @hosts, Loadbars::Main::get_cluster_hosts $C{cluster} if defined $Loadbars::Main::C{cluster}; system 'ssh-add'; |
