Comments (3)
That's already covered under issue #13 (move tiling presets into the config file) and, before holiday overwork hit me like a ton of bricks, I was just about to finally sit down and do the hard work of designing the new config file format needed to fix it.
I hope to get back to that in January or, if something comes up, definitely February. (I may also start writing a GUI for editing the new config file format)
However, I'll leave this feature request open as a reminder that I should offer at least one ready-made alternative config for people with bigger monitors. (It didn't occur to me because I use a pair of 1280x1024 monitors and the boundary between them subdivides the tiling space nicely)
Workaround
In the mean time, if you're feeling adventurous, look at lines 130 through 142 of quicktile.py
.
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)]
That's what currently defines the available layouts.
If you weren't already aware, Python uses an indent-based block syntax instead of curly braces (hence the indent after the for ...:
lines) however, within bracket pairs (list/dict/set/tuple literals, function calls, expressions, etc.), whitespace is as insignificant as in PHP and JavaScript. (So, as long as you keep the indent after those for ...:
lines in mind, you shouldn't have any problems)
The top line defines three columns by setting col
to 1.0 / 3
and then the rest of the lines define layouts as either explicit widths or multiples of the column width.
(In retrospect, maybe I shouldn't have taken advantage of the tuple packing/unpacking syntax for code that Python novices might want to edit. It's just var_a, var_b = "Value A", "Value B"
.)
POSITIONS
is a dict (associative array) mapping position keywords like top-left
to sequences of presets to cycle through. (Here generated by the [gv(...) for x in some_list]
list comprehensions which, if you haven't seen them before, are an expression-form shorthand for a for
(foreach
in PHP) loop, an optional function call (gv
), and an optional if
statement which I don't use here)
The syntax for gv(...)
is defined on line 109 and it's sort of a stop-gap measure until I design the new config file but here's how it works:
- The function signature is basically
gv(width, height, gravity_keyword, position_x, position_y)
- Only the first two arguments are mandatory. The gravity defaults to
top-left
and the two position values are calculated from the gravity if unspecified. - The gravity keyword defines where on the window the
position_x
andposition_y
coordinates refer to. - All values except the gravity keyword are percentages of the monitor size in the range
0.0
to1.0
, inclusive. - All valid values for the gravity keyword are in the dict on line 97.
- I haven't yet got a unit test for it but, if you manually generate the
(x, y, w, h)
tuple thatgv(...)
returns, you should be able to define presets which preserve one or more components by passingNone
as one of the values.
from quicktile.
Thank you! I'm going to take a look a this when I get some time.
from quicktile.
Just so you know, I've finally started to do the big re-architecting I've wanted to do all these years and, as a result, there's now a ColumnCount
key in the config file.
More improvements are planned, but that should be a good start.
Be warned, however, that the installation process has changed because I split QuickTile into multiple files to get past a mental block. It's still simple and you have the same choices, but you'll want to re-read the relevant section of the README
.
from quicktile.
Related Issues (20)
- Incorrect Monitor Geometry HOT 4
- move-to-{top,left,right,bottom} behavior changed in 0.4.0 HOT 8
- Overlapping windows when positioning vertically on Ubuntu 20.04 HOT 25
- Quicktile is not detecting IceWM taskbar HOT 12
- Currently unpredictable state cycling, suggest replace with much simpler logic, gains predictability and cognitive comfort. HOT 1
- PackageNotFoundError in Manjaro after last pacman update HOT 2
- Display a warning if ModMask and per-binding modifiers overlap in potentially confusing ways HOT 8
- Restore the previous window's size & position before tiling. HOT 8
- Skipping the 1/2 width option HOT 3
- While using "right" or "center" command on with external monitor, the windows switch to the next monitor HOT 21
- External keyboard, "Right" keyboard binding breaks HOT 14
- Control-C on `quicktile --daemonize` can hang X on LXDE HOT 1
- No errors and no funcionality on Ubuntu 20.04 HOT 1
- Bug detected - A programming error has been detected during the execution of this program HOT 4
- Failed to load module "xapp-gtk3-module" HOT 5
- Move window to other workspace HOT 4
- 3 columns layout, but gap between left and center HOT 6
- Xfwm4 integration / size restoration HOT 3
- Release a new version. Please. HOT 3
- emacs windows don't tile to edge of screen. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quicktile.