Module: Glove::Windowmanager
- Defined in:
- gloves-windowmanager/lib/glove/windowmanager.rb
Class Method Summary (collapse)
- + (Object) last_error
-
+ (Object) modify(config, params)
Write Keyboard configuration.
-
+ (Object) read(params)
Read all settings relevant for windowmanager configuration (key:value map).
Class Method Details
+ (Object) last_error
27 28 29 |
# File 'gloves-windowmanager/lib/glove/windowmanager.rb', line 27 def self.last_error return @error end |
+ (Object) modify(config, params)
Write Keyboard configuration
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'gloves-windowmanager/lib/glove/windowmanager.rb', line 57 def self.modify(config,params) ret = { "success" => true } # TODO return ret rescue DbusClients::InsufficientPermission => e @error = "User has no permission for action '#{e.}'." return nil end |
+ (Object) read(params)
Read all settings relevant for windowmanager configuration (key:value map).
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'gloves-windowmanager/lib/glove/windowmanager.rb', line 36 def self.read(params) # read config files begin sysconfig_windowmanager = ConfigAgent::Windowmanager.read({}) rescue DbusClients::InsufficientPermission => e @error = "User has no permission for action '#{e.}'." return nil end return sysconfig_windowmanager ret = {} sysconfig_windowmanager.each do |key, val| ret[key.downcase] = val if @sysconfig_values.include? key end ret["windowmanager"] = sysconfig_windowmanager["WINDOWMANAGER"] || "" return ret end |