=== modified file 'bin/powerbox-menu-list' --- old/bin/powerbox-menu-list 2024-07-31 22:48:55 +0000 +++ new/bin/powerbox-menu-list 2024-05-07 20:36:32 +0000 @@ -17,7 +17,7 @@ () { local svc for svc in $HOME/chome/ssh/ssh-rc/out/s6-rc-source/*:master(N); do - printf "!c.urxvt ssh.%s ssh-t %s\n" \ + printf "container-urxvt/ssh.%s/ssh-t %s\n" \ $USER ${${svc:t}%:master} done } @@ -25,7 +25,7 @@ () { local svc for svc in $HOME/chome/rcm-ssh/ssh-rc/out/runimage/*:master(N); do - printf "!c.urxvt rcm-ssh.%s ssh-t %s\n" \ + printf "container-urxvt/rcm-ssh.%s/ssh-t %s\n" \ $USER ${${${svc:t}%:master}#ssh.} done } @@ -59,10 +59,8 @@ if [[ -f $cntdir/data/fstab ]] && read imgdir ignored <$cntdir/data/fstab; then if img_has_bins $imgdir zsh; then img_has_bins $imgdir tmux && \ - printf "!c.tmux %s -A\n" ${${cntdir:t}#container.} - #img_has_bins $imgdir tmux && \ - # printf "container-urxvt/%s/tmux -2u new-session -s %s -A\n" \ - # ${${cntdir:t}#container.} ${(qqq)${${cntdir:t}#container.}%.*} + 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.} printf "container-urxvt/%s/zsh -li\n" ${${cntdir:t}#container.} @@ -71,4 +69,7 @@ done } /run/service/container.*.$USER +# TODO: change to containerized ssh +#awk '$1 == "Host" && $2 !~ /\*/ {printf "ssh/%s\n", $2; printf "ssh2/%s\n", $2}' ~/.ssh/config + # vim: ft=zsh sts=4 ts=4 sw=4 noet === removed file 'xsession-skel/homedir/bin/c.tmux' --- old/xsession-skel/homedir/bin/c.tmux 2024-07-31 22:48:55 +0000 +++ new/xsession-skel/homedir/bin/c.tmux 1970-01-01 00:00:00 +0000 @@ -1,22 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob warn_create_global - -die() { - printf >&2 '%s\n' "$@" - exit 1 -} - -main() { - local container session=_ - [[ $1 == */* ]] && die "Invalid container name: ${(qqq)1}" - container=$1 - shift 1 || exit $? - if [[ $1 == -s ]]; then - session=$2 - shift 2 || exit $? - fi - c.urxvt2 $container tmux -2u new-session -s $session -A "$@" -} -typeset -f -t main - -main "$@" === removed file 'xsession-skel/homedir/bin/c.urxvt' --- old/xsession-skel/homedir/bin/c.urxvt 2024-07-31 22:48:55 +0000 +++ new/xsession-skel/homedir/bin/c.urxvt 1970-01-01 00:00:00 +0000 @@ -1,94 +0,0 @@ -#!/bin/zsh -setopt no_unset extended_glob warn_create_global - -die() { - printf >&2 '%s\n' "$@" - exit 1 -} - -direct-urxvt() { - local container cmd sockd display - container=$1 - cmd=$2 - sock=/run/inbox/$container/run/exec/exec - display=${DISPLAY#:} - - s6-sudo /run/cmd.s link $container xsession.$display.$USER run/exec/exec || - die "Failed to link ${(qqq)container} exec socket." - - [[ -S $sock ]] || - die "Failed to link ${(qqq)container} exec socket." - - local -a el_env=( - EXEC_PATH=$sock - TERM_NAME=${container//./:} - ) - local -a el_cmd=( - 'multisubstitute {' - ' importas -i -u EXEC_PATH EXEC_PATH' - ' importas -i -u TERM_NAME TERM_NAME' - '}' - '/mnt/ns/bin/socketpair 3 1' - 'background {' - ' fdclose 3' - ' s6-sudo $EXEC_PATH' - ' /mnt/ns/bin/spawn-pty rxvt-unicode-256color {' - " $cmd" - ' } /mnt/ns/bin/fdsend 1 0 true' - '}' - 'fdmove -c 1 2' - '/mnt/ns/bin/fdrecvto 3 4' - 'fdclose 3' - 'backtick -E PTS_NAME { /mnt/ns/bin/ptsname 4 }' - 'urxvt -name ${TERM_NAME}:${PTS_NAME} -pty-fd 4' - ) - 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 - - direct-urxvt $container "${(j: :)quoted}" - -} -typeset -f -t main - -main "$@" - - -#local -a el_env=( -# EXEC_PATH=$sock -# TERM_NAME=$container -#) -#local -a el_cmd=( -# 'multisubstitute {' -# ' importas -i -u EXEC_PATH EXEC_PATH' -# ' importas -i -u TERM_NAME TERM_NAME' -# '}' -# '/mnt/ns/bin/socketpair 3 1' -# 'background {' -# ' fdclose 3' -# ' s6-sudo $EXEC_PATH' -# ' strace -fve trace=execve' -# ' /mnt/ns/bin/spawn-pty rxvt-unicode-256color {' -# " $cmd" -# ' } /mnt/ns/bin/fdsend 1 0' -# ' importas -i -u PTS_NAME PTS_NAME' -# ' printf %s\n $PTS_NAME' -# '}' -# 'fdmove -c 1 2' -# '/mnt/ns/bin/fdrecvto 3 4' -# 'backtick -E PTS_NAME { fdmove 0 3 cat }' -# 'fdclose 3' -# 'urxvt -name ${TERM_NAME}:${PTS_NAME} -pty-fd 4' -#) -#exec env $el_env execlineb -c "${(F)el_cmd}" === renamed file 'xsession-skel/homedir/bin/c.s6-sudo-urxvt' => 'xsession-skel/homedir/bin/c.urxvt' === modified file 'xsession-skel/homedir/bin/open-im' --- old/xsession-skel/homedir/bin/open-im 2024-07-31 22:48:55 +0000 +++ new/xsession-skel/homedir/bin/open-im 2024-07-23 21:43:18 +0000 @@ -13,14 +13,14 @@ } launch_app() { - "${(0@)app_cmd[$1]}" &! + "${(0@)app_cmd[$1]}" } typeset -f -t launch_app -add_app '*weechat*' '"weechat:*" "URxvt"' c.tmux weechat.ccx -s weechat weechat-curses -add_app '*profanity*' '"profanity:*" "URxvt"' c.tmux profanity.ccx -s profanity profanity -add_app '*iamb*' '"iamb:*" "URxvt"' c.tmux iamb.ccx -s iamb iamb +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 '*iamb*' '"iamb:ccx:" "URxvt"' powerbox-plumb 'container-urxvt/iamb.ccx/tmux -2u new-session -s iamb -A iamb' 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 '\[signal2.ccx:*' '"signal" "Signal"' xsvc-in-container-xpra signal2.ccx signal-desktop