labnag: add --keyboard-focus option

The new `--keyboard-focus [none|on-demand|exclusive]` option (default:
`none`) allows to some keyboard controls in labnag:

  Right-arrow or Tab: move the button selection to the right
  Left-arrow or Shift-Tab: move the button selection to the left
  Enter: press the selected button
  Escape: close labnag

The selected button is highlighted with the inner 1px border. Maybe we can
instead use different colors for the selected button, but I prefer the
inner border for now because it doesn't require us to add new color
options or make them inherit labwc's theme.
This commit is contained in:
tokyo4j 2025-10-01 14:49:23 +09:00 committed by Johan Malm
parent 03c70e8a5e
commit ef73431367
3 changed files with 237 additions and 4 deletions

View file

@ -31,6 +31,9 @@ _labnag_ [options...]
*-y, --layer* overlay|top|bottom|background
Set the layer to use.
*-k, --keyboard-focus none|exclusive|on-demand*
Set the policy for keyboard focus.
*-f, --font* <font>
Set the font to use.