Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-07-17 10:28:40

svdb
Member
Registered: 2015-07-17
Posts: 2

[Feature Request] Expansions to tiling

I love XFCE. The speed, the simplicity and the looks. And the recently added ability to tile to corners, it's great. It works fast and always the same, whether my terminator terminal has a window decoration or not.

I would like to see the option of being able to define our own layouts. Right now, I use xdotool and bind that to keys.

So for instance, to create a vertical 72 : 28 split on my 1366x768 screen, I bind:

# Current situation in xfce4-keyboard-shortcuts:
/xfwm4/custom/<Super>Up => tile_up_key
/xfwm4/custom/<Super>Down => tile_down_key
/xfwm4/custom/<Super>F1 => tile_up_left_key

# Xdotool solution
/commands/custom/<Super>Up => /usr/bin/xdotool getactivewindow windowsize 1366 553 windowmove 0 0
/commands/custom/<Super>Down => /usr/bin/xdotool getactivewindow windowsize 1366 171 windowmove 0 575

You might notice that the window heights don't add up to 768. They add up to 724. The additional 44 pixels are reserved for two 22 pixel title-bars. When tiling windows that don't have window decorations, xdotool treats them as if they do, and my grid has gaps. They other way around, if I tile using xdotool and take the lack of window decorations into account, windows that do have window decorations, overlap by 22 pixels.

0BIevAhl.png

I've tried tiling window managers such as i3 or awesome, but sometimes I like to have a window decoration. I know they have options to float, but I've created a GTK theme that I'm really happy with, and would like to keep (see terminal screenshot). I've also tried a various combinations of custom scripts that use xprop in combination with xdotool to get the window id and toggle the window decoration at the same moment it is called by the hotkey to be tiled. I haven't gotten this to work properly. Here are some of the sources for that (1, 2, 3), and if anyone can get that to play nice, that would be awesome.

My ideal tiling solution looks like this:

# grids
┌─── 400 ────┬─────────────── 966 ───────────────┐┌─── 400 ────┬─────────────── 966 ───────────────┐
│            │                                   ││  terminal  │                                   │
│            │                                   ││    28%    384                                  │
│  terminal  │              editor               ││    SLLU    │              editor               │
│    28%    768               72%                │├────────────┤                72%                │
│    SLL     │                SRL                ││  terminal  │                SRL                │
│            │                                   ││    28%    384                                  │
│            │                                   ││    SLLD    │                                   │
└────────────┴───────────────────────────────────┘└────────────┴───────────────────────────────────┘
┌───────── 683 ──────────────┬───── 683 ─────────┐┌───────────────────── 1366 ─────────────────────┐
│                            │                   ││                                                │
│                            │                   ││                                                │
│      editor/browser        │   editor/browser  ││                     editor                     │
│          60%               │      40%          ││                       72%                      │
│          SL                │      SR           ││                       SU                       │
│                            │                   │├────────────────────────────────────────────────┤
│                            │                   ││             terminal  28% SD                   │
└────────────────────────────┴───────────────────┘└────────────────────────────────────────────────┘

# hotkeys
SLL = <Super>LeftLeft, or <Super>hh
SRL = <Super>RightLeft, or <Super>hl
SD  = <Super>Down, or <Super>j

Your layout will probably look different. My 72% number for instance, is based on my editor, resolution and working with a 100 char line length.

Those hotkeys make intuitive sense to me, more than having to throw three modifiers at a key to get my window to tile top left. This way, when I want a small tile on the left of the screen, it's just <Mod>Left Left Left (until I decide it's small enough, in predefined steps that make sense, so not 1 pixel but also not 800). If halfway through I decide the window has to go to the top left, I just tack on an Up or k key, or even multiple ones if I want to decrease the vertical height of the window. Ideally, a k/Up press can be undone by a j/Down press, in that same combination.

- when tiling, window decorations be gone
- <Alt>+dragging untiles a window, and brings back window decorations
- hotkeys work on the active window
- I want to be able to define my grids in a simple way and don't have to learn Haskell along the way

This would combine both the productivity of a tiling window manager, but maintain the looks and interface elements of XFCE.

TL;DR: you have spoiled me with tile_up_left_key, please also add tile_w_h_x_y_key

What do you guys and gals think?

Last edited by svdb (2015-07-17 10:37:33)

Offline

#2 2015-07-18 21:57:49

svdb
Member
Registered: 2015-07-17
Posts: 2

Re: [Feature Request] Expansions to tiling

I wrote a Python script that does what I wanted XFCE to do natively. I'd still be stoked to see it implemented though smile

Offline

#3 2015-07-19 00:49:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: [Feature Request] Expansions to tiling

Thank you for sharing the script. Its pretty amazing how extendable Xfce is.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB