added switch between fuzzy and normal time in furrytime
This commit is contained in:
parent
0b19f47483
commit
8686a7545a
2 changed files with 15 additions and 4 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue