Skip to content

Commit

Permalink
Initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaTaf committed Jan 1, 2018
0 parents commit dfb3be0
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions HomeGesture.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.springboard" ); }; }
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include $(THEOS)/makefiles/common.mk

TWEAK_NAME = HomeGesture
HomeGesture_FILES = Tweak.xm

include $(THEOS_MAKE_PATH)/tweak.mk

after-install::
install.exec "killall -9 SpringBoard"
50 changes: 50 additions & 0 deletions Tweak.xm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
long _dismissalSlidingMode = 0;

// Enable home gestures
%hook BSPlatform
- (NSInteger)homeButtonType {
return 2;
}
%end

// Hide home bar
%hook MTLumaDodgePillView
- (id)initWithFrame:(struct CGRect)arg1 {
return NULL;
}
%end

// Workaround for TouchID respring bug
%hook SBCoverSheetSlidingViewController
- (void)_finishTransitionToPresented:(_Bool)arg1 animated:(_Bool)arg2 withCompletion:(id)arg3 {
if ((_dismissalSlidingMode != 1) && (arg1 == 0)) {
return;
} else {
%orig;
}
}
- (long long)dismissalSlidingMode {
_dismissalSlidingMode = %orig;
return %orig;
}
%end

// Remove carrier text
%hook UIStatusBarServiceItemView
- (id)_serviceContentsImage {
return nil;
}
- (CGFloat)extraRightPadding {
return 0.0f;
}
- (CGFloat)standardPadding {
return 2.0f;
}
%end

// Workaround for status bar transition bug
%hook CCUIOverlayStatusBarPresentationProvider
- (void)_addHeaderContentTransformAnimationToBatch:(id)arg1 transitionState:(id)arg2 {
return;
}
%end
9 changes: 9 additions & 0 deletions control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: com.VitaTaf.HomeGesture
Name: HomeGesture
Depends: mobilesubstrate
Version: 0.0.1
Architecture: iphoneos-arm
Description: Enable iPhone X home gesture on other devices.
Maintainer: VitaTaf
Author: VitaTaf
Section: Tweaks

0 comments on commit dfb3be0

Please sign in to comment.