From a7ccd08ed429bbfd4724a77b3ea8f6d33abf87a9 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 13 May 2023 18:03:39 +0200 Subject: [PATCH 01/22] Added mode indicator --- core/modes/mode_indicator.py | 172 +++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 core/modes/mode_indicator.py diff --git a/core/modes/mode_indicator.py b/core/modes/mode_indicator.py new file mode 100644 index 0000000000..7beda0b7df --- /dev/null +++ b/core/modes/mode_indicator.py @@ -0,0 +1,172 @@ +from talon import app, registry, scope, ui, Module +from talon.canvas import Canvas +from talon.skia.canvas import Canvas as SkiaCanvas +from talon.skia.imagefilter import ImageFilter +from talon.screen import Screen +from talon.ui import Rect + +prefix = "mode_indicator" +canvas: Canvas = None +current_mode = "" +mod = Module() + +setting_show = mod.setting( + f"{prefix}_show", + bool, + False, + "If true the mode indicator is shown", +) +setting_size = mod.setting( + f"{prefix}_size", + float, + 30, + "Mode indicator diameter in pixels", +) +setting_x = mod.setting( + f"{prefix}_x", + float, + None, + "Mode indicator center X-position in percentages(0-1)", +) +setting_y = mod.setting( + f"{prefix}_y", + float, + None, + "Mode indicator center Y-position in percentages(0-1)", +) +setting_color_sleep = mod.setting( + f"{prefix}_color_sleep", + str, + "808080", # Grey +) +setting_color_dictation = mod.setting( + f"{prefix}_color_dictation", + str, + "da70d6", # Orchid +) +setting_color_mixed = mod.setting( + f"{prefix}_color_mixed", + str, + "6b8e23", # OliveDrab +) +setting_color_other = mod.setting( + f"{prefix}_color_other", + str, + "f8f8ff", # GhostWhite +) +setting_color_alpha = mod.setting( + f"{prefix}_color_alpha", + float, + 0.5, + "Mode indicator alpha/opacity in percentages(0-1)", +) + +setting_paths = { + s.path + for s in [ + setting_show, + setting_size, + setting_x, + setting_y, + setting_color_sleep, + setting_color_dictation, + setting_color_mixed, + setting_color_other, + setting_color_alpha, + ] +} + + +def get_color() -> str: + if current_mode == "sleep": + color = setting_color_sleep.get() + elif current_mode == "dictation": + color = setting_color_dictation.get() + elif current_mode == "mixed": + color = setting_color_mixed.get() + else: + color = setting_color_other.get() + alpha = f"{int(setting_color_alpha.get() * 255):02x}" + return color + alpha + + +def on_draw(c: SkiaCanvas): + c.paint.style = c.paint.Style.FILL + c.paint.color = get_color() + c.paint.imagefilter = ImageFilter.drop_shadow(1, 1, 1, 1, "000000") + c.draw_circle(c.rect.center.x, c.rect.center.y, c.rect.height / 2 - 2) + + +def move_indicator(): + screen: Screen = ui.main_screen() + rect = screen.rect + radius = setting_size.get() * screen.scale / 2 + + if setting_x.get() is not None: + x = setting_x.get() * rect.width - radius + else: + x = rect.center.x - radius + + if setting_y.get() is not None: + y = setting_y.get() * rect.height - radius + else: + y = rect.top + + side = 2 * radius + canvas.move(x, y) + canvas.resize(side, side) + + +def show_indicator(): + global canvas + canvas = Canvas.from_rect(Rect(0, 0, 0, 0)) + canvas.register("draw", on_draw) + + +def hide_indicator(): + global canvas + canvas.unregister("draw", on_draw) + canvas.close() + canvas = None + + +def update_indicator(): + if setting_show.get(): + if not canvas: + show_indicator() + move_indicator() + canvas.freeze() + elif canvas: + hide_indicator() + + +def on_update_contexts(): + global current_mode + modes = scope.get("mode") + if "sleep" in modes: + mode = "sleep" + elif "dictation" in modes: + if "command" in modes: + mode = "mixed" + else: + mode = "dictation" + else: + mode = "other" + + if current_mode != mode: + current_mode = mode + update_indicator() + + +def on_update_settings(updated_settings: set[str]): + if setting_paths & updated_settings: + update_indicator() + + +def on_ready(): + registry.register("update_contexts", on_update_contexts) + registry.register("update_settings", on_update_settings) + ui.register("screen_change", lambda _: update_indicator) + + +app.register("ready", on_ready) From dc0b17390f47564dd818069f13dc97dd8117f869 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 13 May 2023 16:05:23 +0000 Subject: [PATCH 02/22] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- core/modes/mode_indicator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modes/mode_indicator.py b/core/modes/mode_indicator.py index 7beda0b7df..8c201a1c98 100644 --- a/core/modes/mode_indicator.py +++ b/core/modes/mode_indicator.py @@ -1,8 +1,8 @@ -from talon import app, registry, scope, ui, Module +from talon import Module, app, registry, scope, ui from talon.canvas import Canvas +from talon.screen import Screen from talon.skia.canvas import Canvas as SkiaCanvas from talon.skia.imagefilter import ImageFilter -from talon.screen import Screen from talon.ui import Rect prefix = "mode_indicator" From beacb69767024dd734b31209a5172f5b93700673 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 13 May 2023 18:09:16 +0200 Subject: [PATCH 03/22] Updated descriptions --- core/modes/mode_indicator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modes/mode_indicator.py b/core/modes/mode_indicator.py index 8c201a1c98..c0f7ff7737 100644 --- a/core/modes/mode_indicator.py +++ b/core/modes/mode_indicator.py @@ -26,13 +26,13 @@ f"{prefix}_x", float, None, - "Mode indicator center X-position in percentages(0-1)", + "Mode indicator center X-position in percentages(0-1). 0=left, 1=right", ) setting_y = mod.setting( f"{prefix}_y", float, None, - "Mode indicator center Y-position in percentages(0-1)", + "Mode indicator center Y-position in percentages(0-1). 0=top, 1=bottom", ) setting_color_sleep = mod.setting( f"{prefix}_color_sleep", From 4a3eefacd208dafb3e11d98fa030da301050e127 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 13 May 2023 18:10:52 +0200 Subject: [PATCH 04/22] Moved to plugins folder --- {core/modes => plugin}/mode_indicator.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {core/modes => plugin}/mode_indicator.py (100%) diff --git a/core/modes/mode_indicator.py b/plugin/mode_indicator.py similarity index 100% rename from core/modes/mode_indicator.py rename to plugin/mode_indicator.py From e717b3207409997567ef7304867521ba9174cefb Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 13 May 2023 19:03:34 +0200 Subject: [PATCH 05/22] Moved mode indicator to separate directory with its settings file --- plugin/{ => mode_indicator}/mode_indicator.py | 71 +++++++------------ plugin/mode_indicator/mode_indicator.talon | 19 +++++ 2 files changed, 43 insertions(+), 47 deletions(-) rename plugin/{ => mode_indicator}/mode_indicator.py (69%) create mode 100644 plugin/mode_indicator/mode_indicator.talon diff --git a/plugin/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py similarity index 69% rename from plugin/mode_indicator.py rename to plugin/mode_indicator/mode_indicator.py index c0f7ff7737..e6c7f4fc05 100644 --- a/plugin/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -5,61 +5,39 @@ from talon.skia.imagefilter import ImageFilter from talon.ui import Rect -prefix = "mode_indicator" canvas: Canvas = None current_mode = "" mod = Module() setting_show = mod.setting( - f"{prefix}_show", + "mode_indicator_show", bool, - False, - "If true the mode indicator is shown", + desc="If true the mode indicator is shown", ) setting_size = mod.setting( - f"{prefix}_size", + "mode_indicator_size", float, - 30, - "Mode indicator diameter in pixels", + desc="Mode indicator diameter in pixels", ) setting_x = mod.setting( - f"{prefix}_x", + "mode_indicator_x", float, - None, - "Mode indicator center X-position in percentages(0-1). 0=left, 1=right", + desc="Mode indicator center X-position in percentages(0-1). 0=left, 1=right", ) setting_y = mod.setting( - f"{prefix}_y", + "mode_indicator_y", float, - None, - "Mode indicator center Y-position in percentages(0-1). 0=top, 1=bottom", -) -setting_color_sleep = mod.setting( - f"{prefix}_color_sleep", - str, - "808080", # Grey -) -setting_color_dictation = mod.setting( - f"{prefix}_color_dictation", - str, - "da70d6", # Orchid -) -setting_color_mixed = mod.setting( - f"{prefix}_color_mixed", - str, - "6b8e23", # OliveDrab -) -setting_color_other = mod.setting( - f"{prefix}_color_other", - str, - "f8f8ff", # GhostWhite + desc="Mode indicator center Y-position in percentages(0-1). 0=top, 1=bottom", ) setting_color_alpha = mod.setting( - f"{prefix}_color_alpha", + "mode_indicator_color_alpha", float, - 0.5, - "Mode indicator alpha/opacity in percentages(0-1)", + desc="Mode indicator alpha/opacity in percentages(0-1). 0=fully transparent, 1=fully opaque", ) +setting_color_sleep = mod.setting("mode_indicator_color_sleep", str) +setting_color_dictation = mod.setting("mode_indicator_color_dictation", str) +setting_color_mixed = mod.setting("mode_indicator_color_mixed", str) +setting_color_other = mod.setting("mode_indicator_color_other", str) setting_paths = { s.path @@ -68,11 +46,11 @@ setting_size, setting_x, setting_y, + setting_color_alpha, setting_color_sleep, setting_color_dictation, setting_color_mixed, setting_color_other, - setting_color_alpha, ] } @@ -86,8 +64,7 @@ def get_color() -> str: color = setting_color_mixed.get() else: color = setting_color_other.get() - alpha = f"{int(setting_color_alpha.get() * 255):02x}" - return color + alpha + return f"{color}{int(setting_color_alpha.get() * 255):02x}" def on_draw(c: SkiaCanvas): @@ -102,15 +79,15 @@ def move_indicator(): rect = screen.rect radius = setting_size.get() * screen.scale / 2 - if setting_x.get() is not None: - x = setting_x.get() * rect.width - radius - else: - x = rect.center.x - radius + x = rect.left + min( + max(setting_x.get() * rect.width - radius, 0), + rect.width - 2 * radius, + ) - if setting_y.get() is not None: - y = setting_y.get() * rect.height - radius - else: - y = rect.top + y = rect.top + min( + max(setting_y.get() * rect.height - radius, 0), + rect.height - 2 * radius, + ) side = 2 * radius canvas.move(x, y) diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon new file mode 100644 index 0000000000..addc5c47e1 --- /dev/null +++ b/plugin/mode_indicator/mode_indicator.talon @@ -0,0 +1,19 @@ +settings(): + # Don't show mode indicator by default + user.mode_indicator_show = false + # 30pixels diameter + user.mode_indicator_size = 30 + # Center horizontally + user.mode_indicator_x = 0.5 + # Align top + user.mode_indicator_y = 0 + # Half transparent + user.mode_indicator_color_alpha = 0.5 + # Grey colar for sleep mode + user.mode_indicator_color_sleep = "808080" + # Orchid colar for dictation mode + user.mode_indicator_color_dictation = "da70d6" + # OliveDrab colar for mixed mode + user.mode_indicator_color_mixed = "6b8e23" + # GhostWhite colar for command/other modes + user.mode_indicator_color_other = "f8f8ff" From 929f88d85cfc6cbf33d64c2bba061a2e6b244a46 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 13 May 2023 19:06:41 +0200 Subject: [PATCH 06/22] Updated comments --- plugin/mode_indicator/mode_indicator.talon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon index addc5c47e1..805a201d00 100644 --- a/plugin/mode_indicator/mode_indicator.talon +++ b/plugin/mode_indicator/mode_indicator.talon @@ -9,11 +9,11 @@ settings(): user.mode_indicator_y = 0 # Half transparent user.mode_indicator_color_alpha = 0.5 - # Grey colar for sleep mode + # Grey color for sleep mode user.mode_indicator_color_sleep = "808080" - # Orchid colar for dictation mode + # Orchid color for dictation mode user.mode_indicator_color_dictation = "da70d6" - # OliveDrab colar for mixed mode + # OliveDrab color for mixed mode user.mode_indicator_color_mixed = "6b8e23" - # GhostWhite colar for command/other modes + # GhostWhite color for command/other modes user.mode_indicator_color_other = "f8f8ff" From 08a6639a05d4adb63af5df5a5916ac1c22165e06 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sun, 14 May 2023 14:30:39 +0200 Subject: [PATCH 07/22] Update plugin/mode_indicator/mode_indicator.py Co-authored-by: Michael Arntzenius --- plugin/mode_indicator/mode_indicator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index e6c7f4fc05..b68dc5b858 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -13,6 +13,7 @@ "mode_indicator_show", bool, desc="If true the mode indicator is shown", + default=False, ) setting_size = mod.setting( "mode_indicator_size", From af74cbe056063e15c6ee7a252f50fb340879bcb1 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Mon, 15 May 2023 03:23:43 +0200 Subject: [PATCH 08/22] Added gradient to mode indicator --- plugin/mode_indicator/mode_indicator.py | 49 ++++++++++++++++++++----- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index b68dc5b858..422577e4b0 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -1,4 +1,4 @@ -from talon import Module, app, registry, scope, ui +from talon import Module, app, registry, scope, ui, skia from talon.canvas import Canvas from talon.screen import Screen from talon.skia.canvas import Canvas as SkiaCanvas @@ -56,23 +56,52 @@ } -def get_color() -> str: +def get_mode_color() -> str: if current_mode == "sleep": - color = setting_color_sleep.get() + return setting_color_sleep.get() elif current_mode == "dictation": - color = setting_color_dictation.get() + return setting_color_dictation.get() elif current_mode == "mixed": - color = setting_color_mixed.get() + return setting_color_mixed.get() else: - color = setting_color_other.get() - return f"{color}{int(setting_color_alpha.get() * 255):02x}" + return setting_color_other.get() + + +def get_alpha_color() -> str: + return f"{int(setting_color_alpha.get() * 255):02x}" + + +def get_gradient_color(color: str) -> str: + # hex -> rgb + (r, g, b) = tuple(int(color[i : i + 2], 16) for i in (0, 2, 4)) + # Darken rgb + factor = 0.6 + r, g, b = int(r * factor), int(g * factor), int(b * factor) + # rgb -> hex + return f"{r:02x}{g:02x}{b:02x}" + + +def get_colors(): + color_mode = get_mode_color() + color_gradient = get_gradient_color(color_mode) + color_alpha = get_alpha_color() + return f"{color_mode}{color_alpha}", f"{color_gradient}" def on_draw(c: SkiaCanvas): + color_mode, color_gradient = get_colors() + radius = c.rect.height / 2 - 2 + x, y = c.rect.center.x, c.rect.center.y + + c.paint.shader = skia.Shader.radial_gradient( + (x, y), radius, [color_mode, color_gradient] + ) + + c.paint.imagefilter = ImageFilter.drop_shadow(1, 1, 1, 1, color_gradient) + c.paint.style = c.paint.Style.FILL - c.paint.color = get_color() - c.paint.imagefilter = ImageFilter.drop_shadow(1, 1, 1, 1, "000000") - c.draw_circle(c.rect.center.x, c.rect.center.y, c.rect.height / 2 - 2) + c.paint.color = color_mode + c.draw_circle(x, y, radius) def move_indicator(): From 3dafbdfc48eb933245f05d15ab009fa364b08933 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 01:24:13 +0000 Subject: [PATCH 09/22] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- plugin/mode_indicator/mode_indicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index 422577e4b0..8e5059915d 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -1,4 +1,4 @@ -from talon import Module, app, registry, scope, ui, skia +from talon import Module, app, registry, scope, skia, ui from talon.canvas import Canvas from talon.screen import Screen from talon.skia.canvas import Canvas as SkiaCanvas From d25488a29a4bda057a9c09a4f50a82a96b5cf985 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Mon, 15 May 2023 03:29:38 +0200 Subject: [PATCH 10/22] Added gradient setting --- plugin/mode_indicator/mode_indicator.py | 8 +++++++- plugin/mode_indicator/mode_indicator.talon | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index 422577e4b0..484e9685c0 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -35,6 +35,11 @@ float, desc="Mode indicator alpha/opacity in percentages(0-1). 0=fully transparent, 1=fully opaque", ) +setting_color_gradient = mod.setting( + "mode_indicator_color_gradient", + float, + desc="Mode indicator gradient brightness in percentages(0-1). 0=black, 1=white", +) setting_color_sleep = mod.setting("mode_indicator_color_sleep", str) setting_color_dictation = mod.setting("mode_indicator_color_dictation", str) setting_color_mixed = mod.setting("mode_indicator_color_mixed", str) @@ -48,6 +53,7 @@ setting_x, setting_y, setting_color_alpha, + setting_color_gradient, setting_color_sleep, setting_color_dictation, setting_color_mixed, @@ -72,10 +78,10 @@ def get_alpha_color() -> str: def get_gradient_color(color: str) -> str: + factor = setting_color_gradient.get() # hex -> rgb (r, g, b) = tuple(int(color[i : i + 2], 16) for i in (0, 2, 4)) # Darken rgb - factor = 0.6 r, g, b = int(r * factor), int(g * factor), int(b * factor) # rgb -> hex return f"{r:02x}{g:02x}{b:02x}" diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon index 805a201d00..e4fa749318 100644 --- a/plugin/mode_indicator/mode_indicator.talon +++ b/plugin/mode_indicator/mode_indicator.talon @@ -9,6 +9,8 @@ settings(): user.mode_indicator_y = 0 # Half transparent user.mode_indicator_color_alpha = 0.5 + # Grey gradient + user.mode_indicator_color_gradient = 0.5 # Grey color for sleep mode user.mode_indicator_color_sleep = "808080" # Orchid color for dictation mode From df79a9fc8e5819a99cfd2e3b56ac896fef7fddcb Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Mon, 15 May 2023 03:32:56 +0200 Subject: [PATCH 11/22] Updated description --- plugin/mode_indicator/mode_indicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index e6c047aad9..b246a46ecf 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -38,7 +38,7 @@ setting_color_gradient = mod.setting( "mode_indicator_color_gradient", float, - desc="Mode indicator gradient brightness in percentages(0-1). 0=black, 1=white", + desc="Mode indicator gradient brightness in percentages(0-1). 0=darkest, 1=brightest", ) setting_color_sleep = mod.setting("mode_indicator_color_sleep", str) setting_color_dictation = mod.setting("mode_indicator_color_dictation", str) From 846a1a3a534367907b6d5555c0d75e7b6fdf8150 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Mon, 15 May 2023 03:39:49 +0200 Subject: [PATCH 12/22] cleanup --- plugin/mode_indicator/mode_indicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index b246a46ecf..41a9e33db9 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -96,8 +96,8 @@ def get_colors(): def on_draw(c: SkiaCanvas): color_mode, color_gradient = get_colors() - radius = c.rect.height / 2 - 2 x, y = c.rect.center.x, c.rect.center.y + radius = c.rect.height / 2 - 2 c.paint.shader = skia.Shader.radial_gradient( (x, y), radius, [color_mode, color_gradient] From b1fea8cfaa959b95b0528aa983732f32cf861bb2 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Wed, 17 May 2023 17:06:29 +0200 Subject: [PATCH 13/22] Added specific color for command mode. --- plugin/mode_indicator/mode_indicator.py | 6 ++++++ plugin/mode_indicator/mode_indicator.talon | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index 41a9e33db9..4b5b98970c 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -43,6 +43,7 @@ setting_color_sleep = mod.setting("mode_indicator_color_sleep", str) setting_color_dictation = mod.setting("mode_indicator_color_dictation", str) setting_color_mixed = mod.setting("mode_indicator_color_mixed", str) +setting_color_command = mod.setting("mode_indicator_color_command", str) setting_color_other = mod.setting("mode_indicator_color_other", str) setting_paths = { @@ -57,6 +58,7 @@ setting_color_sleep, setting_color_dictation, setting_color_mixed, + setting_color_command, setting_color_other, ] } @@ -69,6 +71,8 @@ def get_mode_color() -> str: return setting_color_dictation.get() elif current_mode == "mixed": return setting_color_mixed.get() + elif current_mode == "command": + return setting_color_command.get() else: return setting_color_other.get() @@ -163,6 +167,8 @@ def on_update_contexts(): mode = "mixed" else: mode = "dictation" + elif "command" in modes: + mode = "command" else: mode = "other" diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon index e4fa749318..aeba67b689 100644 --- a/plugin/mode_indicator/mode_indicator.talon +++ b/plugin/mode_indicator/mode_indicator.talon @@ -7,8 +7,8 @@ settings(): user.mode_indicator_x = 0.5 # Align top user.mode_indicator_y = 0 - # Half transparent - user.mode_indicator_color_alpha = 0.5 + # Slightly transparent + user.mode_indicator_color_alpha = 0.75 # Grey gradient user.mode_indicator_color_gradient = 0.5 # Grey color for sleep mode @@ -17,5 +17,7 @@ settings(): user.mode_indicator_color_dictation = "da70d6" # OliveDrab color for mixed mode user.mode_indicator_color_mixed = "6b8e23" - # GhostWhite color for command/other modes + # CornflowerBlue color for command mode + user.mode_indicator_color_command = "6495ed" + # GhostWhite color for other modes user.mode_indicator_color_other = "f8f8ff" From 87b1668544d43adc51a20aa8a8f0d4a490bfe250 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 27 May 2023 17:11:04 +0200 Subject: [PATCH 14/22] Update mode_indicator.talon Boolean is not supported in public --- plugin/mode_indicator/mode_indicator.talon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon index aeba67b689..5c5cb17621 100644 --- a/plugin/mode_indicator/mode_indicator.talon +++ b/plugin/mode_indicator/mode_indicator.talon @@ -1,6 +1,6 @@ settings(): # Don't show mode indicator by default - user.mode_indicator_show = false + user.mode_indicator_show = 0 # 30pixels diameter user.mode_indicator_size = 30 # Center horizontally From f2333b24f67244107710a6ecff8d3a83b582668b Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 27 May 2023 17:47:33 +0200 Subject: [PATCH 15/22] Updated default colors --- plugin/mode_indicator/mode_indicator.talon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon index 5c5cb17621..6b54783dd4 100644 --- a/plugin/mode_indicator/mode_indicator.talon +++ b/plugin/mode_indicator/mode_indicator.talon @@ -13,10 +13,10 @@ settings(): user.mode_indicator_color_gradient = 0.5 # Grey color for sleep mode user.mode_indicator_color_sleep = "808080" - # Orchid color for dictation mode - user.mode_indicator_color_dictation = "da70d6" - # OliveDrab color for mixed mode - user.mode_indicator_color_mixed = "6b8e23" + # Gold color for dictation mode + user.mode_indicator_color_dictation = "ffd700" + # MediumSeaGreen color for mixed mode + user.mode_indicator_color_mixed = "3cb371" # CornflowerBlue color for command mode user.mode_indicator_color_command = "6495ed" # GhostWhite color for other modes From 830ab3ea866c994057eb9d8e6e09516cebacf07e Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 15 Jun 2023 11:06:48 +0200 Subject: [PATCH 16/22] Don't apply screen scale on mac --- plugin/mode_indicator/mode_indicator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index 4b5b98970c..524d03d087 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -117,7 +117,8 @@ def on_draw(c: SkiaCanvas): def move_indicator(): screen: Screen = ui.main_screen() rect = screen.rect - radius = setting_size.get() * screen.scale / 2 + scale = screen.scale if app.platform != "mac" else 1 + radius = setting_size.get() * scale / 2 x = rect.left + min( max(setting_x.get() * rect.width - radius, 0), From 6f31919b2f729fd679142443b5e0effc329b8614 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 15 Jun 2023 11:09:15 +0200 Subject: [PATCH 17/22] Resize before move --- plugin/mode_indicator/mode_indicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/mode_indicator.py b/plugin/mode_indicator/mode_indicator.py index 524d03d087..fd2dea58c8 100644 --- a/plugin/mode_indicator/mode_indicator.py +++ b/plugin/mode_indicator/mode_indicator.py @@ -131,8 +131,8 @@ def move_indicator(): ) side = 2 * radius - canvas.move(x, y) canvas.resize(side, side) + canvas.move(x, y) def show_indicator(): From f6466dee10005e25a2755ed1ab6b899f5c28cfd7 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 24 Jun 2023 17:31:53 +0200 Subject: [PATCH 18/22] Added readme to mode indicator --- plugin/mode_indicator/README.md | 29 +++++++++++++++++++++ plugin/mode_indicator/images/command.png | Bin 0 -> 2960 bytes plugin/mode_indicator/images/dictation.png | Bin 0 -> 2916 bytes plugin/mode_indicator/images/mixed.png | Bin 0 -> 2863 bytes plugin/mode_indicator/images/other.png | Bin 0 -> 2293 bytes plugin/mode_indicator/images/sleep.png | Bin 0 -> 1835 bytes 6 files changed, 29 insertions(+) create mode 100644 plugin/mode_indicator/README.md create mode 100644 plugin/mode_indicator/images/command.png create mode 100644 plugin/mode_indicator/images/dictation.png create mode 100644 plugin/mode_indicator/images/mixed.png create mode 100644 plugin/mode_indicator/images/other.png create mode 100644 plugin/mode_indicator/images/sleep.png diff --git a/plugin/mode_indicator/README.md b/plugin/mode_indicator/README.md new file mode 100644 index 0000000000..c9ac742eab --- /dev/null +++ b/plugin/mode_indicator/README.md @@ -0,0 +1,29 @@ +# Mode indicator + +Graphical indicator to show you which Talon mode your currently are in. Supports a lot of settings to move, resize and change colors. + +## Default colors + +Command mode +![Command mode](./images/command.png) + +Dictation mode +![Dictation mode](./images/dictation.png) + +Mixed mode +![Mixed mode](./images/mixed.png) + +Sleep mode +![Sleep mode](./images/sleep.png) + +Other modes +![Others mode](./images/other.png) + +## Usage + +The mode indicator is enabled with the following setting +`user.mode_indicator_show = true` + +## Demo + +[YouTube - Mode indicator demo](https://youtu.be/1lqtfM4vvH4) diff --git a/plugin/mode_indicator/images/command.png b/plugin/mode_indicator/images/command.png new file mode 100644 index 0000000000000000000000000000000000000000..a2495d943ce34b21f37f17baab598dc76bea38ec GIT binary patch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96B%u}cB__0ZWG3~s-6TEdoU4sE}-q2sI`rYT1i!TRrahnz(2;#z{4VXa? zB>9P4*tU?D<-)5iG0zLIpiKb?+MSy|<>Bz_GMj&KcaPx^86xxPo!}B3dK%AbKu?r`kv8Sg_X#qIx zJitq*S^@P042YNaX(}6&Gre-@viPQcfgS=2a<%ql&z?)X-71TKYRR)PosbUD80CNKCr(eaBp#cZN+Xb-?l%$ zKkFAf+-ta?Fr4J~ldRp83-7T4Kq|0~n30n_KXcBV<*CUTJE^_V6Z@BhL;zCH>VEgh zl^-`poNOW(JsJqx9(gku}d{(?={^vHxSvBzZ!)1%`y zuClMy-v*a8CN64;os5;=Fj1CU_`hk_@ z*YXc;?F1;ih^05zkT_ZHH2}hI?U_{s8ibJiCxg8Og0tZ|_`g1y{SP}pu#QD)8TbGI N002ovPDHLkV1nB#WOV=l literal 0 HcmV?d00001 diff --git a/plugin/mode_indicator/images/other.png b/plugin/mode_indicator/images/other.png new file mode 100644 index 0000000000000000000000000000000000000000..18e95d3f7f328055240fea67ad9e303b37d873b8 GIT binary patch literal 2293 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oN zB=7(L2zp6GK~!i%)tU=alQ|TIQ(8a@2&m}Hij2bgm-Lr=+p!?XE;}QuvJ4k{WAmK1 zuW7x^xb0VzGsaxLd}+>;bCP@swWm*?UZyF?<>h6BUayxvefpFxE-upf`FX^Y{pwPC z^5n@>zBTxQ5ByPEFSTCLWVff-irM*V-MDch-MqP+*4Nk5%F4~uXf)y(AQ8vYkShV> z5l8ViZ}!vS;bFF#v%#}|4w1?+*5kCTWQKyYurQzQ-MgDMHy`A5GtJI6qTCi&wOkpP z*RNY?clS-qFTLJnRz^SD?~}GG0fYJ_%`;riW%YU^J$P_GZEZbD^Yil=&}`JHTBZsH zg^rJp)3awUVop(6{GS8L2nuP(lFI=wAoV|kkrioPYBm?sKphxw>puU7_V zDqv7#Z*MQXeEBLmj|HFz0O)wV4hW@zgUrm-Bennm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V=6xiT;Wgq4J4S&%NmntYn?)dn#bzK;1y#wz$w z6%73)1Ok+63&vtN!~oDCP literal 0 HcmV?d00001 diff --git a/plugin/mode_indicator/images/sleep.png b/plugin/mode_indicator/images/sleep.png new file mode 100644 index 0000000000000000000000000000000000000000..77e72ddd826c3d4abfa6cf84d8df5d403abd3633 GIT binary patch literal 1835 zcmV+`2h{k9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oN zB=7(L2Czv)K~!i%)tcK+7CRKhi`?WQh+Mq@F`Dp(F$5AJ@Xmh>fp?Ioi6QW&FNj7G zl%Sx1!133dMb_z=&m*1rgH zjL6|0M9aj)M3|YG2|YbMm6B4)T`-!+fDEF-BSQ}Sj?forZf?G)r`I6{vR}M-5!a~C zpFhX>n5znuCImyax3^=OC^8^Jks&ADVbxP19Vpc&B}VOl=v!M`3!9spVSj(WGEzzr zf&n)ix3E4a_uUD43(s904L>?YjB_^#iOSM93c{geQTJuOh>Z z0@5)WT@D~lhPS(DjE@D>5kYkXn@AgdW68y(2?3g1I&kBVv`s)48R(uiPEtCqh!oek zPQ*e6WiGM^0ZgoD0d72y1CF#01kmOrINVt;i+~-hXWI30kwplT%UCDncfnYV_xk`{ zQ~PBBA(yqsksTpC-Cv=WQ6kXAw{EpLRQCnE2)QIWvIt>fJ_uu=jBtm9w9OrpXxru* zy7yJP>MCpL+O5hElN}*^9ruYbUXY=PoRaS1IZvs+x}M&{@9nzkd~4Mror~-U;iw>8 z2(_5Gp)MeG+C}XiHR)JEZ9uv{KtoC{E=>poAe@_sjMQiuE}d(x%VA21*S)WFuTx4? z2YgN>l_4b;SrI~HaEQdYiAa&rIHbA^Ryw#85ux;#oAd;k9Z7_mgiA74}fMsO}NK0Y1|fD{>s(e6}A7G+8f?JCp0MZz_N zd-wJA#Rx&#+S-2kM*CmL9;vk9(1;T?>L7iBa!T#)v`8sxmtG{?OTs@5Mn^}Z4MYew z$(9_HB7`SF-pO~G0iTZe7*CB&-17XKw%f*&5=>kfPR+NyplarJ2cu_A!GF(Iy zk-#;VTKy330~td@L-Ab*LWmBn9c7{el%w+}Fo3*ef#s}~Lug2$9p^AUeah~d*aDiU<}^ zNVs?JUL*xFsy^(l{O=Hu!ddIbk00ZoWjI9A5obzB5k!iUgR^X{+D%9oeoOtY{|+JG zIAPDnUZRDM(HtUiM8KJeoTS7N)q(4PqfR1#i0JL@jbtFSU5h`=2sj2Yd}f3gQiqSy zTU%R^AnJUR)p`Ml7#w7$z*(Hu>$r5iiE1~g6=h{m7eWA}I59*A22ucH`5+oq{I!=VB4^Hwfqey`m#8abQL Date: Sat, 24 Jun 2023 15:32:29 +0000 Subject: [PATCH 19/22] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- plugin/mode_indicator/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/mode_indicator/README.md b/plugin/mode_indicator/README.md index c9ac742eab..a26c48ca79 100644 --- a/plugin/mode_indicator/README.md +++ b/plugin/mode_indicator/README.md @@ -4,24 +4,24 @@ Graphical indicator to show you which Talon mode your currently are in. Supports ## Default colors -Command mode +Command mode ![Command mode](./images/command.png) -Dictation mode +Dictation mode ![Dictation mode](./images/dictation.png) -Mixed mode +Mixed mode ![Mixed mode](./images/mixed.png) -Sleep mode +Sleep mode ![Sleep mode](./images/sleep.png) -Other modes +Other modes ![Others mode](./images/other.png) ## Usage -The mode indicator is enabled with the following setting +The mode indicator is enabled with the following setting `user.mode_indicator_show = true` ## Demo From 4ca08d4873aef3ab5bee7bababc0fc0940ba167e Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 24 Jun 2023 17:43:22 +0200 Subject: [PATCH 20/22] Update plugin/mode_indicator/README.md Co-authored-by: Phil Cohen --- plugin/mode_indicator/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/README.md b/plugin/mode_indicator/README.md index a26c48ca79..6f171cd5f9 100644 --- a/plugin/mode_indicator/README.md +++ b/plugin/mode_indicator/README.md @@ -22,7 +22,7 @@ Other modes ## Usage The mode indicator is enabled with the following setting -`user.mode_indicator_show = true` +`user.mode_indicator_show = 1` ## Demo From a195077d469a4e4aedca4a8e863682a908e3152c Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 24 Jun 2023 17:44:56 +0200 Subject: [PATCH 21/22] Added new lines --- plugin/mode_indicator/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/mode_indicator/README.md b/plugin/mode_indicator/README.md index 6f171cd5f9..f8e2ffc9bb 100644 --- a/plugin/mode_indicator/README.md +++ b/plugin/mode_indicator/README.md @@ -5,18 +5,23 @@ Graphical indicator to show you which Talon mode your currently are in. Supports ## Default colors Command mode + ![Command mode](./images/command.png) Dictation mode + ![Dictation mode](./images/dictation.png) Mixed mode + ![Mixed mode](./images/mixed.png) Sleep mode + ![Sleep mode](./images/sleep.png) Other modes + ![Others mode](./images/other.png) ## Usage From 7ae900acbed749e2f1929dcbcc38ced4a2621880 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 24 Jun 2023 17:46:31 +0200 Subject: [PATCH 22/22] Updated comment --- plugin/mode_indicator/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/mode_indicator/README.md b/plugin/mode_indicator/README.md index f8e2ffc9bb..0f8d626058 100644 --- a/plugin/mode_indicator/README.md +++ b/plugin/mode_indicator/README.md @@ -26,7 +26,7 @@ Other modes ## Usage -The mode indicator is enabled with the following setting +You can enable this by changing the following setting in `mode_indicator.talon`: `user.mode_indicator_show = 1` ## Demo