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

XMonad.Hooks.ScreenCorners: Add support for edges #893

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

sylecn
Copy link
Contributor

@sylecn sylecn commented Jun 8, 2024

Description

In XMonad.Hooks.ScreenCorners, previously only corner is supported, now support for top and bottom edges is added. This is similar to Hot Edge shell extension in GNOME.

I could add support for SCLeft, SCRight too, if it's desired. I thought I'd ask for a review on this first.

Checklist

  • I've read CONTRIBUTING.md

  • I've considered how to best test these changes (property, unit,
    manually, ...) and concluded:

    I did manual test on this added feature.
    SCTop and SCBottom works. They also with with corner specifier when the corner and edge overlap.
    
  • I updated the CHANGES.md file

Copy link
Contributor

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add SCLeft and SCRight for consistency, but this is fine as is.

let w = displayWidth dpy (defaultScreen dpy) - 1
h = displayHeight dpy (defaultScreen dpy) - 1
threshold = 150
in createWindowAtWithWidth threshold (fi h) (fi $ fi w - threshold * 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in createWindowAtWithWidth threshold (fi h) (fi $ fi w - threshold * 2)
in createWindowAtWithWidth threshold (fi h) (fi w - fi threshold * 2)

Previously only corners are supported, now support for edges are added. This
is similar to Hot Edge shell extension in GNOME.
@sylecn sylecn force-pushed the add-edge-support branch from d621f71 to 95559d6 Compare June 9, 2024 02:23
@sylecn
Copy link
Contributor Author

sylecn commented Jun 9, 2024

Hi, I have added support for SCLeft and SCRight, updated the doc and commit message as well.
Code tested manually.

@geekosaur geekosaur changed the title XMonad.Hooks.ScreenCorners: Add SCTop and SCBottom to support edges XMonad.Hooks.ScreenCorners: Add support for edges Jun 9, 2024
@geekosaur geekosaur merged commit 077b4ff into xmonad:master Jun 9, 2024
20 checks passed
@geekosaur
Copy link
Contributor

Thanks!

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.

2 participants