aboutsummaryrefslogtreecommitdiff
path: root/rui.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-27 07:41:03 +0000
committerFuwn <[email protected]>2024-09-27 07:47:04 +0000
commit4ae51647a0905d2a517ab5019cdb0c5d5be54c3d (patch)
treeae331ebcf82d056daaafadcff8c72243486d4b6a /rui.go
parentfix(flake): add notifier to home manager module (diff)
downloadrui-4ae51647a0905d2a517ab5019cdb0c5d5be54c3d.tar.xz
rui-4ae51647a0905d2a517ab5019cdb0c5d5be54c3d.zip
feat(rui): allow-unfree configuration option
Diffstat (limited to 'rui.go')
-rw-r--r--rui.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/rui.go b/rui.go
index ea261b7..c76870e 100644
--- a/rui.go
+++ b/rui.go
@@ -11,10 +11,11 @@ import (
)
type Configuration struct {
- Notify bool `json:"notify"`
- Editor string `json:"editor"`
- Flake string `json:"flake"`
- Notifier string `json:"notifier"`
+ Notify bool `json:"notify"`
+ Editor string `json:"editor"`
+ Flake string `json:"flake"`
+ Notifier string `json:"notifier"`
+ AllowUnfree bool `json:"allow-unfree"`
}
type ActionDetails struct {
@@ -116,6 +117,13 @@ func main() {
},
},
},
+ Before: func(c *cli.Context) error {
+ if configuration.AllowUnfree {
+ c.Set("allow-unfree", "1")
+ }
+
+ return nil
+ },
Commands: []*cli.Command{
{
Name: "hs",