Last active
September 12, 2016 12:45
-
-
Save planetbeing/9637899 to your computer and use it in GitHub Desktop.
Make FaceTime always on top
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lldb --attach-name FaceTime | |
expr NSArray* $windows = (NSArray*)[(NSApplication*)[NSApplication sharedApplication] windows]; | |
expr unsigned int $count = [$windows count] | |
expr -- for(unsigned int i = 0; i < $count; ++i) { [(NSWindow*)[$windows objectAtIndex:i] setLevel:5]; } | |
expr Class $window = (Class)NSClassFromString(@"NSWindow") | |
expr void* $setLevel = (void*)class_getInstanceMethod($window, @selector(setLevel:)) | |
expr void* $description = (void*)class_getMethodImplementation($window, @selector(description)) | |
call (void)method_setImplementation($setLevel, $description) | |
process detach | |
quit |
@sankalp-khare Works for me, OS X Yosemite here.
When I run this, I get this error and FaceTime freezes.
(lldb) process attach --name "FaceTime"
Process 76732 stopped
* thread #1: tid = 0x11c972, 0x00007fff837b14de libsystem_kernel.dylib`mach_msg_trap + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fff837b14de libsystem_kernel.dylib`mach_msg_trap + 10
libsystem_kernel.dylib`mach_msg_trap:
-> 0x7fff837b14de <+10>: retq
0x7fff837b14df <+11>: nop
libsystem_kernel.dylib`mach_msg_overwrite_trap:
0x7fff837b14e0 <+0>: movq %rcx, %r10
0x7fff837b14e3 <+3>: movl $0x1000020, %eax
Executable module set to "/Applications/FaceTime.app/Contents/MacOS/FaceTime".
Architecture set to: x86_64-apple-macosx.
I'm on yosemite 10.10.4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
doesn't work on Yosemite :/
ran it as a shell script on iTerm / Bash