Skip to content

sizely@gossardla: Initial release - #1140

Open
lasse-tech wants to merge 1 commit into
linuxmint:masterfrom
lasse-tech:add-sizely
Open

sizely@gossardla: Initial release#1140
lasse-tech wants to merge 1 commit into
linuxmint:masterfrom
lasse-tech:add-sizely

Conversation

@lasse-tech

Copy link
Copy Markdown

New extension: Sizely — puts a window at a set size and centers it on the
current monitor, from the title bar menu or by keyboard shortcut.

  • Custom sizes with an optional centering flag, shown grouped in a "Size"
    submenu or directly in the window menu.
  • Built-in standard resolutions from qHD to 8K plus common phone viewports,
    grouped by aspect ratio; only sizes that fit the current monitor are listed.
  • Centering uses the Muffin API (get_work_area_current_monitor() and
    move_resize_frame()), so the panel offset, monitor boundaries on
    mixed-resolution setups and the frame geometry are all handled correctly.
  • Sizes can be given in logical or physical pixels; logical multiplies by the
    UI scaling factor.

Settings are split across three tabs. Translations: English (source) and German.

Tested on Linux Mint 22.3 with Cinnamon 6.6.9 (X11). The APIs used
(MnemonicSubMenuMenuItem, MnemonicLeftOrnamentedMenuItem,
addAction(to_menu, title, callback), keybindingManager, ExtensionSettings,
the list setting type and the layout/section schema) were checked against
the 6.0, 6.2, 6.4 and 6.6 tags, which is the range declared in metadata.json.

./validate-spice sizely@gossardla passes.

Source: https://github.com/lasse-tech/sizely

@github-actions

Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 1 potential issue(s):

⚠️ WARNING

⚠️ hardcoded_data_dir

sizely@gossardla/files/sizely@gossardla/extension.js:17

Gettext.bindtextdomain(UUID, GLib.get_home_dir() + "/.local/share/locale");

Avoid hardcoding .local/share in paths. Use GLib.get_user_data_dir() instead,
which respects the XDG_DATA_HOME environment variable.


Automated pattern check.

@lasse-tech

Copy link
Copy Markdown
Author

Fixed in 1710658 — the locale directory now resolves via
GLib.get_user_data_dir(), so XDG_DATA_HOME is honoured. The warning above
refers to the earlier commit 20bec49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant