summaryrefslogtreecommitdiff
path: root/linux/traycommand
diff options
context:
space:
mode:
authormartin_r <martin_r@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2010-04-02 13:10:09 +0000
committermartin_r <martin_r@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2010-04-02 13:10:09 +0000
commit782d640d0821ce5608632503347e60520a8d0f4b (patch)
tree1c2b179da7f07908e87257d3ee215b609c2bfcfe /linux/traycommand
parent99b07611b80e421bffca1b60fc17462d9f2a9594 (diff)
downloadneo-layout-782d640d0821ce5608632503347e60520a8d0f4b.tar.gz
neo-layout-782d640d0821ce5608632503347e60520a8d0f4b.tar.bz2
neo-layout-782d640d0821ce5608632503347e60520a8d0f4b.zip
gconf2 in fehlermeldung verpackt und programm ohne parameter aufrufbar gemacht
git-svn-id: https://svn.neo-layout.org@2275 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'linux/traycommand')
-rwxr-xr-xlinux/traycommand/traycommand11
1 files changed, 10 insertions, 1 deletions
diff --git a/linux/traycommand/traycommand b/linux/traycommand/traycommand
index 6a4e9fe..7bd862a 100755
--- a/linux/traycommand/traycommand
+++ b/linux/traycommand/traycommand
@@ -9,11 +9,19 @@ rescue LoadError
raise
end
+begin
+ require 'gconf2'
+rescue LoadError
+ $stderr << "########################################################\n"
+ $stderr << "# In order to run this programm you need ruby-gconf2! #\n"
+ $stderr << "########################################################\n"
+ raise
+end
+
require 'yaml'
require 'pp'
require 'optparse'
require 'ostruct'
-require 'gconf2'
TRAYCOMMANDVERSION = [0,1]
@@ -39,6 +47,7 @@ optpars = OptionParser.new { |opts|
begin
optpars.parse!
+ $options.configfile ||= "layoutswitch.yaml"
rescue => e
puts e
puts optpars