=== modified file 'bin/powerbox-menu-list' --- old/bin/powerbox-menu-list 2024-04-14 15:35:09 +0000 +++ new/bin/powerbox-menu-list 2024-04-11 16:14:41 +0000 @@ -50,8 +50,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 "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 default -A\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.} === modified file 'home/xsession-setup' --- old/home/xsession-setup 2024-04-14 15:35:09 +0000 +++ new/home/xsession-setup 2024-04-11 16:14:41 +0000 @@ -6,7 +6,25 @@ DISPLAYNUM=$2 REPO_ROOT=${0:P:h:h} -# helpers +# make files that can't be easily version-controlled +setup-special() { + local fifo=/run/user/$UID/plumber_fifo.X$DISPLAYNUM + if ! [[ -p $fifo ]]; then + mkfifo $fifo || exit $? + fi + ln -f $fifo $DSTROOT/run/plumber_fifo || exit $? +} + +copy-skel() { + local skel dst + s6-hiercopy $REPO_ROOT/xsession-skel/homedir $DSTROOT/home/$USER || exit $? + for skel in $REPO_ROOT/xsession-skel/*/*(DN); do + [[ ${skel:h:t} == homedir ]] && continue + dst=$DSTROOT/${skel:h:t}/${skel:t} + s6-hiercopy $skel $dst || exit $? + done +} + ensure-container-started() { [[ $1 == */* ]] && die "Invalid container name: ${(qqq)1}" s6-svc -wU -T 4000 -o /run/service/container.$1 @@ -19,32 +37,6 @@ link-to-container-inbox $from_container ${DSTROOT:t} "$@" || exit $? } -# Copy over the versioned filesystem image -copy-skel() { - local skel dst - s6-hiercopy $REPO_ROOT/xsession-skel/homedir $DSTROOT/home/$USER || exit $? - for skel in $REPO_ROOT/xsession-skel/*/*(DN); do - [[ ${skel:h:t} == homedir ]] && continue - dst=$DSTROOT/${skel:h:t}/${skel:t} - s6-hiercopy $skel $dst || exit $? - done -} - -# make files that can't be easily version-controlled -setup-special() { - # FIFO for plumber - local fifo=/run/user/$UID/plumber_fifo.X$DISPLAYNUM - if ! [[ -p $fifo ]]; then - mkfifo $fifo || exit $? - fi - ln -f $fifo $DSTROOT/run/plumber_fifo || exit $? - - # init symplink for container startup - ln -sf /home/$USER/run $DSTROOT/run/user-run || exit $? - ln -sf user-run/init $DSTROOT/run/init || exit $? -} - -# make X server available to the xsession container setup-x11() { s6-svwait /run/service/container.X$DISPLAYNUM || exit $? @@ -58,10 +50,7 @@ printf '%s' >$DSTROOT/home/$USER/run/env/DISPLAY :$DISPLAYNUM || exit $? } -# launch container for xpra and make X server available to it setup-xpra() { - to-current-inbox xpra.$USER run/exec/x11 run/exec/exec || exit $? - return # TODO: the rest is probably unnecessary, delete if not needed local svstat xpra_svc xpra_dir xpra_svc=/run/service/container.xpra.$USER xpra_dir=/run/containers/xpra.$USER @@ -80,18 +69,28 @@ ln -f /run/containers/X$DISPLAYNUM.xorg/tmp/.X11-unix/X$DISPLAYNUM $xpra_dir/tmp/.X11-unix/X$DISPLAYNUM || exit $? } -# launch container for handling passwords -setup-pass() { - to-current-inbox pass.$USER run/pass/list run/exec/exec || exit $? -} - -# link sockets for uncontainerized helpers -setup-helper-sockets() { - local sock - s6-rc -l /run/user/$USER/s6-rc -u change xsession-all || exit $? - for sock in /run/user/$USER/xsession/*(=); do - ln -f $sock $DSTROOT/run/${sock:t}.s || exit $? - done +setup-i3status() { + #s6-rc -l /run/user/$USER/s6-rc -u change i3status || exit $? + ln -f /run/user/$USER/xsession/i3status $DSTROOT/run/i3status.s || exit $? +} + +setup-pass-list() { + to-current-inbox pass.$USER run/pass/list || exit $? +} + +setup-powerbox-menu-list() { + #s6-rc -l /run/user/ccx/s6-rc -u change powerbox-menu-list || exit $? + ln -f /run/user/ccx/xsession/powerbox-menu-list $DSTROOT/run/powerbox-menu-list.s || exit $? +} + +setup-svstat() { + #s6-rc -l /run/user/ccx/s6-rc -u change svstat || exit $? + ln -f /run/user/ccx/xsession/svstat $DSTROOT/run/svstat.s || exit $? +} + +setup-init() { + ln -sf /home/$USER/run $DSTROOT/run/user-run || exit $? + ln -sf user-run/init $DSTROOT/run/init || exit $? } main() { @@ -105,12 +104,15 @@ exit 3 fi - copy-skel || exit $? - setup-special || exit $? - setup-x11 || exit $? - setup-xpra || exit $? - setup-pass || exit $? - setup-helper-sockets || exit $? + copy-skel + setup-special + setup-x11 + s6-rc -l /run/user/$USER/s6-rc -u change xsession || exit $? + setup-i3status + setup-pass-list + setup-powerbox-menu-list + setup-svstat + setup-init } main === modified file 'xsession-skel/homedir/.config/i3/config' --- old/xsession-skel/homedir/.config/i3/config 2024-04-14 15:35:09 +0000 +++ new/xsession-skel/homedir/.config/i3/config 2024-03-21 16:50:43 +0000 @@ -26,8 +26,6 @@ workspace_auto_back_and_forth yes show_marks yes -for_window [all] title_format "%instance» %title" - set_from_resource $f_border i3wm.focused_border #4c7899 set_from_resource $f_background i3wm.focused_background #285577 set_from_resource $f_text i3wm.focused_text #ffffff === removed file 'xsession-skel/homedir/bin/ptmx-handler' --- old/xsession-skel/homedir/bin/ptmx-handler 2024-04-14 15:35:09 +0000 +++ new/xsession-skel/homedir/bin/ptmx-handler 1970-01-01 00:00:00 +0000 @@ -1,13 +0,0 @@ -#!/bin/execlineb -# Launched by s6-sudo with: -# FD 0: PTY master device (passed in by the client) -# FD 1,2: stdout/stderr of the client -# FD 4: s6-sudo service stderr -# argv as passed in by the client - -fdmove -c 2 4 # restore stderr -fdmove 1 4 # copy to stdout -fdmove 3 0 # move ptmx to FD 3 -redirfd -r 0 /dev/null # open /dev/null for stdin -importas -D unnamed 1 NAME # get first positional argument, falling back to "unnamed" -background { urxvt -name $NAME -pty-fd 3 } === removed file 'xsession-skel/homedir/bin/sockout' --- old/xsession-skel/homedir/bin/sockout 2024-04-14 15:35:09 +0000 +++ new/xsession-skel/homedir/bin/sockout 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -#!/bin/execlineb -S1 -redirfd -r 0 /dev/null -s6-ipcclient $1 s6-ioconnect === modified file 'xsession-skel/homedir/bin/xpass' --- old/xsession-skel/homedir/bin/xpass 2024-04-14 15:35:09 +0000 +++ new/xsession-skel/homedir/bin/xpass 2024-03-21 16:50:43 +0000 @@ -1,26 +1,5 @@ #!/bin/zsh -dmenu=( - dmenu - -fn 'Misc Fixed:semicondensed:pixelsize=13:lang=cs' - -nb darkred - -nf silver - -sb '#333333' - -sf white -) -list=( - s6-ipcclient - /run/inbox/pass.ccx/run/pass/list - s6-ioconnect -) -show=( - s6-sudo - /run/inbox/pass.ccx/run/exec/exec - pass show -- -) wid=$(xdotool getactivewindow) && -pass=$($list