gnome-shell-extension-awesome-tiles
gnome-shell-extension-awesome-tiles copied to clipboard
[Suggestion] set gap size in pixels instead of percentage for fine tuning
Great extension -- thanks for that! I am a pixel perfect guy and would love to set the gap size in pixels instead of percentages. Also, an option for respecting inner gaps would be awesome. Thank you very much for consideration :)
Hi, I went with percentage because it was the best way to support multiple monitors with different dimensions. I think it should be possible to calculate the percentage for a given pixel size. If that makes sense, I can implement the ability to set floating point numbers for the gaps so that you can fine tune them.
I guess the point of @Earthling-Z3R0 is to have the same gap distance both vertically and horizontally. I was also interested in such change so I have changed my local files of your extension. In the extension.js
file I have made the following modifications:
// const gaps = {
// x: Math.min(gapUncheckedX, gapUncheckedY * 2),
// y: Math.min(gapUncheckedY, gapUncheckedX * 2),
// }
const gaps = {
x: 15,
y: 15,
}
The result was quite satisfying on horizontal and vertical screens:
@velitasali if you don't mind, I am happy to create a PR against your repository with more advanced solution for fixed gap value, so the user would be able to choose between percent and pixel units.
@sebdybowski -- Great change, thanks for this. I will change my file accordingly and am looking forward to an improved version of the extention.
In the end I did it differently. I changed the extension.js like this:
before:
const gaps = {
x: Math.min(gapUncheckedX, gapUncheckedY * 2),
y: Math.min(gapUncheckedY, gapUncheckedX * 2),
}
after:
const gaps = {
x: Math.min(gapUncheckedX, gapUncheckedY * 1.125),
y: Math.min(gapUncheckedY, gapUncheckedX * 2),
}
I am running 2560x1440 screen resolution so I changed the X gap quotient accordingly. (1440 is 56,25% of 2560) (1.125 is 56.25% of 2)
The result is same size gaps around all windows instead of different gap sizes while still being able to use the ingame gap setting to change gap size. (Should work for any 16:9 screen resolution.)
Sorry for the late reply. I will implement this in another release. Patches are welcome!