From efd887f51aae0e908330d6c0b38f09db959a2e23 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 8 Dec 2021 19:43:59 +0100 Subject: [PATCH] xss-dimer: blacken --- bin/xss-dimmer | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/xss-dimmer b/bin/xss-dimmer index 127b21a..7ff04f9 100755 --- a/bin/xss-dimmer +++ b/bin/xss-dimmer @@ -67,11 +67,9 @@ def on_draw(widget, event, options, background, start): # Remaining time remaining = str(round(options.delay - elapsed)) - cctx.select_font_face( - options.font, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD - ) + cctx.select_font_face(options.font, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD) cctx.set_font_size(wheight // 4) - _, _, twidth, theight, _, _ = cctx.text_extents("8"*len(remaining)) + _, _, twidth, theight, _, _ = cctx.text_extents("8" * len(remaining)) text_position = wwidth // 2 - twidth // 2, wheight // 2 + theight // 2 cctx.move_to(*text_position) cctx.set_source_rgba(1, 1, 1, opacity) @@ -90,6 +88,7 @@ def on_refresh(window, options, start): next_step = min(options.step, options.delay - elapsed) GLib.timeout_add(options.step * 1000, on_refresh, window, options, start) + # See: https://easings.net/ easing_functions = { "none": lambda x: x,