Allow layout options configuration from run control
This commit is contained in:
@@ -32,11 +32,15 @@ module Uh
|
||||
@env.keybinds[translate_keysym *keysyms] = block
|
||||
end
|
||||
|
||||
def layout obj
|
||||
if obj.is_a? Class
|
||||
@env.layout_class = obj
|
||||
def layout arg, **options
|
||||
if arg.is_a? Class
|
||||
if options.any?
|
||||
@env.layout = arg.new options
|
||||
else
|
||||
@env.layout_class = arg
|
||||
end
|
||||
else
|
||||
@env.layout = obj
|
||||
@env.layout = arg
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user