Closed indeedwatson closed 4 years ago
Based on that snippet I’d guess you have an indentation issue. default-opacity should have same indentation level as window-class
This how it should be?
rules:
- window-class: Termite
default-opacity: 0.8
Cause that gives me the same error.
Gotcha sounds like thats not it then. I’ll look into it
rules:
- app-id: floating-term
flash-on-focus: False
Gives
INFO: Detected display protocol: wayland - sway
Traceback (most recent call last):
File "/usr/bin/flashfocus", line 12, in <module>
sys.exit(cli())
File "/usr/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/flashfocus/cli.py", line 87, in cli
init_server(kwargs)
File "/usr/lib/python3.8/site-packages/flashfocus/cli.py", line 101, in init_server
config = load_merged_config(config_file_path=Path(config_file_path), cli_options=cli_options)
File "/usr/lib/python3.8/site-packages/flashfocus/config.py", line 324, in load_merged_config
user_config = load_config(config_file_path)
File "/usr/lib/python3.8/site-packages/flashfocus/config.py", line 146, in load_config
config: Dict = yaml.load(f, Loader=yaml.FullLoader)
File "/usr/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/lib/python3.8/site-packages/yaml/constructor.py", line 41, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3.8/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/lib/python3.8/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/lib/python3.8/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python3.8/site-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3.8/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
raise ParserError("while parsing a block mapping", self.marks[-1],```
Ugh sorry I haven’t had time to look into this yet
@indeedwatson @Leo-Lahti I'm not able to replicate either of these on my machine. Could you paste the output of pip freeze
?
@fennerm https://paste.xinu.at/rGyXo/
@indeedwatson I still haven't been able to reproduce but I have a hunch that there is a window with weirdly defined window id/class that is throwing things off. I pushed a release (v2.1.2) which better handles windows with absent class. Let me know if this improves things.
@Leo-Lahti I think your issue is probably unrelated. Could you post the output of pip freeze
and the contents of your config file?
@fennerm Yup looks like that solved it. Feel free to close if you deem leo's issue to be a separate one.
@fennerm hmmm seems like it works after i removed the space in the front of rules: and indented app-id and flash-on-focus correctly
doesnt work
rules:
- app-id: floating-term
flash-on-focus: False
works
rules:
- app-id: floating-term
flash-on-focus: False
Ah I see, yeah yaml is a stickler for spacing. I'll close this out. Looks like this error also wasn't being caught correctly. Fixing that in another patch release.
Only getting this error when I uncomment: