-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4K screen adaptation #60
Comments
Hi. Sorry for not providing a GUI to make that easy. It's been on my TODO list for ages but more important things (typically university-related) keep coming up. (At the moment, I'm working on my degree project.) QuickTile should be able to do any layout you want, but in order to help you, I'll need you to explain exactly what kind of layout you want to generate, since there are multiple ways to have a 5-7 column layout mapped to commands. However, I can give you a quick overview of how that code works without needing clarification from you. Start with this bit: col, gv = 1.0 / 3, GravityLayout()
# TODO: Figure out how best to put this in the config file.
POSITIONS = {
'middle': [gv(x, 1, 'middle') for x in (1.0, col, col * 2)],
} #: command-to-position mappings for L{cycle_dimensions}
for grav in ('top', 'bottom'):
POSITIONS[grav] = [gv(x, 0.5, grav) for x in (1.0, col, col * 2)]
for grav in ('left', 'right'):
POSITIONS[grav] = [gv(x, 1, grav) for x in (0.5, col, col * 2)]
for grav in ('top-left', 'top-right', 'bottom-left', 'bottom-right'):
POSITIONS[grav] = [gv(x, 0.5, grav) for x in (0.5, col, col * 2)] If you paste this in below it and run quicktile... import pprint
pprint.pprint(POSITIONS) ...you'll see that it's a compact, easy-to-adjust way to generate this table: POSITIONS = {
'bottom': [(0.0, 0.5, 1.0, 0.5),
(0.33333333333333337, 0.5, 0.3333333333333333, 0.5),
(0.16666666666666669, 0.5, 0.6666666666666666, 0.5)],
'bottom-left': [(0.0, 0.5, 0.5, 0.5),
(0.0, 0.5, 0.3333333333333333, 0.5),
(0.0, 0.5, 0.6666666666666666, 0.5)],
'bottom-right': [(0.5, 0.5, 0.5, 0.5),
(0.6666666666666667, 0.5, 0.3333333333333333, 0.5),
(0.33333333333333337, 0.5, 0.6666666666666666, 0.5)],
'left': [(0.0, 0.0, 0.5, 1),
(0.0, 0.0, 0.3333333333333333, 1),
(0.0, 0.0, 0.6666666666666666, 1)],
'middle': [(0.0, 0.0, 1.0, 1),
(0.33333333333333337, 0.0, 0.3333333333333333, 1),
(0.16666666666666669, 0.0, 0.6666666666666666, 1)],
'right': [(0.5, 0.0, 0.5, 1),
(0.6666666666666667, 0.0, 0.3333333333333333, 1),
(0.33333333333333337, 0.0, 0.6666666666666666, 1)],
'top': [(0.0, 0.0, 1.0, 0.5),
(0.33333333333333337, 0.0, 0.3333333333333333, 0.5),
(0.16666666666666669, 0.0, 0.6666666666666666, 0.5)],
'top-left': [(0.0, 0.0, 0.5, 0.5),
(0.0, 0.0, 0.3333333333333333, 0.5),
(0.0, 0.0, 0.6666666666666666, 0.5)],
'top-right': [(0.5, 0.0, 0.5, 0.5),
(0.6666666666666667, 0.0, 0.3333333333333333, 0.5),
(0.33333333333333337, 0.0, 0.6666666666666666, 0.5)]} That dict (associative array/hash/map/whatever term you may know) maps commands like Each position tuple takes the form
Once you've got commands that do what you want, then you can edit your |
Awesome ! 4K is 3840x2160, if you want to take benefit from this huge defintiion on a 28" I want to put side by side from 5 to 7 columns. I would like to do 2 types of layouts:
btw I am not sure I understood your explanation. To clarify, do (0.0, 0.5, 1.0, 0.5) means
Thanks for your quick answer. |
Yes, your interpretation of As for the two types of layouts you want, I'm still not sure I understand. What I was asking for (but too tired to ask for properly) was an explanation of exactly what should happen for each keybind. As is, I don't know the answers to questions like: "Do you want to be able to put more than three windows side-by-side? If so, how do you want to deal with the fact that the numeric keypad doesn't have that many columns?" |
Ah, easy answer, I use only laptops - no keypad ;-) so my idea is to use the top number keys. (or Fx keys maybe?) |
(a possible recommendation... please ignore if not helpful as I do not yet u i o This allows me to have the same keys on a laptop without a number pad as I y u i o p On Mon, Dec 21, 2015 at 4:15 PM Stephan Sokolow [email protected]
|
It's not so much the keys I need to know about (those are easy to set in You just clarified that you want five columns in the full sense of the word. I'll assume you also want more rows in the full sense of the word. (I currently use a 3840x1024 desktop spanned across three 19" monitors, so I rely on I'm starting to generalize the code for your use case and I'll have something for you to look at in a bit. |
Ok, take a look at commit c4f1300. I haven't yet added an easy way to define ( |
that is exactly what I wanted. Now quicktile is the only tool around that works in large screen. Some ideas & suggestions:
other thoughts for future releases:
I think the "grid" 3x3 should be replaced by a grid of 7x5 on wide screens. But for my personal need, I don't need more than this change. |
Mapping keys to the seven columns and adding support for more rows is the "part 2" I didn't have time for now. When I have time to move I'm not yet sure what form it will take, but once I have time to design a new, JSON-based config file format, I'll look into adding support for per-monitor tiling grids so each monitor can have the columns most suited to it. (I also want to completely re-architect how columns and rows are handled so that I can implement keys to shrink/grow the current window's column/row and have all of the other windows adjust to match. |
careful not to turn this program into a bloatware :-) After a short time of use, finally I think that beeing able to target the other columns becomes necessary. A suggestion: I think the grid cells should be named like in excel, A1 to G1 (7 columns of 1rst row). Line 105:
below
etc. |
It doesn't work that way for two reasons:
Also, using Excel-style coordinates doesn't really gain anything over using integer |
Understood.
Currently if I can get at least smthing like this working that would be perfect++ :
and as a dream far away a 2/3rd layout ;-)
|
In my implementation, I'd write a new command which can take arguments and then, to tile for the cell you call B3, I'd bind a key to That way, I don't need to either favour one person's set of positions or flood If you don't mind your ROW_COUNT = 3
row_height = 1.0 / ROW_COUNT
# Start the cycle at the width of one cell, rather than 50% or 100%
cell_steps = (col_width,) + cycle_steps
# Generate a string of letters that we can index into for column names
colnames = ''.join((chr(x) for x in range(65, 65 + COLUMN_COUNT)))
# Generate a command for each cell...
for col in range(0, COLUMN_COUNT):
for row in range(0, ROW_COUNT):
# Each command will be named after an Excel-style cell coordinate
POSITIONS['%s%d' % (colnames[col], row)] = [
# gv(width, height, gravity, x, y)
# "gravity" determines where on the window (x, y) refers to.
gv(width, row_height * row, 'top-left', col_width * col, row_height * row)
for width in cell_steps] |
The way you state it sounds easy to understand. Thanks for you help, I we were near I would offer you a beer or 2 ;-) |
chuckle I've never seen the appeal to alcohol, nor to bitter drinks, but thanks anyway. |
I'll leave this open as a reminder to myself. |
Just so you know, I'm finally back to working on this and I'm in the process of making the layout more adaptable. So far, I've added a Also, be aware that, in order to make it easier to work on QuickTile, I split it up into multiple files so you'll need to re-read the install instructions. (Don't worry. I kept the "copy into place" install option... it's just slightly different.) |
Ok, the fix for #20 should have also fixed the cycling bug. :) |
Great. |
In case you're interested in trying it out, the GTK 3 port that I'll be working toward a fix for this on is available in the I still need to fix regressions #107 and #108 before it'll be at parity with the GTK+ 2 version, but it's already got much cleaner internals and a growing suite of automated tests. Just don't use the |
Note to Self: See also discussion on #99. |
I myself don't know anything about Python, so I will wait until the setup is easy. |
It's no more difficult than with QuickTile for GTK+ 2.x. If you're on Debian, Ubuntu, Mint, or Fedora, I can give you trivially simple instructions. (The same instructions will be in the README and on the site once I finish the new manual.) |
Hi, I would like to patch the code to make the most of my 4K screen.
What I need is get rid of that 0.5 factor but insteal allow 5 to 7 vertical columns and be able to cycle through them.
The problem: I need to learn Python before ;-(
I have seen those gravities enums, the POSITIONS array.
Can someone help me doing the proper change?
The text was updated successfully, but these errors were encountered: