Skip to content

Add window preview on hover with Aero Peek and configurable animations#2470

Open
dmzoneill wants to merge 4 commits intomicheleg:masterfrom
dmzoneill-forks:master
Open

Add window preview on hover with Aero Peek and configurable animations#2470
dmzoneill wants to merge 4 commits intomicheleg:masterfrom
dmzoneill-forks:master

Conversation

@dmzoneill
Copy link
Copy Markdown

Implements hover-to-preview functionality for dash-to-dock, showing window thumbnails when hovering over application icons. Includes Windows Aero Peek style transparency effect and multiple animation options.

Features:

  • Hover over dock icons to see window previews after 300ms delay
  • Click on preview thumbnails to activate windows
  • Aero Peek: hovering over a preview makes other windows transparent
  • Icon-to-icon transitions: smoothly move between dock icons
  • Auto-show preview when launching apps while hovering
  • Configurable animation styles (instant, fade, slide, scale, expand, etc.)
  • Configurable preview size scaling
  • Preview shows on hover, click still opens traditional menu

Technical implementation:

  • New setting 'show-previews-hover' to enable/disable hover previews
  • New setting 'preview-animation-style' with 7 animation options
  • WindowPreviewMenu extended with hover mode support
  • Hover mode removes menu from PopupMenuManager to prevent auto-close
  • BoxPointer made non-reactive to allow events through to dock icons
  • BoxPointer.bin remains reactive for clicking on window previews
  • windows-changed signal triggers auto-show when apps launch
  • 200ms delay ensures windows are properly sized before preview
  • Proper timeout management for smooth hover interactions

Animation styles:
0. Instant - No animation

  1. Fade - Pure opacity fade
  2. Slide - Slide from dock with fade
  3. Scale - Zoom in with scale
  4. Expand - Width/height expand (default)
  5. Dissolve - Quick fade with subtle scale
  6. CASCADE - Staggered item appearance

User experience improvements:

  • 300ms hover delay prevents accidental previews
  • Preview stays open when moving from icon to preview
  • 300ms delay before closing when mouse leaves
  • Smooth transitions between different dock icons
  • Instant feedback when launching applications

@dmzoneill
Copy link
Copy Markdown
Author

This is targetting the abondoned PR #574

@rufftruffles
Copy link
Copy Markdown

I really hope this gets implemented.

@rufftruffles
Copy link
Copy Markdown

rufftruffles commented Dec 6, 2025

@micheleg @3v1n0 please merge

@rufftruffles
Copy link
Copy Markdown

@dmzoneill I'm running your fork, there's an issue. Let's say chrome is open, i hover over it and open the chrome window, dash doesn't automatically hides, i have to go back and move mouse over somewhere else on the dock for it to happen. can you take a look?

@rufftruffles
Copy link
Copy Markdown

@dmzoneill

dock doesn't auto-hide after clicking a preview in hover mode.

Fix requires changes to 2 files:

windowPreview.js - In _createPreviewItem(), replace the activate handler:

preview.connect('activate', () => {
    Main.activateWindow(window);
    
    const topMenu = this._getTopMenu();
    if (topMenu.fromHover) {
        topMenu.cancelOpen();
        topMenu.cancelClose();
        topMenu._boxPointer.close(BoxPointer.PopupAnimation.FADE, () => {
            topMenu.actor.hide();
            topMenu.isOpen = false;
            if (topMenu._previewBox) {
                topMenu._previewBox.destroy();
                topMenu._previewBox = null;
            }
            topMenu.emit('menu-closed');
        });
    } else {
        topMenu.close();
    }
});

appIcons.js - In enableHover(), add menu-closed handler:

this._signalsHandler.addWithLabel(PREVIEW_HOVER_LABEL, [
    this._previewMenu,
    'menu-closed',
    () => {
        if (this._hoverIsEnabled && !this._previewMenu.isOpen) {
            this.emit('menu-state-changed', false);
        }
    },
]);

Please fix on your end and then update pr please.

@dmzoneill
Copy link
Copy Markdown
Author

dmzoneill commented Dec 10, 2025

@rufftruffles

Thanks for the feedback, I'm eager for this feature to be merged.. so i dont have to run a dev copy .

Please can you describe the steps clearly.

1. X
2. p
3. y

In my case:

1. i can open 2 chrome windows
2. i can hover over chrome icon in the dash
3. the window preview opens showing 2 windows
4. i can hover over one of the windows in the preview
5. i can click one of the windows and it come to the foreground
6. the preview window DOES NOT stay visible and closes as expected

if im understanding your issue, i suspect you have a conflicting setting.

Can you share the schema settings? this fix may work with your settings, may break for others.

daoneill@fedora:~/src/dash-to-dock/schemas$ gsettings --schemadir $(pwd) list-recursively org.gnome.shell.extensions.dash-to-dock
org.gnome.shell.extensions.dash-to-dock activate-single-window true
org.gnome.shell.extensions.dash-to-dock always-center-icons false
org.gnome.shell.extensions.dash-to-dock animation-time 0.20000000000000001
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-1 ['<Ctrl><Super>1']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-10 ['<Ctrl><Super>0']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-2 ['<Ctrl><Super>2']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-3 ['<Ctrl><Super>3']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-4 ['<Ctrl><Super>4']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-5 ['<Ctrl><Super>5']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-6 ['<Ctrl><Super>6']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-7 ['<Ctrl><Super>7']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-8 ['<Ctrl><Super>8']
org.gnome.shell.extensions.dash-to-dock app-ctrl-hotkey-9 ['<Ctrl><Super>9']
org.gnome.shell.extensions.dash-to-dock app-hotkey-1 ['<Super>1']
org.gnome.shell.extensions.dash-to-dock app-hotkey-10 ['<Super>0']
org.gnome.shell.extensions.dash-to-dock app-hotkey-2 ['<Super>2']
org.gnome.shell.extensions.dash-to-dock app-hotkey-3 ['<Super>3']
org.gnome.shell.extensions.dash-to-dock app-hotkey-4 ['<Super>4']
org.gnome.shell.extensions.dash-to-dock app-hotkey-5 ['<Super>5']
org.gnome.shell.extensions.dash-to-dock app-hotkey-6 ['<Super>6']
org.gnome.shell.extensions.dash-to-dock app-hotkey-7 ['<Super>7']
org.gnome.shell.extensions.dash-to-dock app-hotkey-8 ['<Super>8']
org.gnome.shell.extensions.dash-to-dock app-hotkey-9 ['<Super>9']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-1 ['<Shift><Super>1']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-10 ['<Shift><Super>0']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-2 ['<Shift><Super>2']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-3 ['<Shift><Super>3']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-4 ['<Shift><Super>4']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-5 ['<Shift><Super>5']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-6 ['<Shift><Super>6']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-7 ['<Shift><Super>7']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-8 ['<Shift><Super>8']
org.gnome.shell.extensions.dash-to-dock app-shift-hotkey-9 ['<Shift><Super>9']
org.gnome.shell.extensions.dash-to-dock application-counter-overrides-notifications true
org.gnome.shell.extensions.dash-to-dock apply-custom-theme false
org.gnome.shell.extensions.dash-to-dock apply-glossy-effect true
org.gnome.shell.extensions.dash-to-dock autohide true
org.gnome.shell.extensions.dash-to-dock autohide-in-fullscreen false
org.gnome.shell.extensions.dash-to-dock background-color '#ffffff'
org.gnome.shell.extensions.dash-to-dock background-opacity 0.80000000000000004
org.gnome.shell.extensions.dash-to-dock bolt-support true
org.gnome.shell.extensions.dash-to-dock click-action 'focus-or-previews'
org.gnome.shell.extensions.dash-to-dock custom-background-color false
org.gnome.shell.extensions.dash-to-dock custom-theme-customize-running-dots false
org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-border-color '#ffffff'
org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-border-width 0
org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-color '#ffffff'
org.gnome.shell.extensions.dash-to-dock custom-theme-shrink false
org.gnome.shell.extensions.dash-to-dock customize-alphas false
org.gnome.shell.extensions.dash-to-dock dance-urgent-applications true
org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 32
org.gnome.shell.extensions.dash-to-dock default-windows-preview-to-open false
org.gnome.shell.extensions.dash-to-dock disable-overview-on-startup false
org.gnome.shell.extensions.dash-to-dock dock-fixed true
org.gnome.shell.extensions.dash-to-dock dock-position 'BOTTOM'
org.gnome.shell.extensions.dash-to-dock extend-height false
org.gnome.shell.extensions.dash-to-dock force-straight-corner false
org.gnome.shell.extensions.dash-to-dock height-fraction 0.62
org.gnome.shell.extensions.dash-to-dock hide-delay 0.20000000000000001
org.gnome.shell.extensions.dash-to-dock hide-tooltip false
org.gnome.shell.extensions.dash-to-dock hot-keys true
org.gnome.shell.extensions.dash-to-dock hotkeys-overlay true
org.gnome.shell.extensions.dash-to-dock hotkeys-show-dock true
org.gnome.shell.extensions.dash-to-dock icon-size-fixed true
org.gnome.shell.extensions.dash-to-dock intellihide true
org.gnome.shell.extensions.dash-to-dock intellihide-mode 'FOCUS_APPLICATION_WINDOWS'
org.gnome.shell.extensions.dash-to-dock isolate-locations true
org.gnome.shell.extensions.dash-to-dock isolate-monitors true
org.gnome.shell.extensions.dash-to-dock isolate-workspaces true
org.gnome.shell.extensions.dash-to-dock manualhide false
org.gnome.shell.extensions.dash-to-dock max-alpha 0.80000000000000004
org.gnome.shell.extensions.dash-to-dock middle-click-action 'launch'
org.gnome.shell.extensions.dash-to-dock min-alpha 0.20000000000000001
org.gnome.shell.extensions.dash-to-dock minimize-shift true
org.gnome.shell.extensions.dash-to-dock multi-monitor true
org.gnome.shell.extensions.dash-to-dock preferred-monitor -2
org.gnome.shell.extensions.dash-to-dock preferred-monitor-by-connector 'eDP-1'
org.gnome.shell.extensions.dash-to-dock pressure-threshold 100.0
org.gnome.shell.extensions.dash-to-dock preview-animation-style 4
org.gnome.shell.extensions.dash-to-dock preview-size-scale 0.0
org.gnome.shell.extensions.dash-to-dock require-pressure-to-show true
org.gnome.shell.extensions.dash-to-dock running-indicator-dominant-color false
org.gnome.shell.extensions.dash-to-dock running-indicator-style 'DOT'
org.gnome.shell.extensions.dash-to-dock scroll-action 'do-nothing'
org.gnome.shell.extensions.dash-to-dock scroll-switch-workspace true
org.gnome.shell.extensions.dash-to-dock scroll-to-focused-application true
org.gnome.shell.extensions.dash-to-dock shift-click-action 'minimize'
org.gnome.shell.extensions.dash-to-dock shift-middle-click-action 'launch'
org.gnome.shell.extensions.dash-to-dock shortcut ['<Super>q']
org.gnome.shell.extensions.dash-to-dock shortcut-text '<Super>q'
org.gnome.shell.extensions.dash-to-dock shortcut-timeout 2.0
org.gnome.shell.extensions.dash-to-dock show-apps-always-in-the-edge true
org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
org.gnome.shell.extensions.dash-to-dock show-delay 0.25
org.gnome.shell.extensions.dash-to-dock show-dock-urgent-notify true
org.gnome.shell.extensions.dash-to-dock show-favorites true
org.gnome.shell.extensions.dash-to-dock show-icons-emblems true
org.gnome.shell.extensions.dash-to-dock show-icons-notifications-counter true
org.gnome.shell.extensions.dash-to-dock show-mounts true
org.gnome.shell.extensions.dash-to-dock show-mounts-network true
org.gnome.shell.extensions.dash-to-dock show-mounts-only-mounted true
org.gnome.shell.extensions.dash-to-dock show-previews-hover true
org.gnome.shell.extensions.dash-to-dock show-running true
org.gnome.shell.extensions.dash-to-dock show-show-apps-button true
org.gnome.shell.extensions.dash-to-dock show-trash true
org.gnome.shell.extensions.dash-to-dock show-windows-preview true
org.gnome.shell.extensions.dash-to-dock transparency-mode 'DYNAMIC'
org.gnome.shell.extensions.dash-to-dock unity-backlit-items false
org.gnome.shell.extensions.dash-to-dock workspace-agnostic-urgent-windows true

@Shobhit043
Copy link
Copy Markdown

@dmzoneill
Thanks a lot for this great work

I noticed a small issue with dock autohide behavior. When the mouse pointer moves away from the preview of the currently active window, the preview correctly disappears, but the dock does not autohide (even when autohide is enabled).

Expected behavior

Once the cursor moves from the window preview back to the window area, the dock should autohide automatically.

Proposed fix

This can be resolved by making a small change in windowPreview.js.

Modify _endHoverSession() as follows:

_endHoverSession() {
    if (!this.fromHover)
        return;

    debugLog(`[PREVIEW] Ending hover session for ${this._app.get_name()}`);

    this.fromHover = false;

    // Close preview
    if (this.isOpen) {
        this.actor.hide();
        this.isOpen = false;
    }

    if (this._previewBox) {
        this._previewBox.destroy();
        this._previewBox = null;
    }

    // Force dock autohide when mouse moves to the window
    const dockManager = Docking.DockManager;
    if (dockManager && dockManager._dock) {
        dockManager._dock._onLeave(); // triggers hide logic
    }

    this.emit('menu-closed');
}

This explicitly triggers the dock’s leave logic once the preview hover session ends, ensuring autohide works as expected.

@dmzoneill
Copy link
Copy Markdown
Author

@Shobhit043 i'm not entirely sure what version of the dock you're running.
But I believe I have incorporated your fixes into onhoverClose().
_endHoverSession() is not in my code base.
I can also confirm that the dock hides on onMouseOut.

@Shobhit043
Copy link
Copy Markdown

@Shobhit043 i'm not entirely sure what version of the dock you're running. But I believe I have incorporated your fixes into onhoverClose(). _endHoverSession() is not in my code base. I can also confirm that the dock hides on onMouseOut.

Thanks

@Noah-nbinary
Copy link
Copy Markdown

it'd be amazing if this got implemented

@Fluiding
Copy link
Copy Markdown

Fluiding commented Jan 4, 2026

I hope it gets merged!

@elmagio
Copy link
Copy Markdown

elmagio commented Jan 7, 2026

I've tested the fork on a secondary machine for a couple days, works great ! Haven't noticed any particular problems.

@dmzoneill dmzoneill closed this Feb 13, 2026
@dmzoneill dmzoneill reopened this Feb 14, 2026
@C-Prime90
Copy link
Copy Markdown

C-Prime90 commented Feb 23, 2026

@dmzoneill Works awesome, nice job, hope to see it merged soon. :)

@dmzoneill
Copy link
Copy Markdown
Author

@vanvugt @3v1n0 Anything i can do to get this moving? thanks

Implements hover-to-preview functionality for dash-to-dock, showing window
thumbnails when hovering over application icons. Includes Windows Aero Peek
style transparency effect and multiple animation options.

Features:
- Hover over dock icons to see window previews after 300ms delay
- Click on preview thumbnails to activate windows
- Aero Peek: hovering over a preview makes other windows transparent
- Icon-to-icon transitions: smoothly move between dock icons
- Auto-show preview when launching apps while hovering
- Configurable animation styles (instant, fade, slide, scale, expand, etc.)
- Configurable preview size scaling
- Preview shows on hover, click still opens traditional menu

Technical implementation:
- New setting 'show-previews-hover' to enable/disable hover previews
- New setting 'preview-animation-style' with 7 animation options
- WindowPreviewMenu extended with hover mode support
- Hover mode removes menu from PopupMenuManager to prevent auto-close
- BoxPointer made non-reactive to allow events through to dock icons
- BoxPointer.bin remains reactive for clicking on window previews
- windows-changed signal triggers auto-show when apps launch
- 200ms delay ensures windows are properly sized before preview
- Proper timeout management for smooth hover interactions

Animation styles:
0. Instant - No animation
1. Fade - Pure opacity fade
2. Slide - Slide from dock with fade
3. Scale - Zoom in with scale
4. Expand - Width/height expand (default)
5. Dissolve - Quick fade with subtle scale
6. CASCADE - Staggered item appearance

User experience improvements:
- 300ms hover delay prevents accidental previews
- Preview stays open when moving from icon to preview
- 300ms delay before closing when mouse leaves
- Smooth transitions between different dock icons
- Instant feedback when launching applications
Adds translations for the new window preview settings introduced in
commit cb0a478. Each language now includes translations for:

- "Show window previews on mouse hover"
- "Preview animation style"
- Animation options: Instant, Fade, Slide, Scale, Expand, Dissolve, Cascade

All 28 languages updated: ar, cs, de, el, es, eu, fr, gl, hu, id, it,
ja, ko, nb, nl, pl, pt, pt_BR, ru, sk, sl, sr, sr@latin, sv, tr,
uk_UA, zh_CN, zh_TW
- appIcons.js: remove unnecessary braces from single-statement if (curly)
- dash.js: add missing BoxPointer import (no-undef), rename shadowed
  variable (no-shadow)
- windowPreview.js: remove unused vars (PREVIEW_MAX_WIDTH, logFileStream,
  HOVER_LEAVE_TIMEOUT), omit unused catch binding, fix line length,
  convert non-interpolated template literals to single quotes, use
  object shorthand for delay property, remove unnecessary braces
@dmzoneill
Copy link
Copy Markdown
Author

rebased. still waiting on review @vanvugt @3v1n0 ?

@fabiocasolari
Copy link
Copy Markdown

SUPER! this is the feature i'll waiting for!

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.

8 participants