Skip to content

Add 2-in-1-tools plugin#907

Open
luna-araujo wants to merge 2 commits into
noctalia-dev:mainfrom
luna-araujo:add-2-in-1-tools
Open

Add 2-in-1-tools plugin#907
luna-araujo wants to merge 2 commits into
noctalia-dev:mainfrom
luna-araujo:add-2-in-1-tools

Conversation

@luna-araujo

Copy link
Copy Markdown

Summary

  • Add the 2-in-1-tools plugin for display rotation controls on Niri and Hyprland
  • Include bar and Control Center widgets, settings UI, tablet-mode automation, and Hyprland touchscreen transform sync
  • Add the required 960x540 preview image

Validation

  • Tested locally in Noctalia Shell on Hyprland
  • Verified tablet-mode detection via Hyprland socket/state-file watcher and fallback polling
  • Verified auto-rotate starts/stops and restores display rotation to normal when leaving tablet mode
  • Ran registry generation locally and confirmed the plugin is discovered; registry.json is intentionally not included

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Automatic Code Quality Review


File: 2-in-1-tools/Settings.qml

  • (H) Line 47: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+            label: "Bar icon"
  • (H) Line 48: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+            description: "Tabler icon name used for the bar widget."
  • (H) Line 72: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+            text: "Browse Library"
  • (H) Line 79: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Show transform in tooltip"
  • (H) Line 80: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Include the current rotation state in the bar widget tooltip."
  • (H) Line 90: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Show success toast"
  • (H) Line 91: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Display a toast after a rotation command succeeds."
  • (H) Line 101: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Auto-switch bar density in tablet mode"
  • (H) Line 102: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "When tablet mode is active, switch Noctalia's bar density automatically."
  • (H) Line 112: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Use exclusive dock in tablet mode"
  • (H) Line 113: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "When tablet mode is active, enable the Noctalia dock if needed and switch it to exclusive mode."
  • (H) Line 123: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Auto-rotate screen in tablet mode"
  • (H) Line 124: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Use monitor-sensor while tablet mode is active to rotate the internal display automatically."
  • (H) Line 135: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Allow auto-rotate outside tablet mode"
  • (H) Line 136: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Keep sensor-based auto-rotation available even when tablet mode is not active."
  • (H) Line 146: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Hyprland: sync touchscreen transform"
  • (H) Line 147: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "After rotating a display on Hyprland, also rotate mapped touchscreen coordinates for matching touch devices."
  • (H) Line 157: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Bar and Control Center button behavior"
  • (H) Line 158: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Choose whether the main button toggles auto-rotate lock or rotates the display manually."
  • (H) Line 170: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Auto-rotate requires iio-sensor-proxy"
  • (H) Line 171: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Install iio-sensor-proxy so monitor-sensor and the sensor service are available for tablet-mode rotation."
  • (H) Line 177: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Flip vertical sensor orientation"
  • (H) Line 178: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Swap left-up and right-up auto-rotate behavior for laptops whose sensor reports the portrait directions inverted."
  • (H) Line 189: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        label: "Tablet mode bar density"
  • (H) Line 190: Use translations instead of hardcoded text. Instead of: "Example Label". To: pluginApi?.tr("panel.example-label")
+        description: "Choose the Noctalia bar density to apply while tablet mode is active."

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