Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Jul 2019, 07:35
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
Post new topic   Reply to topic View previous topic :: View next topic
Page 8 of 14 [202 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, 11, 12, 13, 14 Next
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1853
Location: Japan

PostPosted: Sun 29 Jun 2014, 04:41    Post subject:  

Jasper wrote:
If the winkey/115/4 method fails on any of your computers and you have the desired app/folder icons (as you listed) on your desktop you could right click those icons and then use Edit to assign the winkey + [the individual choices in your list]
If the method fails, why would the winkey codes work with ROX icons, but not with JWM?
Back to top
View user's profile Send private message 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Sun 29 Jun 2014, 04:56    Post subject:  

Hi MochiMoppel,

I have some experience of some aspects, but no expertise.

I have found that my desktop shortcuts have worked using winkey[Hyper or Super] via the icon right click then Edit method.

Perhaps I used a poor choice of words and created confusion.

Anyway, my personal "thank you" for your star contributions.

My regards
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1601
Location: nyc

PostPosted: Sun 29 Jun 2014, 12:26    Post subject:  

Jasper wrote:
Hi Puppus Dogfellow,

If the winkey/115/4 method fails on any of your computers and you have the desired app/folder icons (as you listed) on your desktop you could right click those icons and then use Edit to assign the winkey + [the individual choices in your list]. You might then, as you have before, make all or any of those icons invisible.

Personally, I prefer using ROXoff (or Swapicons) for a totally clean desktop - so any assigned shortcuts (as made above) would fail temporarily until my "normal" desktop is restored.

My regards


thanks for the tip, Jasper.

it's been a while, so i may be thinking of my experience with an earlier pup, and i was even more of a noob at the time, but i've failed to make the winkey useful on the keyboard in question with that method as well.

i'll try again when my wife relinquishes the machine. i'm also trying to scrounge up some other keyboards to make sure it's not a hardware issue, though half the usb ports on that tower appear to be dead, or are frequently so, possibly pointing to another cause, one that would make the scavenger hunt pointless. (i think the machine's about ten years old; it's got a host of peripheral related maladies--mouse pointer disappears every five days or so, or refuses to move from a corner, etc.)

anyway, thanks again for your input.

-d.
Back to top
View user's profile Send private message 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Sun 29 Jun 2014, 13:09    Post subject:  

Hi again,

Perhaps try:

Menu/Setup/Mouse keyboard wizard/Advanced Xorg .../Options/ AltWin ...

My regards
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1601
Location: nyc

PostPosted: Sun 29 Jun 2014, 13:28    Post subject:  

Jasper wrote:
Hi again,

Perhaps try:

Menu/Setup/Mouse keyboard wizard/Advanced Xorg .../Options/ AltWin ...

My regards


it may not be necessary, Jasper--your advice worked.
Very Happy

the first time i tried it, it told me Hyper + Super_L was the combo i chose regardless of what winkey combo i actually pressed, which is the reason i abandoned the function to begin with. this time, same result. but i tried it again anyway, just a little more deliberately and slowly than before. problem solved--worked for a folder (applications) and a program (pup-shots).

Cheers.

***

decided to go back to jwmrc-personal in the hopes that i had somehow woken the rest of the machine up to the existence of the key, but no luck. the rox way may not be as convenient as just pasting a slew of keycuts into a file, but it's nice to know it's there as a backup plan.

many thanks.

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


Joined: 07 Jan 2013
Posts: 1601
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: 1853
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: 1601
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: 1601
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: 1601
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: 1601
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: 1601
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: 1601
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: 1601
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: 1601
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 
Display posts from previous:   Sort by:   
Page 8 of 14 [202 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, 11, 12, 13, 14 Next
Post new topic   Reply to topic 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.1343s ][ Queries: 12 (0.0167s) ][ GZIP on ]