i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Formatting: treat `key` as a shortcut for `key:true`

Open MaxVerevkin opened this issue 1 year ago • 2 comments

For example .dur(hms) instead of .dur(hms:true).

MaxVerevkin avatar Sep 07 '24 19:09 MaxVerevkin

I like the idea, but I think we'd want to only do that, if the parameter is a boolean. Otherwise we'd get odd errors for args like arg_takes_number, arg_takes_string

bim9262 avatar Sep 07 '24 23:09 bim9262

Funny thing is that the comments in parse.rs suggest this was the intention all along

https://github.com/greshake/i3status-rust/blob/a2704aedebf8818628977cde99a5a1886e63e09f/src/formatting/parse.rs#L114-L116

MaxVerevkin avatar Sep 08 '24 16:09 MaxVerevkin