added switch between fuzzy and normal time in furrytime

This commit is contained in:
Paul Wilde 2022-09-27 18:32:47 +01:00
parent 0b19f47483
commit 8686a7545a
2 changed files with 15 additions and 4 deletions

View file

@ -82,11 +82,22 @@ proc getObject(time: string): Info =
data.border = default_fg data.border = default_fg
return data 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() = proc main() =
let time = getFuzzyTime() let time = getFuzzyTime()
let data = getObject(time) show(time)
outputData(data)
if isMainModule: if isMainModule:
main() main()

View file

@ -46,10 +46,10 @@ proc selectRemmina(conn: string) =
case output: case output:
of "connect": of "connect":
startRemmina(conn) startRemmina(conn)
switchWorkspace() #switchWorkspace()
of "edit": of "edit":
editRemmina(conn) editRemmina(conn)
switchWorkspace() #switchWorkspace()
of "back": of "back":
main() main()