uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
53
pkgs/tools/X11/xkeysnail/browser-emacs-bindings.py
Normal file
53
pkgs/tools/X11/xkeysnail/browser-emacs-bindings.py
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
from xkeysnail.transform import *
|
||||
|
||||
aa = False
|
||||
def aa_setvar(v):
|
||||
def _aa_setvar():
|
||||
transform._mark_set = False
|
||||
global aa; aa = v
|
||||
return _aa_setvar
|
||||
def aa_ifvar():
|
||||
def _aa_ifvar():
|
||||
transform._mark_set = False
|
||||
global aa
|
||||
if aa: aa = False; return K("esc")
|
||||
return K("enter")
|
||||
return _aa_ifvar
|
||||
def aa_flipmark():
|
||||
def _aa_flipmark():
|
||||
transform._mark_set = not transform._mark_set;
|
||||
return _aa_flipmark
|
||||
|
||||
define_keymap(re.compile("Google-chrome|Chromium-browser|firefox"), {
|
||||
K("C-b"): with_mark(K("left")),
|
||||
K("C-f"): with_mark(K("right")),
|
||||
K("C-p"): with_mark(K("up")),
|
||||
K("C-n"): with_mark(K("down")),
|
||||
K("M-b"): with_mark(K("C-left")),
|
||||
K("M-f"): with_mark(K("C-right")),
|
||||
K("C-a"): with_mark(K("home")),
|
||||
K("C-e"): with_mark(K("end")),
|
||||
|
||||
K("C-w"): [K("C-x"), set_mark(False)],
|
||||
K("M-w"): [K("C-c"), K("right"), set_mark(False)],
|
||||
K("C-y"): [K("C-v"), set_mark(False)],
|
||||
K("C-k"): [K("Shift-end"), K("C-x"), set_mark(False)],
|
||||
K("C-d"): [K("delete"), set_mark(False)],
|
||||
K("M-d"): [K("C-delete"), set_mark(False)],
|
||||
K("M-backspace"): [K("C-backspace"), set_mark(False)],
|
||||
|
||||
K("C-slash"): [K("C-z"), set_mark(False)],
|
||||
K("C-space"): aa_flipmark(),
|
||||
K("C-M-space"): with_or_set_mark(K("C-right")),
|
||||
|
||||
# K("C-s"): K("F3"),
|
||||
# K("C-r"): K("Shift-F3"),
|
||||
# K("C-g"): [K("esc"), set_mark(False)]
|
||||
|
||||
K("C-s"): [K("F3"), aa_setvar(True)],
|
||||
K("C-r"): [K("Shift-F3"), aa_setvar(True)],
|
||||
K("C-g"): [K("esc"), aa_setvar(False)],
|
||||
K("enter"): aa_ifvar()
|
||||
})
|
||||
42
pkgs/tools/X11/xkeysnail/default.nix
Normal file
42
pkgs/tools/X11/xkeysnail/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, fetchFromGitHub, makeWrapper, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "xkeysnail";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mooz";
|
||||
repo = pname;
|
||||
rev = "bf3c93b4fe6efd42893db4e6588e5ef1c4909cfb";
|
||||
sha256 = "0plcpb4ndzfsd5hj32m0g32swnhyph9sd759cdhhzmjvlq3j8q6p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
evdev
|
||||
xlib
|
||||
inotify-simple
|
||||
appdirs
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share
|
||||
cp ./example/config.py $out/share/example.py
|
||||
cp ${./browser-emacs-bindings.py} $out/share/browser.py
|
||||
|
||||
makeWrapper $out/bin/xkeysnail $out/bin/xkeysnail-example \
|
||||
--add-flags "-q" --add-flags "$out/share/example.py"
|
||||
makeWrapper $out/bin/xkeysnail $out/bin/xkeysnail-browser \
|
||||
--add-flags "-q" --add-flags "$out/share/browser.py"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yet another keyboard remapping tool for X environment";
|
||||
homepage = "https://github.com/mooz/xkeysnail";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl1Only;
|
||||
maintainers = with maintainers; [ bb2020 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue