Skip to content
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

Feature Request: Enable using the 'c' unit with the "MinWindowSize" and "MaxWindowSize" styles #145

Closed
SolubleShoe opened this issue Jun 27, 2020 · 2 comments · Fixed by #560
Assignees
Labels
difficulty:easy Issue is suitable for new fvwm developer help wanted Development help required (see `difficulty:*`) type:enhancement Augmenting an existing feature
Milestone

Comments

@SolubleShoe
Copy link

Currently fvwm can resize windows using units defined by the client application. But for some reason those units can't be used when defining a minimum or maximum window size.

Quote from the man page:

Resize [[frame] [directiondir] [warptoborderautomatic] [fixeddirection] [w]width[p|c|wa|da] [w]height[p|c]]
Allows for resizing a window. If called from somewhere in a window or its border, then that window is resized. If called from the root window then the user is allowed to select the target window.

The operation can be aborted with Escape or by pressing any mouse button (except button 1 which confirms it).

If the optional arguments width and height are provided, then the window is resized so that its dimensions are width by height. The units of width and height are percent-of-screen, unless a letter 'p' is appended to one or both coordinates, in which case the location is specified in pixels. With a 'c' suffix the unit defined by the client application (hence the c) is used. With the suffix 'wa' the value is a percentage of the width or height size of the EWMH working area, and with the suffix 'da' it is a percentage of the width or height of the EWMH dynamic working area. So you can say
Resize 80c 24c
to make a terminal window just big enough for 80x24 characters.

What I would like is to be able to say:
Style "termite" MinWindowSize 80c 24c
But that is not currently supported, you can only use percentage of screen size or pixels. If i could use the 'c' suffix it would be really sweet, especially when some shells freak out and flood the terminal with warning messages about "unreasonable" terminal sizes

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label enhancement to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the type:enhancement Augmenting an existing feature label Jun 27, 2020
@SolubleShoe SolubleShoe changed the title Feature Request: Enable using the 'c' unit with the "MinWindowSize" and "MaxWindowSize" Feature Request: Enable using the 'c' unit with the "MinWindowSize" and "MaxWindowSize" styles Jun 27, 2020
@ThomasAdam ThomasAdam self-assigned this Jun 27, 2020
@ThomasAdam ThomasAdam added this to the post-1.0 milestone Jun 27, 2020
@ThomasAdam ThomasAdam added the type:new-feature Brand new feature not yet present in fvwm3 label Jun 28, 2020
@ThomasAdam ThomasAdam added difficulty:easy Issue is suitable for new fvwm developer help wanted Development help required (see `difficulty:*`) and removed type:new-feature Brand new feature not yet present in fvwm3 labels Dec 20, 2020
@ThomasAdam ThomasAdam modified the milestones: post-1.0, 1.0.4 Jun 23, 2021
somiaj added a commit that referenced this issue Jun 24, 2021
Adds the option to the MinWindowSize and MaxWindowSize style to state the
size in terms of the clients size increment hints by using the suffix 'c'.
For example to give xterm minimum size to be 80x24 use.

Style xterm MinWindowSize 80c 24c

Note, the MinWindowSize and MaxWindowSize includes the window borders and
title bar, so the actual window size maybe smaller than specified depending
on border and/or title size.

Fixes #145
@somiaj
Copy link
Collaborator

somiaj commented Jun 24, 2021

@SolubleShoe I have worked on a patch that adds this feature. Check out the js/gh-145 branch if you want to test it out.

ThomasAdam pushed a commit that referenced this issue Jun 24, 2021
Adds the option to the MinWindowSize and MaxWindowSize style to state the
size in terms of the clients size increment hints by using the suffix 'c'.
For example to give xterm minimum size to be 80x24 use.

Style xterm MinWindowSize 80c 24c

Note, the MinWindowSize and MaxWindowSize includes the window borders and
title bar, so the actual window size maybe smaller than specified depending
on border and/or title size.

Fixes #145
somiaj added a commit that referenced this issue Jun 24, 2021
Adds the option to the MinWindowSize and MaxWindowSize style to state the
size in terms of the clients size increment hints by using the suffix 'c'.
For example to give xterm minimum size to be 80x24 use.

Style xterm MinWindowSize 80c 24c

Fixes #145
somiaj added a commit that referenced this issue Jun 25, 2021
Adds the option to the MinWindowSize and MaxWindowSize style to state the
size in terms of the clients size increment hints by using the suffix 'c'.
For example to give xterm minimum size to be 80x24 use.

Style xterm MinWindowSize 80c 24c

Fixes #145
ThomasAdam pushed a commit that referenced this issue Jun 25, 2021
Adds the option to the MinWindowSize and MaxWindowSize style to state the
size in terms of the clients size increment hints by using the suffix 'c'.
For example to give xterm minimum size to be 80x24 use.

Style xterm MinWindowSize 80c 24c

Fixes #145
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 20, 2021
# Changelog

## [1.0.4](https://github.com/fvwmorg/fvwm3/tree/1.0.4) (2021-07-17)

[Full Changelog](fvwmorg/fvwm3@1.0.3...1.0.4)

**Breaking changes:**

- Deprecate Label for FvwmPager [\#342](fvwmorg/fvwm3#342)
- Extend \*FvwmIconMan:Resolution to include specific Desktop / Pager [\#455](fvwmorg/fvwm3#455)
- Replace libbson with cJSON [\#408](fvwmorg/fvwm3#408)
- FvwmButtons: Shrink windows when honoring Hints. [\#577](fvwmorg/fvwm3#577) ([somiaj](https://github.com/somiaj))
- Replace libbson with cJSON [\#571](fvwmorg/fvwm3#571) ([ThomasAdam](https://github.com/ThomasAdam))
- Add commands to configure the size/position window. [\#558](fvwmorg/fvwm3#558) ([ThomasAdam](https://github.com/ThomasAdam))
- Retire FvwmTile and FvwmCascade wrappers. [\#515](fvwmorg/fvwm3#515) ([somiaj](https://github.com/somiaj))

**Implemented enhancements:**

- Set min. size for windows shown in pager [\#542](fvwmorg/fvwm3#542)
- Moving windows: allow for "warping" to other windows in a given direction [\#540](fvwmorg/fvwm3#540)
- Update monitor struct to know if monintor edges are OUTSIDE\_EDGE or INSIDE\_EDGE [\#523](fvwmorg/fvwm3#523)
- Two issues with the WindowList [\#151](fvwmorg/fvwm3#151)
- Feature Request: Enable using the 'c' unit with the "MinWindowSize" and "MaxWindowSize" styles [\#145](fvwmorg/fvwm3#145)
- Allow per monitor EdgeCommand and EdgeLeaveCommand [\#582](fvwmorg/fvwm3#582) ([somiaj](https://github.com/somiaj))
- expand: add prev\_{desk,pagex,pagey} [\#579](fvwmorg/fvwm3#579) ([ThomasAdam](https://github.com/ThomasAdam))
- Improve translations [\#568](fvwmorg/fvwm3#568) ([somiaj](https://github.com/somiaj))
- Cleanup SetRCDefaults\(\) [\#567](fvwmorg/fvwm3#567) ([somiaj](https://github.com/somiaj))
- Add local configuration file to the default-config. [\#557](fvwmorg/fvwm3#557) ([somiaj](https://github.com/somiaj))
- Add icon for Run Command. [\#552](fvwmorg/fvwm3#552) ([somiaj](https://github.com/somiaj))
- Add command: Move shuffle \[flags\] direction\(s\) [\#550](fvwmorg/fvwm3#550) ([somiaj](https://github.com/somiaj))
- expand: add desk, pagex, pagey variables [\#539](fvwmorg/fvwm3#539) ([ThomasAdam](https://github.com/ThomasAdam))
- Add a screen option to the Scroll command. [\#531](fvwmorg/fvwm3#531) ([ThomasAdam](https://github.com/ThomasAdam))
- RandR: support RandRFunc for screen changes [\#525](fvwmorg/fvwm3#525) ([ThomasAdam](https://github.com/ThomasAdam))

**Fixed bugs:**

- Pager do not show smalls windows in the correct place when snapped to the edge [\#541](fvwmorg/fvwm3#541)
- EwmhBaseStruts glitch when using screen with different resolutions [\#66](fvwmorg/fvwm3#66)
- Fvwm segfaults parsing module configuration [\#575](fvwmorg/fvwm3#575)
- Swallowing FvwmPager inside FvwmButtons breaks resizing FvwmButtons when aspect ratio resizing is used [\#573](fvwmorg/fvwm3#573)
- Move X Y Warp doesn't move pointer to window. [\#551](fvwmorg/fvwm3#551)
- Maximize fullscreen command does not clear \_NET\_WM\_STATE\_FULLSCREEN when exiting fullscreen [\#545](fvwmorg/fvwm3#545)
- EdgeLeaveCommand don't work or need a page change to work [\#543](fvwmorg/fvwm3#543)
- FvwmPager Icon view fix background color. [\#537](fvwmorg/fvwm3#537)
- FvwmPager with bad aspect ratio on dual-head display [\#522](fvwmorg/fvwm3#522)
- AnimatedMove [\#513](fvwmorg/fvwm3#513)
- Spelling errors found by lintian. [\#511](fvwmorg/fvwm3#511)
- SnapAttraction: take into account individual monitors [\#466](fvwmorg/fvwm3#466)
- FvwmPager not taking into account global screen dimensions when configured with DeskTopScale [\#223](fvwmorg/fvwm3#223)
- FvwmPager: moving windows inside FvwmPager is inconsistent [\#198](fvwmorg/fvwm3#198)
- Add force\_icons\_size kludge to .stalonetrayrc. [\#581](fvwmorg/fvwm3#581) ([somiaj](https://github.com/somiaj))
- Fix pass through binding logic. [\#570](fvwmorg/fvwm3#570) ([somiaj](https://github.com/somiaj))
- Make default-config greyed colorset grey. [\#566](fvwmorg/fvwm3#566) ([somiaj](https://github.com/somiaj))
- Cleanup FvwmScript manual page. [\#565](fvwmorg/fvwm3#565) ([somiaj](https://github.com/somiaj))
- GNOME: remove DO\_IGNORE\_GNOME\_HINTS [\#556](fvwmorg/fvwm3#556) ([lgsobalvarro](https://github.com/lgsobalvarro))
- Unmaximize: restore \_NET\_WM\_STATE [\#546](fvwmorg/fvwm3#546) ([ThomasAdam](https://github.com/ThomasAdam))
- Fix compiler warnings in modules/FvwmScript/Instructions.c [\#544](fvwmorg/fvwm3#544) ([pm215](https://github.com/pm215))
- Rework FvwmPager to move windows easier [\#536](fvwmorg/fvwm3#536) ([ThomasAdam](https://github.com/ThomasAdam))
- Move: disable working area when screen given [\#535](fvwmorg/fvwm3#535) ([ThomasAdam](https://github.com/ThomasAdam))
- Make RightPanel use primary monitor dimensions. [\#530](fvwmorg/fvwm3#530) ([somiaj](https://github.com/somiaj))
- Set base struts only for primary monitor in default-config. [\#528](fvwmorg/fvwm3#528) ([somiaj](https://github.com/somiaj))
- Change FvwmPager Logic for initial window size. [\#527](fvwmorg/fvwm3#527) ([somiaj](https://github.com/somiaj))
- EWMH\_GetWorkArea use monitor dimensions. [\#526](fvwmorg/fvwm3#526) ([somiaj](https://github.com/somiaj))
- Make SnapAttraction snap to edges of all monitors. [\#521](fvwmorg/fvwm3#521) ([somiaj](https://github.com/somiaj))
- Update FvwmCommand to allow multiple args. [\#514](fvwmorg/fvwm3#514) ([somiaj](https://github.com/somiaj))

**Merged pull requests:**

- Extend FvwmIconMan Resolution configuration. [\#561](fvwmorg/fvwm3#561) ([somiaj](https://github.com/somiaj))
- Allow Min/Max WindowSize style to use client size [\#560](fvwmorg/fvwm3#560) ([somiaj](https://github.com/somiaj))
- Add more columns to default-config menu ItemFormat. [\#559](fvwmorg/fvwm3#559) ([somiaj](https://github.com/somiaj))
- Fix broken link. [\#529](fvwmorg/fvwm3#529) ([somiaj](https://github.com/somiaj))
- Spelling error fixes. [\#512](fvwmorg/fvwm3#512) ([somiaj](https://github.com/somiaj))
- Working on 1.0.4 [\#509](fvwmorg/fvwm3#509) ([ThomasAdam](https://github.com/ThomasAdam))
- module expand: don't overwrite previous expansion [\#576](fvwmorg/fvwm3#576) ([ThomasAdam](https://github.com/ThomasAdam))
- conditional: fix whitespace/comma parsing [\#572](fvwmorg/fvwm3#572) ([ThomasAdam](https://github.com/ThomasAdam))
- Configure a colorset for XDGMenu options. [\#564](fvwmorg/fvwm3#564) ([somiaj](https://github.com/somiaj))
- Menu: add option to grey entries out [\#563](fvwmorg/fvwm3#563) ([ThomasAdam](https://github.com/ThomasAdam))
- Remove \*FvwmPager: Label configuration option. [\#562](fvwmorg/fvwm3#562) ([somiaj](https://github.com/somiaj))
- move: Warp: move pointer to centre of window [\#553](fvwmorg/fvwm3#553) ([ThomasAdam](https://github.com/ThomasAdam))
- FvwmPager: Improvments with dealing with tiny windows on tiny pagers. [\#548](fvwmorg/fvwm3#548) ([somiaj](https://github.com/somiaj))
- PanFrame improvements [\#547](fvwmorg/fvwm3#547) ([ThomasAdam](https://github.com/ThomasAdam))
- pager: teach Icon view about colorsets [\#538](fvwmorg/fvwm3#538) ([ThomasAdam](https://github.com/ThomasAdam))
- placement: fix mouse positioning [\#533](fvwmorg/fvwm3#533) ([ThomasAdam](https://github.com/ThomasAdam))
- EdgeScroll: a few improvements [\#524](fvwmorg/fvwm3#524) ([ThomasAdam](https://github.com/ThomasAdam))
- Update manual for Echo/EchoFuncDefinition [\#520](fvwmorg/fvwm3#520) ([somiaj](https://github.com/somiaj))
- release: remove dev-docs from release tarball [\#518](fvwmorg/fvwm3#518) ([ThomasAdam](https://github.com/ThomasAdam))
- configure: remove stale references to BUGADDR [\#517](fvwmorg/fvwm3#517) ([ThomasAdam](https://github.com/ThomasAdam))
- Configuration tweaks [\#516](fvwmorg/fvwm3#516) ([ThomasAdam](https://github.com/ThomasAdam))
- build: add CHANGELOG.md to dist [\#510](fvwmorg/fvwm3#510) ([ThomasAdam](https://github.com/ThomasAdam))
@ThomasAdam ThomasAdam moved this to Done in FVWM3 Sep 18, 2022
@ThomasAdam ThomasAdam added this to FVWM3 Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy Issue is suitable for new fvwm developer help wanted Development help required (see `difficulty:*`) type:enhancement Augmenting an existing feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants