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 Tue 16 Oct 2018, 06:32
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 7 of 14 [202 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 12, 13, 14 Next
Author Message
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1564
Location: nyc

PostPosted: Thu 12 Jun 2014, 22:54    Post subject: Puppy Panel Pack  

Puppy_Panel_Pack.tar.gz

an easy way to get a menu of six four panel toggles is to unpack the above gz. and move the Puppy Panel Pack folder into root. then add:


Code:


<Menu label="Puppy Panel Pack" icon="/root/Puppy Panel Pack/pnls.png" height="16">
<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>
<Program label="p2" icon="/root/Puppy Panel Pack/panel icons/p2.png" >"/root/Puppy Panel Pack/p2"</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>


to your [custom].jwmrc or /etc/xdg/templates/_root_.jwmrc and restart JWM.




(default panels except for the toggle panel (P5) script entry)



****

helpful hint:
you can use
Code:

<Menu label="original puppy menu" icon="" height="16">

</Menu>


around the block of code in /etc/xdg/templates/_root_.jwmrc that looks like this:

Code:
 
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-desktop.menu
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-system.menu
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-setup.menu
to squash as much of the original puppy menu as you like down into one line. (personally i divide it in two: shutdown remains out, everything else goes inside. i place the "original puppy menu" inside the panel pack menu, and place the desktop switcher slot between those entries so that the pointer can just continue to cut across. this leaves plenty of room for future additions and, after some reasonably careful consideration, is the way i would recommend to begin messing around with JWM.)
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1564
Location: nyc

PostPosted: Tue 17 Jun 2014, 01:36    Post subject:  

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":

Quote:
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:
<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:


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, 02:44; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1564
Location: nyc

PostPosted: Wed 25 Jun 2014, 22:10    Post subject: the windows menu on the main menu
Subject description: thanks to MochiMoppel for the code
 

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

Code:

<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:
<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.
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1564
Location: nyc

PostPosted: Fri 27 Jun 2014, 10:48    Post subject: one pixel spacer x3
Subject description: thanks yet again, Mochi
 

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


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, 01:46; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1564
Location: nyc

PostPosted: Sun 29 Jun 2014, 00:49    Post subject: getting back to shortcut keys
Subject description: the windows key
 

keycode 115 apparently works on most machines and enables you assign programs, files, or folders to the windows button. for example,
Code:
<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:
<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.
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:28    Post subject:  

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
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1662
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: 1564
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: 1564
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: 1564
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: 1662
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: 1564
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: 1564
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 
Display posts from previous:   Sort by:   
Page 7 of 14 [202 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 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.1930s ][ Queries: 12 (0.0106s) ][ GZIP on ]