Add A JWM Bookmarks Menu or Submenu/Messing Around With JWM

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

two more ways to get bookmarks on your menus

#201 Post by Puppus Dogfellow »

a return to the motivation behind the original posts in the thread: the multi-panes are really multiple directories opened at once, so i'm using the close all rox script (it'll probably come in handy if you use anything from this post--those windows can really begin to bury you) as the example for how to get icons into your pup through the terminal.

Virtual Multi-Pane (really multiple windows/directories, but it more less functions as multi-pane) and a Close All Rox Windows Command Line Menu Install And Icon Creator/Placer. run as a script or dump into a terminal; modify and rerun as often as you like:

Code: Select all


#!/bin/sh
#rox multipane -- 3 templates
#(since rox will use default apps for most files, you can
#use these same templates for a variety of batch launching,
#(but by then you could just swap out executables or swap in scripts))

#you could use any pic on your system for the icon if you swap in
#the correct path for it--i just went with what was in  #/usr/share/applications/ROX-Filer-file-manager.desktop

echo $'
[Desktop Entry]
Encoding=UTF-8
Name=ROX-4
Icon=/usr/share/pixmaps/puppy/open.svg
Comment=rox multipane--change number and paths of dirs belows
Exec=rox /mnt /root/.config  /root/Choices /root/Desktop
Terminal=false
Type=Application
Categories=FileManager
GenericName=rox4
' > /usr/share/applications/ROX-4.desktop
echo $'
[Desktop Entry]
Encoding=UTF-8
Name=ROX-3
Icon=/usr/share/pixmaps/puppy/open.svg
Comment=rox multipane--change number and paths of dirs belows
Exec=rox /mnt /root/my-documents /usr/share/applications
Terminal=false
Type=Application
Categories=FileManager
GenericName=rox3
' > /usr/share/applications/ROX-3.desktop
echo $'
[Desktop Entry]
Encoding=UTF-8
Name=ROX-2
Icon=/usr/share/pixmaps/puppy/open.svg
Comment=rox multipane--change number and paths of dirs belows
Exec=rox /root/.jwm /etc/xdg/templates
Terminal=false
Type=Application
Categories=FileManager
GenericName=rox2
' > /usr/share/applications/ROX-2.desktop
#add an icon for the next .desktop 
#(rox colored (turquoise) X on a transparent background)
#default action for open as text changed transparent to black
#so i had to manually swap in the "none"

echo $'
/* XPM */
static char *cr_xpm[] = {
"21 21 2 1",
"0	c none",
"1	c #00FFFF",
"000000000000000000000",
"000000000000000000000",
"001000000000000000100",
"000100000000000001000",
"000010000000000010000",
"000001000000000100000",
"000000100000001000000",
"000000010000010000000",
"000000001000100000000",
"000000000101000000000",
"000000000010000000000",
"000000000101000000000",
"000000001000100000000",
"000000010000010000000",
"000000100000001000000",
"000001000000000100000",
"000010000000000010000",
"000100000000000001000",
"001000000000000000100",
"000000000000000000000",
"000000000000000000000"
};
' > /usr/share/pixmaps/puppy/cr.xpm

#all those "multipanes" can start to bury you in windows, so 
# here's an easy way to close them all
echo $'
[Desktop Entry]
Encoding=UTF-8
Name=Rox-CloseAll
Icon=/usr/share/pixmaps/puppy/cr.xpm
Comment=close all rox
Exec=rox -D /
Terminal=false
Type=Application
Categories=FileManager
GenericName=Rox-CloseAll
' > /usr/share/applications/Rox-CloseAll.desktop
fixmenus
jwm -reload

