s243a icon

init_scripts.sh (Phoenix - Draft#1)

s243a | PRO | 03/14/21 08:07:54 PM UTC (Edited) | 0 ⭐ | 1031 👁️ | Never ⏰ | []
Bash |

2.05 KB

|

None

|

0 👍

/

0 👎

if [ -z "$CHROOT_FOLDER" ]; then
  if [ ! -z "$CONT_NAME_DEST" ]; then
    CHROOT_FOLDER="/${CONT_NAME_DEST}"
  else
    CHROOT_FOLDER=top
  fi
fi
 
echo '
#!/bin/sh
source /etc/profile
export PATH="$PATH:/usr/local/bin/"
ldconfig
#gdk-pixbuf-query-loaders --update-cache
/usr/bin/gtk-update-icon-cache -f /usr/share/icons/hicolor/
DEFAULT_DESK_ICONS="JQ8flat"
#[ $NEWPVERSION -ge 500 ] && DEFAULT_DESK_ICONS="JQ8flat"
[ ! -d /usr/local/lib/X11/themes/JQ8flat ] && DEFAULT_DESK_ICONS="Stardust"
[ -f /etc/desktop_icon_theme ] && DEFAULT_DESK_ICONS="`cat /etc/desktop_icon_theme`" #w477
/usr/sbin/icon_switcher_cli $DEFAULT_DESK_ICONS
fixmenus #probably not necessary'"
DISPLAY=$XephyrDISPLAY rox -n &
/strip_jwm.sh
DISPLAY=$XephyrDISPLAY jwm &"'
PID=$!
'"$(if [ ! -z "$CHROOT_CMD2" ]; then
  echo "DISPLAY=$XephyrDISPLAY $CHROOT_CMD2 &"
   fi )"'
wait "$PID"
' >"$CHROOT_FOLDER"/init_basic
 
chmod +x "$CHROOT_FOLDER"/init_basic
 
cat <<"EOF">"$CHROOT_FOLDER"/strip_tray.sed
#!/bin/sed -nrf
{H;}
/^.*<\/Swallow>.*$/ {x;
                                    s#(.*)(.*<Swallow[^<]*.*asapmshell.*$)#\1#g;tp
                                    s#(.*)(.*<Swallow[^<]*.*freememappletshell.*$)#\1#g;tp
                                    s#(.*)(.*<Swallow[^<]*.*xload.*$)#\1#g;tp
                                   }
/^.*<\/Swallow>.*$/ {bp}
$ {x;p}
/.*/! {:p #Print than cleanup
       #s/([[:blank:]]*)//g #This doesn't seem to do anything
        p
        s/.*//g;x;d}
EOF
chmod +x "$CHROOT_FOLDER"/strip_tray.sed
 
cat << "EOF" >"$CHROOT_FOLDER"/strip_jwm.sh
#!bin/sh
cat /root/.jwmrc | sed -nr '$! {H};$ {H;x;s#(<StartupCommand>)(.*)(</StartupCommand>)##g;p}' > /root/.jwmrc-new
mv /root/.jwmrc-new /root/.jwmrc
 
cat /root/.jwmrc-tray | /strip_tray.sed > /root/.jwmrc-tray-new
mv /root/.jwmrc-tray-new /root/.jwmrc-tray
EOF
chmod +x "$CHROOT_FOLDER"/strip_jwm.sh
 
 
# Xephyr parameters
#   XP="-fullscreen -title container -name Xephyr2 -dpi 144 -nolisten tcp"
#XEPHYR="-fullscreen -name Xephyr2 -dpi 144 -nolisten tcp"   
#XEPHYR="$XP"
 
 

Comments