diff options
author | Yth - Arnaud <yth@ythogtha.org> | 2023-07-08 12:33:38 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-07-08 16:41:52 +0700 |
commit | 01c2196764d291811fabc9059c2f432f32639288 (patch) | |
tree | 71b62904320d1504dddfa1b296907ca3bf141cfa /python | |
parent | 3517e9211d13af9554a82f509de1e02078078998 (diff) |
python/python3-xkeysnail: Added (keyboard remapping tool).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/python3-xkeysnail/README | 23 | ||||
-rw-r--r-- | python/python3-xkeysnail/python3-xkeysnail.SlackBuild | 78 | ||||
-rw-r--r-- | python/python3-xkeysnail/python3-xkeysnail.info | 10 | ||||
-rw-r--r-- | python/python3-xkeysnail/slack-desc | 19 |
4 files changed, 130 insertions, 0 deletions
diff --git a/python/python3-xkeysnail/README b/python/python3-xkeysnail/README new file mode 100644 index 000000000000..0636e30f7e8f --- /dev/null +++ b/python/python3-xkeysnail/README @@ -0,0 +1,23 @@ +xkeysnail + +xkeysnail is yet another keyboard remapping tool for X environment +written in Python. It's like xmodmap but allows more flexible +remappings. + + +Pros + +1. Has high-level and flexible remapping mechanisms, such as + per-application keybindings can be defined +2. multiple stroke keybindings can be defined such as Ctrl+x Ctrl+c + to Ctrl+q +3. not only key remapping but arbitrary commands defined by Python + can be bound to a key +4. Runs in low-level layer (evdev and uinput), making remapping work + in almost all the places + +Cons + +1. Runs in root-mode (requires sudo) + +The key remapping mechanism of xkeysnail is based on pykeymacs diff --git a/python/python3-xkeysnail/python3-xkeysnail.SlackBuild b/python/python3-xkeysnail/python3-xkeysnail.SlackBuild new file mode 100644 index 000000000000..807a948cb11e --- /dev/null +++ b/python/python3-xkeysnail/python3-xkeysnail.SlackBuild @@ -0,0 +1,78 @@ +#!/bin/bash + +# Slackware build script for python3-xkeysnail + +# Copyright 2023, Lockywolf +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python3-xkeysnail +TARNAM=xkeysnail +VERSION=${VERSION:-0.4.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $TARNAM-$VERSION +tar xvf $CWD/$TARNAM-$VERSION.tar.gz +cd $TARNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +python3 setup.py install --root=$PKG + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + PKG-INFO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python/python3-xkeysnail/python3-xkeysnail.info b/python/python3-xkeysnail/python3-xkeysnail.info new file mode 100644 index 000000000000..af0aab0619ae --- /dev/null +++ b/python/python3-xkeysnail/python3-xkeysnail.info @@ -0,0 +1,10 @@ +PRGNAM="python3-xkeysnail" +VERSION="0.4.0" +HOMEPAGE="https://github.com/mooz/xkeysnail" +DOWNLOAD="https://files.pythonhosted.org/packages/75/18/3256d5f82078c55d72c70db8925de7aae2c1cef383f4e7b14d40589b90d3/xkeysnail-0.4.0.tar.gz" +MD5SUM="141d5a7d87faff40881d7210ea51eb8e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python-evdev" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.python3-xkeysnail_2023-07-04@lockywolf.net" diff --git a/python/python3-xkeysnail/slack-desc b/python/python3-xkeysnail/slack-desc new file mode 100644 index 000000000000..c1b64afa39d0 --- /dev/null +++ b/python/python3-xkeysnail/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +python3-xkeysnail: python3-xkeysnail (keyboard remapping tool for X environment) +python3-xkeysnail: +python3-xkeysnail: xkeysnail is yet another keyboard remapping tool for X environment +python3-xkeysnail: written in Python. It's like xmodmap but allows more flexible +python3-xkeysnail: remappings. +python3-xkeysnail: +python3-xkeysnail: The key remapping mechanism of xkeysnail is based on pykeymacs. +python3-xkeysnail: +python3-xkeysnail: +python3-xkeysnail: +python3-xkeysnail: |