Remove the 3 second delay

This commit is contained in:
Rokosun 2023-12-26 19:02:06 +00:00
parent 2eb10c5b71
commit 666d24625b

View File

@ -1,4 +1,4 @@
from std/os import symlinkExists, getConfigDir, `/`, sleep
from std/os import symlinkExists, getConfigDir, `/`
from std/envvars import existsEnv, getEnv, delEnv, putEnv
from std/options import Option, some, get, isNone
from std/strutils import toLowerAscii, split
@ -121,8 +121,6 @@ proc enableLayout(args: tuple[layoutName: string, app: AppState]) {.thread.} =
# Restart mate-hud
if runCommand("/usr/bin/killall", ["mate-hud"]) == 0:
discard runCommand("/usr/bin/setsid", ["-f", "/usr/lib/mate-hud/mate-hud"])
# Wait 3 seconds for the effects to take place on screen
sleep(3000)
sendNotification(appID, "Layout Switcher", layoutName & " layout was enabled",
icon = iconsDir / layoutName.toLowerAscii() & "-layout.png")