mirror of
https://codeberg.org/icewind/shortcutd.git
synced 2026-06-03 09:14:07 +02:00
dont eat all the cpu
This commit is contained in:
parent
4fbdc1164c
commit
3307be701d
2 changed files with 4 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ Description=shortcutd
|
|||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectSystem=full
|
||||
ProtectSystem=strict
|
||||
RestrictSUIDSGID=true
|
||||
PrivateNetwork=true
|
||||
CapabilityBoundingSet=true
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use std::fmt::{self, Display};
|
|||
use std::str::FromStr;
|
||||
use std::sync::mpsc::{channel, Receiver};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Duration;
|
||||
|
||||
mod keycodes;
|
||||
|
||||
|
|
@ -219,6 +220,8 @@ impl ShortcutListener {
|
|||
tx.send(shortcut.clone()).unwrap()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
std::thread::sleep(Duration::from_millis(10));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue