You are not logged in.

#1 2017-12-30 15:14:13

lajner
New Member
Registered: 2017-12-30
Posts: 4

How to achieve grid of desktops with vertical multi_desktop tint2?

Hi all,

I found this forum when I was googling how I could improve my Openbox+tint2 desktop. I am not bunsenlabs user, but I share your idea of lightweight desktop. I decided I try to ask you if somebody would help me.

I am a big fan of vertical tint2 configuration like this:

https://gitlab.com/o9000/tint2/wikis/sc … tral-icons

Wide-screen displays have a lot of horizontal space, so I want to safe all vertical space. Also I find sufficient to have only application icons in taskbar, usually I know what programs I run and how their icons look like. And there is enought space to show all 4 virtual desktops I use.

I am using this configuration for more than a two years without problems. But I would like to improve it. Usually I use all four desktops when I am working on some task. Suddenly I need to switch on completely different task. It would be great to switch to different "set" of four virtual desktop to complete this task. In other words, to have grid of virtual desktops, lets say 3x4 – 3 quartets of desktops. And show only all desktops from one quartet.

Perfect solution would be to have widget (pager?) that would display on which quartet of desktop I currently am. It would also allow to change quartets on mouse click. Moreover, it would be great if tint2 would allow to drag application between quartets.

Do you have any idea how to achieve such behaviour?

Last edited by lajner (2017-12-30 15:26:30)

Offline

#2 2017-12-30 18:54:14

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

Hello smile

I'm not sure that I understand exactly what you want but forum member and tint2 maestro @ututo has created a desktop switcher using a tint2 instance, see this post for details:

https://forums.bunsenlabs.org/viewtopic … 2442#p2442

I don't know if your "grid" idea is achievable though unless you look at something like fvwm (which features such a layout by default).


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2017-12-31 08:16:38

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,769

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

Not sure if i understand the question,

1. Traveling there

a. my attempt at desktop switcher was a tint2 executor bash script
https://raw.githubusercontent.com/bront … in/deskSpy
(running this for a while on one machine without trouble)

b. set GoToDesktop shortkeys (openbox)
http://openbox.org/wiki/Help:Actions

c. client-list-combined-menu shows you everything (openbox). I have this as super+tab.

2. Moving to

a. Openbox client-menu has an option "send to desktop".

b. Also I see I have this in rc.xml

      <mousebind action="Click" button="A-S-Up">
        <action name="SendToDesktopPrevious"/>
      </mousebind>
      <mousebind action="Click" button="A-S-Down">
        <action name="SendToDesktopNext"/>
      </mousebind>

but never actually use it.

Last edited by brontosaurusrex (2017-12-31 08:47:14)

Offline

#4 2017-12-31 15:48:00

lajner
New Member
Registered: 2017-12-30
Posts: 4

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

Thank you for your replies!

I tried to explain what I want as simple as possible, but I probably overengineered it smile I try to do it once again.

Before my openbox+tint2  combo I used to use Mate desktop. In Mate was possible to arrange desktops into grid. So one can navigate between desktops not only left&right but also up&down. Taskbar displayed task on current desktop.

Tint2 has Taskbar / Pager, that can run in two modes: single desktop and multi desktop. I use multi desktop, which shows my all 4 virtual desktops at once. As far as I know Tint2 does not support any grid layout.

And what I want is a kind of hybrid wink I want Taskbar/pager how it works in multi desktop Tint2, but not for all virtual desktops, but only for one column in grid.

Other way how to look at it: Add another parameter to Tint2's multi desktop configuration which defines in how many columns virtual desktops should be organized. And not display them at once, but only show current column.

Thank you @Head_on_a_Stick for you suggestions! I have already seen the post, but it does not help me. Moreover I think OpenBox is capable of grid layout, because GoToDesktop supports also "up/down" and "left/right" values.

Thank you @brontosaurusrex also! 1. What should the script do? I didn't get it. 2. I think OpenBox is capable of my wished grid layout.

I think I clarify it for myself. What I need is "better" Tint2 Taskbar / Pager. I will try to suggest it to its developers…

Last edited by lajner (2017-12-31 16:02:05)

Offline

#5 2017-12-31 17:15:32

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,055

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

Moreover I think OpenBox is capable of grid layout, because GoToDesktop supports also "up/down" and "left/right" values.

That is set by a 3rd party pager, or an external program - FAQ - second question

As far as I know, a grid layout cannot be set directly with obconf or editing the rc.xml - I think, pekwm is the only window manager (as opposed to desktop environment) that has that configuration option natively.

I don't think tint2 has column/row options.

If the Mate pager allows you to set the desktop layout as 2x2 (or whatever you're after) you may be able to use that in openbox. Using openbox as the window manager for an xfce desktop might be another option; the xfce pager may support configuring column/rows for openbox desktops.


You must unlearn what you have learned.
    -- yoda

Offline

#6 2017-12-31 17:35:06

lajner
New Member
Registered: 2017-12-30
Posts: 4

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

Somewhere at OpenBox page is a short C program code that allows to set grid layout. But I think, and that is part of my question, Tint2 would not handle it in its multi-desktop setup.

A agree that another option would be XFce, but it, at least as far as I know, does not offer what Tint2 has: the multi-desktop Pager. I think its a great idea, but I would like to extend it a little bit wink)

Offline

#7 2017-12-31 18:45:15

ohnonot
...again
Registered: 2015-09-29
Posts: 3,773
Website

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

lajner wrote:

Other way how to look at it: Add another parameter to Tint2's multi desktop configuration which defines in how many columns virtual desktops should be organized. And not display them at once, but only show current column.

this is not possible in tint2.
it either shows 1 desktop, or all.

however, the gridlayout itself is possible:

/**
 * Ultralightweight NetWM desktop pager setlayout by Nicklas W Bjurman
 * Derivative work of Mikachu's setlayout.c from Openbox official website.
 *
 * To compile this program: gcc -o setlayout setlayout.c -lX11
 */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>

void print_help() {
	printf("Usage: setlayout ORIENTATION COLUMNS ROWS START\n\n"
		
		"ORIENTATION:\n"
		" The orientation of the desktop layout\n"
		"  0 - horizontal\n"
		"  1 - vertical\n\n"
		
		"COLUMNS and ROWS:\n"
		" Number of columns and rows\n\n"
		
		"START:\n"
		" Starting corner\n"
		"  0 - Top-left\n"
		"  1 - Top-right\n"
		"  2 - Bottom-right\n"
		"  3 - Bottom-left\n");
}

int main(int argc, char **argv) {
	unsigned long data[4];
	Display *display;
	int screen;
	Window root;
	
	//Argument validation
	if(argc == 2 && (strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"-?") == 0 || strcmp(argv[1],"--help") == 0)) {
		print_help();
		return 1;
	} else if(argc < 5 || argc > 5) {
		printf("setlayout: invalid number of arguments\n");
		print_help();
		return 1;
	}
	
	//Assign the _NET_DESKTOP_LAYOUT variables
	data[0] = atoi(argv[1]); //Orientation
	data[1] = atoi(argv[2]); //Columns
	data[2] = atoi(argv[3]); //Rows
	data[3] = atoi(argv[4]); //Starting corner
	
	//Get desktop objects
	display = XOpenDisplay(NULL);
	screen = DefaultScreen(display);
	root = RootWindow(display, screen);
	
	//Set desktop layout
	XChangeProperty(display, root, XInternAtom(display, "_NET_DESKTOP_LAYOUT", False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&data, 4);
	
	//Clean up
	XFlush(display);
	XCloseDisplay(display);
	return 0;
}

Offline

#8 2017-12-31 18:47:28

ohnonot
...again
Registered: 2015-09-29
Posts: 3,773
Website

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

however, this is just a 2d grid and NOT the concept you outlined in post #1 - that indeed isn't possible with openbox, but i know for a fact that fvwm has that feature.

Last edited by ohnonot (2017-12-31 18:47:58)

Offline

#9 2017-12-31 19:29:04

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,769

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

bbpager2.th.png

There is also bbpager (in repos), which can do grid layout (still not sure if thats that), bbpager bottom-right, my lil script top-right (no grid layout possible).

Last edited by brontosaurusrex (2017-12-31 19:30:36)

Offline

#10 2018-01-01 08:38:43

ohnonot
...again
Registered: 2015-09-29
Posts: 3,773
Website

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

bronto, that's still a single row.
a grid would be in rows AND columns, like 2x3 or 5x2 etc.

Offline

#11 2018-01-01 09:33:55

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,769

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

Lol, option for rows, columns is in the config (man bbTab).

Last edited by brontosaurusrex (2018-01-01 09:35:35)

Offline

#12 2018-01-01 16:16:57

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 398
Website

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

lajner wrote:

Usually I use all four desktops when I am working on some task. Suddenly I need to switch on completely different task. It would be great to switch to different "set" of four virtual desktop to complete this task. In other words, to have grid of virtual desktops, lets say 3x4 – 3 quartets of desktops. And show only all desktops from one quartet.

So what you want to achieve is group together multiple desktops, and have tint2 only show window buttons for windows belonging to any desktop in the current group at a time. It's an interesting idea.

The problem with getting this working is that both openbox and tint2 follow the EWMH specification quite strictly, and the spec doesn't provide such functionality (desktop groups).

Perfect solution would be to have widget (pager?) that would display on which quartet of desktop I currently am. It would also allow to change quartets on mouse click. Moreover, it would be great if tint2 would allow to drag application between quartets.

So you would like to simulate desktop groups by the current column/row, with desktops laid out in a matrix.

I checked and indeed the program http://openbox.org/dist/tools/setlayout.c can set such a layout correctly for Openbox (the shortcuts to navigate between desktops in up/right direction etc. work).

However there is no way to show only the current column/row of desktops in tint2. I'll think about adding an option for it, but no promises. The taskbar code is messy and fragile, and I avoid making any intrusive changes there. I'd rather spend time refactoring it before adding more features. But I don't know when that will happen.

Offline

#13 2018-01-02 18:44:31

lajner
New Member
Registered: 2017-12-30
Posts: 4

Re: How to achieve grid of desktops with vertical multi_desktop tint2?

@brontosaurusrex @ohnonot Thank you both for your suggestions! What I really enjoy is the multidesktop Tint2 setting, that integrates Taskbar with Pager. So what I am looking for is not ordinary pager, even it would be able to organize desktop into grid. (This thread have helped me to precise my idea, so I am now more specific then in my first post.)

@o9000 Hmm, I did not even think of "desktop groups", the "simulation" was only my attempt to explain what I want from different angle. The concept of desktop groups would allow, for instance, to have different number of virtual desktop in each group, right? Which sounds cool smile) But all groups with predefined number of virtual desktops (= grid) is perfectly OK in my opinion.

I am glad you will consider to implement this idea. I have already filled an Issue on tint2's GitLab, because I did not expect a tint2 developer here smile) I completely understand it is not an easy work, I once tried to program a little program that tried to handle all these EWMH events and I know it was a pain. I remember it surprised me many many times wink

Offline

Board footer

Powered by FluxBB