mrrl-logincaps

MRRL version of logincaps
git clone https://ccx.te2000.cz/git/mrrl-logincaps
Log | Files | Refs

commit dae217b7dd0e50fd931e4ad4af03de1c66363877
parent 15ee21267da36510229cd63f05670ded249267db
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Mon, 22 Aug 2022 23:03:02 +0200

pass support
Diffstat:
Mbin/handle-nsx11-message | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/bin/handle-nsx11-message b/bin/handle-nsx11-message @@ -200,6 +200,15 @@ container-ssh() { in_terminal s6-sudo /run/containers/$container/run/exec/exec env TERM=rxvt-unicode-256color s6-setsid "$@" } +pass-input() { + local wid=$1 + local entry=$2 + pass show -- $entry | \ + awk -v wid=$wid 'NR == 1 { printf("type --window %s %s\n", wid, $0) }' | \ + s6-sudo $x_container_tmpfs/run/exec/exec xdotool - + # s6-sudo $x_container_tmpfs/run/exec/exec forstdin IN importas -i IN IN i3-nagbar -f fixed -t warning -m '$IN' +} + # read full data from stdin, will handle binary payloads correctly unlike env IFS= read -ru 0 -k $plumb_ndata data || return $? @@ -242,6 +251,13 @@ case $data in #container-ssh alpine-ssh.${USER} ssh -t -- $ssh_host ;; + (pass-input/wid:*/*) + local wid_entry="${data#*/wid:}" + local wid="${wid_entry%%/*}" + local entry="${wid_entry#*/}" + pass-input $wid $entry + ;; + (*) nag -t warning -m "Powerbox got message: ${(qqq)plumb_data}" ;;