Is tabbing possible?

Have a problem writing a FVWM function? Post your problem here, or post example functions that you think others' will enjoy.
beastie1
Kitten
Kitten
Posts: 3
Joined: Wed Jan 11, 2017 11:22 pm

Is tabbing possible?

Postby beastie1 » Wed Jan 11, 2017 11:29 pm

Hello!

I've been trying to make a tabber using FvwmButtons to group all windows that have the same title together, for example all xterm windows. But I haven't been very successful. FvwmButtons only seems to swallow the first window. The rest are displayed outside FvwmButtons unless I close the existing one first.

It seems there was something called FvwmTabs, but it was broken and it's been removed.

Is it even possible to make something like that with FvwmButtons?

somiaj
Administrator
Administrator
Posts: 39
Joined: Mon Nov 08, 2004 9:54 pm
Location: Idaho (USA)
Contact:

Re: Is tabbing possible?

Postby somiaj » Thu Jan 12, 2017 3:01 am

Afiak you wont be able to get tabs. Though this might work

Place all the windows on top of each other (fvwm can do this) and then use something like FvwmIconMan and a limited list of windows (say FvwmIconMan that shows all xterms) and then you can select the window in FvwmIconMan and it will bring it to the foreground via either Raise or maybe Iconify.

Would something like that satisfy your needs. (it is basically what tabs do in my opinion)

The other option is use apps that have tabs/buffers. I use tmux and can open/close shells and use the mass to switch between my running windows that way in a single xterm. There are also terminal emulators that support tabs.

jaimos
-jaimos

beastie1
Kitten
Kitten
Posts: 3
Joined: Wed Jan 11, 2017 11:22 pm

Re: Is tabbing possible?

Postby beastie1 » Thu Jan 12, 2017 8:21 pm

Thank you for the prompt reply.

somiaj wrote:Place all the windows on top of each other (fvwm can do this) and then use something like FvwmIconMan and a limited list of windows (say FvwmIconMan that shows all xterms) and then you can select the window in FvwmIconMan and it will bring it to the foreground via either Raise or maybe Iconify.

Would something like that satisfy your needs. (it is basically what tabs do in my opinion)

Well that is exactly what I'm trying to do. But I haven't been very successful. As I mentioned FvwmButtons only swallows the first window. It's not much but this is what I have so far:

Code: Select all

+ "Tabber" FvwmButtons Tabber
+ "XTerm" Exec xterm -title "BLAH"

Code: Select all

DestroyModuleConfig Tabber: *

*Tabber: Back #EFEFEF
*Tabber: Frame 2
*Tabber: Geometry 1000x800+0+0
*Tabber: (2x1, Swallow (SwallowNew) "BLAH" "Nop")



somiaj wrote:The other option is use apps that have tabs/buffers. I use tmux and can open/close shells and use the mass to switch between my running windows that way in a single xterm. There are also terminal emulators that support tabs.

Yes, I know there are such programs. I've used tabbed by suckless, which is very good. Unfortunately it only works through xembed and some programs I'm using don't support it. That's the case of the links browser (in graphics mode).

I don't need anything too fancy. Just something minimalistic and generic will do.

somiaj
Administrator
Administrator
Posts: 39
Joined: Mon Nov 08, 2004 9:54 pm
Location: Idaho (USA)
Contact:

Re: Is tabbing possible?

Postby somiaj » Thu Jan 12, 2017 11:13 pm

beastie1 wrote:Well that is exactly what I'm trying to do. But I haven't been very successful. As I mentioned FvwmButtons only swallows the first window. It's not much but this is what I have so far:

How is that exactly what I suggested I never mentioned using FvwmButtons?

This was on the lines of what I mentioned.

1) Use fvwm to position the windows.

Code: Select all

Style xterm-tab PositionPlacement 10px 10px


2) Use FvwmIconMan to list the tabs.

Code: Select all

DestroyModuleConfig TabList:*
*TabList: Show class=xterm-tab
*TabList: Action Mouse 0 N sendcommand ShowTab


To run this

Code: Select all

Module FvwmIconMan TabList


3) Have a function that hides/shows the windows.

Code: Select all

DestroyFunc ShowTab
AddToFunc ShowTab
+ I All (xterm-tab) Iconify on
+ I ThisWindow (xterm-tab) Iconify off


now every term you launch with the class xterm-tab will appear in the same place and the FvwmIconMan can be used to select between them.

To run the xterms

Code: Select all

xterm -class xterm-tab


This requires all the windows being positioned in the same place (on the same Page/Desktop).

If you want to be able to move these around you will have to write some functions that move them all to the same place. Something along the lines will move all the windows:

Code: Select all

All (xterm-tab) Move options


But if you want to be able to move things with the mouse, you may need to get more creative and use the $[w.x] and $[w.y] of the current visible window. There are similar things if you need to resize all the windows.
-jaimos

beastie1
Kitten
Kitten
Posts: 3
Joined: Wed Jan 11, 2017 11:22 pm

Re: Is tabbing possible?

Postby beastie1 » Sat Jan 14, 2017 10:08 pm

What I meant was that the idea you suggested is like the general idea I had in mind. But I mistakenly thought you intended to use both FvwmIconMan and FvwmButtons: one to provide a list of windows and the other to group them. Sorry for the confusion.

Thank you for the help. It's much appreciated!


Return to “Complex functions”

Who is online

Users browsing this forum: No registered users and 2 guests