mirror of
https://codeberg.org/ProgramSnail/config.git
synced 2026-01-11 14:07:17 +00:00
add dotfiles (including kitty & alacritty themes), add proxies, add writing & haskell roles
This commit is contained in:
parent
46bdf4dda0
commit
6561d54f45
346 changed files with 15329 additions and 0 deletions
20
roles/dotfiles/files/.config/kitty/kitty-themes/.tools/windowid.swift
Executable file
20
roles/dotfiles/files/.config/kitty/kitty-themes/.tools/windowid.swift
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/swift
|
||||
import Foundation
|
||||
import Cocoa
|
||||
import CoreGraphics.CGWindow
|
||||
|
||||
let windows : NSArray = CGWindowListCopyWindowInfo(CGWindowListOption.excludeDesktopElements, kCGNullWindowID)! as NSArray
|
||||
|
||||
let search_for_app = CommandLine.arguments[1]
|
||||
let search_for_win = CommandLine.arguments[2]
|
||||
|
||||
for window in windows {
|
||||
let window = window as! NSDictionary
|
||||
|
||||
let app_name = window[kCGWindowOwnerName] as! String
|
||||
let window_name = window[kCGWindowName] as? String
|
||||
|
||||
if app_name == search_for_app && window_name == search_for_win {
|
||||
print("\(window[kCGWindowNumber]!)")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue