Skip to content

Feat(bar): add a toggle for exclusion zone#2066

Merged
ItsLemmy merged 10 commits intonoctalia-dev:mainfrom
SpeakingPNG:feat/configurable-exclusion-zone
Mar 11, 2026
Merged

Feat(bar): add a toggle for exclusion zone#2066
ItsLemmy merged 10 commits intonoctalia-dev:mainfrom
SpeakingPNG:feat/configurable-exclusion-zone

Conversation

@SpeakingPNG
Copy link
Copy Markdown
Contributor

@SpeakingPNG SpeakingPNG commented Mar 4, 2026

Pull Request

Add a toggle to be able to manually configure the 1px exclusion zone bleed. No translation, but could be added if needed.

Motivation

Currently, BarExclusionZone.qml hardcodes a 1 physical pixel reduction (bleedInset) to the bar's reserved space. This hardcoded approach does not work simultaneously for both Niri and hyprland. To fix this conflict, this PR makes the exclusion zone offset configurable, allowing users to change the bleed behavior on the fly depending on their compositor and gap preferences.

Type of Change

Mark the relevant option with an "x".

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring

Related Issue

Testing

  • Tested on niri
  • Tested on Hyprland
  • Tested on sway
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors (if applicable)

Screenshots / Videos

Menu

Screenshot from 2026-03-04 15-56-17

With the option turned off

Screenshot from 2026-03-04 15-54-49

With the option turned on

Screenshot from 2026-03-04 15-53-57

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • No new warnings or errors
  • Documentation or comments updated (if relevant)

Additional Notes

It's not a complete fix, as in niri with gaps (e.g. 4) and the setting turned off (enableExclusionZoneInset is false) there is still 1 extra pixel visible. It does seem like a niri issue though.

When scrolling left

Screenshot from 2026-03-04 16-07-18

When scrolling right

Screenshot from 2026-03-04 16-07-39

Copilot AI review requested due to automatic review settings March 4, 2026 15:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a user-facing toggle to control whether the bar’s Wayland exclusion zone is reduced by 1 physical pixel (to influence window “bleed” under the bar), addressing compositor-specific behavior differences (e.g., Niri vs Hyprland).

Changes:

  • Add a new bar.exclusionZoneOffset boolean setting with defaults.
  • Expose the setting as an NToggle in the Bar → Appearance settings UI and include it in settings search indexing.
  • Update BarExclusionZone.qml to apply a 0px/1px (physical) inset based on the toggle and display scale.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml Adds a new toggle in the Bar Appearance settings for the exclusion zone inset behavior.
Modules/MainScreen/BarExclusionZone.qml Makes the 1-physical-pixel exclusion zone inset conditional on the new setting.
Commons/Settings.qml Introduces the new bar.exclusionZoneOffset setting in the settings adapter.
Assets/settings-search-index.json Adds the new toggle’s label/description keys to the settings search index.
Assets/settings-default.json Defines the new setting’s default value in shipped defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml Outdated
Comment thread Assets/settings-search-index.json Outdated
Comment thread Commons/Settings.qml Outdated
Comment thread Commons/Settings.qml Outdated
Comment thread Assets/settings-default.json Outdated
Comment thread Modules/MainScreen/BarExclusionZone.qml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml Outdated
Comment thread Assets/Translations/en.json Outdated
@ItsLemmy ItsLemmy merged commit 6eacb55 into noctalia-dev:main Mar 11, 2026
@SpeakingPNG SpeakingPNG deleted the feat/configurable-exclusion-zone branch March 11, 2026 16:10
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.

3 participants