diff options
author | Conrad Haupt | 2020-07-15 12:37:22 +0200 |
---|---|---|
committer | Conrad Haupt | 2020-07-15 12:37:22 +0200 |
commit | b056fd2ef6943708129b6a0902836b325b891fe2 (patch) | |
tree | 64bee590f669e6d5c7a3b33fbddf2db83a5dd769 | |
download | aur-b056fd2ef6943708129b6a0902836b325b891fe2.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | asus-charging-threshold | 1 | ||||
-rw-r--r-- | asus-charging-threshold.path | 5 | ||||
-rw-r--r-- | asus-charging-threshold.service | 10 |
6 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3b0dc1076dbf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = systemd-asus-battery-threshold + pkgdesc = Systemd service that manages the Asus Zenbook charging threshold. Specifically designed for the Zenbook 15 UX533. + pkgver = 1.1 + pkgrel = 2 + arch = i686 + arch = x86_64 + arch = arm + arch = armv7h + arch = armv6h + arch = aarch64 + license = MIT + depends = systemd + depends = linux>=5.4 + depends = git + source = asus-charging-threshold + source = asus-charging-threshold.path + source = asus-charging-threshold.service + sha256sums = 6442bc26a7c562f5afe6467dab36365c709909f6a81afcecfc0c25cff0f1bab0 + sha256sums = c1389fd887fecbcb2799fa37ddd956b2dacb7bc1da78d44898578986cd79615e + sha256sums = 1709bc93a1c4dff8068b270d0515d99627bebb3a9c19dd5950eb687bc24c4e9e + +pkgname = systemd-asus-battery-threshold + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..b73905529f23 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +*.tar +*.tar.* +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7b29e910dff1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: NeedleNardleNoo (conrad@conradhaupt.co.za) +pkgname=systemd-asus-battery-threshold +pkgver=1.1 +pkgrel=2 +pkgdesc="Systemd service that manages the Asus Zenbook charging threshold. Specifically designed for the Zenbook 15 UX533." +arch=('i686' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64') +# url="https://github.com/Jguer/yay" +license=('MIT') +depends=( + 'systemd' + 'linux>=5.4' + 'git' +) +source=("asus-charging-threshold" + "asus-charging-threshold.path" + "asus-charging-threshold.service") +sha256sums=('6442bc26a7c562f5afe6467dab36365c709909f6a81afcecfc0c25cff0f1bab0' + 'c1389fd887fecbcb2799fa37ddd956b2dacb7bc1da78d44898578986cd79615e' + '1709bc93a1c4dff8068b270d0515d99627bebb3a9c19dd5950eb687bc24c4e9e') + +package() { + install -v -D -m644 "${srcdir}/asus-charging-threshold.service" "${pkgdir}/etc/systemd/system/asus-charging-threshold.service" + install -v -D -m644 "${srcdir}/asus-charging-threshold.path" "${pkgdir}/etc/systemd/system/asus-charging-threshold.path" + install -v -D -m644 "${srcdir}/asus-charging-threshold" "${pkgdir}/etc/asus-charging-threshold" + mkdir -p "${pkgdir}/usr/lib/systemd/system/multi-user.target.wants/" + ln -s "${pkgdir}/etc/systemd/system/asus-charging-threshold.path" "${pkgdir}/usr/lib/systemd/system/multi-user.target.wants/asus-charging-threshold.path" +}
\ No newline at end of file diff --git a/asus-charging-threshold b/asus-charging-threshold new file mode 100644 index 000000000000..2bbd69c2e548 --- /dev/null +++ b/asus-charging-threshold @@ -0,0 +1 @@ +70 diff --git a/asus-charging-threshold.path b/asus-charging-threshold.path new file mode 100644 index 000000000000..70801fab326c --- /dev/null +++ b/asus-charging-threshold.path @@ -0,0 +1,5 @@ +[Path] +PathModified=/etc/asus-charging-threshold + +[Install] +WantedBy=multi-user.target
\ No newline at end of file diff --git a/asus-charging-threshold.service b/asus-charging-threshold.service new file mode 100644 index 000000000000..fadce371ebc8 --- /dev/null +++ b/asus-charging-threshold.service @@ -0,0 +1,10 @@ +[Unit] +Description=Set the battery charge threshold +After=multi-user.target + +[Service] +Type=oneshot +ExecStart=/bin/bash -c 'cat /etc/asus-charging-threshold > /sys/class/power_supply/BAT0/charge_control_end_threshold' + +[Install] +WantedBy=multi-user.target
\ No newline at end of file |