set ENTER on pingclock to refresh pingclock

This commit is contained in:
Paul Wilde 2022-05-01 22:49:55 +01:00
parent d59ea16991
commit 2aa3e0db32
2 changed files with 7 additions and 7 deletions

View file

@ -57,7 +57,9 @@ proc main() =
let ping = get_ping()
if ping != last_ping:
let data = getObject(ping)
outputJSON(data)
let output = outputJSON(data)
if output == data.full_text:
main()
last_ping = ping
loop = not stoploop
if loop:

View file

@ -77,20 +77,18 @@ proc get_volume*(run_once: bool = false) =
else:
try:
let vol = parseInt(option)
discard execCmd("pamixer --set-volume " & $vol)
let x = execCmd("pamixer --set-volume " & $vol)
echo x
get_volume()
except:
echo getCurrentExceptionMsg()
get_volume()
if run_once:
break
last_vol = vol
sleep(1000)
if stoploop:
break
sleep(1000)
proc main() =
get_volume()