=== modified file 'bin/powerbox-menu-list' --- old/bin/powerbox-menu-list 2024-05-07 20:36:32 +0000 +++ new/bin/powerbox-menu-list 2024-04-14 15:35:09 +0000 @@ -30,15 +30,6 @@ done } -() { - local xsvc container - for xsvc in $HOME/chome/*/run/rc.extra/xsvc.*(/N); do - container=${xsvc:h:h:h:t} - printf "!xsvc-in-container-xpra %s %s\n" \ - $container.$USER ${${xsvc:t}#xsvc.} - done -} - img_has_bins() { local base p b found base=$1 @@ -61,8 +52,8 @@ img_has_bins $imgdir tmux && \ printf "container-urxvt/%s/tmux -2u new-session -s %s -A\n" \ ${${cntdir:t}#container.} ${(qqq)${${cntdir:t}#container.}%.*} - #img_has_bins $imgdir abduco && \ - # printf "abduco/%s/shell/zsh -li\n" ${${cntdir:t}#container.} + img_has_bins $imgdir abduco && \ + printf "abduco/%s/shell/zsh -li\n" ${${cntdir:t}#container.} printf "container-urxvt/%s/zsh -li\n" ${${cntdir:t}#container.} fi fi === modified file 'bin/xsession-cmd' --- old/bin/xsession-cmd 2024-05-07 20:36:32 +0000 +++ new/bin/xsession-cmd 2024-04-17 00:59:47 +0000 @@ -10,7 +10,7 @@ ensure-container-started() { [[ $1 == */* ]] && die "Invalid container name: ${(qqq)1}" - s6-svc -wU -T 4000 -o /run/service/container.$1 || die "failed to start container ${(qqq)1}" + s6-svc -wU -T 4000 -o /run/service/container.$1 } cmd_up() { === modified file 'home/container-setup' --- old/home/container-setup 2024-05-07 20:36:32 +0000 +++ new/home/container-setup 2024-04-23 21:15:55 +0000 @@ -37,12 +37,11 @@ setup-sndio() { local sndio_container=sndiod.$USER - local sndio_dir=$DSTROOT/run/inbox/$sndio_container/tmp/sndio-$UID + local sndio_dir=$DSTROOT/run/inbox/$sndio_container/sndio-$UID s6-svc -wU -T 4000 -o /run/service/container.$sndio_container || exit $? mkdir -p $sndio_dir || exit $? ln -fv /run/containers/$sndio_container/tmp/sndio-$UID/sock0 $sndio_dir/ || exit $? #ln -fv /run/containers/$sndio_container/tmp/sndio-$UID/sock{0,1} $sndio_dir/ || exit $? - ln -sfv ../run/inbox/$sndio_container/tmp/sndio-$UID $DSTROOT/tmp || exit $? } setup-gpg-agent() { @@ -106,21 +105,10 @@ (weechat) setup-pass-show weechat/P14s-gen2 ;; - (bzr|git) + (bzr) setup-ssh-exec ccx@saturnin ccx@eva {ccx,www}@www_te2000 ;; - (notes) - to-current-inbox git.$USER run/git/rw.notes - ;; - esac - case $CONTAINER_NAME in - (ff-*) - if [[ -d $HOME/chome/$CONTAINER_NAME/. && ! -d $HOME/chome/$CONTAINER_NAME/.mozilla/firefox/default ]]; then - rsync -avi $HOME/chome/ff-template/.mozilla $HOME/chome/$CONTAINER_NAME/ || exec $? - fi - ;; - esac - + esac return 0 } === modified file 'xpra-skel/homedir/.config/ccx.xmodmap' --- old/xpra-skel/homedir/.config/ccx.xmodmap 2024-05-07 20:36:32 +0000 +++ new/xpra-skel/homedir/.config/ccx.xmodmap 2024-04-17 00:59:47 +0000 @@ -4,7 +4,6 @@ add lock = XF86Calculator add lock = Menu -clear control !! left ctrl as compose key !keysym Control_L = Multi_key Multi_key !keycode 37 = Multi_key Multi_key @@ -12,9 +11,6 @@ !keysym Control_L = Mode_switch Mode_switch keycode 37 = Mode_switch Mode_switch -add control = Caps_Lock -add control = Control_R - !! right win key as second modifier !keysym Super_R = Mode_switch Mode_switch === removed file 'xpra-skel/homedir/bin/clip' --- old/xpra-skel/homedir/bin/clip 2024-05-07 20:36:32 +0000 +++ new/xpra-skel/homedir/bin/clip 1970-01-01 00:00:00 +0000 @@ -1,48 +0,0 @@ -#!/bin/zsh -setopt no_unset warn_create_global -typeset -gA clipboards -typeset -g map=/run/display-container-map -#set -x - -get-clip() { - local sel out name=$1 - for sel in CLIPBOARD PRIMARY; do - out=$( xclip -o -sel $sel ) && \ - [[ -n $out ]] && - clipboards[${sel:l}@$name]=$out - done -} - -scan() { - local sock - local -a found - for sock in /tmp/.X11-unix/X*; do - found=( $map/${${sock:t}#X}=*(N) ) - DISPLAY=:${sock##*/X} get-clip ${${found[1]:-${sock:t}}##*=} - done -} -#typeset -f -t scan - -print-clip() { - local name content - for name content in "${(kv@)clipboards}"; do - printf '>> %s <<\n%s\n\n' $name $content - done -} - -print-clip-0() { - local name content - for name content in "${(kv@)clipboards}"; do - printf '%s\0' $name $content - done -} - -main() { - scan - if (($#)) && [[ $1 == -0 ]]; then - print-clip-0 - else - print-clip - fi -} -main "$@" === modified file 'xpra-skel/homedir/bin/start-xpra-for-container' --- old/xpra-skel/homedir/bin/start-xpra-for-container 2024-05-07 20:36:32 +0000 +++ new/xpra-skel/homedir/bin/start-xpra-for-container 2024-04-23 21:15:55 +0000 @@ -114,7 +114,7 @@ '#!/bin/execlineb -P' \ 's6-envdir env' \ xpra-client "$display" \ - "--title=\"[${container}] @title@ «s=@server-machine@ c=@client-machine@ d=@hostinfo@ w=@xid@\"" + "--title=\"[${container}:${display}] @title@ wid:@windowid@\"" mkdir -p $sv/env || exit $? printf '%s\n' $DISPLAY >$sv/env/DISPLAY } === removed file 'xpra-skel/homedir/bin/xkb-all' --- old/xpra-skel/homedir/bin/xkb-all 2024-05-07 20:36:32 +0000 +++ new/xpra-skel/homedir/bin/xkb-all 1970-01-01 00:00:00 +0000 @@ -1,4 +0,0 @@ -#!/bin/sh -for sock in /tmp/.X11-unix/X*; do - DISPLAY=:${sock##*/X} xkb -done === modified file 'xpra-skel/homedir/bin/xpra-client' --- old/xpra-skel/homedir/bin/xpra-client 2024-05-07 20:36:32 +0000 +++ new/xpra-skel/homedir/bin/xpra-client 2024-04-17 00:59:47 +0000 @@ -17,7 +17,7 @@ --opengl=no --mmap=yes - --clipboard=no + --clipboard=yes --pulseaudio=no --webcam=no --speaker=off === modified file 'xsession-skel/homedir/.config/i3/config' --- old/xsession-skel/homedir/.config/i3/config 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/.config/i3/config 2024-04-14 15:35:09 +0000 @@ -55,8 +55,6 @@ bindsym $mod+Control+t exec mpc toggle bindsym $mod+Control+Up exec powerbox-plumb "amixer/set PCM 2dB+" bindsym $mod+Control+Down exec powerbox-plumb "amixer/set PCM 2dB-" -bindsym $mod+i exec shiftinsert -bindsym $mod+v exec ctrlv # bindsym $mod+space mark --toggle M # bindsym $mod+Shift+space move window to mark M === removed file 'xsession-skel/homedir/bin/c.exec' --- old/xsession-skel/homedir/bin/c.exec 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/c.exec 1970-01-01 00:00:00 +0000 @@ -1,29 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob warn_create_global - -die() { - printf >&2 '%s\n' "$@" - exit 1 -} - -main() { - local container sock - [[ $1 == */* ]] && die "Invalid container name: ${(qqq)1}" - container=$1 - shift 1 || exit $? - sock=/run/inbox/$container/run/exec/exec - if [[ -S $sock ]]; then - exec s6-sudo $sock "$@" - else - local arg - local -a quoted - for arg in "$@"; do - quoted+=( "$(s6-quote -- "$arg")" ) - done - powerbox-plumb "container-exec/$container/${(j: :)quoted}" - fi - -} -typeset -f -t main - -main "$@" === removed file 'xsession-skel/homedir/bin/c.urxvt' --- old/xsession-skel/homedir/bin/c.urxvt 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/c.urxvt 1970-01-01 00:00:00 +0000 @@ -1,61 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob warn_create_global - -die() { - printf >&2 '%s\n' "$@" - exit 1 -} - -container-urxvt() { - local container cmd sockd display - container=$1 - cmd=$2 - sock=/run/inbox/$container/run/exec/exec - display=${DISPLAY#:} - - s6-sudo /run/cmd.s up $container || - die "Failed to start container ${(qqq)container}" - - s6-sudo /run/cmd.s link xsession.$display.$USER $container run/exec/urxvt || - die "Failed to link urxvt socket." - - local -a el_env=( - EXEC_PATH=/run/containers/$container/run/exec/exec - URXVT_PATH=/run/inbox/xsession.$display.$USER/run/exec/urxvt - ) - local -a el_cmd=( - 'multisubstitute {' - ' importas -i -u EXEC_PATH EXEC_PATH' - ' importas -i -u URXVT_PATH URXVT_PATH' - '}' - 's6-sudo $EXEC_PATH' - '/mnt/ns/bin/spawn-pty rxvt-unicode-256color {' - " $cmd" - '} s6-sudo $URXVT_PATH '${(qqq)${container//./:}} - ) - exec env $el_env execlineb -c "${(F)el_cmd}" -} - -main() { - local container sock arg - local -a quoted - [[ $1 == */* ]] && die "Invalid container name: ${(qqq)1}" - container=$1 - shift 1 || exit $? - sock=/run/inbox/$container/run/exec/exec - - for arg in "$@"; do - quoted+=( "$(s6-quote -- "$arg")" ) - done - - if [[ -S $sock ]]; then - #exec s6-sudo $sock "$@" - direct-urxvt $container "${(j: :)quoted}" - else - powerbox-plumb "container-urxvt/$container/${(j: :)quoted}" - fi - -} -typeset -f -t main - -main "$@" === removed file 'xsession-skel/homedir/bin/clip' --- old/xsession-skel/homedir/bin/clip 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/clip 1970-01-01 00:00:00 +0000 @@ -1,8 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob # warn_create_global -typeset -gA clipboards -set -x -clipboards=( ${(0)"$(s6-sudo /run/inbox/xpra.ccx/run/exec/exec clip -0)"} ) -choice=$(printf '%s » %s\n' ${(kv)clipboards//$'\n'/»} | dmenu -l 8 -fn Terminus) -choice=${choice%% » *} -printf "%s\n" $clipboards[$choice] === removed file 'xsession-skel/homedir/bin/ctrlv' --- old/xsession-skel/homedir/bin/ctrlv 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/ctrlv 1970-01-01 00:00:00 +0000 @@ -1,23 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob # warn_create_global -set -x -wid=$(xdotool getactivewindow) || exit $? -title=$(xdotool getwindowname $wid) || exit $? -if [[ $title != *«s=xpra\ * ]]; then - echo >&2 "failed to determine xpra window" - exit 3 -fi -typeset -gA win_meta -for kv in ${=${title##*«s=xpra\ }}; do - [[ $kv != *=* ]] && exit 3 - win_meta[${kv%%=*}]=${kv#*=} -done -[[ -n $win_meta[w] && -n $win_meta[d] ]] || exit 3 - -s6-sudo /run/inbox/xpra.ccx/run/exec/exec export DISPLAY $win_meta[d] xdotool getwindowname $win_meta[w] -#s6-sudo /run/inbox/xpra.ccx/run/exec/exec export DISPLAY $win_meta[d] wmctrl -l - -clip | IFS= read -r -d '' clip -[[ -n $clip ]] || exit $? -s6-sudo /run/inbox/xpra.ccx/run/exec/exec export DISPLAY $win_meta[d] xclip -i -sel CLIPBOARD <(printf %s $clip) || exit $? -xdotool windowfocus $wid key --window $wid Caps_Lock+v === modified file 'xsession-skel/homedir/bin/open-im' --- old/xsession-skel/homedir/bin/open-im 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/open-im 2023-01-12 09:56:36 +0000 @@ -18,10 +18,10 @@ typeset -f -t launch_app -add_app '*weechat*' '"weechat:ccx" "URxvt"' powerbox-plumb 'container-urxvt/weechat.ccx/tmux -2u new-session -s weechat -A weechat-curses' -add_app '*profanity*' '"profanity:ccx" "URxvt"' powerbox-plumb 'container-urxvt/profanity.ccx/tmux -2u new-session -s profanity -A profanity' -add_app '\[telegram.ccx:*' '"telegram-desktop" "TelegramDesktop"' xsvc-in-container-xpra telegram.ccx telegram-desktop -add_app '\[signal.ccx:*' '"signal" "Signal"' xsvc-in-container-xpra signal.ccx signal-desktop +add_app '\[weechat@weechat.ccx\]*' '"abduco:weechat:weechat-ccx" "URxvt"' powerbox-plumb 'abduco/weechat.ccx/weechat/weechat-curses' +add_app '\[profanity@profanity.ccx\]*' '"abduco:profanity:profanity-ccx" "URxvt"' powerbox-plumb 'abduco/profanity.ccx/profanity/profanity' +add_app '\[void-telegram.ccx:*' '"telegram-desktop" "TelegramDesktop"' run-in-container-xpra void-telegram.ccx telegram-desktop +add_app '\[void-signal.ccx:*' '"signal" "Signal"' run-in-container-xpra void-signal.ccx signal-desktop main() { === modified file 'xsession-skel/homedir/bin/run-in-container-xpra' --- old/xsession-skel/homedir/bin/run-in-container-xpra 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/run-in-container-xpra 2024-04-23 21:15:55 +0000 @@ -15,7 +15,7 @@ s6-sudo /run/cmd.s link xsession.$display.$USER xpra.$USER tmp/.X11-unix/X$display || exit $? local -a xpra - xpra=( $(s6-sudo /run/inbox/xpra.ccx/run/exec/x11 $display $xsession_cookie start-xpra-for-container $container) ) || exit $? + xpra=( $(s6-sudo /run/inbox/xpra.ccx/run/exec/x11 $display $xsession_cookie start-xpra-for-container $container) ) (($#xpra == 2)) || exit 1 s6-sudo /run/cmd.s link xpra.$USER $container tmp/.X11-unix/X$xpra[1] || exit $? === removed file 'xsession-skel/homedir/bin/shiftinsert' --- old/xsession-skel/homedir/bin/shiftinsert 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/shiftinsert 1970-01-01 00:00:00 +0000 @@ -1,23 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob # warn_create_global -set -x -wid=$(xdotool getactivewindow) || exit $? -title=$(xdotool getwindowname $wid) || exit $? -if [[ $title != *«s=xpra\ * ]]; then - echo >&2 "failed to determine xpra window" - exit 3 -fi -typeset -gA win_meta -for kv in ${=${title##*«s=xpra\ }}; do - [[ $kv != *=* ]] && exit 3 - win_meta[${kv%%=*}]=${kv#*=} -done -[[ -n $win_meta[w] && -n $win_meta[d] ]] || exit 3 - -#s6-sudo /run/inbox/xpra.ccx/run/exec/exec export DISPLAY $win_meta[d] xdotool getwindowname $win_meta[w] -s6-sudo /run/inbox/xpra.ccx/run/exec/exec export DISPLAY $win_meta[d] wmctrl -l - -clip | IFS= read -r -d '' clip -[[ -n $clip ]] || exit $? -s6-sudo /run/inbox/xpra.ccx/run/exec/exec export DISPLAY $win_meta[d] xclip -i -sel CLIPBOARD <<<$clip || exit $? -xdotool windowfocus $wid key --clearmodifiers --window $wid 'Shift+Insert' === modified file 'xsession-skel/homedir/bin/x' --- old/xsession-skel/homedir/bin/x 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/x 2024-03-21 16:50:43 +0000 @@ -1,17 +1,6 @@ #!/bin/zsh autoxrandr - -# run script in xpra container to reset keyboard layout on all X servers -() { - local display xsession_cookie - display=${DISPLAY#:} - xsession_cookie="$(xauth list $DISPLAY)" || exit $? - xsession_cookie=${xsession_cookie##* } || exit $? - s6-sudo /run/cmd.s link xsession.$display.$USER xpra.$USER tmp/.X11-unix/X$display || exit $? - exec s6-sudo /run/inbox/xpra.$USER/run/exec/x11 "$display" "$xsession_cookie" xkb-all -} - -#xkb -#for N in {00..10}; do -# DISPLAY=$DISPLAY$N xkb -#done +xkb +for N in {00..10}; do + DISPLAY=$DISPLAY$N xkb +done === removed file 'xsession-skel/homedir/bin/xsvc-in-container-xpra' --- old/xsession-skel/homedir/bin/xsvc-in-container-xpra 2024-05-07 20:36:32 +0000 +++ new/xsession-skel/homedir/bin/xsvc-in-container-xpra 1970-01-01 00:00:00 +0000 @@ -1,27 +0,0 @@ -#!/bin/zsh -# vim: sts=2 sw=2 et -setopt no_unset warn_create_global - -main() { - local container display xsession_cookie - (( $# == 2 )) || exit 100 - container=$1 - xsvc_name=$2 - [[ $container == */* ]] && exit 100 - display=${DISPLAY#:} - xsession_cookie=${"$(xauth list $DISPLAY)"##* } || exit $? - - # s6-sudo /run/cmd.s up $container || exit $? - s6-sudo /run/cmd.s link $container xsession.$display.$USER run/exec/xsvc run/exec/exec || exit $? - s6-sudo /run/cmd.s link xsession.$display.$USER xpra.$USER tmp/.X11-unix/X$display || exit $? - - local -a xpra - xpra=( $(s6-sudo /run/inbox/xpra.ccx/run/exec/x11 $display $xsession_cookie start-xpra-for-container $container) ) - (($#xpra == 2)) || exit 1 - - s6-sudo /run/cmd.s link xpra.$USER $container tmp/.X11-unix/X$xpra[1] || exit $? - exec s6-sudo /run/inbox/$container/run/exec/xsvc "$xpra[@]" "$xsvc_name" -} -typeset -f -t main - -main "$@"