The time now is Fri 20 Apr 2018, 18:41
All times are UTC - 4 |
Author |
Message |
shinobar

Joined: 28 May 2009 Posts: 2664 Location: Japan
|
Posted: Sun 22 Aug 2010, 22:20 Post subject:
jwmconfig2-20101228 Subject description: pannel-buttons works/gtk2jwm removed |
|
The 'Application launch buttons in tray' of JWM configuration did not work for a long time.
The Japanese Forum member, himajin and shinobar, fixed the code.
Hopefully works on puppies 4.x/5.x.
# 2009-NOV-06 low and high position fixed by himajin, shinobar
# 23aug2010 shinobar: skip comments from edit
# 20101212 01micko: removed gtktheme section from main menu
# 23aug2010 shinobar: remove warnings at parsing new config
# 27dec2010 shinobar: remove warnings from virtualDesk, thanks to Gyle
# 28dec2010 shinobar: gtk2jwm fixed but still removed from the main menu
Get jwmconfig2-20101228.pet.
Note: it includes jwm themes at '/root/.jwm/themes'.
The font setting in '*-jwmrc' of the themes is modified.
Quote: | <Font>DejaVu Sans-13:bold</Font> |
minus(-) removed:
Quote: | <Font>DejaVu Sans 13:bold</Font> |
_________________ Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Last edited by shinobar on Mon 27 Dec 2010, 22:37; edited 1 time in total
|
Back to top
|
|
 |
shinobar

