diff options
author | yunmi | 2021-07-31 19:34:53 +0300 |
---|---|---|
committer | yunmikun2 | 2021-07-31 19:41:58 +0300 |
commit | d72c29c44b8c8938fc6b4ce9f6e8581c45a255fa (patch) | |
tree | 14611a39adfca7d69a3c9c86c6ef742d7b1b4385 | |
download | aur-d72c29c44b8c8938fc6b4ce9f6e8581c45a255fa.tar.gz |
init
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | README.md | 22 | ||||
-rw-r--r-- | config.yml | 18 | ||||
-rw-r--r-- | kbct.service | 10 |
6 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b20d36b7bb66 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = kbct-git + pkgdesc = Keyboard keycode mapping utility for Linux supporting layered configuration + pkgver = 0.1.0.r45.7c2a54f + pkgrel = 1 + url = https://github.com/samvel1024/kbct + arch = x86_64 + license = None + makedepends = git + makedepends = cargo + makedepends = rust + provides = kbct + backup = etc/kbct/config.yml + source = git+https://github.com/samvel1024/kbct + source = kbct.service + source = config.yml + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = kbct-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..72e8ffc0db8a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e9eb8b4e16fd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +pkgname="kbct-git" +_gitname=kbct +pkgver=0.1.0.r45.7c2a54f +pkgrel=1 +pkgdesc="Keyboard keycode mapping utility for Linux supporting layered configuration" +arch=('x86_64') +url="https://github.com/samvel1024/kbct" +license=('None') +depends=() +makedepends=('git' 'cargo' 'rust') +provides=('kbct') +source=("git+$url" 'kbct.service' 'config.yml') +backup=('etc/kbct/config.yml') +md5sums=('SKIP' 'SKIP' 'SKIP') + +pkgver() { + cd "$_gitname" + echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).r$(git rev-list --count HEAD).$(git rev-parse --short HEAD) +} + +build() { + cd "$_gitname" + cargo build --release +} + +package() { + cd "$_gitname" + install -D -m755 ./target/release/kbct "$pkgdir/usr/bin/kbct" + install -D -m644 "$srcdir/kbct.service" "$pkgdir/etc/systemd/system/kbct.service" +} diff --git a/README.md b/README.md new file mode 100644 index 000000000000..a42b2bed7322 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# kbct + +This is a [PKGBUILD](https://wiki.archlinux.org/title/PKGBUILD) script +for [kbct](https://github.com/samvel1024/kbct) -- keyboard keycode +mapping utility for Linux supporting layered configuration. + +## Installation + +```sh +$ git clone https://aur.archlinux.org/kbct-git.git +$ cd kbct-git +$ makepkg -si +``` + +## Configuration + +The config is expected to be in `/etc/kbct/config.yml`. After you +finish the configuration, you can enable the service: + +```sh +$ systemctl start kbct +``` diff --git a/config.yml b/config.yml new file mode 100644 index 000000000000..b90eebf4f765 --- /dev/null +++ b/config.yml @@ -0,0 +1,18 @@ +# - keyboards: [ "AT Translated Set 2 keyboard"] +# # Remap capslock and left control. +# keymap: +# leftctrl: capslock +# capslock: leftctrl +# # Specify layered configurations (much similar to fn+F keys) +# layers: +# Specify the modifiers of the layer +# - modifiers: ['rightalt'] +# keymap: +# i: up +# j: left +# k: down +# l: right +# u: pageup +# o: pagedown +# p: home +# semicolon: end diff --git a/kbct.service b/kbct.service new file mode 100644 index 000000000000..66d9fcfc36d4 --- /dev/null +++ b/kbct.service @@ -0,0 +1,10 @@ +[Unit] +Description=Keyboard keycode mapping daemon supporting layered configuration + +[Service] +Type=simple +ExecStart=kbct remap --config /etc/kbct/config.yml +Restart=always + +[Install] +WantedBy=default.target |