
hammerspoon

local function moveChatGPT() local targetFrame = hs.application.applicationsForBundleID("ru.keepcoder.Telegram")[1]:focusedWindow():frame() local gpt = hs.application.applicationsForBundleID("com.openai.chat")[1]:allWindows()[1] targetFrame.y = targetFrame.y + targetFrame.h targetFrame.h = targetFrame.h / 2 gpt:setFrame(targetFrame) end local telegramWindowFilter = hs.window.filter.new(false):setAppFilter('Telegram') telegramWindowFilter:subscribe(hs.window.filter.windowMoved, moveChatGPT) 1 onsdriver OP 这个需求还是太怪了吗 |
2 chenxuuu 2024-09-02 13:01:06 +08:00 |
3 onsdriver OP @chenxuuu 好像不支持 MacOS > AquaSnap is compatible with all Windows versions, from Windows 7 to Windows 11, with true 64-bit support. We will do our absolute best to support all future Windows versions. |
5 onsdriver OP 没找到什么靠谱的替代啊,AquaSnap 真是完美符合我所有的需求,但是不支持 MacOS 继续蹲,走过路过的朋友支支招 |
6 chenxuuu 2024-09-04 10:33:30 +08:00 如果是固定的几个软件,你用 hammerspoon 写个脚本就好了吧 |
7 q534 2024-09-05 11:15:01 +08:00 好怪,好爱,等一个方案 |
8 onsdriver OP 已经使用 hammerspoon 解决,虽然不是很丝滑但也足矣!! 效果: ![]() 代码: ```lua local function moveChatGPT() local targetFrame = hs.application.applicationsForBundleID("ru.keepcoder.Telegram")[1]:focusedWindow():frame() local gpt = hs.application.applicationsForBundleID("com.openai.chat")[1]:allWindows()[1] targetFrame.y = targetFrame.y + targetFrame.h targetFrame.h = targetFrame.h / 2 gpt:setFrame(targetFrame) end local telegramWindowFilter = hs.window.filter.new(false):setAppFilter('Telegram') telegramWindowFilter:subscribe(hs.window.filter.windowMoved, moveChatGPT) ``` @q534 可以参考我的 @chenxuuu 感谢指路 |
9 rukeypei 2024-09-11 15:12:41 +08:00 想不到还有这个需求跟脚本 |