Skip to content

Commit a969c5b

Browse files
committed
The intital release!
1 parent bcdf783 commit a969c5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+593
-0
lines changed

CydiaXI Dark Mode/CydiaXIdark.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ Filter = { Bundles = ( "com.saurik.Cydia" ); }; }
8.3 KB
Binary file not shown.
9.15 KB
Binary file not shown.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<html>
2+
<head>
3+
<style>
4+
@font-face { font-family: SFMed; src: url('sf-med.otf'); }
5+
@font-face { font-family: SFDMed; src: url('sfd-med.otf'); }
6+
@font-face { font-family: SFSemi; src: url('sf-semi.otf'); }
7+
body {
8+
font-family: SFMed, sans-serif;
9+
margin-top: 40px;
10+
margin-left: 20px;
11+
margin-right: 20px;
12+
margin-bottom: 20px;
13+
background-color: #404040;
14+
}
15+
16+
h5.date {
17+
color: #96969B;
18+
margin-bottom: -25px;
19+
font-weight: 500;
20+
}
21+
22+
h1.cydia {
23+
font-size: 28pt;
24+
font-family: SFSemi, sans-serif;
25+
font-weight: 500;
26+
margin-bottom: 5px;
27+
color: #fff;
28+
}
29+
30+
div.card1 {
31+
height: 87%;
32+
background-color:#CCC;
33+
border-radius: 15px;
34+
box-shadow: 0px 5px 20px #222;
35+
background: linear-gradient(-45deg, #FF8EF0, #88B7E1);
36+
position: relative;
37+
margin-bottom: 30px;
38+
}
39+
40+
div.card2 {
41+
height: 87%;
42+
background-color:#CCC;
43+
border-radius: 15px;
44+
box-shadow: 0px 5px 20px #222;
45+
background: linear-gradient(-45deg, #7FFF8E, #7CC8FF);
46+
position: relative;
47+
margin-bottom: 30px;
48+
}
49+
50+
div.card3 {
51+
height: 87%;
52+
background-color:#CCC;
53+
border-radius: 15px;
54+
box-shadow: 0px 5px 20px #222;
55+
background: linear-gradient(-45deg, #FFAAAA, #FFB384);
56+
position: relative;
57+
margin-bottom: 30px;
58+
}
59+
img.cardimg {
60+
height: 100%;
61+
width: 100%;
62+
-o-object-fit: contain;
63+
object-fit: contain;
64+
display: block;
65+
margin-right: auto;
66+
margin-left: auto;
67+
}
68+
</style>
69+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
70+
<title>Cydia</title>
71+
</head>
72+
<body onload="getVersion()">
73+
<h5 class="date" id="demo"></h5>
74+
<h1 class="cydia">Cydia</h1>
75+
<div class="card1">
76+
<a href="cydia://package/com.macciti.lotus" target="_blank"><img src="lotusthumb.png" class="cardimg"/></a>
77+
</div>
78+
<div class="card2">
79+
<a href="cydia://package/com.laughingquoll.noctisxi" target="_blank"><img src="noctisthumb.png" class="cardimg"/></a>
80+
</div>
81+
<div class="card3">
82+
<a href="cydia://package/com.tigisoftware.filza" target="_blank"><img src="filzathumb.png" class="cardimg"/></a>
83+
</div>
84+
85+
<script>
86+
function getToday() {
87+
var d = new Date();
88+
var weekday = new Array(7);
89+
weekday[0] = "SUNDAY";
90+
weekday[1] = "MONDAY";
91+
weekday[2] = "TUESDAY";
92+
weekday[3] = "WEDNESDAY";
93+
weekday[4] = "THURSDAY";
94+
weekday[5] = "FRIDAY";
95+
weekday[6] = "SATURDAY";
96+
97+
var month = new Array();
98+
month[0] = "JANUARY";
99+
month[1] = "FEBRUARY";
100+
month[2] = "MARCH";
101+
month[3] = "APRIL";
102+
month[4] = "MAY";
103+
month[5] = "JUNE";
104+
month[6] = "JULY";
105+
month[7] = "AUGUST";
106+
month[8] = "SEPTEMBER";
107+
month[9] = "OCTOBER";
108+
month[10] = "NOVEMBER";
109+
month[11] = "DECEMBER";
110+
111+
var n1 = weekday[d.getDay()];
112+
var n2 = d.getDate();
113+
var n3 = month[d.getMonth()];
114+
document.getElementById("demo").innerHTML = n1 + " " + n2 + " " + n3;
115+
}
116+
117+
window.addEventListener("load", getToday, true);
118+
</script>
119+
</body>
120+
</html>

CydiaXI Dark Mode/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
THEOS_DEVICE_IP = xxx.xxx.xxx.xxx
2+
ARCHS = arm64
3+
include /home/EvenDev/theos/makefiles/common.mk
4+
5+
TWEAK_NAME = CydiaXIdark
6+
CydiaXIdark_FILES = Tweak.xm
7+
CydiaXIdark_FRAMEWORKS = UIKit
8+
9+
include $(THEOS_MAKE_PATH)/tweak.mk
10+
11+
after-install::
12+
install.exec "killall -9 Cydia"

CydiaXI Dark Mode/Tweak.xm

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
@interface CydiaLoadingViewController : UIViewController
2+
@end
3+
4+
%hook CydiaLoadingViewController
5+
-(void)loadView {
6+
%orig;
7+
UIView *xiView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds];
8+
xiView.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
9+
UIImageView *logo =[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Logo.png"]];
10+
logo.frame = CGRectMake([UIScreen mainScreen].bounds.size.width / 2 - 60, [UIScreen mainScreen].bounds.size.height / 2 - 90, 120, 120);
11+
logo.layer.masksToBounds = YES;
12+
logo.layer.cornerRadius = 10;
13+
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height / 2 + 60, [UIScreen mainScreen].bounds.size.width, 40)];
14+
label.text = @"Cydia";
15+
label.textAlignment = NSTextAlignmentCenter;
16+
label.textColor = [UIColor whiteColor];
17+
[label setFont:[UIFont boldSystemFontOfSize:30]];\
18+
[xiView addSubview:logo];
19+
[xiView addSubview:label];
20+
[[self view] addSubview:xiView];
21+
}
22+
%end
23+
24+
25+
@interface HomeController : UIViewController
26+
-(void)setURL:(id)URL;
27+
-(void)reloadData;
28+
@end
29+
30+
%hook HomeController
31+
#define cyHomeKitURLiPad @"/Applications/Cydia.app/CydiaXIdark.html"
32+
#define cyHomeKitURLiPhone @"/Applications/Cydia.app/CydiaXIdark.html"
33+
34+
-(id)init {
35+
self.view.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
36+
NSString* htmlString = [NSString stringWithContentsOfFile:cyHomeKitURLiPhone encoding:NSUTF8StringEncoding error:nil];
37+
[(UIWebView *)self.view loadHTMLString:htmlString baseURL:[NSURL URLWithString:cyHomeKitURLiPhone]];
38+
return self;
39+
}
40+
41+
-(UIStatusBarStyle)preferredStatusBarStyle {
42+
return UIStatusBarStyleLightContent;
43+
}
44+
%end
45+
46+
@interface PackageCell : UITableViewCell
47+
@end
48+
49+
@interface UITableViewCellContentView : UIView
50+
@end
51+
52+
@interface CyteTableViewCellContentView : UIView
53+
@end
54+
55+
extern "C" void UISetColor(CGColorRef color);
56+
%hook PackageCell
57+
- (void) setPackage:(id)package asSummary:(bool)summary {
58+
%orig;
59+
for (UITableViewCellContentView *uicell in self.subviews) {
60+
for (CyteTableViewCellContentView *cytecell in uicell.subviews) {
61+
62+
if (NSString *mode = (NSString *)[package mode]) {
63+
if ([mode isEqualToString:@"REMOVE"] || [mode isEqualToString:@"PURGE"]) {
64+
[cytecell setBackgroundColor:[UIColor colorWithRed:0.6 green:0.30 blue:0.30 alpha:0.4]];
65+
} else {
66+
[cytecell setBackgroundColor:[UIColor colorWithRed:0.30 green:0.6 blue:0.30 alpha:0.4]];
67+
}
68+
} else {
69+
[cytecell setBackgroundColor:[UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0]];
70+
}
71+
72+
}
73+
}
74+
bool commercial_ = (bool)object_getIvar(self, class_getInstanceVariable([self class], "commercial_"));
75+
NSString* name_ = (NSString *)object_getIvar(self, class_getInstanceVariable([self class], "name_"));
76+
NSString* source_ = (NSString *)object_getIvar(self, class_getInstanceVariable([self class], "source_"));
77+
NSString* description_ = (NSString *)object_getIvar(self, class_getInstanceVariable([self class], "description_"));
78+
float width([self bounds].size.width);
79+
80+
if (!commercial_) {
81+
UISetColor([UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1].CGColor);
82+
} else {
83+
UISetColor([UIColor colorWithRed:0.4 green:0.5 blue:0.9 alpha:1].CGColor);
84+
}
85+
[name_ drawAtPoint:CGPointMake(48, 8) forWidth:(width - 80) withFont:[UIFont boldSystemFontOfSize:18] lineBreakMode:NSLineBreakByTruncatingTail];
86+
if (!commercial_) {
87+
UISetColor([UIColor grayColor].CGColor);
88+
}
89+
[source_ drawAtPoint:CGPointMake(58, 29) forWidth:(width - 29) withFont:[UIFont systemFontOfSize:12] lineBreakMode:NSLineBreakByTruncatingTail];
90+
[description_ drawAtPoint:CGPointMake(12, 46) forWidth:(width - 46) withFont:[UIFont systemFontOfSize:14] lineBreakMode:NSLineBreakByTruncatingTail];
91+
}
92+
%end
93+
94+
@interface CyteTableViewCell : UIView
95+
@end
96+
97+
%hook CyteTableViewCell
98+
- (void)layoutSubviews {
99+
%orig;
100+
self.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
101+
}
102+
%end
103+
104+
%hook CyteTableViewCellContentView
105+
- (void)layoutSubviews {
106+
%orig;
107+
self.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
108+
}
109+
%end
110+
111+
%hook UITableView
112+
- (void)layoutSubviews {
113+
%orig;
114+
self.separatorColor = [UIColor colorWithRed:0.15 green:0.15 blue:0.15 alpha:1.0];
115+
}
116+
%end
117+
118+
%hook UITabBar
119+
-(void)didMoveToWindow {
120+
%orig;
121+
self.backgroundColor = [UIColor colorWithRed:0.20 green:0.20 blue:0.20 alpha:1.0];
122+
}
123+
%end
124+
125+
%hook UINavigationBar
126+
-(void)didMoveToWindow {
127+
%orig;
128+
self.backgroundColor = [UIColor colorWithRed:0.20 green:0.20 blue:0.20 alpha:1.0];
129+
}
130+
%end
131+
132+
@interface UISearchBarTextField : UIView
133+
@end
134+
135+
%hook UISearchBarTextField
136+
-(void)didMoveToWindow {
137+
%orig;
138+
self.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
139+
}
140+
%end
141+
142+
@interface UIStatusBarForegroundView : UIView
143+
@end
144+
145+
%hook UIStatusBarForegroundView
146+
-(void)didMoveToWindow {
147+
%orig;
148+
self.backgroundColor = [UIColor colorWithRed:0.20 green:0.20 blue:0.20 alpha:1.0];
149+
}
150+
%end
151+
152+
%hook UITableView
153+
-(void)didMoveToWindow {
154+
%orig;
155+
self.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
156+
}
157+
%end
158+
159+
%hook UITableViewCell
160+
-(void)didMoveToWindow {
161+
%orig;
162+
self.backgroundColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1.0];
163+
}
164+
%end
165+
166+
@interface UITableViewIndex : UIView
167+
@property (nonatomic, strong) UIColor *indexBackgroundColor;
168+
@end
169+
170+
%hook UITableViewIndex
171+
-(void)didMoveToWindow {
172+
%orig;
173+
self.indexBackgroundColor = [UIColor colorWithRed:0.19 green:0.19 blue:0.19 alpha:1.0];
174+
}
175+
%end
176+
177+
%hook UILabel
178+
-(UIColor *)textColor {
179+
return [UIColor whiteColor];
180+
}
181+
%end
182+
183+
@interface _UITableViewHeaderFooterContentView : UIView
184+
@end
185+
186+
%hook _UITableViewHeaderFooterContentView
187+
-(void)didMoveToWindow {
188+
%orig;
189+
self.backgroundColor = [UIColor colorWithRed:0.19 green:0.19 blue:0.19 alpha:1.0];
190+
}
191+
%end
192+
193+
%hook UILabel
194+
-(void)didMoveToWindow {
195+
self.textColor = [UIColor whiteColor];
196+
}
197+
%end
198+
199+
@interface _UITableViewCellSeparatorView : UIView
200+
@end
201+
202+
%hook _UITableViewCellSeparatorView
203+
-(void)didMoveToSuperview {
204+
%orig;
205+
self.backgroundColor = [UIColor colorWithRed:0.15 green:0.15 blue:0.15 alpha:1.0];
206+
}
207+
%end
208+
209+
@interface _UIBarBackground : UIView
210+
@end
211+
212+
%hook _UIBarBackground
213+
-(void)layoutSubviews {
214+
%orig;
215+
self.hidden = YES;
216+
}
217+
%end

CydiaXI Dark Mode/control

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Package: com.example.cydiaxidark
2+
Name: CydiaXI Dark Mode
3+
Depends: com.example.cydiaxi
4+
Version: 1.0
5+
Architecture: iphoneos-arm
6+
Description: My CydiaXI Dark Mode extension!
7+
Maintainer: Developer
8+
Author: Developer
9+
Section: CydiaXI
Loading
Loading
Loading

0 commit comments

Comments
 (0)