From 8686a7545ac8281857070b6336f253137a900932 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Tue, 27 Sep 2022 18:32:47 +0100 Subject: [PATCH] added switch between fuzzy and normal time in furrytime --- furrytime/src/furrytime.nim | 15 +++++++++++++-- remmina_choosurr/src/remmina_choosurr.nim | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/furrytime/src/furrytime.nim b/furrytime/src/furrytime.nim index c032f29..1a4d705 100644 --- a/furrytime/src/furrytime.nim +++ b/furrytime/src/furrytime.nim @@ -82,11 +82,22 @@ proc getObject(time: string): Info = data.border = default_fg return data +proc show(time: string, next_fuzzy: bool = false) = + let data = getObject(time) + let x = outputData(data) + if x == time: + case next_fuzzy: + of true: + let t = getFuzzyTime() + show(t, false) + else: + let t = now().format("HH:mm:ss") + show(t, true) + proc main() = let time = getFuzzyTime() - let data = getObject(time) - outputData(data) + show(time) if isMainModule: main() diff --git a/remmina_choosurr/src/remmina_choosurr.nim b/remmina_choosurr/src/remmina_choosurr.nim index e3c25f7..65a43fe 100644 --- a/remmina_choosurr/src/remmina_choosurr.nim +++ b/remmina_choosurr/src/remmina_choosurr.nim @@ -46,10 +46,10 @@ proc selectRemmina(conn: string) = case output: of "connect": startRemmina(conn) - switchWorkspace() + #switchWorkspace() of "edit": editRemmina(conn) - switchWorkspace() + #switchWorkspace() of "back": main()