Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.
TypeScript clipboardclipboard-managerdesktop-appdrag-and-dropelectronopen-sourceproductivityproductivity-toolwindows
feat(settings): add Hover Activation toggle, tray sync, and auto-link with Fullscreen Protection
Deepender25046d3e97b6d9
diff --git a/electron/main/tray.ts b/electron/main/tray.tsindex cd6004c..61f1b48 100644--- a/electron/main/tray.ts+++ b/electron/main/tray.ts@@ -128,6 +128,19 @@ export function createTray(): Tray {rebuild()}},+ {+ label: 'Hover Trigger (open on hover)',+ type: 'checkbox',+ checked: settings.hoverActivation ?? true,+ click: (item) => {+ const next = saveSettings({+ hoverActivation: item.checked,+ suppressInFullscreen: item.checked ? true : false+ })+ pushState.settings(next)+ rebuild()+ }+ },{ type: 'separator' },{label: 'Stick to',diff --git a/electron/main/window.ts b/electron/main/window.tsindex 849b20d..27a38ab 100644--- a/electron/main/window.ts+++ b/electron/main/window.ts@@ -448,7 +448,7 @@ export function createWindow(): BrowserWindow {registerFullscreenActiveListener(() => {const settings = loadSettings()- if (settings.suppressInFullscreen) {+ if (settings.suppressInFullscreen && (settings.hoverActivation ?? true)) {if (mainWindow && !mainWindow.isDestroyed() && !mainWindow.webContents.isDestroyed()) {mainWindow.webContents.send('window:toggle', false)}diff --git a/shared/types.ts b/shared/types.tsindex 3d62174..2749a39 100644--- a/shared/types.ts+++ b/shared/types.ts@@ -160,6 +160,8 @@ export interface Settings {soundEffects?: boolean/** Last version for which the user opened/viewed the What's New changelog panel. */lastSeenChangelogVersion?: string+ /** When true, hovering cursor near edge activates the panel. When false, panel opens exclusively via Alt + C. Default: true. */+ hoverActivation?: boolean}export const DEFAULT_SETTINGS: Settings = {@@ -186,7 +188,8 @@ export const DEFAULT_SETTINGS: Settings = {triggerAlignment: 'center',showEdgeLocationHint: true,soundEffects: true,- lastSeenChangelogVersion: undefined+ lastSeenChangelogVersion: undefined,+ hoverActivation: true}diff --git a/src/components/Settings.tsx b/src/components/Settings.tsxindex dd84849..3d4854d 100644--- a/src/components/Settings.tsx+++ b/src/components/Settings.tsx@@ -277,13 +277,66 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool<div className="setting-divider" /><div className="setting-row">+ <div className="setting-info">+ <div className="setting-title">Hover Activation</div>+ <div className="setting-desc" style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: '3px 5px', marginTop: 2 }}>+ {(settings.hoverActivation ?? true) ? (+ <span>Slide open shelf when hovering cursor near screen edge</span>+ ) : (+ <>+ <span>Hover trigger paused. Use</span>+ <kbd+ style={{+ display: 'inline-flex',+ alignItems: 'center',+ padding: '1px 6px',+ fontSize: 10.5,+ fontWeight: 600,+ fontFamily: 'inherit',+ color: '#ffffff',+ background: 'rgba(255, 255, 255, 0.14)',+ border: '1px solid rgba(255, 255, 255, 0.28)',+ borderRadius: 4,+ boxShadow: '0 1px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2)',+ whiteSpace: 'nowrap',+ letterSpacing: '0.02em',+ lineHeight: '14px'+ }}+ >+ Alt + C+ </kbd>+ <span>to open.</span>+ </>+ )}+ </div>+ </div>+ <Toggle+ checked={settings.hoverActivation ?? true}+ onChange={(v) => {+ if (!v) {+ patch({ hoverActivation: false, suppressInFullscreen: false })+ } else {+ patch({ hoverActivation: true, suppressInFullscreen: true })+ }+ }}+ />+ </div>++ <div className="setting-divider" />++ <div className="setting-row" style={{ opacity: (settings.hoverActivation ?? true) ? 1 : 0.45, transition: 'opacity 0.2s ease' }}><div className="setting-info"><div className="setting-title">Fullscreen Protection</div>- <div className="setting-desc">Automatically pause edge hover while playing games or watching fullscreen videos</div>+ <div className="setting-desc">+ {(settings.hoverActivation ?? true)+ ? 'Automatically pause edge hover while playing games or watching fullscreen videos'+ : 'Disabled because Hover Activation is turned off'}+ </div></div><Toggle- checked={settings.suppressInFullscreen}- onChange={(v) => patch({ suppressInFullscreen: v })}+ checked={(settings.hoverActivation ?? true) ? settings.suppressInFullscreen : false}+ onChange={(v) => (settings.hoverActivation ?? true) && patch({ suppressInFullscreen: v })}+ disabled={!(settings.hoverActivation ?? true)}/></div>@@ -851,10 +904,12 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: boolfunction Toggle({checked,- onChange+ onChange,+ disabled}: {checked: booleanonChange: (v: boolean) => void+ disabled?: boolean}) {return (<button@@ -862,7 +917,9 @@ function Toggle({className={`setting-toggle${checked ? ' checked' : ''}`}role="switch"aria-checked={checked}+ disabled={disabled}onClick={() => {+ if (disabled) returnplayToggleSound(!checked)onChange(!checked)}}@@ -871,14 +928,15 @@ function Toggle({width: 38,height: 22,borderRadius: 999,- background: checked ? '#ffffff' : 'rgba(255, 255, 255, 0.12)',- border: checked ? '1px solid #ffffff' : '1px solid rgba(255, 255, 255, 0.18)',+ background: disabled ? 'rgba(255, 255, 255, 0.05)' : checked ? '#ffffff' : 'rgba(255, 255, 255, 0.12)',+ border: disabled ? '1px solid rgba(255, 255, 255, 0.08)' : checked ? '1px solid #ffffff' : '1px solid rgba(255, 255, 255, 0.18)',position: 'relative',- cursor: 'pointer',+ cursor: disabled ? 'not-allowed' : 'pointer',padding: 0,outline: 'none',transition: 'background 0.22s ease, border-color 0.22s ease',- boxShadow: checked ? '0 0 12px rgba(255, 255, 255, 0.25)' : 'none'+ boxShadow: !disabled && checked ? '0 0 12px rgba(255, 255, 255, 0.25)' : 'none',+ opacity: disabled ? 0.45 : 1}}><motion.spandiff --git a/src/hooks/useEdgeHover.ts b/src/hooks/useEdgeHover.tsindex c058d97..ef05e9f 100644--- a/src/hooks/useEdgeHover.ts+++ b/src/hooks/useEdgeHover.ts@@ -330,11 +330,13 @@ export function useEdgeHover(): void {edgeHintFired = false}- if (inEdgeNear && !inZone && !state.open && (state.settings.showEdgeLocationHint ?? true)) {+ const isHoverEnabled = state.settings.hoverActivation ?? true++ if (inEdgeNear && !inZone && !state.open && isHoverEnabled && (state.settings.showEdgeLocationHint ?? true)) {triggerEdgeHint()}- if (distFromRight >= -BUFFER_PX && distFromRight <= TRIGGER_PX && inZone && !state.open) {+ if (distFromRight >= -BUFFER_PX && distFromRight <= TRIGGER_PX && inZone && !state.open && isHoverEnabled) {if (state.edgeHintActive) state.setEdgeHintActive(false)cancelClose()if (dwellTimer === undefined) {@@ -390,11 +392,13 @@ export function useEdgeHover(): void {edgeHintFired = false}- if (inEdgeNear && !inZone && !state.open && (state.settings.showEdgeLocationHint ?? true)) {+ const isHoverEnabled = state.settings.hoverActivation ?? true++ if (inEdgeNear && !inZone && !state.open && isHoverEnabled && (state.settings.showEdgeLocationHint ?? true)) {triggerEdgeHint()}- if (data.x >= -BUFFER_PX && data.x <= TRIGGER_PX && inZone && !state.open) {+ if (data.x >= -BUFFER_PX && data.x <= TRIGGER_PX && inZone && !state.open && isHoverEnabled) {if (state.edgeHintActive) state.setEdgeHintActive(false)cancelClose()if (dwellTimer === undefined) {