Skip to content

Commit

Permalink
deploy: 19f3806
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 16, 2024
1 parent f7094f8 commit dca1a31
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 22 deletions.
4 changes: 2 additions & 2 deletions catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@
"published": 1725643905000,
"rating": 10,
"ratingUsers": 21,
"updated": 1725779296000,
"updated": 1731764371000,
"users": 1004
},
"metadata": {
Expand All @@ -2106,7 +2106,7 @@
],
"name": "Customize Windows notifications placement",
"twitter": "https://twitter.com/m417z",
"version": "1.0.1"
"version": "1.0.2"
}
},
"old-this-pc-commands": {
Expand Down
4 changes: 4 additions & 0 deletions changelogs/notifications-placement.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2 ([Nov 16, 2024](https://github.com/ramensoftware/windhawk-mods/blob/19f3806e71b16183c5217ec05500791bbd400896/mods/notifications-placement.wh.cpp))

* Add an option to show notifications on the monitor where the mouse cursor is located.

## 1.0.1 ([Sep 8, 2024](https://github.com/ramensoftware/windhawk-mods/blob/2914b84cba2528701e51fcb904fe379e9bfd982d/mods/notifications-placement.wh.cpp))

* The mod was tested on Windows 10 and was found to be working correctly. The mod name and description were updated accordingly.
Expand Down
20 changes: 15 additions & 5 deletions mods/notifications-placement.wh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @id notifications-placement
// @name Customize Windows notifications placement
// @description Move notifications to another monitor or another corner of the screen
// @version 1.0.1
// @version 1.0.2
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
Expand Down Expand Up @@ -38,7 +38,8 @@ Only Windows 10 64-bit and Windows 11 are supported.
- monitor: 1
$name: Monitor
$description: >-
The monitor number that notifications will appear on
The monitor number that notifications will appear on, set to zero to use the
monitor where the mouse cursor is located
- horizontalPlacement: right
$name: Horizontal placement on the screen
$options:
Expand Down Expand Up @@ -271,9 +272,18 @@ void AdjustCoreWindowPos(int* x, int* y, int* cx, int* cy) {
return;
}

HMONITOR destMonitor = !g_unloading && g_settings.monitor >= 1
? GetMonitorById(g_settings.monitor - 1)
: nullptr;
HMONITOR destMonitor = nullptr;

if (!g_unloading) {
if (g_settings.monitor == 0) {
POINT pt;
GetCursorPos(&pt);
destMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);
} else if (g_settings.monitor >= 1) {
destMonitor = GetMonitorById(g_settings.monitor - 1);
}
}

if (!destMonitor) {
destMonitor = primaryMonitor;
}
Expand Down
29 changes: 14 additions & 15 deletions updates.atom
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://windhawk.net/</id>
<title>Windhawk Mod Updates</title>
<updated>2024-11-16T00:41:37.000Z</updated>
<updated>2024-11-16T13:39:31.000Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<link rel="alternate" href="https://windhawk.net/"/>
<subtitle>Updates in the official collection of Windhawk mods</subtitle>
<icon>https://windhawk.net/favicon.ico</icon>
<rights>Ramen Software</rights>
<entry>
<title type="html"><![CDATA[Customize Windows notifications placement 1.0.2]]></title>
<id>https://windhawk.net/mods/notifications-placement#19f3806e71b16183c5217ec05500791bbd400896</id>
<link href="https://windhawk.net/mods/notifications-placement"/>
<updated>2024-11-16T13:39:31.000Z</updated>
<content type="html"><![CDATA[<ul>
<li>Add an option to show notifications on the monitor where the mouse cursor is located.</li>
</ul>]]></content>
<author>
<name>m417z</name>
<uri>https://github.com/m417z</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[Custom Desktop Watermark 1.0.2]]></title>
<id>https://windhawk.net/mods/custom-desktop-watermark#3205ff7547c8429f0d5b7141231a8733c18d123d</id>
Expand Down Expand Up @@ -268,20 +281,6 @@
<updated>2024-11-07T00:56:08.000Z</updated>
<content type="html"><![CDATA[<ul>
<li>Added support for Everything 1.5 alpha.</li>
</ul>]]></content>
<author>
<name>m417z</name>
<uri>https://github.com/m417z</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[Better file sizes in Explorer details 1.2]]></title>
<id>https://windhawk.net/mods/explorer-details-better-file-sizes#b789eaa75dec0f1005f0c08b8657a9901bbb910d</id>
<link href="https://windhawk.net/mods/explorer-details-better-file-sizes"/>
<updated>2024-11-06T21:11:33.000Z</updated>
<content type="html"><![CDATA[<ul>
<li>Added an option for getting folder sizes via "Everything" integration, which results in immediate folder sizes without having to calculate them manually.</li>
<li>Improved the performance of sorting folders by size.</li>
</ul>]]></content>
<author>
<name>m417z</name>
Expand Down

0 comments on commit dca1a31

Please sign in to comment.