i3lock-color icon indicating copy to clipboard operation
i3lock-color copied to clipboard

Add options to draw indicator as polygon

Open Zabot opened this issue 3 years ago • 1 comments

Description

I needed a hexagon unlock indicator for my config, thought it turned out pretty neat and was worth sharing. This adds three new config options.

  • --polygon-sides=n enables drawing a regular polygon instead of a circle for the indicator. It defaults to 0, which draws a circle, and can be any integer greater then 2.
  • --polygon-offset=d specifies a rotation in degrees to apply to the polygon. At zero offset the first vertex is at (ind_x+radius,ind_y).
  • --polygon-highlight={0,1,2} defines the highlight mode while typing. 0 highlights a random edge on each keystroke. 1 highlights sequential edges walking clockwise around the indicator. 2 walks counter clockwise. The edge to highlight is based on the buffer position, so backspacing characters reverses the direction of rotation.

The value of --radius is the center to vertex distance of the polygon. --line-*, --inside-*, and --ring-* are all respected. Separators are not drawn.

Screenshots/screencaps

custom default

Release notes

Notes: Added config options to draw indicator as a polygon.

Zabot avatar Mar 27 '22 05:03 Zabot

This is SO COOL. I'll review and merge soon!

Raymo111 avatar Mar 27 '22 06:03 Raymo111