Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
WindowMaker %a and %s in fluxbox menu.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Superfly
n00b
n00b


Joined: 09 Apr 2003
Posts: 34

PostPosted: Wed Apr 09, 2003 9:10 pm    Post subject: WindowMaker %a and %s in fluxbox menu. Reply with quote

I'm a recent fluxbox conversion... but I couldn't live without %a and %s WindowMaker functionality in my menu. Mainly because I love centericq... but it's a pain when someone sends me a url in it. In WindowMaker I'd just set up a menu item like so: "mozilla %s", highlight the url, right click, choose that item, and poof.

So I hacked my way through fluxbox source and added %a and %s functionality. And while I was at it, I added paste with the middle mouse button to fbrun.

I thought someone else might miss those features from WindowMaker too.

DISCLAIMER

1. I am not a c, or c++ programmer. I learned as I went.
2. I am not an Xlib programmer. I copied from other sources.
3. Pointers are EVIL. But fun.
4. I really had no idea what I was doing.

It works for me... and I think I've taken care of all bugs that killed my X Server... with a little help from a friend of mine who IS a c++ programmer. So ahhh... if it kills your system... it wasn't me. It was him ---->

WindowMaker Patch
fbrun paste Patch

To get them to work, stick them in:
/usr/portage/x11-wm/fluxbox/files
Then modify the ebuild file for fluxbox:
vi /usr/portage/x11-wm/fluxbox/fluxbox-0.1.14-r1.ebuild

And add underneath line 37:

Code:

epatch {FILESDIR}/${PN}-vano-gentoo.patch


these lines:

Code:

   # Add WindowMaker %s and %a features to menu
   epatch ${FILESDIR}/${P}-windowmakermenu.patch
   # Add paste to fbrun
   epatch ${FILESDIR}/${P}-fbrun-paste.patch


Then run "emerge fluxbox" to re-install fluxbox with the patches.

To use:

I basically hacked fbrun so that it takes a new command line parameter: "-pre". Whatever is typed in -pre will be stuck to the begining of the input typed in to fbrun.

%a(window title) is what you stick in your menu. The window title is optional. Also... there is a different history file for each window title.

So, if you add:

Code:

     [exec] (run) {%a}
     [exec] (ssh to) {rxvt -e ssh -X %a(Enter Server)}
     [exec] (google search) {moz-ctrl google %s}


moz-ctrl is a script I made when I was tired of the binary distribution of mozilla telling me "Profile in use" whenever I tried to open two mozilla windows with the mozilla command. (you'll most likely have to change the path to mozilla)

The "run" command will pop open an fbrun window with it's own history list. Type in the command and it'll run it.

The "ssh to" command will pop open an fbrun window that says "Enter Server". you could enter "superfly@server.com" and it'd open an rxvt window running ssh. It would have it's own seperate history file.

The "google search" command would paste whatever is currently selected in to %s. So it'd open up google searching for whatever you have selected.

And the obvious one, if you open an fbrun command, you can paste in to it using your middle mouse button.
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Wed Apr 09, 2003 10:15 pm    Post subject: Reply with quote

awesome! would it be too much to ask for you to make a version of the patch for everyones favorite blackbox alternative, openbox?
Back to top
View user's profile Send private message
Superfly
n00b
n00b


Joined: 09 Apr 2003
Posts: 34

PostPosted: Thu Apr 10, 2003 12:09 pm    Post subject: Reply with quote

That wasn't hard at all.

Openbox windowmaker-like patch

%a still requires my patched fbrun though. So:

1. Follow the directoins in the first post of this thread.
2. Download openbox patch
3. Put it in /usr/portage/x11-wm/openbox/files
4. vi /usr/portage/x11-wm/openbox/openbox-2.1.3-r4.ebuild
5. Add underneath line 42:

Code:

    unpack ${A}


These 3 lines:

Code:

    cd ${S}
    # Add WindowMaker %s and %a features to menu
    epatch ${FILESDIR}/${P}-windowmakermenu.patch

6. Run "emerge openbox" to reinstall with the patches.

Have fun.
Back to top
View user's profile Send private message
Superfly
n00b
n00b


Joined: 09 Apr 2003
Posts: 34

PostPosted: Thu Apr 10, 2003 12:10 pm    Post subject: Reply with quote

So, why openbox?

I find openbox to be extremely similar to fluxbox, but fluxbox has really cool features like tabbed windows... and a very elaborate system for keyboard bindings.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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