parent
5c6773d87a
commit
bf304abff1
@ -0,0 +1,39 @@
|
|||||||
|
# Maintainer: Aakash Sharma <aakashsensharma@gmail.com>
|
||||||
|
# Contributor: Sergey A. <murlakatamenka@disroot.org>
|
||||||
|
# Contributor: rv178 <idliyout@gmail.com>
|
||||||
|
|
||||||
|
_pkgname="swhkd"
|
||||||
|
pkgname="${_pkgname}-git"
|
||||||
|
pkgver=.552.g1b6cf27
|
||||||
|
pkgrel=2
|
||||||
|
arch=("x86_64")
|
||||||
|
url="https://github.com/waycrate/swhkd"
|
||||||
|
pkgdesc="A display server independent hotkey daemon inspired by sxhkd."
|
||||||
|
license=("BSD")
|
||||||
|
depends=("polkit")
|
||||||
|
makedepends=("rustup" "make" "git" "scdoc")
|
||||||
|
conflicts=("swhkd-musl-git")
|
||||||
|
source=("${_pkgname}::git+${url}.git")
|
||||||
|
sha256sums=("SKIP")
|
||||||
|
|
||||||
|
build(){
|
||||||
|
cd "$_pkgname"
|
||||||
|
make setup
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
install -Dm 755 ./target/release/swhkd "$pkgdir/usr/bin/swhkd"
|
||||||
|
install -Dm 755 ./target/release/swhks "$pkgdir/usr/bin/swhks"
|
||||||
|
|
||||||
|
install -Dm 644 -o root ./com.github.swhkd.pkexec.policy -t "$pkgdir/usr/share/polkit-1/actions"
|
||||||
|
|
||||||
|
install -Dm 644 ./docs/*.1.gz -t "$pkgdir/usr/share/man/man1/"
|
||||||
|
install -Dm 644 ./docs/*.5.gz -t "$pkgdir/usr/share/man/man5/"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd $_pkgname
|
||||||
|
echo "$(grep "^version =" Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
|
||||||
|
}
|
@ -1,32 +0,0 @@
|
|||||||
# Maintainer: Aakash Sharma <aakashsensharma@gmail.com>
|
|
||||||
pkgname='swhkd-git'
|
|
||||||
_pkgname="swhkd"
|
|
||||||
pkgver=1
|
|
||||||
pkgrel=1
|
|
||||||
arch=('x86_64')
|
|
||||||
url="https://github.com/waycrate/swhkd"
|
|
||||||
pkgdesc="A display server independent hotkey daemon inspired by sxhkd."
|
|
||||||
license=('BSD')
|
|
||||||
depends=('polkit')
|
|
||||||
makedepends=('rustup' 'make' 'git')
|
|
||||||
conflicts=('swhkd-musl-git')
|
|
||||||
source=("$_pkgname::git+https://github.com/waycrate/$_pkgname")
|
|
||||||
sha256sums=('SKIP')
|
|
||||||
|
|
||||||
build(){
|
|
||||||
cd "$_pkgname"
|
|
||||||
make setup
|
|
||||||
make glibc
|
|
||||||
}
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "$_pkgname"
|
|
||||||
install -Dm 755 ./bin/swhkd "$pkgdir/usr/bin/swhkd"
|
|
||||||
install -Dm 755 ./bin/swhks "$pkgdir/usr/bin/swhks"
|
|
||||||
install -Dm 644 ./swhkd.rules "$pkgdir/etc/polkit-1/rules.d/swhkd.rules"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgver() {
|
|
||||||
cd $_pkgname
|
|
||||||
echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
|
|
||||||
}
|
|
@ -0,0 +1,9 @@
|
|||||||
|
## OpenRC Instructions
|
||||||
|
|
||||||
|
To have OpenRC automatically start `swhkd` for you:
|
||||||
|
|
||||||
|
1. `chmod +x swhkd`
|
||||||
|
2. Copy `swhkd` into /etc/init.d/
|
||||||
|
3. Run `sudo rc-update add swhkd`
|
||||||
|
4. Run `swhks` on login ( Add it to your `.xinitrc` file or your setup script )
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
command="/usr/bin/swhkd"
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
## systemd Instructions
|
||||||
|
|
||||||
|
To have systemd automatically start `swhkd` for you:
|
||||||
|
|
||||||
|
1. Copy `hotkeys.sh` into your preferred directory
|
||||||
|
2. `chmod +x hotkeys.sh`
|
||||||
|
3. Copy `hotkeys.service` into your `$XDG_CONFIG_DIR/systemd/user` directory
|
||||||
|
4. Using a text editor, uncomment line 7 of `hotkeys.service` and change the path accordingly
|
||||||
|
5. In a terminal: `systemctl --user enable hotkeys.service`
|
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=swhkd hotkey daemon
|
||||||
|
BindsTo=default.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
# ExecStart=/path/to/hotkeys.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
killall swhks
|
||||||
|
|
||||||
|
swhks & pkexec swhkd
|
@ -1,32 +0,0 @@
|
|||||||
# Maintainer: Aakash Sharma <aakashsensharma@gmail.com>
|
|
||||||
pkgname='swhkd-musl-git'
|
|
||||||
_pkgname="swhkd"
|
|
||||||
pkgver=1
|
|
||||||
pkgrel=1
|
|
||||||
arch=('x86_64')
|
|
||||||
url="https://github.com/waycrate/swhkd"
|
|
||||||
pkgdesc="A display server independent hotkey daemon inspired by sxhkd."
|
|
||||||
license=('BSD')
|
|
||||||
conflicts=('swhkd-glib-git')
|
|
||||||
depends=('polkit')
|
|
||||||
makedepends=('rustup' 'make' 'git')
|
|
||||||
source=("$_pkgname::git+https://github.com/waycrate/$_pkgname")
|
|
||||||
sha256sums=('SKIP')
|
|
||||||
|
|
||||||
build(){
|
|
||||||
cd "$_pkgname"
|
|
||||||
make setup
|
|
||||||
make
|
|
||||||
}
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "$_pkgname"
|
|
||||||
install -Dm 755 ./bin/swhkd "$pkgdir/usr/bin/swhkd"
|
|
||||||
install -Dm 755 ./bin/swhks "$pkgdir/usr/bin/swhks"
|
|
||||||
install -Dm 644 ./swhkd.rules "$pkgdir/etc/polkit-1/rules.d/swhkd.rules"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgver() {
|
|
||||||
cd $_pkgname
|
|
||||||
echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
|
|
||||||
}
|
|
Loading…
Reference in new issue