Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Add brightnessctl service to {,re}store screen brightness
@ 2019-07-10 19:12 voidlinux-github
  2019-07-10 19:14 ` voidlinux-github
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: voidlinux-github @ 2019-07-10 19:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

There is a new 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: 1633 bytes --]

From fe7b5656a901069c5ce179ffa83610c4ecf4f769 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 {,re}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

end of thread, other threads:[~2020-11-05 12:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-07-11  3:56 ` voidlinux-github
2019-07-11  4:48 ` voidlinux-github
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).