(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 27 Oct 2020, 20:45
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Add A JWM Bookmarks Menu or Submenu/Messing Around With JWM
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 8 of 14 [203 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, 11, 12, 13, 14 Next
Author Message
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Tue 22 Jul 2014, 05:43    Post subject: terminal as a shortcut device
Subject description: briefly named programs, easy on and off terminal
 

terminal_shortcuts.tar.gz

Quote:
cadi close all instances on all desktops
ccdi close all instances on current desktop
cg close all current geany
cl close all current leafpad
closeallrox
close instances template and explanation
cm close all current mtpaint
cr close all current rox
cs close all current sakura
ct close all current rxvt
cu close all current urxvt
cx close all current xpad
d1
d10
d2
d3
d4
d5 [all the d- series will take you to the desktop number indicated]
d6
d7
d8
d9
hlx [launch htop and lx task at the same time]
mps exit to prompt
mrs reboot
mss shutdown [m-series are Mochi-Moppel's gentler shutdown scripts,which i've not yet used. mss is the original...]
mxs restart xserver
p0
p1
p2

p3 [p- series is a (configurable) four panel toggle--like a menu for all sides. good for cadi, ccdi, and the launching scripts. also the NWPT]
p4
p5
p7
p8
p9

wg wmctrl list plus window geometry
wh wmctrl help
wl wmctrl list
wmctrl-1.07-6_i386.pet [needed by most of the stuff here]
wmctrlh wmctrl help, clickable (thanks to disciple)
wmctrll wmctrl list plus window geometry, clickable (thanks to disciple) [these two make it somewhat easier to learn about this very useful program]



because i've now made my terminal the keyboard shortcut of spacebar+shift[<Key mask="S" key="space">exec:sakura</Key>], i'm finding it's actually faster to do many things through it. because "cs" entered into it closes it, it's also unobtrusive and the action flows as smoothly as typing in a document. i also just discovered that the up and down arrow keys will allow you to scroll back and forth through all the commands you've ever entered into a terminal, so you could get away with longer, more descriptive titles without too much loss in speed, though
Code:
shift+space, two or three characters, cs.
can be done while looking elsewhere or one's eyes closed. i decided to gain back some of my keyboard shortcuts (regained ten with the desktops) and made a few happy discoveries along the way, the main one being that you can use the terminal in the same way we've been customizing the menu to launch specific folders and files. here are two templates and three examples:


Code:
#!/bin/bash

geany /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad1.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad2.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad3.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad4.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad5.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad6.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad7.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad8.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad9.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad10.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad11.txt


Code:
#!/bin/bash
rox /mnt/mmcblk0p2/Dropbox/MMMMMMMMM /mnt/mmcblk0p2/Dropbox /mnt/mmcblk0p2/Dropbox/ANCN /mnt/mmcblk0p2/Dropbox/feb /mnt/sda2/downloadsFFFsda2 /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad



Code:
#!/bin/bash

leafpad /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad1.txt| leafpad /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad2.txt| leafpad /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad3.txt| leafpad /mnt/sda1/dropboxondell571/Dropbox/MMMMMMMMM/supl/leafpad/leafpad4.txt| leafpad /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad5.txt


the first one and second share the same syntax--program name, then the files or folders you want to open. naming the geany one gl and copying it (i suppose symlinking would also do) to a bin folder (/bin, usr/bin, /root/my-applications/bin, etc--all of them need to be copied to a bin folder in order for the terminal to pick them up as commands) will launch geany with those files opened when "gl" is entered into a terminal. you could also make these things themselves into shortcut keys or menu items. the rox one will open up multiple rox folders. the leafpad situation is a bit different and some programs may need this technique. it's not merely a question of whether or not the program opens with a file list/tree or as individual windows, because for libreoffice, the geany syntax [#!/bin/sh
libreoffice4.2 --writer fileone'sfullpath filetwo'sfullpath] will work. anyway, for leafpad and others, making the shortcut file is a bit more involved than simply highlighting a bunch in a folder then dragging the list to a leafpad or xpad file and then adding the crunchbang and program name on top of it. you need to use the | character to separate the individual items you want launched. you can also add more than one program launching more than one file this way. once you're done or have done a few of these, you may find
Code:
shift+space, two to five characters, ct
is faster than many other keyboard shortcuts (flows better, easier to remember, less hand contorting) and is an appreciable deal faster than hunting and pecking for things on the menus or panels.

...

of course, you could still use these scripts without ever having to touch the the terminal. if you've copied the contents of the downloaded zip into my-applications/bin, making <Key mask="A" key="space">exec:rox /root/my-applications/bin</Key> the alt+spacebar shortcut for that folder allows any of them to be activated at a click, including cr, which will then close all the open rox windows, including the one it itself is in. cadi and ccdi can't be used this way (beyond functioning as cr and closeallrox) as they will both just offer to shut the active window, which is in this case rox.

to further speed things along, you could add MochiMoppel's excellent ROX-Filer: Superfast bookmarks script to the folder, perhaps calling it m1 or something brief/terminal-route friendly. it's a good idea to get familiar with rox's built in speed dials anyway--it's the fastest way to open individual folders, but you need to already be in a rox window to use it. so anyway, you get 10 (with alt+spacebar as the eleventh and only two-key item) folders you can access with the press of 0-9 on your keyboard. these scripts, as well as individual folders or scripts made to launch batches of them, can also be dragged to a panel, which can be itself made into a button, a keyboard shortcut, or a terminal shortcut. they can't be instantly closed with a c- script, but reentering the name of/reclicking the script for the same panel as the one that's opened will close it (the other panel scripts will just cover the previous one). for this reason, dragging the folder that contains the panel scripts to the panels is a good idea.

edit: updated download to include accidentally omitted p6.

Last edited by Puppus Dogfellow on Sat 09 Aug 2014, 15:50; edited 2 times in total
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Tue 22 Jul 2014, 11:02    Post subject: Re: terminal as a shortcut device
Subject description: briefly named programs, easy on and off terminal
 

Puppus Dogfellow wrote:
Code:
shift+space, two to five characters, ct
is faster than many other keyboard shortcuts (flows better, easier to remember, less hand contorting) and is an appreciable deal faster than hunting and pecking for things on the menus or panels.

Hmmm...usefellness aside, when you start scripts from a console, e.g one of your scripts to open files with geany, you can't close the console before closing geany, otherwise your geany session, incl. all unsaved documents, will be killed (!), not gently closed.

And those d1~ d10 scripts: Looks terribly complicated. When you enter your shortcut and press Enter, you jump to the new desktop and leave the console behind on the old desktop?
JWM comes by default with the shortcut Alt+# (with # representing desktops 1 ~9). Just 2 keys to jump to 9 different desktops. What's wrong with this?
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Tue 22 Jul 2014, 18:44    Post subject: Re: terminal as a shortcut device
Subject description: briefly named programs, easy on and off terminal
 

MochiMoppel wrote:
Puppus Dogfellow wrote:
Code:
shift+space, two to five characters, ct
is faster than many other keyboard shortcuts (flows better, easier to remember, less hand contorting) and is an appreciable deal faster than hunting and pecking for things on the menus or panels.

Hmmm...usefellness aside, when you start scripts from a console, e.g one of your scripts to open files with geany, you can't close the console before closing geany, otherwise your geany session, incl. all unsaved documents, will be killed (!), not gently closed.

And those d1~ d10 scripts: Looks terribly complicated. When you enter your shortcut and press Enter, you jump to the new desktop and leave the console behind on the old desktop?
JWM comes by default with the shortcut Alt+# (with # representing desktops 1 ~9). Just 2 keys to jump to 9 different desktops. What's wrong with this?


closing the terminal closes the leafpad documents but not the geany window--the files just stay loaded/added to whatever's there. rox windows stay open when the terminal is closed...i guess if it becomes a problem for a specific program/set of files, you can make it a shortcut key or launch it from the folder, the menu, or a panel.

yes, you leave the console behind when switching desktops. i suppose you can use a separate console (urxvt instead of sakura or rxvt instead of urxvt) for such things if closing all the terminal windows becomes a problem. d(#) followed by cadi will close the terminals you leave behind... not sure if it's complicated, but i do know you were the source for it. Laughing (it's an adaptation on what you came up with for putting the windows menu on the main root:3 menu). anyway, why no desktop ten with the stock jwm setup? this works well enough--i rarely switch desktops this way i.e. i use your unpublished window switcher script more often than not--i usually am switching to an item on a desktop rather than to a desktop per se, and so it hasn't been much of a problem to not be annoyed at a window i can't see or closing it with cadi from where i am or cs when i return. i'll do some more testing to see which programs the terminal closing affects. is there a way to alter the scripts so that the closing of the terminal never has any effect?

anyway, my main machine has no windows key, no escape key, and no function keys, so i'd rather use alt+# for nine other things. maybe nine terminals. Laughing

***

update: closing the terminal doesn't affect libreoffice documents opened with a terminal-launched script like the one mentioned above.

update 2: further fiddling around reveals that hlx launched from sakura will keep alive htop but not lxtask when the sakura window is closed. modifying hlx to launch urxvt and rxvt simultaneously with
Code:
#!/bin/bash

urxvt| rxvt

named lu (for launch urxvt. adding rxvt was an afterthought) reveals no effect when the sakura window launching them is closed. so far only lxtask and leafpad seem affected, and in the latter case maybe having what is essentially a closeall button isn't such a bad thing (perhaps unnecessary with cl and cadi/ccdi, but not a bad thing. personally i don't mind closing sakura closing lxtask but not htop--i tend to leave the latter running longer.)

update three: closing the launching sakura window closes Mochi's bookmarks script. since i run it with a command that opens three instances of it at a time and it's set to not autoclose after clicking, i see this as more of a boon than a problem.

helpful hint: the order of the files determines the order in which they are cascaded onto the desktop, so you may want to keep that in mind when making your shortcut scripts.
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Sat 26 Jul 2014, 19:16    Post subject: Desktop Switching/Window Management
Subject description: and possibly a way to gain taskbar space
 

Code:


#!/bin/sh

wmctrl -l; wmctrl -d

#requires wmctrl available above. name this one w11 and symlink or copy it to a /bin or /.../bin directory.




Code:


#!/bin/sh

rxvt| rxvt -hold -e w11

#requires wmctrl available above. name this one w12 and symlink or copy it to a /bin or /.../bin directory.


if you follow the above instructions, entering w11 into a terminal gets you a list of your desktops (the one you're presently on highlighted with an asterisk) and all the program windows they currently contain. you can then enter d(1-10) to get to your destination. w12 is a clickable version that opens up two windows--one with the list of desktops and the list of windows, and another that is an rxvt terminal (i'd be grateful to anyone who knows how to alter the code so that the two lists end in a usable prompt and the whole thing is limited to one window, but this works okay).

because this now does more or less the same thing as the taskbar pager, you can remove it and still have easy access to all the desktops. w12 can be made into a shortcut key, or dragged to the panel or desktop. from a terminal, w11 is a better choice unless you want to open up rxvt/an additional terminal.

as discussed here, the way to rid yourself of the pager is with
Code:
<Pager/> 
in /root/.jwmrc-tray commented out, i.e. rendered
Code:
  <!--   <Pager/> -->

I'm guessing
Code:
#<Pager/> 
may also work...
[edit: nope--use <!-- --> ]

I do not yet know how this would affect the annoying default jwm scroll wheel behavior when the mouse cursor is resting on the desktop wallpaper; that is, i don't know if the removal of the pager would free the scrolling from it's current current-row constraint and allow you to move all the way from 1 to 10 (or any other maximum achieved by adding a second row in the jwm configuration manager), but i do know that the ten desktops display takes up a big chunk of taskbar real estate.

***

on the subject of gaining space, you can drag the w12 file and a panel file to the desktop, then, after clicking the panel file, you can drag your drive icons, the panel file (p3, for arguments sake), and the w12 file to it. if you've activated SFR's drivespace script, either by clicking on it or by virtue of it being in your start up folder, the drive space tool tip will also be shown when the icon in the panel is hovered over. you can now delete your drive icons from the desktop. you can reach them from p3 entered into the terminal or clicked from the desktop, or perhaps made into a shortcut key, obviating the need for it itself to take up any desktop space. should you decide you want them back, just drag them back to the desktop, which is also one way to copy them back to other panels. you can also add the desktop switching programs (d1-10) to a panel for easy switching from multiple locations. i find giving it a one pixel by one pixel icon and setting the panel housing it to show program names (right click > panel options) is probably the second fastest way to set that up (you could just leave them as script-looking things). the invisible icon from a few pages back would also work well for that--you'd just set the space you'd want the icon to take up by setting the size from the image menu (scale) in mtpaint.


update: regarding the scroll wheel behavior, even if you have the pager removed or commented out, the scroll is still confined to whatever row your current window is on; that is, you will continually cycle through 1-5 or 6-10, but you'd need to move from the first five to the second five or vice versa to actually use the default behavior to navigate to all your desktops. this limitation alone makes adding the desktop menu entry a good idea, though the d1-10 terminal entries have recently made me forget it's there (it was a happy rediscovery). anyway, i recommend getting rid of the scroll-through-the-desktops behavior with Mochi's solution,
Code:

    <RootMenu onroot="4"/>
    <RootMenu onroot="5"/>


added to /root/.jwm/jwmrc-personal. a way to get the default behavior changed to a scroll through a given desktop's windows would be more useful and less disconcerting/annoying than the abrupt and often unintentional desktop changes, but this is a nice solution. it also still allows for scrolling through your windows as long as the mouse is positioned where they get iconified on the taskbar (which is called the TaskList, at least according to .jwmrc-tray).

Last edited by Puppus Dogfellow on Thu 07 Aug 2014, 11:44; edited 3 times in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Sun 27 Jul 2014, 00:47    Post subject: on the other hand, and sticking with tradition, a
Subject description: a potentially useful group of shortcut keys, including the missing desktop 10 key
 

if you use the built in alt+1-9 (a nice idea--i added it before i realized it was a given) keycuts to navigate between desktops, you may have noticed that "desktop#10" doesn't work in the file and alt+0 doesn't work as a shortcut to the tenth desktop. use

Code:
<Key mask="A" key="0">exec:wmctrl -s9</Key>
instead.

for SendTo, and in keeping with using the ten number keys for convenience, you can try out

Code:
<Key mask="SAC" key="1">exec:wmctrl -r :SELECT: -t0</Key>
<Key mask="SAC" key="2">exec:wmctrl -r :SELECT: -t1</Key>
<Key mask="SAC" key="3">exec:wmctrl -r :SELECT: -t2</Key>   
<Key mask="SAC" key="4">exec:wmctrl -r :SELECT: -t3</Key>   
<Key mask="SAC" key="5">exec:wmctrl -r :SELECT: -t4</Key>   
<Key mask="SAC" key="6">exec:wmctrl -r :SELECT: -t5</Key>

<Key mask="SAC" key="7">exec:wmctrl -r :SELECT: -t6</Key>
<Key mask="SAC" key="8">exec:wmctrl -r :SELECT: -t7</Key>
<Key mask="SAC" key="9">exec:wmctrl -r :SELECT: -t8</Key>   
<Key mask="SAC" key="0">exec:wmctrl -r :SELECT: -t9</Key>   


added to jwmrc-personal. pressing this shortcut will turn the cursor into a crosshairs which you would then place and click to send a window to your desktop selection. the three modifiers work for this on my machine though other attempts at using them have failed; you may also benefit from that added bonus. it's also pretty easy to remember...

***
Code:

<Key key="h">left</Key>
<Key key="j">down</Key>
<Key key="k">up</Key>
<Key key="l">right</Key>

<Key mask="A" key="h">move</Key>
<Key mask="A" key="j">prev</Key>
<Key mask="A" key="k">next</Key>
<Key mask="A" key="l">resize</Key>

<Key mask="AC" key="h">exec:mwl</Key>
<Key mask="AC" key="j">minimize</Key>
<Key mask="AC" key="k">maximize</Key>
<Key mask="AC" key="l">exec:3r</Key>


<Key mask="SC" key="h">wmctrl -r :SELECT: -b toggle,sticky</Key>
<Key mask="SC" key="j">root:3</Key>
<Key mask="SC" key="k">windows</Key>
<Key mask="SC" key="l">showdesktop</Key>


<Key mask="SA" key="h">exec:ccdi</Key>
<Key mask="SA" key="j">close</Key>
<Key mask="SA" key="k">kill</Key>
<Key mask="SA" key="l">exec:cadi</Key>



<Key mask="SAC" key="h">exec:mwl</Key>
<Key mask="SAC" key="j">exec:3r</Key>
<Key mask="SAC" key="k">root:3</Key>
<Key mask="SAC" key="l">exec:w12</Key>


the "toggle, sticky" entry is "stick," a toggle version of what's in the windows menu. the above is my attempt at making the arrow keys along home row into more or less a replacement for the windows menu. something that can help it out, anyway.

there are some duplicates as i'm in the process of rearranging my keys. during this process, i noticed that there was some sort of problem with the usual desktop# entry not giving me working keys, so if any are similarly in need of the wmctrl way of switching desktops:

Code:
<Key mask="AC" key="1">exec:wmctrl -s0</Key>
<Key mask="AC" key="2">exec:wmctrl -s1</Key>
<Key mask="AC" key="3">exec:wmctrl -s2</Key>
<Key mask="AC" key="4">exec:wmctrl -s3</Key>
<Key mask="AC" key="5">exec:wmctrl -s4</Key>
<Key mask="AC" key="6">exec:wmctrl -s5</Key>
<Key mask="AC" key="7">exec:wmctrl -s6</Key>   
<Key mask="AC" key="8">exec:wmctrl -s7</Key>   
<Key mask="AC" key="9">exec:wmctrl -s8</Key>   
<Key mask="AC" key="0">exec:wmctrl -s9</Key>


(it's the same MochiMoppel code used to make the d1-d10 scripts. Mochi is also the source for the sticky toggle and SendTo code, and both the cadi and ccdi close-all scripts).
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Sun 03 Aug 2014, 14:19    Post subject: more terminal shortcuts plus a solution to get the windows
Subject description: and desktop lists onto the same window as the usuable terminal
 

SupToTermShrtctsStickSendTo.tar.gz


from the readme:

Quote:
if you've already got wmctrl installed, these 11 scripts copied or linked into /bin, /usr/bin, etc will give the terminal shortcuts s1-10, which turn the cursor into a crosshair--next click gets sent to the corresponding desktop. s0 is a stick/unstick toggle. stuck windows don't need to be unstuck before sent on their way with s1-s10--they are automatically unstuck and then sent.

a further tip. if you make a script named wll with the following text:



#!/bin/sh

wmctrl -l; wmctrl -d



and copy that wll script into any bin folder (the "etc" in this file's first line refers to the fact that the machine will pick up any script in any of its bin folders; there are a bunch), you get a nice component to the d1-10 scripts (see Terminal Shortcuts compressed folder for them--it's barely bigger than this one and has wmctrl included), a list of the desktops, which one you're on, what windows are open, which desktops they're on. then, adding

[[ "$PS1" ]] && w11


to /root/.bashrc gives you the info right before the first prompt. subsequent entries are what ever you have your prompt set to (my does the date and time:

[[ "$PS1" ]] && w11
export PS1="\d \T \\$ "

)

if you want to see the windows and desktop info again, simply enter w11. s1-10 give you a cross hair that will sendto, s0 one that will toggle a state of stickiness, and d1-10 will just send you to that desktop.

enjoy.

w11 now included...


well, that was the readme in its entirety...

so anyway,

Code:
[[ "$PS1" ]] && w11


added to /root/.bashrc

where w11 is

Code:
#!/bin/sh

wmctrl -l; wmctrl -d


copied or symlinked to /bin and wmctrl.pet has been installed, will give you
something like


Quote:
0x01e00066 6 puppypc27232 7
0x01e00039 3 puppypc27232 4
0x01e0003c 1 puppypc27232 2
0x01e00051 8 puppypc27232 9
0x01e00054 4 puppypc27232 5
0x01e00063 0 puppypc27232 1
0x01e00036 9 puppypc27232 10
0x01e0003f -1 puppypc27232 SendTo
0x01e0005a -1 puppypc27232 rox /root/Puppy Panel Pack/ShutDown2
0x01e0004a -1 puppypc27232 /mnt/home
0x01e0002f -1 puppypc27232 http://www.murga-linux.com/puppy/viewtopic.php?t=94591
0x01e00047 -1 puppypc27232 cal -y cal -j
0x01e00060 7 puppypc27232 8
0x01e00026 2 puppypc27232 3
0x01000009 -1 puppypc27232 htop
0x01600064 4 puppypc27232 Puppy Linux Discussion Forum :: Post a reply - Mozilla Firefox
0x02600003 8 puppypc27232 read me - /mnt/sda2/downloadsFFFsda2/spackwl - Geany
0x03800003 3 puppypc27232 sakura
0x00800003 3 puppypc27232 w1
0x0047776e 8 puppypc27232 /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/panlepack (Thumbs)
0x0047b009 8 puppypc27232 ~ (All, Thumbs)
0x01e4a94e -1 puppypc27232 . /etc/profile
0x04800003 0 puppypc27232 sakura
0x004ab79a 4 puppypc27232 /mnt/sda2/downloadsFFFsda2/terminal shortcuts (Thumbs)
0x01e4e4d4 -1 puppypc27232 s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10
0x004ae8a8 4 puppypc27232 ~ (Thumbs)
0x004af08f 4 puppypc27232 ~ (All, Thumbs)
0x004b1301 4 puppypc27232 /mnt/sda2/downloadsFFFsda2/spackwl (Thumbs)
0x004b1c96 4 puppypc27232 /mnt/sda2/downloadsFFFsda2/SupToTermShrtctsStickSendTo (Thumbs)
0x004b229e 4 puppypc27232 /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/panlepack (Thumbs)
0x004b3020 4 puppypc27232 /mnt/sda2/downloadsFFFsda2 (Thumbs)
0x02800003 4 puppypc27232 sakura
0 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 1
1 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 2
2 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 3
3 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 4
4 * DG: 2880x900 VP: 0,0 WA: 0,0 2880x900 5
5 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 6
6 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 7
7 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 8
8 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 9
9 - DG: 2880x900 VP: N/A WA: 0,0 2880x900 10
Sun Aug 03 02:10:50 #


when you click shift+spacebar or otherwise launch urxvt, rxvt, or sakura. subsequent presses of enter just give the regular prompt (the second line in

[[ "$PS1" ]] && w11
export PS1="\d \T \\$ "

gives the date and time.) you could swap out the w11 in the first line to run a program of your choice. you could add additional programs with the | character added after the w11/your first choice. i think it and what follows it need to be separated by a space. the info in the case of w11 is processed so quickly that there is no perceptible difference between this longish prompt and the regular one--window is ready instantly with or without the changes to .bashrc.

the longish batch is the windows list and the shorter one is the desktops. switch the order of -l and -d in w11 if you'd like that reversed.
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Wed 06 Aug 2014, 02:12    Post subject: layer terminal shortcuts, for use with Busta Rowdexta
Subject description: aka Dexter Homerow...behold my right side home row keycuts...
 

Code:
 #!/bin/sh

#!/bin/sh

#Stick/Unstick. name this one s0

wmctrl -r :SELECT: -b toggle,sticky

------------------------------------------

wmctrl -r :SELECT: -b add,below

#layer below; name this one lb

------------------------------------------

 #!/bin/sh

 wmctrl -r :SELECT: -b add,above     
 
 # layer above; name this one la     
 
------------------------------------------
 
 
#!/bin/sh
 
wmctrl -r :SELECT: -b remove,above,below
 
 #layer normal(/middle); name this one lm (ln is taken in /bin, so...layer, middle).


------------------------------------------


to move from high to low or low to high, you must first engage the middle step. unlike the SendTo shortcuts, the layer shortcuts for the terminal don't automatically skip it, at least not on my 13 layer-providing copy of precise 5.5. i haven't tried it out with 5.6 or 5.7, both of which just give you the above, below, and normal options. Mochi's code was probably designed with that type of set up in mind and you may well be able to skip that step on later upups and recent slackos. anyway, the shortcut still works--when clicked by the cross hairs, the layer will be decreased or increased by two or three from the (attained) middle position.

***

okay, now for the business of the right side home row. my shortcuts, made a little more generic and with the integration of the file system with the keys in mind:

Code:
<Key mask="A" key="h">prev</Key>
<Key mask="A" key="j">next</Key>
<Key mask="A" key="k">move</Key>
<Key mask="A" key="l">resize</Key>

<Key mask="AC" key="h">exec:lm</Key>
<Key mask="AC" key="j">exec:la</Key>
<Key mask="AC" key="k">exec:lb</Key>
<Key mask="AC" key="l">exec:rx1</Key>

<Key mask="SC" key="h">minimize</Key>
<Key mask="SC" key="j">maximize</Key>
<Key mask="SC" key="k">exec:rx2</Key>
<Key mask="SC" key="l">exec:rx3</Key>

<Key mask="SA" key="h">exec:ccdi</Key>
<Key mask="SA" key="j">close</Key>
<Key mask="SA" key="k">kill</Key>
<Key mask="SA" key="l">exec:cadi</Key>

<Key mask="SAC" key="h">root:3</Key>
<Key mask="SAC" key="j">window</Key>
<Key mask="SAC" key="k">exec:s0</Key>
<Key mask="SAC" key="l">showdesktop</Key>


i'm beginning to put all my little scripts directly into my-applications. it's a convenient part of the path in that it's relatively empty and so easy to keep track of your scripts. copying to the various bin folders means digging back through them if you want to make changes, which brings me to another advantage of keeping little scripts like the following for use with the terminal or keyboard rather than altering the code in jwmrc-personal to do it: instant results. a change in the code results in key behavior instantly changed. in the long run, it's easier to modify those files, i think.

here are some suggestions for the three rx files:

Code:


#!/bin/sh
 
rxvt -e tub

#name this one rx1. if you close the terminal window that opened them, all windows will close except the rox folder. it requires the following to also be placed in a /bin folder:


#!/bin/sh
 

galculator| gcolor2| gfnrename| gdmap| gmeasures| gfontsel| empty-files| partview| rox /mnt| pdict| leafpad| markup

#name this one tub, which is an acronym for terminal utilities batch. use tub to launch it from the terminal, rx1 for a clickable script or shortcut key.

------------------------------------------


#!/bin/sh
 

rxvt -e sniff


#name this one snff or rx2 (change the code in  jwmrc.personal to reflect name changes). "snff" is more descriptive as it's a bunch of search utilities (and leafpad, to help make up for the loss of alt+ctrl+l).


------------

#!/bin/sh
 

pfind| pfilesearch| spacefm -f| gnome-search-tool |leafpad

#name this one sniff


------------------------------------------

#!/bin/sh

rox /bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/X11R7/bin /root/my-applications/bin /usr/games

#this is all the PATH files  (result of echo $PATH entered in terminal) on my precise 5.5. it's just a template of sorts until i get more of my batch file/folder scripts sorted out. it will open 8 folders which you can then easily navigate back and forth between, changing them each into one of ten other choices using the rox speed dial function and giving the next and previous keys a workout. anyway, it's here to be adapted.


i'm growing fond of this set up so i figured i'd share it. some mnemonic devices: ASk to kill--the close scripts all rely on Alt+Shift; the SAC row is supposed to somewhat mimic the taskbar. mostly things are positioned by what i think i'd use most often being placed in the most convenient or comfortable positions.


this may be a good idea:

Code:

#!/bin/sh

geany /root/my-applications/bin/snff /root/my-applications/bin/sniff /root/my-applications/bin/tub /root/my-applications/bin/rx4 /root/my-applications/bin/rx1 /root/my-applications/bin/rx2 /root/my-applications/bin/rx3


#name this one rx4. it will allow you to edit these other scripts and itself by opening them with geany...thinking about adding rox my-apps and usr/share/apps...


you can make
Code:
<Key mask="SC" key="k">exec:rx4</Key>
the script to edit other scripts in geany and use the two remaining L-key shortcuts for leafpad and lxterminal:

Code:
<Key mask="SC" key="l">exec:lxterminal</Key>
<Key mask="AC" key="l">exec:leafpad</Key>


if you've done the modification to .bashrc but would like to occasionally run a terminal without the time, date, and desktop and window data, install lxterminal or roxterminal from the ppm. neither of these is affected by the changes (sakura, urxvt, and rxvt are. i haven't tested any others).

update: termit is also affected by the change to .bashrc.

Last edited by Puppus Dogfellow on Mon 18 Aug 2014, 22:49; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Sat 09 Aug 2014, 16:29    Post subject: 40 pack of launchers: instant on/off
Subject description: the escape key plus another possible use for the three rx keys from the previous post
 

Code:
<Key mask="AC" key="l">exec:p1</Key>
<Key mask="SC" key="k">exec:p2</Key>
<Key mask="SC" key="l">exec:p3</Key>

<Key mask="A" key="Escape">exec:p4</Key>
<Key mask="C" key="Escape">exec:p5</Key>
<Key mask="S" key="Escape">exec:p6</Key>
<Key mask="AC" key="Escape">exec:p7</Key>
<Key mask="AS" key="Escape">exec:p8</Key>
<Key mask="CS" key="Escape">exec:p9</Key>   
<Key mask="SAC" key="Escape">exec:p0</Key>


if you take the p-series from here and copy them to them to /root/my-applications, the above pasted into jwmrc-personal will give you ten instant on/instant off blank launchers. the keys will toggle on and off and cover one another. if you want to recopy batches of shortcuts from panel to panel, the easiest way to do it (after the initial set up of the proto panels, which is most easily done by dragging things to them) is to edit the generated panel files in /root/.config/rox.sourceforge.net/ROX-Filer--it's just matter of copy/paste (select/middle click). programs and your personal scripts/files will launch, folders will open to their contents/subfolders, and deletions just affect the panel, not the content. it's like getting 40 workspaces (or menus, depending on how you look at it and/or the taskbar) that are always out of your way if you don't need them. if you don't use (by adding it to jwm-personal)

Code:
   
   <Tray x="200" y="1">
      <Spacer width="1" height="1"/>
   </Tray>
#t

   <Tray x="1" y="200">
      <Spacer width="1" height="1"/>
   </Tray>
#l

   <Tray x="-1" y="200">
      <Spacer width="1" height="1"/>
   </Tray>
#r

<Tray x="200" y="-29">
     <Spacer width="1" height="1"/>
 </Tray>
#d


to allow the panels to popup when moused over on an essentially fully occupied screen, you may find the show desktop keys especially handy. the panels are bookmarks inasmuch as you can order favorite folders (or files or websites, for that matter) according to some personal hierarchy; they're launchers as you can activate scripts and programs from them; they're desktops inasmuch as they can contain (each one by a factor of at least four) all the desktop icons that normally come with a puppy (which also means you can leave your desktop absolutely blank without losing functionality); they're workspaces inasmuch as the only thing that really changes from desktop to desktop are the things you are working on, and you would eventually start choosing panels based on what they most easily allow you to work with or on.

personally, i chose those three extra keys from the homerow for other things. for the panel keys i ended up using the escape key and the tab key:

Code:
<Key mask="A" key="Escape">exec:p1</Key>
<Key mask="C" key="Escape">exec:p2</Key>
<Key mask="S" key="Escape">exec:p3</Key>
<Key mask="AC" key="Escape">exec:p4</Key>
<Key mask="AS" key="Escape">exec:p5</Key>
<Key mask="CS" key="Escape">exec:p6</Key>   
<Key mask="SAC" key="Escape">exec:p7</Key>
 
<Key mask="AC" key="Tab">exec:p8</Key>
<Key mask="AS" key="Tab">exec:p9</Key>
<Key mask="CS" key="Tab">exec:p0</Key>
<Key mask="C" key="Tab">exec:gexec</Key>   
<Key mask="A" key="Tab">next</Key>
<Key mask="SAC" key="Tab">showdesktop</Key>


[edited to swap out prev for gexec: ctrl+tab never works for prev but seems to have no problems covering anything else. prev seems to work everywhere but as ctrl+tab.]

Last edited by Puppus Dogfellow on Mon 11 Aug 2014, 04:51; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Sun 10 Aug 2014, 18:59    Post subject: Possibly the easiest way to add a custom menu:
Subject description: creating an artificial history in /root/.gexec_history
 

gexec-0.4-pup1.pet

many puppies come with gexec, and nearly all seem to come with a taskbar button for it commented out in jwmrc_tray. an easy way to make a custom launcher is to open up .gexec_history and just add whatever programs and shortcuts/commands you want. type gexec into a terminal. if nothing launches, install the above pet. if it launches, you're basically set. open up .gexec_history with a text editor and add the names of programs and scripts or some custom commands.

an example of a pasted artificial history as a menu:

Quote:

p0
p1
p2
p3
p4
p5
p56
p6
p7
p8
p9
p97
p98
d1
d10
d2
d3
d4
d5
d6
d7
d8
d9
s0
s1
s10
s2
s3
s4
s5
s6
s7
s8
s9
lm
la
lb
geany /root/.gexec_history /root/.gexec


all the items but the last are programs i keep in my /root/my-applications folder or have otherwise sent or linked to a path (bin). the last one is simply a command to open two files with geany, the history file that needs to be altered when you feel like changing around the programs or commands and the configuration file that will need to be changed when your maximum file length exceeds the default of 20 (or for when you feel like being proactive in that regard). because you are now looking at a pull-down list and not relying on the terminal to launch (though the tab-completion feature is just about as quick and the history command just slightly less so), you can get more descriptive with the titles of your own custom scripts placed in /root/my-applications. for example,

Code:
#!/bin/bash

rox /mnt/mmcblk0p2/Dropbox/MMMMMMMMM /mnt/mmcblk0p2/Dropbox /mnt/mmcblk0p2/Dropbox/ANCN /mnt/mmcblk0p2/Dropbox/feb /mnt/sda2/downloadsFFFsda2 /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad| leafpad /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad1.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad2.txt /mnt/mmcblk0p2/Dropbox/MMMMMMMMM/supl/leafpad/leafpad3.txt

#named rx6, it's easily launched from a terminal. if i name it mm ancn feb lp folder and text 123, i may actually remember what it does.

 



you can use one of the leftover keys from the homerow show to launch it, and you can uncomment out the line in jwmrc-tray (or add it). it will likely look something like this:

Code:
   <!--   <TrayButton popup="Run commandline" icon="gexec.xpm">exec:gexec</TrayButton> -->


it should look like this:
Code:

   <TrayButton popup="Run commandline" icon="gexec.xpm">exec:gexec</TrayButton>
 


though i add label="l" and remove icon="gexec.xpm". the button's a little smaller that way and "(l)aunch" makes as much sense to denote it as that little turquoise asterisk. basically just delete <!-- and --> and that part's done.


as with the shortcut keys, any changes made to the scripts will be instantly reflected in their activation through gexec. any changes to the history file will be reflected the next time gexec is run.
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Mon 18 Aug 2014, 23:10    Post subject: easy bake menu part two...pexec and /root/.pexec_history
Subject description: another easy custom menu through the similar but not quite as flexible pexec program
 

pexec-001.pet requires dash-0.5.6.pet.

if you install the above you get a second, easily customizable menu, one that may be better at pointing to scripts you can alter on the fly than at allowing you to mess around in the history file itself. (it will allow you to paste an artificial history and go to programs, folders and files, but it tends to divide commands so that something like "geany, open these five files" (geany /pathtofile1 /pathto2 /path/to/3, ...) is answered, "Geany did what you asked; it opened--what's the deal with this other stuff?" use pexec for things that won't change much--names of programs or scripts and the like, and let gexec and/or the scripts you keep in /root/my-applications/bin serve for things you change often or continually tweak. you could then use the gexec_history file to tailor and fine tune how or what geany, rox, and other programs open, or alter them in in my-applications/bin to allow changes there to be instantly accessible to the short cut keys that call them.)

unlike gexec, pexec doesn't give you a history file once it's installed--you must first run it and give it something to do before it will generate it.
Code:
rox /root
will take you there as it's being generated.
Code:
geany /root/.pexec_history
should also work, but i'm not sure how you'd be able to tell whether it was being created because of pexec's code or because you just told geany to open or make a file in that location. you can make a template for scripts your first entry:
Code:
geany /root/my-applications/bin/script

or
Code:
leafpad /root/my-applications/bin/script

then when the file opens, just paste
Code:
 #!/bin/sh

on top and save it for use as a template (one of my machines allowed me right click > new > script, but not all of them did. you can drag it to the template folder in rox for easy right-click creation anywhere. right click > new > customize menu pops up a folder you can drag template files to). both gexec and pexec have roll down pop ups for the history that scroll if it becomes too long, but gexec's gives you a scroll bar and is the more luxurious of the two. they can both be used to enter the cryptic titles of the scriplets from the terminal shortcuts posts, and they can both be used to display more descriptive titles/specific information. for whatever reason, gexec is better at receiving and storing more involved commands, at least when hand-editing of the history file is involved.

don't be thrown or intimidated by "script"--for our use here, it's basically just here is the program i want to use and here is a list of folders or files i want it to open/here are some programs and files i want to open.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5834
Location: Republic of Novo Zelande

PostPosted: Tue 19 Aug 2014, 03:03    Post subject:  

I'm struggling to follow every detail of what you are building here, but I get the sense that this could be used to recreate a prior session - almost like a time machine that switches Puppy back to all the documents and directories you were "looking at last night".

Is this how you see it or am I way off base?
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Tue 19 Aug 2014, 05:47    Post subject:  

greengeek wrote:
I'm struggling to follow every detail of what you are building here, but I get the sense that this could be used to recreate a prior session - almost like a time machine that switches Puppy back to all the documents and directories you were "looking at last night".

Is this how you see it or am I way off base?


that's one way to look at it. also like a staggered autostart of sorts. one of the reasons i hate rebooting is getting things i want opened where and how i want them opened, etc, so i ended putting quite a bit of stuff in my start up folder and rarely touch it. over time i noticed there are groups of files i like to have opened in, for example, geany, and folders i always seem to be opening up to move stuff back and forth between in rox. so rather than make it a menu item, i end up making stuff like that a button or prominent entry on the gexec history, which not only allows me to instantly edit it but also allows me to get quickly into jwmpersonal, etc. you kind of got ahead of me. i was going to post a bunch of (hopefully) useful groupings (mostly files with geany and folders with rox) as scripts and keyboard shortcuts, but first i had planned to talk about ways to divide the keyboard to best allow you to keep track of (what can become) a pretty lengthy list of shortcuts. in fact, i had just come here to post fifty i thought would be pretty useful...

a shortcut key to the startup folder and root/my-applications/bin gives me access to much of what i would end up adding (i like to use the spacebar plus modifer to open rox stuff. it's a quick way in (10 speed dials beyond what you just opened) and out (if a rox window is active, cadi/ccdi to close them instantly. a millisecond more if not: shift+spacebar (for example) to open it, ccdi (alt+shift+h) to close whatever rox windows have piled up), but it strikes me that yes, the pull down menus could actually take you to what you were working on with what you were using with little more info than just where you were (dragging files/folders to leafpad documents to get their pastable paths becomes pretty routine and useful).

of course, to kill all the rox windows, it'd probably be easier to just call terminal (shift+space), cr, enter...see which method of then closing the terminal best fits you...

Last edited by Puppus Dogfellow on Tue 19 Aug 2014, 06:21; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Tue 19 Aug 2014, 06:06    Post subject: The Control Rug/Pug Control 50
Subject description: fifty possibly useful shortcuts using the scripts, etc. from the previous page
 



so that's what the layout is, more or less. s1-s10 will turn the cursor into a cross hair that will send the next window clicked to that desktop. d1-10 is go to desktop--1-9 is built in so you really only need d10. p are the ten panels. will give more of an explanation and will repost the code for it sometime later tonight at the latest. it can be pieced together pretty easily from what's on the preceding page. lm la lb are layers (more crosshair stuff), most of the other stuff is self explanatory. ccdi closes all the current instances of the active window and so does cadi--the difference is that cCdi does it for only the Current desktop and cAdi does it for All of them.

so now that i've discovered pexec, i'm not as enthusiastic idea about having those last three remaining keys (after show desktop, ten panels, desktops, send-to targets, three layers, windows menu, main right click menu, stick toggle (again, you get a crosshair), and whatever else seemed required to give control and access...) be RUG--the Urxvt terminal sandwiched between Rox (you need to get into the file system) and Gexec (you can do it rather precisely with this and change how you do it as you are doing it, the recording of which becomes an instant shortcut...another set of bookmarks of sorts...). pexec plus gexec gives you PUG, an acronym as easily remembered as the one pups may pee on or rest upon and which fits in with much of the naming scheme within the community. you get two custom menus, another terminal beyond the one the tilde generally calls... so, either way seems okay to me to offer as a general suggestion for the fifty.

***

to get the 50 shortcut keys in the photo:


Quote:
Place The Following in /root/.jwm/jwmrc-personal:

<Key mask="A" key="1">exec:wmctrl -s0</Key>
<Key mask="A" key="2">exec:wmctrl -s1</Key>
<Key mask="A" key="3">exec:wmctrl -s2</Key>
<Key mask="A" key="4">exec:wmctrl -s3</Key>
<Key mask="A" key="5">exec:wmctrl -s4</Key>
<Key mask="A" key="6">exec:wmctrl -s5</Key>
<Key mask="A" key="7">exec:wmctrl -s6</Key>
<Key mask="A" key="8">exec:wmctrl -s7</Key>
<Key mask="A" key="9">exec:wmctrl -s8</Key>
<Key mask="A" key="0">exec:wmctrl -s9</Key>
#this does the same as putting the d1-d10 scripts in /root/my-applications/bin and using exec:d[1-10] between the > and <. the advantage to taking that additional step is that you could then d# yourself to and fro from pexec/gexec or the terminal. jwm moves you from desktop to desktop by default through this shortcut but 0 doesn't work for desktop ten. if you don't care about teleporting by terminal, you may only need the last one (and then only if you keep all ten desktops. paring them down opens up other keys for shortcuts. you can also factor in the windows key as an additional modifier (use 4 for the windows key in the same way you use ASC for Alt, Shift, and Control).

<Key mask="AC" key="1">root:3</Key>
<Key mask="AC" key="2">window/Key>
<Key mask="AC" key="3">exec:s0</Key>
<Key mask="AC" key="4">showdesktop</Key>
<Key mask="AC" key="5">move</Key>
<Key mask="AC" key="6">resize</Key>
<Key mask="AC" key="7">minimize</Key>
<Key mask="AC" key="8">maximize</Key>
<Key mask="AC" key="9">prev</Key>
<Key mask="AC" key="0">next</Key>



<Key mask="SA" key="1">exec:pexec</Key>
<Key mask="SA" key="2">exec:urxvt</Key>
<Key mask="SA" key="3">exec:gexec</Key>
<Key mask="SA" key="4">exec:lm</Key>
<Key mask="SA" key="5">exec:la</Key>
<Key mask="SA" key="6">exec:lb</Key>
<Key mask="SA" key="7">exec:ccdi</Key>
<Key mask="SA" key="8">close</Key>
<Key mask="SA" key="9">kill</Key>
<Key mask="SA" key="0">exec:cadi</Key>


<Key mask="SAC" key="1">exec:p1</Key>
<Key mask="SAC" key="2">exec:p2</Key>
<Key mask="SAC" key="3">exec:p3</Key>
<Key mask="SAC" key="4">exec:p4</Key>
<Key mask="SAC" key="5">exec:p5</Key>
<Key mask="SAC" key="6">exec:p6</Key>
<Key mask="SAC" key="7">exec:p7</Key>
<Key mask="SAC" key="8">exec:p8</Key>
<Key mask="SAC" key="9">exec:p9</Key>
<Key mask="SAC" key="0">exec:p10</Key>
#four panels toggle on and off and/or replace each other. screen (desktop space, though folded back onto itself) extension/workbench/pop-up menu frame

<Key mask="SC" key="1">exec:wmctrl -r :SELECT: -t0</Key>
<Key mask="SC" key="2">exec:wmctrl -r :SELECT: -t1</Key>
<Key mask="SC" key="3">exec:wmctrl -r :SELECT: -t2</Key>
<Key mask="SC" key="4">exec:wmctrl -r :SELECT: -t3</Key>
<Key mask="SC" key="5">exec:wmctrl -r :SELECT: -t4</Key>
<Key mask="SC" key="6">exec:wmctrl -r :SELECT: -t5</Key>
<Key mask="SC" key="7">exec:wmctrl -r :SELECT: -t6</Key>
<Key mask="SC" key="8">exec:wmctrl -r :SELECT: -t7</Key>
<Key mask="SC" key="9">exec:wmctrl -r :SELECT: -t8</Key>
<Key mask="SC" key="0">exec:wmctrl -r :SELECT: -t9</Key>
#this does the same as putting the s0-s10 scripts in /root/my-applications/bin and using exec:s[1-10] between the > and <. . the advantage to taking that additional step is that you could then s# stuff to and fro from pexec/gexec or the terminal. s0, which appears elsewhere, is the sticky toggle.

<Key mask="SAC" key="1">exec:p1</Key>
<Key mask="SAC" key="2">exec:p2</Key>
<Key mask="SAC" key="3">exec:p3</Key>
<Key mask="SAC" key="4">exec:p4</Key>
<Key mask="SAC" key="5">exec:p5</Key>
<Key mask="SAC" key="6">exec:p6</Key>
<Key mask="SAC" key="7">exec:p7</Key>
<Key mask="SAC" key="8">exec:p8</Key>
<Key mask="SAC" key="9">exec:p9</Key>
<Key mask="SAC" key="0">exec:p10</Key>
#four panels toggle on and off and/or replace each other. screen (desktop space) extension/workbench/popup menu frame

#requires wmctrl, sticky supplemental pack, panel pack, dash,...will soon make a neater, all-inclusive package, but for now all available a page or two back--a few pets and small compressed folders.


#this is the Pug Control version. i recommend placing all the names of the scriptlets in the .pexec_history file. it'll be a quick duplicate of all the functions of these keys as a way to get you started with it. gexec provides a slightly more responsive menu so we might as well free it up. the reason i opted for this rather than the Control Rug is because Rox (and pretty much everything) is really more quickly launched through the spacebar. while pexec and gexec are self-closing, the terminals (most of them--urxvt, rxvt, sakura, termit) hold the additional information we added to .bashrc (they flash the window and desktop info when first opened) and allow for commands such as wl or wd (windows list, desktop list) to be entered and the results be human-readable ("i think pexec/gexec executed the command--i think that's what that blip was..."). if you're using the terminals to open and close and navigate, that is, if you are using them to enter the terminal shortcuts discussed a few pages back, you might be better served by pexec/gexec because their self-closing nature prevents their windows from piling up/eliminates the step needed to close them. just as Rox is most quickly reached by (Modifier +) Spacebar, so too are the terminals. other than maybe placing one on homerow, nothing would less interrupt typing flow.


after the sets from homerow, spacebar, f1-12, backspace, escape, and tab are complete (or begun--potentially hundreds await...), you may notice you have copies even beyond taking into account the fact that some have been purposely included because you want to be able to execute quickly with either hand as well as with both. this gateway to your machine is both a sculpture in progress and videogame of sorts...

(in case you were wondering why i don't find thinking about stuff like this tedious. zapping windows is pretty much the same at my age as zapping zombies, soldiers, or space invaders.)

Very Happy

Though it may be true that the spacebar is the fastest way into the filing system, using a modified number key also makes sense: your fingers would already be in position to press a speed dial key (Ctrl+[0-9] bookmarks within rox; that number (minus the ctrl key) will return to that folder from within any other rox folder).
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Wed 20 Aug 2014, 22:12    Post subject: Spacebar keycuts to complement PUG
Subject description: or RUG or...
 

as usual, add to .jwmrc_personal.

Code:


<Key mask="A" key="space">exec:gexec</Key>
<Key mask="C" key="space">exec:rox</Key>
<Key mask="S" key="space">exec:termit</Key>
<Key mask="CA" key="space">exec:rox /root/my-applications/bin /usr/share/applications</Key>
<Key mask="CS" key="space">exec:rox /mnt /mnt/home</Key>
<Key mask="AS" key="space">exec:rox /root/Startup /root/puppy-reference</Key>
<Key mask="CAS" key="space">exec:geany /root/.pexec_history .gexec_history /root/.gexec /root/despitethewarning.jwmrc /root/.jwmrc /root/scrap /root/notes /root/.jwmrc-tray /etc/xdg/templates/_root_.jwmrc /root/.jwm/jwmrc-personal /root/.jwm/jwmrc-personal2</Key>

#and if you've got a windows key, here's a template for another 8:

<Key mask="4" key="space">exec:</Key>
<Key mask="4A" key="space">exec:</Key>
<Key mask="4C" key="space">exec:</Key>
<Key mask="4S" key="space">exec:</Key>
<Key mask="4CA" key="space">exec:</Key>
<Key mask="4CS" key="space">exec:</Key>
<Key mask="4AS" key="space">exec:</Key>
<Key mask="4CAS" key="space">exec:</Key>


I haven't actually tested to see if the Winkey works when partnered with the other modifiers. if you're going to test it out, remember that for the windows functions (move, resize, etc. "kill" is actually a call to a program and needs the "exec:"), you need to remove the "exec:"; regular programs and scripts will not run without it.

changes done in jwmrc-personal, jwrc-tray, .jwmrc, /etc/xdg/templates/_root_.jwmrc, and your custom.jwmrc file (if it exists) need a jwm restart to take effect. changes done to scripts placed in the path (for example, in /root/my-applications/bin) will be immediately reflected in the key, icon, menu item, or button that calls them.

as for the program/file choices, you can swap out termit for Urxvt or Rxvt if you don't feel like installing it. it allows copy and paste without having to use middle click through shortcut keys and the right click menu (tip: if you don't have a middle button, you can press left and right together for the same effect in rxvt/urxvt).

Control+Shift+Alt + Spacebar opens Geany and most of the files you may need to touch if following this thread. I also added notes and scrap--voila!, now it's a note-taking app. if any of the files are already opened in geany, the others will just be added to them. as to the two scrap files, you can use them as they're labeled, or you can also use them to help you launch things. in geany, if you go to view > show message window and click the terminal tab, you get a terminal beneath your document into which you can paste your growing and refined list of rox ____ ___ ____ or geany ____ ____ ___----that stuff can also be used for "menu items" when copied into .pexec_history or .gexec_history.

for rox, i chose what i thought would be useful or what's been brought up in the thread. simple to open to root, but you need to use an additional finger to get the pairs of folders to open. as with everything, a template for you to play around with.

i included the custom.jwmrc file i need on this machine--if you insist on editing .jwmrc instead of going through the personal folders in /root/.jwmrc or the _root_.jwrc file in /etc, this is one of the easiest ways to rename it to .jwmrc when necessary. (right click >copy >delete >enter >enter is probably easier.)

to convert any of these keys into terminal shortcuts, just open a file, place

#!/bin/bash

atop, and then paste in the same code from above that sits between the ><, taking out the "exec:".

so, for example, the last one from above becomes

Code:

#!/bin/bash

geany /root/.pexec_history .gexec_history /root/.gexec /root/despitethewarning.jwmrc /root/.jwmrc /root/scrap /root/notes /root/.jwmrc-tray /etc/xdg/templates/_root_.jwmrc /root/.jwm/jwmrc-personal /root/.jwm/jwmrc-personal2


give it a name you'll remember and that's pretty short--for this one i suggest "tweak." you can then go back to .jwmrc-personal and swap out the code for "exec:tweak." this way, you can more easily mess around with the contents and more readily see the results.

tip: /root/.bashrc may provide some commands worth pasting into your scrap or g(p)exec_history file.

tip2: if any of the programs fails to launch, especial at first run, check the permissions (file name should be green in a stock rox setup--if not, right click, permissions, quiet or yes) or its location (it must be in the path--enter
Code:
 echo $PATH
into a terminal to see acceptable locations to copy, move, or link your scripts/programs into.


enjoy.
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Thu 21 Aug 2014, 19:45    Post subject: 9 Pack Of JWM Menus
Subject description: the escape key as seven additional menu buttons
 

here's an easy way to get nine additional menus. 1 is left click, 2, is middle, 4 is scroll up, 5 is scroll down, 3 is already your right click menu. the others need to be anchored to something so...

Place in .jwmrc-tray or jwmrc-personal just below where you see <JWM> :

Code:
<Include>/root/root0menu</Include>
<Include>/root/root1menu</Include>
<Include>/root/root2menu</Include>
<Include>/root/root4menu</Include>
<Include>/root/root5menu</Include>
<Include>/root/root6menu</Include>
<Include>/root/root7menu</Include>
<Include>/root/root8menu</Include>
<Include>/root/root9menu</Include>

<!-- <TrayButton label="1">root:1</TrayButton> -->
<!-- <TrayButton label="2">root:2</TrayButton> -->
<!-- <TrayButton label="4">root:4</TrayButton> -->
<!-- <TrayButton label="5">root:5</TrayButton> -->
<!-- <TrayButton label="6">root:6</TrayButton> -->
<!-- <TrayButton label="7">root:7</TrayButton> -->
<!-- <TrayButton label="8">root:8</TrayButton> -->
<!-- <TrayButton label="9">root:9</TrayButton> -->
<!-- <TrayButton label="0">root:0</TrayButton> -->
   
<!--   four and five are scroll up and down; 3 is already your main (right click) menu and one is already left click. the others need to be anchored to something to exist--either shortcut keys or these buttons with the comments (the "<!--" and  the "-->" that "hide" the code from the machine) removed. if you're going to use taskbar buttons (rather than the escape key shortcuts suggested below), you may want to add an additional taskbar... -->


^ again, place in .jwmrc-tray or jwmrc-personal; you can omit the comment.

place in jwmrc-personal:

Code:
<Key mask="A" key="Escape">root:0</Key>
<Key mask="C" key="Escape">root:1</Key>
<Key mask="S" key="Escape">root:2</Key>
<Key mask="AC" key="Escape">root:6</Key>
<Key mask="AS" key="Escape">root:7</Key>
<Key mask="CS" key="Escape">root:8</Key>   
<Key mask="SAC" key="Escape">root:9</Key>


then run the following script (or just enter the code in a terminal):
Code:

#!/bin/sh

geany /root/root0menu /root/root1menu /root/root2menu /root/root4menu /root/root5menu /root/root6menu /root/root7menu /root/root8menu /root/root9menu /root/.jwmrc-tray /root/.jwm/jwmrc-personal /root/my-applications/bin/9menus

#call this one 9menus and place in /root/my-applications/bin (it could come in handy later).


add the following to their respective root#menu files:

Code:
<?xml version="1.0"?>
<JWM>
<RootMenu onroot="#">

<Desktops></Desktops>

<Include>/root/places_submenu</Include>

</RootMenu>
</JWM>


fill in what ever programs, files, etc you want as per the instructions laid out in the thread. you can copy any of the entries from .jwmrc or _root_.jwmrc over or make entries for the terminal shortcuts, etc. i included the desktops and Rox bookmarks (see page 6 for Mochi's scripts to accomplish the latter) to get the menu started; just add your submenus and programs between <RootMenu onroot="#"> and </RootMenu>.

scrolling up will activate the root:4 menu and scrolling down will activate the root:5 menu. you can grab shortcut keys from (for example) tab or backspace if you don't want to rely on that method of calling them.

replace the "#" with the actual number of the root menu being populated in each root#menu file (it may seem obvious, and perhaps it is, but i actually forgot to include the line (and its complement) in the above seven-line code--apologies to any who may have been affected). on the subject of perhaps obvious but maybe worth mentioning: if you've used any of the earlier shortcuts, for example the escape keys for the panels, make sure you delete or overwrite conflicts when replacing them with new versions--little things like that tend to jam things up. run jwm -p in a terminal and you'll get a a readout of any existing problems and where they can be found.

another thing that may be obvious relates to what i mentioned earlier about the left and right click together functioning as a middle click--for about three years, the workaround had me occasionally sitting around like a spazz trying to coordinate the action with my two index fingers on my laptop's trackpad buttons--much easier to just place your finger between the two and press.


Laughing

edit: i tried to make it easier by including ready-made versions of the 9 root menus suggested above. i included instructions, Mochi's script from page 6, the code that needs to be pasted into the two jwm files, and the little geany script to gather together some of the files you might need:

jwmmenu9pack.tar.gz

The pack above assumes you are going to want to keep your new menu files in /root. if you're keen on changing the location, change the

Code:
<Include>/root/root#menu</Include>


lines (that you added to either /root/.jwmrc-tray or /root/.jwm/jwmrc-personal) to accurately reflect your chosen location(s).

___

a bit more on this, root menus, and shortcut keys here.

Last edited by Puppus Dogfellow on Sun 22 Feb 2015, 21:50; edited 1 time in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 8 of 14 [203 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, 11, 12, 13, 14 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

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.1671s ][ Queries: 12 (0.0236s) ][ GZIP on ]