Hey,
I wrote a quick Arch PKGBUILD for macropad_tool.
- the project does not have a license yet, so I chose
license=('AGPL3') as a placeholder
- the pkgver is hardcoded to '0.1.r144.56911748' for now
PKGBUILD :
pkgname=macropad_tool-git
_pkgname=macropad_tool
pkgver=0.1.r144.56911748
pkgrel=1
pkgdesc="tool to program a macropad"
arch=('x86_64')
url="https://github.com/kamaaina/${_pkgname}"
license=('AGPL3')
depends=()
makedepends=('git' 'rust')
source=("git+https://github.com/kamaaina/$_pkgname.git")
sha256sums=('SKIP')
build() {
cd "$_pkgname"
cargo build --release --workspace
}
package() {
install -Dm755 "${_pkgname}/target/release/${_pkgname//_/-}" "$pkgdir/usr/bin/${_pkgname//_/-}"
install -Dm 644 "${_pkgname}/80-macropad.rules" "${pkgdir}/etc/udev/rules.d/80-macropad.rules"
}
Also I wrote this little macropad-tool-led bash script
(increments the led color array up with no or "u" argument, and down with "d" argument)
#!/bin/bash
declare -a COLS=( "red" "orange" "yellow" "green" "cyan" "blue" "purple" )
AL=${#COLS[@]}
CSHM="/dev/shm/mpcol.txt"
if [ ! -f "$CSHM" ]; then
echo 0 > "$CSHM"
fi
CUR="$(cat "$CSHM")"
if [ -z "$1" ] || [ "$1" == "u" ]; then
NXT=$(( CUR + 1 ))
if [ "$NXT" -gt "$AL" ]; then
NXT=0
fi
echo "$NXT" > "$CSHM"
elif [ "$1" == "d" ]; then
NXT=$(( CUR - 1 ))
if [ "$NXT" -lt 0 ]; then
NXT="$AL"
fi
echo "$NXT" > "$CSHM"
fi
macropad-tool led 3 1 "${COLS[$NXT]}"
edit: scratch that mapping, it breaks keys 7 and 9:
and mapped it to one of the macropad knobs in xbindkeys
#Remark
"/usr/local/bin/macropad-tool-led"
m:0x10 + c:18
Mod2 + 9
#Remark
"/usr/local/bin/macropad-tool-led d"
m:0x10 + c:16
Mod2 + 7
Everything no big deal, but maybe someone has some use for it.
Have fun!
Hey,
I wrote a quick Arch
PKGBUILDformacropad_tool.license=('AGPL3')as a placeholderPKGBUILD:Also I wrote this little
macropad-tool-ledbash script(increments the led color array up with no or "u" argument, and down with "d" argument)
edit: scratch that mapping, it breaks keys 7 and 9:
and mapped it to one of the macropad knobs in xbindkeysEverything no big deal, but maybe someone has some use for it.
Have fun!