aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/app
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-23 06:33:27 +0900
committerOphestra <cat@gensokyo.uk>2026-06-23 06:33:27 +0900
commit854bcc998ba2924859ae4ecd8f751332dc80d49f (patch)
tree4fc6ce032205d2c53515ee0222e0736a7eb88d2a /cmd/app
parent358247be5b4905edaed992ff5a0c7237a15fef2a (diff)
cmd/app: expose scheduling configuration
Useful for the music player. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/app')
-rw-r--r--cmd/app/app.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/app/app.go b/cmd/app/app.go
index a8508676..308e8131 100644
--- a/cmd/app/app.go
+++ b/cmd/app/app.go
@@ -8,6 +8,7 @@ import (
"strings"
"hakurei.app/check"
+ "hakurei.app/ext"
"hakurei.app/fhs"
"hakurei.app/hst"
)
@@ -192,6 +193,20 @@ func parse(
c.Groups = append(c.Groups, value)
continue
+ case "sched_policy":
+ if err := c.SchedPolicy.UnmarshalText([]byte(value)); err != nil {
+ return nil, err
+ }
+ continue
+
+ case "sched_priority":
+ v, err := strconv.Atoi(value)
+ if err != nil {
+ return nil, err
+ }
+ c.SchedPriority = ext.Int(v)
+ continue
+
case "env":
if key, value, ok = strings.Cut(value, "="); !ok {
return nil, fmt.Errorf("invalid environment %q", key)