adi1090x / rofi

A huge collection of Rofi based custom Applets, Launchers & Powermenus.
GNU General Public License v3.0
6.51k stars 303 forks source link

Generating config files for "custom" resolutions #38

Closed Syphdias closed 2 years ago

Syphdias commented 3 years ago

As I mentioned in #33, my native resolution (1440p) sadly is not supported.

I wrote a small python script to (mostly) generate the proper alignments.

The script looks at the directories 720p/ and 1080p/ and tries to generate a new directory "{resolution}p" where the numbers are adjusted. It does this by going through all files in the initial directories and scaling changed numbers linearly. For example: If a number is 2 for 720p, 3 for 1080p, and you generate for 1400p You will end up with 4 for 1440p. Likewise 5 (2+3) (720p) and 6 (3+3) (1080p) would yield 7 (4+3).

The script is quite raw, but I would improve on it if there is interest or any use for it.

Some things I just did not tackle (yet):

I think it could be a jumping-off point or workaround if your resolution is not 720p or 1080p.

redxtech commented 2 years ago

I am also a 1440p user myself, this script looks great! Would be great to see it refined and merged.

I have a question/suggestion: would it be easier to put all the screen size related variables into one file (e.g. size/1080p.rasi & size/720p.rasi, etc.) and have all the other configs just pull from there when they need the variables? This would make the maintenance easier, as the actual styling and the rest of the code can be written once, and the script from this PR could be simplified to only run on the one file.