Joined: 28 May 2009 Posts: 2664 Location: Japan
|
Posted: Mon 27 Dec 2010, 21:53 Post subject:
jwmconfig2-20101228 |
|
Updated including recent fixes.
_________________ Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 4208 Location: Kiel,Germany
|
Posted: Wed 29 Dec 2010, 02:39 Post subject:
|
|
/usr/local/jwmconfig2/panel-buttons
The # 2009-NOV-06 low and high position fixed by himajin, shinobar
deleted the
<!-- Additional Pager attributes; width, height -->
<Pager/>
at .jwmrc-tray while playing around with the move feature , that I hadn't recognized before. Must have gone between dpup-001 and puppy-431 .....
Just for the if [ "$choice" = Move ]; then
Code: | # 2009-NOV-06 low and high position fixed
total=`wc -l /root/.jwmrc-tray | sed -e 's/ *//' | sed -e 's/ .*//g'` ### get total number of lines
low=`grep -n '^[[:blank:]]*<TrayButton' /root/.jwmrc-tray | head -n 1| cut -d':' -f1` ### get line number of the first button(Menu)
#high=`grep -n '^[[:blank:]]*<TrayButton' /root/.jwmrc-tray | tail -n 1| cut -d':' -f1` ### get line number of the last button
high=`grep '<!-- Additional Pager attributes; width, height -->' -n /root/.jwmrc-tray | sed -e 's/\:.*>//g'` ### get line number with Additional Pager
high=`echo "(("$high" - 0))" | bc -l`
last=`echo "(("$total" - "$high" + 2))" | bc -l`
begin=`echo "(("$low" + 1))" | bc -l` ### first line with panel buttons
#end=`echo "(("$high" - 1))" | bc -l` ### last line with panel buttons
cat /root/.jwmrc-tray | head -n "$low" > /tmp/jwmrc-tray-head.txt
cat /root/.jwmrc-tray | tail -n "$last" > /tmp/jwmrc-tray-tail.txt |
Code: | if [ "$choice" = Move ]; then
grep -n '<TrayButton popup' /root/.jwmrc-tray | grep -v '<\!--' > /tmp/g0.txt
zz=`grep -c '<TrayButton popup' /tmp/g0.txt`
yy=0
y=1
z=`echo "(("$high" - "$begin"))" | bc -l`
echo $z
echo $begin
echo $high
bb=`expr $begin - 1`
echo 380
echo $bb
while [ "$begin" != "$high" ]; do
(( bb++ ))
echo $bb
PB2=`cat /root/.jwmrc-tray | sed -n ""$begin"p" | sed -e 's/<TrayButton popup="//g' | sed -e 's/\".*//g' | sed 's/^[ \t]*//'`
echo $PB2
#echo $PB2 > /tmp/jwmrc-tray-panel-$z.txt
#TTPT=`cat /root/.jwmrc-tray | sed -n ""$begin"p"`
#echo $TTPT > /tmp/jwmrc-tray-panel-$z.txt
#cat /tmp/jwmrc-tray-panel-$z.txt
SKIP=""
echo "$PB2" | grep -q '^<!--' && SKIP="yes"
[ "$PB2" = "" ] && SKIP="yes"
#[ "$SKIP" = "yes" ] && y=`expr $y - 1 `
echo $y
# echo $PB2 > /tmp/jwmrc-tray-move-$y.txt
LINE=`cat -n /root/.jwmrc-tray | grep -w $bb -m 1`
echo 399
echo $LINE
LINEwoNr=`echo $LINE | cut -f 2-99 -d ' '`
echo 402
echo "$LINEwoNr"
echo "$LINEwoNr" > /tmp/jwmrc-tray-move-$bb.txt
cat /tmp/jwmrc-tray-move-$bb.txt
echo 406
if [ "$SKIP" != "yes" ]; then
(( yy++ )); echo $yy
echo $bb
by=`expr $bb + $yy`
echo $by
echo 412
TTPT=`cat /root/.jwmrc-tray | grep "$PB2"`
echo $TTPT > /tmp/jwmrc-tray-move-$by.txt
cat /tmp/jwmrc-tray-move-$by.txt
#zz=`expr $z - 1`
echo line 417
echo $zz
#echo $TTPT > /tmp/jwmrc-tray-move-$zz.txt
#at /tmp/jwmrc-tray-move-$zz.txt
#grep -n '<TrayButton popup' /root/.jwmrc-tray | grep -v '<\!--' > /tmp/g0.txt
#zz=`grep -c '<TrayButton popup' /tmp/g0.txt`
Xdialog --title "INPUT BOX" \
--inputbox "$PB2 is button $yy of your $zz buttons.\n\
\n\
If you would like that button in another\n\
position please enter the number below." 18 45 2> /tmp/inputbox.tmp.$$
retval=$?
input=`cat /tmp/inputbox.tmp.$$`
rm -f /tmp/inputbox.tmp.$$
echo 434
echo $input
case $retval in
0)
echo "Input string is '$input'";;
1)
echo "Cancel pressed."
rm -f /tmp/jwmrc-tray*
exit 0
;;
255)
echo "Box closed."
rm -f /tmp/jwmrc-tray*
exit 0
;;
esac
if [ "$retval" != 0 ]; then
exit 0
fi
if [ "$input" != "" ]; then
#ls /tmp/jwmrc-tray-tmp-$input.txt
echo 457
#ls /tmp/jwmrc-tray-tmp-$zz.txt
echo 459
#ls /tmp/jwmrc-tray-tmp-$z.txt
echo 461
#ls /tmp/jwmrc-tray-tmp-$z.txt
echo 463
bbb=`expr $bb + $input`
if [ "`ls /tmp/jwmrc-tray-tmp-$bbb.txt`" = "/tmp/jwmrc-tray-tmp-$bbb.txt" ]; then
echo 466
Xdialog --title "MESSAGE BOX" \
--msgbox "Position "$input"
has already been selected.
you must now start over." 10 41
case $? in
0)
echo "OK" 464 ;;
255)
echo "Box closed."
rm -f /tmp/jwmrc-tray*
exit 0
;;
esac
rm -f /tmp/jwmrc-tray*
exit 0
fi # 465
echo 485
mv /tmp/jwmrc-tray-move-"$by".txt /tmp/jwmrc-tray-tmp-"$input".txt
echo 457
else # 455
echo 489
bbb=`expr $bb + $input`
if [ "`ls /tmp/jwmrc-tray-tmp-"$bbb".txt`" = /tmp/jwmrc-tray-tmp-"$bbb".txt ]; then #506
Xdialog --title "MESSAGE BOX" \
--msgbox "Position "$y"
has already been selected.
You must now start over." 10 41
case $? in
0)
echo "OK";;
255)
echo "Box closed."
rm -f /tmp/jwmrc-tray*
exit 0
;;
esac
rm -f /tmp/jwmrc-tray*
exit 0
fi # 491
fi # 488
echo 511
echo $y
# mv /tmp/jwmrc-tray-move-$y.txt /tmp/jwmrc-tray-tmp-$y.txt
#fi # 488
else # 403
mv /tmp/jwmrc-tray-move-$bb.txt /tmp/jwmrc-tray-tmp-$bb.txt
fi # 516
begin=`echo "(("$begin" + 1))" | bc -l`
echo 520
echo $begin
y=`echo "(("$y" + 1))" | bc -l`
echo 523
echo $y
#fi # 403 daemon :)
shift
done
echo line 528
cat /tmp/jwmrc-tray-tmp-* >> /tmp/jwmrc-tray-head.txt
cat /tmp/jwmrc-tray-head.txt
echo line 531
cat /tmp/jwmrc-tray-tail.txt
echo line 533
cat /tmp/jwmrc-tray-tail.txt >> /tmp/jwmrc-tray-head.txt
cat /tmp/jwmrc-tray-head.txt
mv /tmp/jwmrc-tray-head.txt /root/.jwmrc-tray
# fi # 403 syntax error near unexpected token done
Xdialog --title "MESSAGE BOX" \
--msgbox "Moving complete.
You must restart jwm for
changes to take effect." 10 41
case $? in
0)
echo "OK";;
255)
echo "Box closed."
exit 0
;;
esac
fi # 370
rm -f /tmp/jwmrc-tray*
exit 0 |
I did not clean up to show how difficult it is to hack this .......
I guess the if [ "$choice" = Remove ]; then and if [ "$choice" = Edit ]; then parts will be the same difficult.
And replacing my /root/.jwm/jwmrc-personal was not very gentleman-like ....
Still everything best and good coding !
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
[ Time: 0.0399s ][ Queries: 12 (0.0067s) ][ GZIP on ] |