This commit is contained in:
Nihaal Sharma committed 2026-10-06 10:06:37 +01:00
1 parent b35932488b
commit 42173d056c
9 files changed
+860 -170

No files matched your search

+15 -9
View File
@@ -1,6 +1,6 @@
//
// GooseWindow.swift
// DesktopGoose2
// DesktopDuck
//
// Created by neon443 on 11/09/2025.
//
@@ -10,29 +10,30 @@ import Cocoa
class GooseWindow {
private var window: NSWindow
private var duck: NSImageView
private var angle: CGFloat = 90
var shown: Bool = false
private var x = 1
private var time: Timer?
init() {
self.window = NSWindow(
contentRect: CGRect(
x: 0,
y: 0,
width: NSScreen.main!.frame.width,
height: NSScreen.main!.frame.width
),
contentRect: CGRect(x: 0, y: 0, width: NSScreen.main!.frame.width, height: NSScreen.main!.frame.width),
styleMask: .borderless,
backing: .buffered,
defer: false
)
window.backgroundColor = .init(srgbRed: 1, green: 1, blue: 1, alpha: 0.1)
window.contentView = NSImageView()
window.isOpaque = false
window.level = NSWindow.Level.screenSaver + 1
window.ignoresMouseEvents = true
window.hasShadow = false
window.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces.union(.canJoinAllApplications).union(.stationary)
window.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllApplications.union(.stationary)
duck = .init(image: NSImage(named: "pond")!)
window.contentView?.addSubview(duck)
duck.frame.origin.x = NSScreen.main!.frame.width/2
duck.frame.origin.y = NSScreen.main!.frame.height/2
showHide()
}
@@ -44,4 +45,9 @@ class GooseWindow {
window.orderFront(nil)
}
}
func setup() {
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.