Your comments and observations, please, for the following. TIA.
For the record, I broached on this subject yesterday in radky's DPupStretch-7.5
thread, here:
http://murga-linux.com/puppy/viewtopic. ... ost#979231
I always thought a bit strange that in the original .xinitrc, if you had both fbpanel and
lxpanel installed, there was a possibility that both be launched.
In this new code, I have tried to be more discriminate, through the introduction of a
$panel variable that the user would store in a small text file somewhere in the file
system. The form for this $panel variable is borrowed from what BarryK uses for the
$desktop variable at the top of the .xinitrc script.
As well, I have done a lot of work on alternative window managers, and this bash
code snippet I am suggesting expands the number of WMs Puppy can handle.
This may theoretically mean more Puppy users in the long run.
Additional problemS being that
-- some WMs come with a tray-and-task bar and some don't;
-- icewm and jwm can use an alternative tray-and-task bar if configured for it;
-- there is a variety of good tray-and-task bars available.
My suggested code tries to take those probs into account.
Also, the absolute original ending of the .xinitrc script is, IMO, like this paranoid guy
who is wearing suspenders AND a belt for fear his trousers will drop. I realize that
there needs to be some kind of net for the initial WM launch, that is documented,
but I felt we were overdoing it. Hence the simplification.
I left a couple of the original lines at the top so you can search for those to get the
exact location of the subroutine in .xinitrc. In radky's DPupStretch-7.5, e.g., it
starts at line 163. But it varies from Puppy to Puppy.
I tested this on my xenialPup-706 and it works fine with
Code: Select all
panel=bmpanel2
minutes --, I will be most grateful. You must absolutely back-up your original
.xinitrc before testing, do I need to remind you?
There is a "DRAFT" filigree all over this snippet, even if you can't see it!!! I'm
sure there are still a couple of issues with it. One I can see right away is how
do you define or detect the $panel variable, blind, I mean without knowing in
advance which one the user wants to use.
Isn't there a part of maths that can handle these situations? From my junior college
days: it was called the "theory of limits", IIRC, which is used in the shipping
industry, among other fields, to define the 3D geometry of boxes and containers,
starting with limited input data (with several unknowns). Or maybe I'm imagining
things.
TIA. TWYL, hopefully.
~~~~~~~~~~~~~~~
Code: Select all
# (...)
### Ending of script /root/.xinitrc ###
#v3.95 support fbpanel tray/taskbar...
#only launch tray for w.m. without inbuilt tray...
# Begin of refit by musher0, Jan 4. 2018
panel="`cat /root/panel_app`"
case "$CURRENTWM" in
jwm|icewm)echo . > /dev/null
;;
aewm|jbwm)aepanel -b -rc /root/.wmx/complement3 # or other aemenu resource file
;;
echinus|openbox|waimea|wmx)
case "$panel" in
fbpanel)if [ -x /usr/bin/fbpanel ];then # double-check # This original part by BarryK, kept.
#a bit of a hack: when 3builddistro runs fixmenus, which calls variconlinks,
#which populates /var/local/icons with symlinks, /usr/local/lib/X11/pixmaps
#is not yet populated (happens at first boot, from default icon theme)...
[ ! -e /var/local/icons/home48.png ] && ln -fs /usr/local/lib/X11/pixmaps/* /var/local/icons/
fbpanel &
fi
;;
lxpanel)[ "$desktop" = "rox" ] && [ -x /usr/bin/lxpanel ] && lxpanel & # This original part by BarryK, kept.
;;
bmpanel2)[ -x /usr/bin/bmpanel2 ] && bmpanel2 --theme="Light-T" 2>/dev/null
;;
esac
;;
esac # End of refit by musher0, Jan. 4 2018
# enable xorg mousekeys # This original part by BarryK, kept.
# they should be enabled by default somewhere in /etc/X11/xkb
# but who knows
setxkbmap -option keypad:pointerkeys
# Begin of refit by musher0, Jan 4. 2018
`which $CURRENTWM`
[ -x $CURRENTWM ] && exec $CURRENTWM
# [ "$desktop" = "rox" ] && exec jwm
# Association très artificielle....
# End of refit by musher0, Jan 4. 2018
###END###