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

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

#101 Post by Puppus Dogfellow »

Puppy Panel Pack

the above gz file (160k unpacked) contains wmctrl.pet, bm.sh, cadi, ccdi, closeallrox,mbm, mmrx3, MRUD-lst.sh, six sets of panel toggles, and an explanatory text, "for the menu":
unpack zip and move the Puppy Panel Pack folder to /root and then just copy the following text to your custom.jwmrc or (preferred) /etc/xdg/templates/_root_.jwmrc to get the menu entries for the panel toggles. click on the wmcrl pet and the mbm script, run fixmenus and restart jwm. for a condensed menu with more room for later additions, either enclose all the PUPPYMENU type stuff in between
<Menu label="original puppy menu" icon="" height="16">

and

</Menu>

or move the text entries themselves in between
<Menu label="Puppy Panel Pack" icon="/root/Puppy Panel Pack/pnls.png" height="16">
and
</Menu>

and/or between
<Menu label="Shutdown" icon="shutdown24.png" height="16">
and
</Menu>

[you can also move the entire menu if encapsulated with the new "...original...menu.../menu> entry...]
.....

the following will give you the programs in their own menu with the applications folder as the first entry--you get programs and files and a template you can change...


llllllllllllstart of menu pastablelllllllllll

<Program label="applications" icon="/root/puppy-reference/midi-icons/folder48.png">rox "/usr/share/applications"</Program>


<Menu label="Puppy Panel Pack" icon="/root/Puppy Panel Pack/pnls.png" height="16">

<Include>/root/places_submenu</Include>
<Program label="4p" icon="/root/Puppy Panel Pack/panel icons/awlp.png" >"/root/Puppy Panel Pack/awlpnels"</Program>
<Program label="p1" icon="/root/Puppy Panel Pack/panel icons/p1.png" >"/root/Puppy Panel Pack/p1"</Program>
<Desktops label="Desktops"> </Desktops>
<Program label="p2" icon="/root/Puppy Panel Pack/panel icons/p2.png" >"/root/Puppy Panel Pack/p2"</Program>
<Program label="Puppy Panel Pack" icon="/root/Puppy Panel Pack/pnls.png">rox "/root/Puppy Panel Pack"</Program>


<Program label="close all rox" icon="/root/Puppy Panel Pack/progicons/crx.png" >"/root/Puppy Panel Pack/closeallrox"</Program>
<Program label="rox and gtk bookmarks" icon="/root/Puppy Panel Pack/progicons/bookmarks.png" >"/root/Puppy Panel Pack/bm.sh"</Program>
<Program label="recent documents" icon="/root/Puppy Panel Pack/progicons/mudicon.png" >"/root/Puppy Panel Pack/MRUD-lst.sh"</Program>
<Program label="Rox Speed Dial" icon="/root/Puppy Panel Pack/progicons/mmr3icn.png" >"/root/Puppy Panel Pack/mmrx3"</Program>
<Program label="Close All on Current" icon="/root/Puppy Panel Pack/progicons/ccdi.png" >"/root/Puppy Panel Pack/ccdi"</Program>
<Program label="Close All on All" icon="/root/Puppy Panel Pack/progicons/cadi.png" >"/root/Puppy Panel Pack/cadi"</Program>

<Program label="p3" icon="/root/Puppy Panel Pack/panel icons/p3.png" >"/root/Puppy Panel Pack/p3"</Program>
<Program label="p4" icon="/root/Puppy Panel Pack/panel icons/p4.png" >"/root/Puppy Panel Pack/p4"</Program>
<Program label="p5" icon="/root/Puppy Panel Pack/panel icons/p5.png" >"/root/Puppy Panel Pack/p5"</Program>


</Menu>


lllllllllllllllend menu pastablellllllllllllll

i recommend dragging the panel scripts to their respective panels and/or dragging the pup panel pack folder to one (you can access the other panel sets or close the current one very easily that way). MochiMoppel's Close scripts work well off the panels, menus, and desktop, but cannot be run from their containing rox folder or terminal (will just close down those windows).

move around the entries, substitute other programs or icons, use .jwmrc for entries you can easily copy and paste into new shortcut and favorites menus.

have fun...
this gives you disciple's bookmarks script, musher0's recently used documents script, and the following by MochiMoppel: close all active instances (of a given program on all desktops), close all active instances (current desktop), close all rox (everywhere), rox bookmarks on the JWM menu, and Rox speed dial. my own panel scripts (based on musher0's code) are also included. i added one

Code: Select all

<Desktops label="Desktops">  </Desktops>
because it just makes sense to me to have access to each of them without having to hunt out a corner of the desktop.

Code: Select all


reminder/templates for menu use: 

<Menu label="" icon="" height="16">
<Program label="" icon="" >""</Program>
<Desktops label="Desktops">  </Desktops>
<Include>/root/places_submenu</Include>
<Program label="Urxvt terminal emulator" icon="mini-sh.xpm">urxvt</Program>
</Menu>
the blank menu would function and give four slots: one dead, one labeled "Desktops" and giving you a pipe menu to access yours, one a duplicate result of the ROX bookmarks on the JWM Menu script, and one a terminal window (pretty useful and perhaps should be on the main real estate of the menu's initial popup phase). use the functioning entry as a guide, fill in, duplicate, embed, ...copy stuff from .jwmrc....

or just drag stuff to the panels. give a slot to a text file to open up the secret to the shortcut keys you can only remember when you change them less frequently...


edit: forgot to include the dependencies for mrud: replaceit-1.0.0.pet and aemenu-1.2.12.pet
Last edited by Puppus Dogfellow on Sun 29 Jun 2014, 06:44, edited 1 time in total.

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

the windows menu on the main menu

#102 Post by Puppus Dogfellow »

if you have wmctrl installed, you can place the windows menu on your main menu with:

Code: Select all

<Menu label="windows menu">
<Move/>
<Resize/>

<Desktops/>

<Menu label="Send To">
<Program label="1">wmctrl -r :SELECT: -t0</Program>
<Program label="2">wmctrl -r :SELECT: -t1</Program>
<Program label="3">wmctrl -r :SELECT: -t2</Program>
<Program label="4">wmctrl -r :SELECT: -t3</Program>
<Program label="5">wmctrl -r :SELECT: -t4</Program>
<Program label="6">wmctrl -r :SELECT: -t5</Program>
<Program label="7">wmctrl -r :SELECT: -t6</Program>
<Program label="8">wmctrl -r :SELECT: -t7</Program>
<Program label="9">wmctrl -r :SELECT: -t8</Program>
<Program label="10">wmctrl -r :SELECT: -t9</Program>
</Menu>
<Menu label="Layer">
<Program label="below">wmctrl -r :SELECT: -b add,below</Program>
<Program label="normal">wmctrl -r :SELECT: -b remove,above,below</Program>
<Program label="above">wmctrl -r :SELECT: -b add,above</Program>
</Menu>
<Program label="Stick/Unstick">wmctrl -r :SELECT: -b toggle,sticky</Program>
<Minimize/>
<Maximize/>
<Close/>
<Kill/>
</Menu>
[you need to put in all ten desktops (or the max you think you'll ever use) for Send To even if you've got only two. this way you're covered in the event you go as high as ten--it doesn't auto detect the amount. not at the moment at least.]


the commands Move, Minimize, Resize, and Maximize (maybe others, but these are confirmed to work; SendTo/Send To is confirmed not to) can also be bound to shortcut keys. for example,

Code: Select all

<Key mask="A" key="m">move</Key>
.

the built in windows menu is Alt + F2; main menu can be accessed with F12 or Alt + F1.

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

one pixel spacer x3

#103 Post by Puppus Dogfellow »

Code: Select all

   <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
code that will give a 1 pixel spacer around top, left, and right. down is commented out but set for just above a stock height, bottom-situated taskbar. place in jwmrc-personal and restart jwm to see it.


you can click a desktop icon (you'd have to move it to an edge of your screen) or access the panels or click menus with the mouse easily with this, even on a single screen setup with maximized windows. you can also set windows behind the (essentially) maximized ones for easy access/ to augment a function of their taskbar representations.

cost: three unobtrusive little black dots. adjust the "200" number to reposition the little (i guess they're really squares more than) dots along their planes. they can serve as visual cues for the placement of icons or windows you may want to click but would be unable to see without revealing the desktop.

***
edit: on the subject of the taskbar representations,

to get smaller task list items change

<!-- Additional TaskList attribute: maxwidth -->
<TaskList/>

to

<!-- Additional TaskList attribute: maxwidth -->
<TaskList maxwidth="25"/>

(~lines 14-15 in jwmrc-tray. thanks to Jasper for the info. you'd need to restart jwm to see the change, and i suppose a little trial and error to adjust the 25 to what suits you best.)
Last edited by Puppus Dogfellow on Sun 29 Jun 2014, 05:46, edited 1 time in total.

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

getting back to shortcut keys

#104 Post by Puppus Dogfellow »

keycode 115 apparently works on most machines and enables you assign programs, files, or folders to the windows button. for example,

Code: Select all

<Key keycode="115">exec:rox /usr/share/applications</Key>
will open the directory containing most of your systems applications when you click it. that same key made into a modifier ("mask" in jwm lingo) is known as "4":

Code: Select all

<Key mask="4" key="x">exec:xpad</Key>
<Key mask="4" key="a">exec:rox /usr/share/applications</Key>
<Key mask="4" key="l">exec:leafpad</Key>
<Key mask="4" key="s">exec:sakura</Key>
<Key mask="4" key="p">exec:exec:/root/.Pup-Shots/.PupShots</Key>
<Key mask="4" key="w">window</Key>
<Key mask="4" key="d">exec:goldendict</Key>
<Key mask="4" key="f">exec:pfind</Key>
<Key mask="4" key="g">exec:geany</Key>
<Key mask="4C" key="r">exec:recoll</Key>
<Key mask="4" key="r">resize</Key>
<Key mask="4" key="m">move</Key>
<Key mask="4" key="1">desktop#1</Key>
<Key mask="4" key="2">desktop#2</Key>
<Key mask="4" key="3">desktop#3</Key>
<Key mask="4" key="4">desktop#4</Key>
<Key mask="4" key="5">desktop#5</Key>
<Key mask="4" key="6">desktop#6</Key>
<Key mask="4" key="7">minimize</Key>
<Key mask="4" key="8">maximize</Key>
<Key mask="4" key="9">prev</Key>
<Key mask="4" key="0">next</Key>
seems that using the windows key as the primary method of assigning shortcuts is a good idea on a linux system--you can be sure you're not overriding any existing shortcuts that way.

i've tried this in two machines so far as i've read it works for most. in my case, my logitech keyboard refuses to acknowledge the keys even though an internal program called xev correctly identifies/registers their actions (this is also true of the number pad, whose keys are identified as distinct from their duplicates elsewhere on the keyboard). i'm not sure if there's a way around it, but so far assigning a shortcut to the 115 on its own makes it also launch when every combo is used. the work around would probably be to find a program (xdotool and xbindkeys may be worth checking out) that can differentiate between press, release, and press-and-release. as a modifier, 4 can be used in combination with the others, i.e. 4C, 4AS, 4CS--haven't seen anything that says you can't use four at a time, though if you're contorting and choreographing five fingers to run something, you may just find it easier to type its name into a terminal. (you can make a script to launch one or ten documents called "14" and 14 entered into a terminal would launch it. plus nearly all the programs can be run by name that way.)

the machine this works on has only one windows key. the machine it doesn't identifies the right side windows key as 116.

similarly, on the little dell that could, i was able to map the media keys, identifying them with xev. on the gateway that won't, they are identified but jwm ignores them.

Jasper

#105 Post by Jasper »

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

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#106 Post by MochiMoppel »

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?

Jasper

#107 Post by Jasper »

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

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

#108 Post by Puppus Dogfellow »

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.

Jasper

#109 Post by Jasper »

Hi again,

Perhaps try:

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

My regards

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

#110 Post by Puppus Dogfellow »

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.
:D

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.

:)

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

terminal as a shortcut device

#111 Post by Puppus Dogfellow »

terminal_shortcuts.tar.gz
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: Select all

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: Select all

#!/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: Select all

#!/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: Select all

#!/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: Select all

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, 19:50, edited 2 times in total.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: terminal as a shortcut device

#112 Post by MochiMoppel »

Puppus Dogfellow wrote:

Code: Select all

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?

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

Re: terminal as a shortcut device

#113 Post by Puppus Dogfellow »

MochiMoppel wrote:
Puppus Dogfellow wrote:

Code: Select all

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. :lol: (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. :lol:

***

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: Select all

#!/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.

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

Desktop Switching/Window Management

#114 Post by Puppus Dogfellow »

Code: Select all


#!/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: Select all


#!/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: Select all

<Pager/>  
in /root/.jwmrc-tray commented out, i.e. rendered

Code: Select all

  <!--   <Pager/> --> 

I'm guessing

Code: Select all

#<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: Select all

    <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, 15:44, edited 3 times in total.

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

on the other hand, and sticking with tradition, a

#115 Post by Puppus Dogfellow »

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: Select all

<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: Select all

<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: Select all

<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: Select all

<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).

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

more terminal shortcuts plus a solution to get the windows

#116 Post by Puppus Dogfellow »

SupToTermShrtctsStickSendTo.tar.gz


from the readme:
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: Select all

[[ "$PS1" ]] && w11 
added to /root/.bashrc

where w11 is

Code: Select all

#!/bin/sh

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

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.

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

layer terminal shortcuts, for use with Busta Rowdexta

#117 Post by Puppus Dogfellow »

Code: Select all

 #!/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: Select all

<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: Select all


#!/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: Select all

#!/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: Select all

<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: Select all

<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 Tue 19 Aug 2014, 02:49, edited 1 time in total.

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

40 pack of launchers: instant on/off

#118 Post by Puppus Dogfellow »

Code: Select all

<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: Select all

	
   <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: Select all

<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, 08:51, edited 1 time in total.

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

Possibly the easiest way to add a custom menu:

#119 Post by Puppus Dogfellow »

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:
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: Select all

#!/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: Select all

	<!--	<TrayButton popup="Run commandline" icon="gexec.xpm">exec:gexec</TrayButton> -->
it should look like this:

Code: Select all

	<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.

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

easy bake menu part two...pexec and /root/.pexec_history

#120 Post by Puppus Dogfellow »

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: Select all

rox /root
will take you there as it's being generated.

Code: Select all

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: Select all

geany /root/my-applications/bin/script
or

Code: Select all

leafpad /root/my-applications/bin/script
then when the file opens, just paste

Code: Select all

 #!/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.

Post Reply