Configure default worker settings
This commit is contained in:
parent
cb0c5f6ca2
commit
231e7cd67a
@ -3,10 +3,11 @@ module Uh
|
|||||||
class Env
|
class Env
|
||||||
RC_PATH = '~/.uhwmrc.rb'.freeze
|
RC_PATH = '~/.uhwmrc.rb'.freeze
|
||||||
|
|
||||||
MODIFIER = :mod1
|
MODIFIER = :mod1
|
||||||
KEYBINDS = {
|
KEYBINDS = {
|
||||||
q: proc { quit }
|
q: proc { quit }
|
||||||
}.freeze
|
}.freeze
|
||||||
|
WORKER = :block
|
||||||
|
|
||||||
LOGGER_LEVEL = Logger::WARN
|
LOGGER_LEVEL = Logger::WARN
|
||||||
LOGGER_LEVEL_VERBOSE = Logger::INFO
|
LOGGER_LEVEL_VERBOSE = Logger::INFO
|
||||||
@ -28,6 +29,7 @@ module Uh
|
|||||||
@rc_path = RC_PATH
|
@rc_path = RC_PATH
|
||||||
@modifier = MODIFIER
|
@modifier = MODIFIER
|
||||||
@keybinds = KEYBINDS.dup
|
@keybinds = KEYBINDS.dup
|
||||||
|
@worker = :block
|
||||||
end
|
end
|
||||||
|
|
||||||
def verbose?
|
def verbose?
|
||||||
|
@ -29,6 +29,10 @@ module Uh
|
|||||||
expect(env.keybinds.keys).to eq %i[q]
|
expect(env.keybinds.keys).to eq %i[q]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'has the blocking worker by default' do
|
||||||
|
expect(env.worker).to eq :block
|
||||||
|
end
|
||||||
|
|
||||||
describe '#verbose?' do
|
describe '#verbose?' do
|
||||||
context 'when verbose mode is disabled' do
|
context 'when verbose mode is disabled' do
|
||||||
before { env.verbose = false }
|
before { env.verbose = false }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user