Skip to content

Commit 0b6287f

Browse files
authored
feat: implement intelligent auto-hide for dock with updated settings and translations (#73)
1 parent 1cf4d47 commit 0b6287f

8 files changed

Lines changed: 42 additions & 39 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Aurora is split into independent modules, so you can enable only what you want.
1616

1717
### Dock & Panel
1818

19-
- **Dock** - replaces the stock dash with a smart per-monitor dock with intellihide, edge reveal, optional always-visible mode, Trash, and removable drive shortcuts.
19+
- **Dock** - replaces the stock dash with a per-monitor dock that always auto-hides by default, with optional intellihide and always-visible modes, edge reveal, Trash, and removable drive shortcuts.
2020
- **Aurora Menu** - adds an Aurora panel menu with recent items, useful shortcuts, configurable panel icon, optional Activities button hiding, and a custom command slot.
2121
- **Volume Mixer** - adds per-application volume sliders to Quick Settings with fast access to Sound Settings.
2222
- **Low Battery Percentage** - uses GNOME's native battery percentage setting while the battery is discharging below 20%, without overriding users who already enabled it.

data/po/pt_BR.po

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: aurora-shell\n"
88
"Report-Msgid-Bugs-To: https://github.com/luminusOS/aurora-shell/issues\n"
9-
"POT-Creation-Date: 2026-07-15 17:04-0300\n"
9+
"POT-Creation-Date: 2026-07-15 21:17-0300\n"
1010
"PO-Revision-Date: 2026-03-09 18:00-0300\n"
1111
"Last-Translator: Aurora Shell Contributors\n"
1212
"Language-Team: Portuguese (Brazil)\n"
@@ -179,12 +179,12 @@ msgstr ""
179179
"Mantém o dock sempre visível e reduz as janelas para que nunca o sobreponham"
180180

181181
#: dist/dock/dock.manifest.js:19
182-
msgid "Always Auto-Hide Dock"
183-
msgstr "Sempre ocultar dock automaticamente"
182+
msgid "Intelligent Auto-Hide Dock"
183+
msgstr "Ocultação inteligente do dock"
184184

185185
#: dist/dock/dock.manifest.js:20
186-
msgid "Keep the dock hidden until the pointer reaches the screen edge"
187-
msgstr "Mantém o dock oculto até o ponteiro alcançar a borda da tela"
186+
msgid "Keep the dock visible until a window overlaps it"
187+
msgstr "Mantém o dock visível até que uma janela sobreponha seu espaço"
188188

189189
#: dist/dock/dock.manifest.js:25
190190
msgid "Show Dock on All Monitors"
@@ -736,6 +736,9 @@ msgstr "Alternador de Tema"
736736
msgid "Monitors and synchronizes GNOME color scheme"
737737
msgstr "Monitora e sincroniza o esquema de cores do GNOME"
738738

739+
#~ msgid "Keep the dock hidden until the pointer reaches the screen edge"
740+
#~ msgstr "Mantém o dock oculto até o ponteiro alcançar a borda da tela"
741+
739742
#~ msgid "When disabled, show the dock only on the primary monitor"
740743
#~ msgstr "Quando desativado, mostra o dock somente no monitor principal"
741744

data/schemas/org.gnome.shell.extensions.aurora-shell.gschema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@
7676
<summary>Always show dock</summary>
7777
<description>Keep the dock permanently visible and reserve screen space so windows never overlap it</description>
7878
</key>
79-
<key name="dock-always-autohide" type="b">
79+
<key name="dock-intellihide" type="b">
8080
<default>false</default>
81-
<summary>Always auto-hide dock</summary>
82-
<description>Keep the dock hidden until the pointer reaches the screen edge, regardless of window overlap</description>
81+
<summary>Use intelligent dock auto-hide</summary>
82+
<description>Keep the dock visible until a window overlaps its screen space</description>
8383
</key>
8484
<key name="dock-show-on-all-monitors" type="b">
8585
<default>false</default>

src/dev/dockDevTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class DockDevTool {
3030
createDevToolSummary(
3131
this.iconName,
3232
dock
33-
? `Bindings: ${dock.bindings.length} · Always-show: ${dock.alwaysShow ? 'on' : 'off'} · Always-autohide: ${dock.alwaysAutoHide ? 'on' : 'off'}`
33+
? `Bindings: ${dock.bindings.length} · Always-show: ${dock.alwaysShow ? 'on' : 'off'} · Intellihide: ${dock.intellihideEnabled ? 'on' : 'off'}`
3434
: 'Dock disabled',
3535
),
3636
);

src/dock/dock.manifest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const manifest: ModuleManifest = {
1515
type: 'switch',
1616
},
1717
{
18-
key: 'dock-always-autohide',
19-
title: _('Always Auto-Hide Dock'),
20-
subtitle: _('Keep the dock hidden until the pointer reaches the screen edge'),
18+
key: 'dock-intellihide',
19+
title: _('Intelligent Auto-Hide Dock'),
20+
subtitle: _('Keep the dock visible until a window overlaps it'),
2121
type: 'switch',
2222
},
2323
{

src/dock/dock.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Dock extends Module {
3838
private _pendingRebuild = false;
3939
private _dockSettings: any = null;
4040
private _alwaysShow = false;
41-
private _alwaysAutoHide = false;
41+
private _intellihideEnabled = false;
4242
private _showOnAllMonitors = false;
4343
private _showTrash = true;
4444
private _showExternalStorage = true;
@@ -51,17 +51,17 @@ export class Dock extends Module {
5151
this._lifecycle = new LifecycleScope();
5252
this._dockSettings = this.context.settings.getRawSettings();
5353
this._alwaysShow = this._dockSettings?.get_boolean('dock-always-show') ?? false;
54-
this._alwaysAutoHide = this._dockSettings?.get_boolean('dock-always-autohide') ?? false;
55-
if (this._alwaysShow && this._alwaysAutoHide) {
56-
this._alwaysAutoHide = false;
57-
this._dockSettings?.set_boolean('dock-always-autohide', false);
54+
this._intellihideEnabled = this._dockSettings?.get_boolean('dock-intellihide') ?? false;
55+
if (this._alwaysShow && this._intellihideEnabled) {
56+
this._intellihideEnabled = false;
57+
this._dockSettings?.set_boolean('dock-intellihide', false);
5858
}
5959
this._showOnAllMonitors = this._dockSettings?.get_boolean('dock-show-on-all-monitors') ?? false;
6060
this._showTrash = this._dockSettings?.get_boolean('dock-show-trash') ?? true;
6161
this._showExternalStorage =
6262
this._dockSettings?.get_boolean('dock-show-external-storage') ?? true;
6363
logger.debug(
64-
`enable alwaysShow=${this._alwaysShow} alwaysAutoHide=${this._alwaysAutoHide} showOnAllMonitors=${this._showOnAllMonitors} showTrash=${this._showTrash} showExternalStorage=${this._showExternalStorage} monitors=${Main.layoutManager.monitors?.length ?? 0}`,
64+
`enable alwaysShow=${this._alwaysShow} intellihide=${this._intellihideEnabled} showOnAllMonitors=${this._showOnAllMonitors} showTrash=${this._showTrash} showExternalStorage=${this._showExternalStorage} monitors=${Main.layoutManager.monitors?.length ?? 0}`,
6565
{ prefix: LOG_PREFIX },
6666
);
6767

@@ -98,16 +98,16 @@ export class Dock extends Module {
9898
'changed::dock-always-show',
9999
() => {
100100
this._alwaysShow = this._dockSettings?.get_boolean('dock-always-show') ?? false;
101-
if (this._alwaysShow && this._alwaysAutoHide) {
102-
this._dockSettings?.set_boolean('dock-always-autohide', false);
101+
if (this._alwaysShow && this._intellihideEnabled) {
102+
this._dockSettings?.set_boolean('dock-intellihide', false);
103103
return;
104104
}
105105
this._rebuildBindings();
106106
},
107-
'changed::dock-always-autohide',
107+
'changed::dock-intellihide',
108108
() => {
109-
this._alwaysAutoHide = this._dockSettings?.get_boolean('dock-always-autohide') ?? false;
110-
if (this._alwaysAutoHide && this._alwaysShow) {
109+
this._intellihideEnabled = this._dockSettings?.get_boolean('dock-intellihide') ?? false;
110+
if (this._intellihideEnabled && this._alwaysShow) {
111111
this._dockSettings?.set_boolean('dock-always-show', false);
112112
return;
113113
}
@@ -155,8 +155,8 @@ export class Dock extends Module {
155155
return this.context.settings.getBoolean('dock-always-show');
156156
}
157157

158-
get alwaysAutoHide(): boolean {
159-
return this.context.settings.getBoolean('dock-always-autohide');
158+
get intellihideEnabled(): boolean {
159+
return this.context.settings.getBoolean('dock-intellihide');
160160
}
161161

162162
toggleAlwaysShow(): boolean {
@@ -252,9 +252,9 @@ export class Dock extends Module {
252252
private _createBinding(monitor: DashBounds, monitorIndex: number): ManagedDockBinding | null {
253253
const mode = this._alwaysShow
254254
? 'always-show'
255-
: this._alwaysAutoHide
256-
? 'always-autohide'
257-
: 'intellihide';
255+
: this._intellihideEnabled
256+
? 'intellihide'
257+
: 'always-autohide';
258258
// In always-show mode the strutActor must be added to uiGroup BEFORE the
259259
// container. Both are inserted via addChrome (→ uiGroup.add_child), so the
260260
// one added first sits lower in Z-order. The DnD system uses PickMode.ALL
@@ -316,7 +316,7 @@ export class Dock extends Module {
316316
} else {
317317
binding.hotArea = this._createHotArea(binding, monitor);
318318

319-
if (this._alwaysAutoHide) {
319+
if (!this._intellihideEnabled) {
320320
dash.forceAutoHide(false);
321321
this._enableHotAreaWhenDockHidden(binding);
322322
return binding;
@@ -636,11 +636,11 @@ export class Dock extends Module {
636636
this._updateWorkArea(binding);
637637
if (this._alwaysShow) {
638638
binding.dash.blockAutoHide(true);
639-
} else if (this._alwaysAutoHide) {
639+
} else if (this._intellihideEnabled) {
640+
binding.intellihide?.refresh('overview-hidden', true);
641+
} else {
640642
binding.dash.forceAutoHide(false);
641643
this._enableHotAreaWhenDockHidden(binding);
642-
} else {
643-
binding.intellihide?.refresh('overview-hidden', true);
644644
}
645645
}
646646
});

tests/shell/auroraDock.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ export async function run() {
138138
const originalShowTrash = settings.get_boolean('dock-show-trash');
139139
const originalShowExternalStorage = settings.get_boolean('dock-show-external-storage');
140140
const originalAlwaysShow = settings.get_boolean('dock-always-show');
141-
const originalAlwaysAutoHide = settings.get_boolean('dock-always-autohide');
141+
const originalIntellihide = settings.get_boolean('dock-intellihide');
142142
const originalShowOnAllMonitors = settings.get_boolean('dock-show-on-all-monitors');
143143
settings.set_boolean('dock-show-trash', true);
144144
settings.set_boolean('dock-show-external-storage', false);
145145
settings.set_boolean('dock-always-show', false);
146-
settings.set_boolean('dock-always-autohide', false);
146+
settings.set_boolean('dock-intellihide', true);
147147
settings.set_boolean('dock-show-on-all-monitors', false);
148148

149149
await Scripting.waitLeisure();
@@ -754,7 +754,7 @@ export async function run() {
754754

755755
// Always auto-hide must bypass intellihide completely: with no overlap
756756
// decision involved, it starts hidden and only appears through the hot area.
757-
settings.set_boolean('dock-always-autohide', true);
757+
settings.set_boolean('dock-intellihide', false);
758758
await Scripting.waitLeisure();
759759
await Scripting.sleep(400);
760760
const alwaysAutoHideBinding = dock.bindings.find(
@@ -804,7 +804,7 @@ export async function run() {
804804
settings.set_boolean('dock-show-trash', originalShowTrash);
805805
settings.set_boolean('dock-show-external-storage', originalShowExternalStorage);
806806
settings.set_boolean('dock-always-show', originalAlwaysShow);
807-
settings.set_boolean('dock-always-autohide', originalAlwaysAutoHide);
807+
settings.set_boolean('dock-intellihide', originalIntellihide);
808808
settings.set_boolean('dock-show-on-all-monitors', originalShowOnAllMonitors);
809809
settings.set_boolean('module-dock', originalValue);
810810
await Scripting.waitLeisure();

tests/unit/schema.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,6 @@ test('schema — Dock defaults to the primary monitor only', () => {
229229
assert.equal(schemaDefault('dock-show-on-all-monitors'), 'false');
230230
});
231231

232-
test('schema — Dock always auto-hide is disabled by default', () => {
233-
assert.equal(schemaDefault('dock-always-autohide'), 'false');
232+
test('schema — Dock uses always auto-hide by default', () => {
233+
assert.equal(schemaDefault('dock-intellihide'), 'false');
234234
});

0 commit comments

Comments
 (0)