#other choices for menu position/category include:
#Utility;WordProcessor;FileSystem;System;Amusement;X-Internet-browser;TextEditor;Player;Recorder;X-Document;RasterGraphics
#(pick a .desktop file from /usr/share/applications whose menu position is close to what you want for your item and copy its category listing for your own .desktop), then run fixmenus; jwm -reload
the icon is just a turquoise (rox-colored) X i made in mt-paint and saved as .xpm. right click it to open it as text so you can include it in your script (you could also just point to any existing icon on your system you'd like to use).

swap out directories and how many you want launched, alter the position, sprinkle the menu with close-all-rox commands. use the same template to launch multiple files in geany or multiple windows in leafpad (as examples).

from the comments, the only problem i found from making .xpm icons this way:
[...]
#(rox colored (turquoise) X on a transparent background)
#default action for open as text changed transparent to black
#so i had to manually swap in the "none"
when i checked to see if it worked, i noticed that my transparency was turned to black so i had to change the #000000 (black) to none.

sandwich the icons and .desktops you'd like to make with

Code: Select all

echo $'
(content--script spits out a sample create-file-with-content template)
' > (path to file)
(cnt in the nwp's pwn launcher if you have that installed) and modify and run the file (or parts of it) as needed. the above is set for one each of a two, three, and four window launch.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

space bar keybank toggle and mini word processor

#202 Post by Puppus Dogfellow »

without a fix.

the word processing project in this thread goes back quite a while:

Puppus Dogfellow
Tue 16 Jun 2015, 02:37 Post subject: nearly all the custom packs in one folder that can be left
Subject description: outside your save file/shared with other puppies on your system
Gaexec_Paexack-jwm.tar.xz http://www.murga-linux.com/puppy/viewto ... 016#851016

Puppus Dogfellow
Sun 13 Dec 2015, 09:00 Post subject: jwm word processor functions plus a bunch of other stuff.
Subject description: 827kb http://murga-linux.com/puppy/viewtopic. ... 695#876695

and the additional menus idea
(
Puppus Dogfellow
Thu 21 Aug 2014, 19:45 Post subject: 9 Pack Of JWM Menus
Subject description: the escape key as seven additional menu buttons
http://www.murga-linux.com/puppy/viewto ... 032#796032
)

turned into 6 banks of keys, toggles, to which i'm going to add a few more. before i get to the long paste-in, a little background. if you've installed the nwp, you have the following keys as spacebar shortcuts:

Code: Select all


<Key mask="A" key="space">exec:rox</Key>
<Key mask="C" key="space">exec:/nwp/ww</Key>
<Key mask="S" key="space">exec:/nwp/p</Key>
<Key mask="CA" key="space">exec:/nwp/rr</Key>
<Key mask="CS" key="space">exec:/nwp/cr</Key>
<Key mask="AS" key="space">exec:/nwp/t</Key>
<Key mask="CAS" key="space">exec:/nwp/rup</Key> 
(rup--up from the bottom of the rox bookmarks recents, t--terminal, cr--close all rox, rr--rox recents, p --main launcher, ww--MochiMoppel's WinSwitcher).

if not, that chunk of text added to /root/.jwm/jwmrc-personal will give you them (after a fixmenus; jwm -restart and the creation of the destination files (or just make a /nwp folder for now)). you can use the above as a template for your own needs, or use them in conjunction with the mini word processor:

from http://murga-linux.com/puppy/viewtopic. ... 194#993194,
[5/25/18] at 16:38 Post subject: mcbwp "plugin" updated to mcbwp1; encompassing 1.5 updated
Subject description: and based on 1.4; box1 spun off as ewp--The Emergency Word Processor; fixes for tab sp. issue

Puppus Dogfellow wrote:bwp1.5 (46k)
mcbwp1 (12k)

ewp--EmergencyWordProcessor.html (159k)
ewp--EmergencyWordProcessor.html.gz (25k)

box1.1.html (159k)
box1.1.html.xz (18k)

if you activate the swap (the script's name in the launcher or clicking the script will do it), alt+ctrl+space will add a tab space, and alt+shift+space will spit out the page break code.
larger bwp's desktop file now active (guess that howto will have to wait some more--the keys and indentation issue have gotten in the way), and box1 and 2 are no longer copies of one another; preloading the boxes with the templates and styles sheets (turns out you have to paste into and download from the first box regardless it seems) allows the file to recreate (possibly customized on the fly) the styles and templates sheets, and so is a word processor maker of a sort. the autoindenting paragraph templates will be the next update of the old pu/up (the first micro word processor spinoff in this thread), and you could use a special character or some sort of find and replace strategy after the fact, but if you want to type in tab spaces in browser mode, i think one solution could be to make a toggle of the space bar keys:




these are the built in spacebar shortcuts:

Code: Select all

<Key mask="A" key="space">exec:rox</Key>
<Key mask="C" key="space">exec:/nwp/ww</Key>
<Key mask="S" key="space">exec:/nwp/p</Key>
<Key mask="CA" key="space">exec:/nwp/rr</Key>
<Key mask="CS" key="space">exec:/nwp/cr</Key>
<Key mask="AS" key="space">exec:/nwp/t</Key>
<Key mask="CAS" key="space">exec:/nwp/rup</Key> 
(rup--up from the bottom of the rox bookmarks recents, t--terminal, cr--close all rox, rr--rox recents, p --main launcher, ww--MochiMoppel's WinSwitcher; names are launch codes and shorter is usually better, but there are a few that i've had to make because i've forgotten their convenient original name)


new nwp shortcuts and a couple of blanks for browser based word processor use:

Code: Select all

echo $'
#!/bin/sh
#newspacekeys /root/.jwm/jwmrc-personal
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /root/.jwm/jwmrc-personal
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /root/.jwm/jwmrc-personal
fixmenus; jwm -restart
' >/nwp/jtab
chmod 755 /nwp/jtab

echo $'
#!/bin/sh
#root3-9
#newkeys0:
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9/keys0
#root3-9
#newkeys1:
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9/keys1
fixmenus; jwm -restart
' >/nwp/spc9
chmod 755 /nwp/spc9

echo $'
#!/bin/sh
#root3-9m
#newkeys0:
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9menusblanks/keys0
#newkeys1:
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9menusblanks/keys1
fixmenus; jwm -restart
' >/nwp/spc9m
chmod 755 /nwp/spc9m

echo $'
#!/bin/sh
#root3-10
#newkeys0:
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/10/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/10/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/10/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/10/keys0
#root3-10
#newkeys1:
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/10/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/10/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/10/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/10/keys1
fixmenus; jwm -restart
' >/nwp/spc10
chmod 755 /nwp/spc10


#
#reverse:
#



echo $'
#!/bin/sh
#revkeys0:
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9/keys0
#revkeys1:
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9/keys1
fixmenus; jwm -restart
' >/nwp/spc9r
chmod 755 /nwp/spc9r
echo $'
#!/bin/sh
revkeys0:
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9menusblanks/keys0
#revkeys1:
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9menusblanks/keys1
fixmenus; jwm -restart
' >/nwp/spc9mr
chmod 755 /nwp/spc9mr
echo $'
#!/bin/sh
#revkeys0:
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/10/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/10/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/10/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/10/keys0
#revkeys1:
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/10/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/10/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/10/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/10/keys1
fixmenus; jwm -restart
' >/nwp/spc10r
chmod 755 /nwp/spc10r
echo $'
#!/bin/sh
#space key toggle back(jwmrc-p):
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /root/.jwm/jwmrc-personal
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /root/.jwm/jwmrc-personal
fixmenus; jwm -restart
' >/nwp/jtabr
chmod 755 /nwp/jtabr


#
#all at once:

#in:




echo $'
#!/bin/sh
#newspacekeys 
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /root/.jwm/jwmrc-personal
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9/keys0
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9/keys1
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9menusblanks/keys0 
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/9menusblanks/keys1 
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/10/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/10/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/10/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/10/keys0
sed -i \'/"CA" key="space">exec:\/nwp\/rr/ s//"CA" key="space">exec:\/nwp\/bh1/g\' /nwp/root3/10/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/t/ s//"AS" key="space">exec:\/nwp\/bh2/g\' /nwp/root3/10/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/cr/ s//"CS" key="space">exec:\/nwp\/bh3/g\' /nwp/root3/10/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/rup/ s//"CAS" key="space">exec:\/nwp\/bh4/g\' /nwp/root3/10/keys1
fixmenus; jwm -restart

' >/nwp/bwpk1
chmod 755 /nwp/bwpk1


#
#reverse:
#


echo $'
#!/bin/sh
#revkeys
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9/keys0
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9/keys1
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9menusblanks/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9menusblanks/keys0 
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/9menusblanks/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/9menusblanks/keys1 
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/10/keys0
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/10/keys0
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/10/keys0
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/10/keys0
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /nwp/root3/10/keys1
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /nwp/root3/10/keys1
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /nwp/root3/10/keys1
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /nwp/root3/10/keys1
sed -i \'/"CA" key="space">exec:\/nwp\/bh1/ s//"CA" key="space">exec:\/nwp\/rr/g\' /root/.jwm/jwmrc-personal
sed -i \'/"AS" key="space">exec:\/nwp\/bh2/ s//"AS" key="space">exec:\/nwp\/t/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CS" key="space">exec:\/nwp\/bh3/ s//"CS" key="space">exec:\/nwp\/cr/g\' /root/.jwm/jwmrc-personal
sed -i \'/"CAS" key="space">exec:\/nwp\/bh4/ s//"CAS" key="space">exec:\/nwp\/rup/g\' /root/.jwm/jwmrc-personal
fixmenus; jwm -restart

' >/nwp/bwpk1
chmod 755 /nwp/bwpk1r
you can copy them over from nwp to ~/my-apps/bin or the ~/my-apps/mc/scripts folder the pets make (already in the nwp, but if you didn't have it installed, it'd make them), and fill them out with chunks you hone from the vtg sheet.

here's a template for a couple of bwp helpers and a couple of blanks (plus cr as an example to show where you add the code). putting the code on a separate script rather than in the window manager file means you can adjust what the keys do without having to restart or reload the manager or fix the menus):

Code: Select all


echo $'
#!/bin/sh

rox -D /
' > /nwp/cr
chmod 755 /nwp/cr


echo $'
#!/bin/sh
#bwp helper 1--tab spaces for browser mode
xdotool type "     "
#set at five spaces
' > /nwp/bh1
chmod 755 bh1
echo $'
#!/bin/sh
#as key does same as paw in launcher
#page break after, white text (if any). paw.
xdotool type \'<par style="font-size: 11pt; color:white; page-break-after: always"></par>\'
#bwp helper two--page break code spit out for text editor view (there's a cut and paste version in styles2 that works in browser mode for bh1 and bh2)
' > /nwp/bh2
chmod 755 bh2

echo $'
#!/bin/sh

' > /nwp/bh3
chmod 755 bh3

echo $'
#!/bin/sh

' > /nwp/bh4
chmod 755 bh4


echo $'#!/bin/sh

' > /nwp/bh4
chmod 755 bh4

permissions are set--just fill out the content.
mkdir -p /nwp in the terminal will give a place for the above if you don't feel like making one yourself and swapping out the default path for yours.

word processor works by giving you an editable browser tab with formatting you can cut and paste from templates.

enjoy.

:D

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

panel frames and pinboard swaps on the jwm menus

#203 Post by Puppus Dogfellow »

from http://www.murga-linux.com/puppy/viewto ... 45#1034645
Re: panels and pins on the jwm menus
-------

Puppus Dogfellow wrote:

Code: Select all

echo $'<JWM>
<Menu label="Panels and Pins" icon="" height="16">
<Program label="panel frame set1" icon="">/nwp/p1</Program>
<Program label="panel frame set2" icon="">/nwp/p2</Program>
<Program label="panel frame set3" icon="">/nwp/p3</Program>
<Program label="panel frame set4" icon="">/nwp/p4</Program>
<Program label="panel frame set5" icon="">/nwp/p5</Program>
<Program label="panel frame set6" icon="">/nwp/p6</Program>
<Program label="panel frame set7" icon="">/nwp/p7</Program>
<Program label="panel frame set8" icon="">/nwp/p8</Program>
<Program label="panel frame set9" icon="">/nwp/p9</Program>
<Menu label="Pins" icon="" height="16">
<Program label="pinboard 1" icon="">/nwp/pp1</Program>
<Program label="pinboard 2" icon="">/nwp/pp2</Program>
<Program label="pinboard 3" icon="">/nwp/pp3</Program>
<Program label="pinboard 4" icon="">/nwp/pp4</Program>
<Program label="pinboard 5" icon="">/nwp/pp5</Program>
<Program label="pinboard 6" icon="">/nwp/pp6</Program>
<Program label="make  6 puppy pins for pp# series" icon="">/nwp/mk6p</Program>
</Menu>
</Menu>

<!--  you could use any name for the icon then make the scripts to match after the fact-->
</JWM>
' > /root/.jwm/pansnpins
sed -i 's/<Menu label="Shutdown/<Include>\/root\/.jwm\/pansnpins<\/Include>\n<Menu label="Shutdown/' /etc/xdg/templates/_root_.jwmrc
jwm -reload

#to add the <Include>/root/.jwm/pansnpins</Include> to one of the other menus, uncomment the line below pick a spot in one of the other menus:
#geany -i /nwp/root3/9/root0menu /nwp/root3/9/root1menu /nwp/root3/9/root2menu /nwp/root3/9/root4menu /nwp/root3/9/root5menu /nwp/root3/9/root6menu /nwp/root3/9/root7menu /nwp/root3/9/root8menu /nwp/root3/9/root9menu
#the -i opens it in a new window (search and replace by session to work on these files in a new window without affecting your other stuff.)
#geany -i /etc/xdg/templates/_root_.jwmrc #to change the location of the line added by the above script 



#menu is already under rox in the n aemenu (n in the launcher >rox> panels and pins)
#for icons see http://www.murga-linux.com/puppy/viewtopic.php?p=1031459#1031459
#for more on panels, see http://www.murga-linux.com/puppy/viewtopic.php?p=1031770#1031770
#non anuupuus/approximatic (these spins) setups can use either of the above posts for the panel part of the scripts.
#and grab the pinboard codes from: http://www.murga-linux.com/puppy/viewtopic.php?p=1034601#1034601

dump the above into a terminal to get the aemenu rox submenu for the panels and pins (n in launcher) on the right click menu. see
http://www.murga-linux.com/puppy/viewto ... 01#1034601
http://www.murga-linux.com/puppy/viewto ... 70#1031770
http://www.murga-linux.com/puppy/viewto ... 459#103145

for more on icons, panels, and the pinboard swaps. you don't have to follow any of those directions except to get icons since the swapping scripts exist in /nwp, but the general purpose versions (linked and in the comments) use the terminal instead of the launcher so work out of /root/my-applications/bin. the icon making scripts are built in--just run the code in the link and pick your icons (you could also reuse the pinboard icons in /usr/share/applications/icons-alt). if you put them in an icon path (like /root/puppy-reference/mini-icons) you only need the name in the icon="" field. if in some random spot on your system, use the full path between the quotation marks.

...

the four hundred or so icons (0-9 in the default mcc colors) are only about 11k gz compressed, so i'll add them at the end of this post.


default location for menu and submenu is above the shutdown menu (right click/alt+3)
---------------



Puppus Dogfellow wrote:just as you can swap out panels/panel frame sets to swap in keyboard shortcuts (or programs) assigned through rox to icons you put there, you can swap shortcuts and icons by swapping the puppy pinboard in and out (but you'd have to make copies of it first,which is one of the first things i did with the original MCC utility. using the code to make five additional copies and some tiny scripts to flip through the pinboards, you can have a similar utility for the main background that works like the earlier one for the panels:

Code: Select all

#!/bin/sh
#make into a script or dump into a terminal:
echo $'	#!/bin/sh
#(older comments from nwp utility) name mk6ps and place in /nwp or just run in terminal as:  cd /root/Choices/ROX-Filer; for f in PuppyPin{2..6} ; do cp PuppyPin $f ; done
cd /root/Choices/ROX-Filer
# nwp menu entry for aemenu: cmd "make  6 puppy pins for pp# series" "/nwp/mk6p"
# nwp menu entry  for jwm: <Program label="make  6 puppy pins">/nwp/mk6p</Program>
for f in PuppyPin{2..6} ; do cp PuppyPin $f ; done
' > /root/my-applications/bin/mk6p
echo $'#!/bin/sh
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin1
' > /root/my-applications/bin/pp1
echo $'#!/bin/sh
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin2
' > /root/my-applications/bin/pp2
echo $'#!/bin/sh
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin3
' > /root/my-applications/bin/pp3
echo $'#!/bin/sh
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin4
' > /root/my-applications/bin/pp4
echo $'#!/bin/sh
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin5
' > /root/my-applications/bin/pp5
echo $'#!/bin/sh
rox --pinboard=/root/Choices/ROX-Filer/PuppyPin6
' > /root/my-applications/bin/pp6
chmod 755 /root/my-applications/bin/pp*
chmod 755 /root/my-applications/bin/mk6p

#swap out the path /root/my-applications/bin for /root/Desktops/desktops/scripts to use it with the desktop idea from http://murga-linux.com/puppy/viewtopic.php?p=1031769#1031769
#mkdir -p /root/Desktop/desktops/{scripts,icons/{pans,defaults,dirs,conf,cus}} 
#use a set made but you didn't use from the panels for the icons...
#panels: http://murga-linux.com/puppy/viewtopic.php?p=1031459#1031459
#... set of 9 alternate icons in directory as above. 	 


[...]
___________

grab the codes for the panel swaps and see the default icon code and colors from http://www.murga-linux.com/puppy/viewto ... 59#1031459 (PostPosted: Wed 03 Jul 2019, 08:27 Post subject: panel frame "plugin" and icon template
Subject description: 4 panels toggle on and off. set of 9. alternate icons in directory as above) or use the link at top and grab the pans.tar.gz that's already done.

___________

Code: Select all


echo $'<JWM>
<Menu label="Panels and Pins" icon="" height="16">
<Program label="panel frame set1" icon="">p1</Program>
<Program label="panel frame set2" icon="">p2</Program>
<Program label="panel frame set3" icon="">p3</Program>
<Program label="panel frame set4" icon="">p4</Program>
<Program label="panel frame set5" icon="">p5</Program>
<Program label="panel frame set6" icon="">p6</Program>
<Program label="panel frame set7" icon="">p7</Program>
<Program label="panel frame set8" icon="">p8</Program>
<Program label="panel frame set9" icon="">p9</Program>
<Menu label="Pins" icon="" height="16">
<Program label="pinboard 1" icon="">pp1</Program>
<Program label="pinboard 2" icon="">pp2</Program>
<Program label="pinboard 3" icon="">pp3</Program>
<Program label="pinboard 4" icon="">pp4</Program>
<Program label="pinboard 5" icon="">pp5</Program>
<Program label="pinboard 6" icon="">pp6</Program>
<Program label="make  6 puppy pins for pp# series" icon="">mk6p</Program>
</Menu>
</Menu>

<!--  you could use any name for the icon then make the scripts to match after the fact-->
</JWM>
' > /root/.jwm/pansnpins
sed -i 's/<Menu label="Shutdown/<Include>\/root\/.jwm\/pansnpins<\/Include>\n<Menu label="Shutdown/' /etc/xdg/templates/_root_.jwmrc
jwm -reload


Post Reply