* Re: Add brightnessctl service to {,re}store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
@ 2019-07-10 19:14 ` voidlinux-github
2019-07-10 19:28 ` [PR PATCH] [Updated] Add brightnessctl service to {, re}store " voidlinux-github
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-10 19:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
New comment by xtraeme on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-510191838
Comment:
Please fix the commit message
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] Add brightnessctl service to {, re}store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
2019-07-10 19:14 ` voidlinux-github
@ 2019-07-10 19:28 ` voidlinux-github
2019-07-10 19:28 ` voidlinux-github
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-10 19:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
There is an updated pull request by mamins1376 against master on the void-packages repository
https://github.com/mamins1376/void-packages brightnessctl-runit-store
https://github.com/void-linux/void-packages/pull/12974
Add brightnessctl service to {,re}store screen brightness
Thought it would be nice to have this in the original package.
A patch file from https://github.com/void-linux/void-packages/pull/12974.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brightnessctl-runit-store-12974.patch --]
[-- Type: application/text/x-diff, Size: 1628 bytes --]
From b5954570cbb9550901743997743b0a18ff7274f5 Mon Sep 17 00:00:00 2001
From: Mohammad Amin Sameti <mamins1376@gmail.com>
Date: Wed, 10 Jul 2019 23:32:31 +0430
Subject: [PATCH] Add brightnessctl service to store brightness
---
srcpkgs/brightnessctl/files/brightness/finish | 2 ++
srcpkgs/brightnessctl/files/brightness/run | 5 +++++
srcpkgs/brightnessctl/template | 1 +
3 files changed, 8 insertions(+)
create mode 100755 srcpkgs/brightnessctl/files/brightness/finish
create mode 100755 srcpkgs/brightnessctl/files/brightness/run
diff --git a/srcpkgs/brightnessctl/files/brightness/finish b/srcpkgs/brightnessctl/files/brightness/finish
new file mode 100755
index 00000000000..0fe19032089
--- /dev/null
+++ b/srcpkgs/brightnessctl/files/brightness/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec env XDG_RUNTIME_DIR=/var/lib brightnessctl -s > /dev/null
diff --git a/srcpkgs/brightnessctl/files/brightness/run b/srcpkgs/brightnessctl/files/brightness/run
new file mode 100755
index 00000000000..db42d6de09b
--- /dev/null
+++ b/srcpkgs/brightnessctl/files/brightness/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+# This will mkdir /var/lib/brightnessctl && store brightness values there
+env XDG_RUNTIME_DIR=/var/lib brightnessctl -r > /dev/null
+exec chpst -b brightness pause
diff --git a/srcpkgs/brightnessctl/template b/srcpkgs/brightnessctl/template
index 5480f496fa8..75632af1576 100644
--- a/srcpkgs/brightnessctl/template
+++ b/srcpkgs/brightnessctl/template
@@ -15,4 +15,5 @@ checksum=ac86de0df8dcfd60a415465daabca283192ceb8de6c53b8844e628709ccd0cef
post_install() {
vlicense LICENSE
+ vsv brightness
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] Add brightnessctl service to {, re}store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
2019-07-10 19:14 ` voidlinux-github
2019-07-10 19:28 ` [PR PATCH] [Updated] Add brightnessctl service to {, re}store " voidlinux-github
@ 2019-07-10 19:28 ` voidlinux-github
2019-07-11 3:31 ` brightnessctl: Add service to store " voidlinux-github
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-10 19:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
There is an updated pull request by mamins1376 against master on the void-packages repository
https://github.com/mamins1376/void-packages brightnessctl-runit-store
https://github.com/void-linux/void-packages/pull/12974
Add brightnessctl service to {,re}store screen brightness
Thought it would be nice to have this in the original package.
A patch file from https://github.com/void-linux/void-packages/pull/12974.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brightnessctl-runit-store-12974.patch --]
[-- Type: application/text/x-diff, Size: 1628 bytes --]
From b5954570cbb9550901743997743b0a18ff7274f5 Mon Sep 17 00:00:00 2001
From: Mohammad Amin Sameti <mamins1376@gmail.com>
Date: Wed, 10 Jul 2019 23:32:31 +0430
Subject: [PATCH] Add brightnessctl service to store brightness
---
srcpkgs/brightnessctl/files/brightness/finish | 2 ++
srcpkgs/brightnessctl/files/brightness/run | 5 +++++
srcpkgs/brightnessctl/template | 1 +
3 files changed, 8 insertions(+)
create mode 100755 srcpkgs/brightnessctl/files/brightness/finish
create mode 100755 srcpkgs/brightnessctl/files/brightness/run
diff --git a/srcpkgs/brightnessctl/files/brightness/finish b/srcpkgs/brightnessctl/files/brightness/finish
new file mode 100755
index 00000000000..0fe19032089
--- /dev/null
+++ b/srcpkgs/brightnessctl/files/brightness/finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec env XDG_RUNTIME_DIR=/var/lib brightnessctl -s > /dev/null
diff --git a/srcpkgs/brightnessctl/files/brightness/run b/srcpkgs/brightnessctl/files/brightness/run
new file mode 100755
index 00000000000..db42d6de09b
--- /dev/null
+++ b/srcpkgs/brightnessctl/files/brightness/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+# This will mkdir /var/lib/brightnessctl && store brightness values there
+env XDG_RUNTIME_DIR=/var/lib brightnessctl -r > /dev/null
+exec chpst -b brightness pause
diff --git a/srcpkgs/brightnessctl/template b/srcpkgs/brightnessctl/template
index 5480f496fa8..75632af1576 100644
--- a/srcpkgs/brightnessctl/template
+++ b/srcpkgs/brightnessctl/template
@@ -15,4 +15,5 @@ checksum=ac86de0df8dcfd60a415465daabca283192ceb8de6c53b8844e628709ccd0cef
post_install() {
vlicense LICENSE
+ vsv brightness
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (2 preceding siblings ...)
2019-07-10 19:28 ` voidlinux-github
@ 2019-07-11 3:31 ` voidlinux-github
2019-07-11 3:56 ` voidlinux-github
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-11 3:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 302 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-510314965
Comment:
There are valid arguments against expanding the use of oneshot runit services using pause. Please consider using rc.local and rc.shutdown for these use cases.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (3 preceding siblings ...)
2019-07-11 3:31 ` brightnessctl: Add service to store " voidlinux-github
@ 2019-07-11 3:56 ` voidlinux-github
2019-07-11 4:48 ` voidlinux-github
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-11 3:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-510319247
Comment:
> There are valid arguments against expanding the use of oneshot runit services using pause.
I've considered we need a `/etc/oneshot` directory type thing for packages that need a oneshot, and similarly enable them in something like `/var/oneshot`. Or something. I'm not sure what's best.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (4 preceding siblings ...)
2019-07-11 3:56 ` voidlinux-github
@ 2019-07-11 4:48 ` voidlinux-github
2019-07-11 5:38 ` voidlinux-github
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-11 4:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
New comment by mamins1376 on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-510327657
Comment:
@CameronNemo: Originally I was using the solution you mentioned. Then I saw `alsa-util`'s and found that pretty clever, with the added bonus of having the store and restore in one directory.
Is there any doc's indicating the downsides? Why this is not applied to `ALSA`?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (5 preceding siblings ...)
2019-07-11 4:48 ` voidlinux-github
@ 2019-07-11 5:38 ` voidlinux-github
2019-07-11 7:22 ` voidlinux-github
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-11 5:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-510336839
Comment:
Lots of services like alsa, iptables, ufw, etc used the mechanism you have here. At first glance it is fairly clever, but it is weak for a couple reasons:
- no way to tell if or when the task has actually completed
- two useless processes hanging around (memory and clutter concerns)
Indeed having the boot/shutdown task in the same place is a nice quality of this mechanism. Hopefully we can maintain that while solving the above problems. It will require additions to void-runit.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (6 preceding siblings ...)
2019-07-11 5:38 ` voidlinux-github
@ 2019-07-11 7:22 ` voidlinux-github
2020-02-12 13:57 ` voidlinux-github
2020-11-05 12:06 ` [PR PATCH] [Closed]: " mamins1376
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-11 7:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
New comment by mamins1376 on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-510363513
Comment:
Based on @abenson's suggestion; `/etc/rc.local`:
```
for f in /var/oneshot/*/start; do
[ -x $f ] && $f;
done
```
And a similar one with `/var/oneshot/*/stop`; So that packages can add their own hooks and even do some sort of dependency satisfaction through number prefixes.
This is kind of borrowed from `/etc/X11/xinit/xinitrc`.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (7 preceding siblings ...)
2019-07-11 7:22 ` voidlinux-github
@ 2020-02-12 13:57 ` voidlinux-github
2020-11-05 12:06 ` [PR PATCH] [Closed]: " mamins1376
9 siblings, 0 replies; 11+ messages in thread
From: voidlinux-github @ 2020-02-12 13:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
New comment by Anachron on void-packages repository
https://github.com/void-linux/void-packages/pull/12974#issuecomment-585216698
Comment:
How is the progress here? @abenson
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Closed]: brightnessctl: Add service to store screen brightness
2019-07-10 19:12 [PR PATCH] Add brightnessctl service to {,re}store screen brightness voidlinux-github
` (8 preceding siblings ...)
2020-02-12 13:57 ` voidlinux-github
@ 2020-11-05 12:06 ` mamins1376
9 siblings, 0 replies; 11+ messages in thread
From: mamins1376 @ 2020-11-05 12:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
There's a closed pull request on the void-packages repository
brightnessctl: Add service to store screen brightness
https://github.com/void-linux/void-packages/pull/12974
Description:
Thought it would be nice to have this in the original package.
^ permalink raw reply [flat|nested] 11+ messages in thread