waycorner
waycorner copied to clipboard
what's the meaning of [left] in example config.toml
I found it quite confusing, and it's about how to allocate commands and settings to edges and corners
I agree, the name "left" in example is confusing (I think, something like "my_config" would be better).
And there are no hints that there can be several top-level sections
The example config.toml is confusing.
It's because it's referring to the two left corners. It can be anything. It might make more sense if there's a second example or there's a comment added that explains this.
I disagree that my_config would be better. Though am happy to hear any proposals that would make it more clear and accept PRs making the necessary changes.
It's basically a Map<String, Config>. String can thus be anything and Config is the actual config. See https://github.com/AndreasBackx/waycorner/blob/main/src/config.rs#L100 and the TOML spec itself: https://toml.io/en/
locations = ["bottom_right", "bottom_left"] # default
should name it 'bottom', it's a mistake?
enter_command = [ "notify-send", "enter" ]
Can you also clarify on the syntax of command ? What if i want to run multiple commands?
@vincentaxhe no, it's correct. It's referring to corners so there are bottom/top left/right corners. You can do bottom/top/left/right as well, see #11. This is also documented in the README in the comments above the line you quoted.
@KAGEYAM4 You can only have 1 command. If you want multiple commands, you could run "bash" or some other shell and pass it multiple commands. Every item in the list is what you would pass on the terminal, but with spaces instead. Having a list instead makes it so you don't have to deal with quotes. This is how applications are called on Linux.
See https://github.com/AndreasBackx/waycorner/blob/main/src/config.rs#L63-L98 for the Rust version of the TOML types.
If you have improvements you wish to make, I'd be happy to accept a PR that improves the documentation.
I still did not get it , means left monitor's bottom two corners? why not call it [eDP-1],is [left] just a label, if same corner bind commands more than one time , later overwrite before, right? can be more than one top sections linked with locations, [1] [2] [3] [4] also is allowed?
@vincentaxhe here's an example, the purpose of [] at start is for the purpose of grouping ( if i understand correctly ). Read a little bit about array in toml sepcification, it will clear things up-->
[left-edge-whatever] # Can be named anything
#enter_command = [ "hyprctl", "dispatch", "workspace", "e-1" ]
enter_command = [ "hyprctl", "dispatch workspace e-1" ]
locations = ["left"]
size = 2
margin = 20
timeout_ms = 250
color = "#FFFF0000"
[right-edge] # Can be named anything
enter_command = [ "hyprctl", "dispatch workspace e+1" ]
locations = ["right"]
size = 2
margin = 20
timeout_ms = 250
color = "#FFFF0000"
section [left] but grouped with bottom two corners is mis-leading, but the author say it's not a mistake, I have to reckon left refers to left monitor. wait the author give a reasonable explanation
@vincentaxhe my bad, yes. It's been a while since I touched this. It means the left monitor most likely. Feel free to put up a PR that makes the documentation more clear.