updated readme and build
This commit is contained in:
@@ -1 +1,37 @@
|
||||
# stims
|
||||
|
||||
An Android app that keeps your screen awake while specific apps are in the foreground.
|
||||
|
||||
## What it does
|
||||
|
||||
Stims lets you select apps that should prevent your screen from turning off. When a "stimmed" app is active in the foreground, the screen stays on at full brightness. When you switch to a different app, the screen resumes normal sleep behavior.
|
||||
|
||||
---
|
||||
|
||||
# Building from source
|
||||
|
||||
**Requirements**
|
||||
|
||||
- Android Studio or the Android SDK command-line tools
|
||||
- JDK 8+
|
||||
|
||||
**Steps**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/acidburnmonkey/stims.git
|
||||
cd stims
|
||||
./gradlew assembleDebug
|
||||
```
|
||||
|
||||
The APK will be output to:
|
||||
|
||||
```
|
||||
app/build/outputs/apk/debug/stims-<version>.apk
|
||||
```
|
||||
|
||||
For a release build:
|
||||
|
||||
```bash
|
||||
./gradlew assembleRelease
|
||||
# output: app/build/outputs/apk/release/stims-<version>.apk
|
||||
```
|
||||
|
||||
@@ -26,6 +26,12 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
outputFileName = "stims-${variant.versionName}.apk"
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
|
||||
@@ -196,16 +196,12 @@ fun AppListScreen(prefs: SharedPreferences) {
|
||||
}
|
||||
|
||||
Button(
|
||||
onClick = {
|
||||
if (tempSelected.isEmpty()) {
|
||||
Toast.makeText(context, "Check some apps first!", Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
stimmedPackages.addAll(tempSelected)
|
||||
tempSelected.clear()
|
||||
// Service lifecycle is handled automatically by LaunchedEffect
|
||||
Toast.makeText(context, "Apps Stimmed!", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
onClick = {
|
||||
stimmedPackages.addAll(tempSelected)
|
||||
tempSelected.clear()
|
||||
Toast.makeText(context, "Apps Stimmed!", Toast.LENGTH_SHORT).show()
|
||||
},
|
||||
enabled = tempSelected.isNotEmpty(),
|
||||
modifier = Modifier.fillMaxWidth().padding(16.dp),
|
||||
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.primary),
|
||||
shape = MaterialTheme.shapes.medium
|
||||
|
||||
+389
@@ -0,0 +1,389 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="221.7683"
|
||||
height="373.49692"
|
||||
viewBox="0 0 221.7683 373.49692"
|
||||
role="img"
|
||||
aria-label="Cyberpunk caffeine auto-injector icon"
|
||||
version="1.1"
|
||||
id="svg24"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs13">
|
||||
<linearGradient
|
||||
id="bodyGrad"
|
||||
x1="0"
|
||||
y1="0"
|
||||
x2="1"
|
||||
y2="1">
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#24163a"
|
||||
id="stop1" />
|
||||
<stop
|
||||
offset="50%"
|
||||
stop-color="#3b2c65"
|
||||
id="stop2" />
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#0b0f1f"
|
||||
id="stop3" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="glassGrad"
|
||||
x1="183.4281"
|
||||
y1="75.396645"
|
||||
x2="441.97247"
|
||||
y2="333.94101"
|
||||
gradientTransform="scale(0.79948761,1.2508011)"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#ff9a00"
|
||||
id="stop4" />
|
||||
<stop
|
||||
offset="45%"
|
||||
stop-color="#ff5e00"
|
||||
id="stop5" />
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#ffbf3c"
|
||||
id="stop6" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="needleGrad"
|
||||
x1="260.10269"
|
||||
y1="342.12448"
|
||||
x2="350.93219"
|
||||
y2="342.12448"
|
||||
gradientTransform="scale(1.5138252,0.66057826)"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#9cfbff"
|
||||
id="stop7" />
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#00d1ff"
|
||||
id="stop8" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="ringGrad"
|
||||
x1="0"
|
||||
y1="0"
|
||||
x2="0"
|
||||
y2="1">
|
||||
<stop
|
||||
offset="0%"
|
||||
stop-color="#59f3ff"
|
||||
id="stop9" />
|
||||
<stop
|
||||
offset="100%"
|
||||
stop-color="#00a3d9"
|
||||
id="stop10" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
id="glowCyan"
|
||||
x="-0.75"
|
||||
y="-0.75"
|
||||
width="2.5"
|
||||
height="2.5">
|
||||
<feGaussianBlur
|
||||
stdDeviation="5"
|
||||
result="blur"
|
||||
id="feGaussianBlur10" />
|
||||
<feMerge
|
||||
id="feMerge11">
|
||||
<feMergeNode
|
||||
in="blur"
|
||||
id="feMergeNode10" />
|
||||
<feMergeNode
|
||||
in="SourceGraphic"
|
||||
id="feMergeNode11" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
<filter
|
||||
id="glowOrange"
|
||||
x="-0.28296598"
|
||||
y="-0.84744828"
|
||||
width="1.565932"
|
||||
height="2.6948966">
|
||||
<feGaussianBlur
|
||||
stdDeviation="7"
|
||||
result="blur"
|
||||
id="feGaussianBlur11" />
|
||||
<feMerge
|
||||
id="feMerge13">
|
||||
<feMergeNode
|
||||
in="blur"
|
||||
id="feMergeNode12" />
|
||||
<feMergeNode
|
||||
in="SourceGraphic"
|
||||
id="feMergeNode13" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
<style
|
||||
id="style13">
|
||||
.outline { stroke:#0ff7ff; stroke-opacity:.55; stroke-width:3; }
|
||||
.metal { fill:url(#bodyGrad); stroke:#7d6efc; stroke-width:3; }
|
||||
.accent { fill:#6a49ff; }
|
||||
.cyan { fill:#40f5ff; }
|
||||
.text { font-family: Arial, Helvetica, sans-serif; font-weight:700; letter-spacing:2px; }
|
||||
</style>
|
||||
<linearGradient
|
||||
xlink:href="#bodyGrad"
|
||||
id="linearGradient24"
|
||||
x1="136.72952"
|
||||
y1="127.53463"
|
||||
x2="231.78215"
|
||||
y2="222.58723"
|
||||
gradientTransform="scale(0.68383178,1.462348)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
xlink:href="#bodyGrad"
|
||||
id="linearGradient25"
|
||||
x1="134.45683"
|
||||
y1="173.42926"
|
||||
x2="334.03391"
|
||||
y2="373.00632"
|
||||
gradientTransform="scale(1.067257,0.93698147)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
xlink:href="#ringGrad"
|
||||
id="linearGradient26"
|
||||
x1="58.319386"
|
||||
y1="210.38649"
|
||||
x2="58.319386"
|
||||
y2="314.7475"
|
||||
gradientTransform="scale(1.6289609,0.61388827)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
xlink:href="#ringGrad"
|
||||
id="linearGradient27"
|
||||
x1="144.26373"
|
||||
y1="210.38649"
|
||||
x2="144.26373"
|
||||
y2="314.7475"
|
||||
gradientTransform="scale(1.6289609,0.61388827)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
xlink:href="#bodyGrad"
|
||||
id="linearGradient28"
|
||||
x1="579.89478"
|
||||
y1="113.10458"
|
||||
x2="656.08533"
|
||||
y2="189.29514"
|
||||
gradientTransform="scale(0.59062442,1.6931233)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
xlink:href="#bodyGrad"
|
||||
id="linearGradient29"
|
||||
x1="512.72302"
|
||||
y1="157.30843"
|
||||
x2="582.06396"
|
||||
y2="226.64938"
|
||||
gradientTransform="scale(0.74991759,1.3334799)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<g
|
||||
transform="matrix(-0.30621193,0.74049952,-0.49004152,-0.46271545,312.88776,84.680243)"
|
||||
id="g24">
|
||||
<!-- rear cap -->
|
||||
<rect
|
||||
x="95"
|
||||
y="188"
|
||||
rx="26"
|
||||
ry="26"
|
||||
width="62"
|
||||
height="136"
|
||||
class="metal"
|
||||
id="rect13"
|
||||
style="fill:url(#linearGradient24)" />
|
||||
<circle
|
||||
cx="124"
|
||||
cy="205"
|
||||
r="9"
|
||||
class="cyan"
|
||||
filter="url(#glowCyan)"
|
||||
id="circle13" />
|
||||
<circle
|
||||
cx="124"
|
||||
cy="307"
|
||||
r="9"
|
||||
class="cyan"
|
||||
filter="url(#glowCyan)"
|
||||
id="circle14" />
|
||||
<!-- body -->
|
||||
<rect
|
||||
x="145"
|
||||
y="164"
|
||||
rx="34"
|
||||
ry="34"
|
||||
width="210"
|
||||
height="184"
|
||||
class="metal"
|
||||
id="rect14"
|
||||
style="fill:url(#linearGradient25)" />
|
||||
<rect
|
||||
x="165"
|
||||
y="182"
|
||||
rx="20"
|
||||
ry="20"
|
||||
width="170"
|
||||
height="148"
|
||||
fill="#11192c"
|
||||
stroke="#3ef4ff"
|
||||
stroke-width="2"
|
||||
id="rect15" />
|
||||
<!-- glowing chamber -->
|
||||
<rect
|
||||
x="184"
|
||||
y="196"
|
||||
rx="16"
|
||||
ry="16"
|
||||
width="132"
|
||||
height="120"
|
||||
fill="url(#glassGrad)"
|
||||
filter="url(#glowOrange)"
|
||||
opacity="0.96"
|
||||
id="rect16"
|
||||
style="fill:url(#glassGrad)" />
|
||||
<rect
|
||||
x="193"
|
||||
y="196"
|
||||
rx="10"
|
||||
ry="10"
|
||||
width="18"
|
||||
height="120"
|
||||
fill="#fff4c2"
|
||||
opacity="0.18"
|
||||
id="rect17" />
|
||||
<text
|
||||
x="250"
|
||||
y="263"
|
||||
text-anchor="middle"
|
||||
class="text"
|
||||
font-size="28px"
|
||||
fill="#fff6d5"
|
||||
filter="url(#glowOrange)"
|
||||
id="text17">CAF</text>
|
||||
<!-- cyan tubing -->
|
||||
<path
|
||||
d="m 214,174 c -26,-34 -54,-34 -68,-1"
|
||||
fill="none"
|
||||
stroke="url(#ringGrad)"
|
||||
stroke-width="9"
|
||||
stroke-linecap="round"
|
||||
filter="url(#glowCyan)"
|
||||
id="path17"
|
||||
style="stroke:url(#linearGradient26)" />
|
||||
<path
|
||||
d="m 286,174 c 26,-34 54,-34 68,-1"
|
||||
fill="none"
|
||||
stroke="url(#ringGrad)"
|
||||
stroke-width="9"
|
||||
stroke-linecap="round"
|
||||
filter="url(#glowCyan)"
|
||||
id="path18"
|
||||
style="stroke:url(#linearGradient27)" />
|
||||
<!-- side nodes -->
|
||||
<circle
|
||||
cx="170"
|
||||
cy="256"
|
||||
r="12"
|
||||
class="accent"
|
||||
id="circle18" />
|
||||
<circle
|
||||
cx="341"
|
||||
cy="256"
|
||||
r="12"
|
||||
class="accent"
|
||||
id="circle19" />
|
||||
<!-- display -->
|
||||
<rect
|
||||
x="205"
|
||||
y="320"
|
||||
rx="10"
|
||||
ry="10"
|
||||
width="90"
|
||||
height="24"
|
||||
fill="#101827"
|
||||
stroke="#3ef4ff"
|
||||
stroke-width="2"
|
||||
id="rect19" />
|
||||
<text
|
||||
x="250"
|
||||
y="338"
|
||||
text-anchor="middle"
|
||||
class="text"
|
||||
font-size="14px"
|
||||
fill="#53fbff"
|
||||
id="text19">250</text>
|
||||
<!-- front collar -->
|
||||
<rect
|
||||
x="344"
|
||||
y="193"
|
||||
rx="20"
|
||||
ry="20"
|
||||
width="42"
|
||||
height="126"
|
||||
class="metal"
|
||||
id="rect20"
|
||||
style="fill:url(#linearGradient28)" />
|
||||
<circle
|
||||
cx="365"
|
||||
cy="207"
|
||||
r="8"
|
||||
class="cyan"
|
||||
filter="url(#glowCyan)"
|
||||
id="circle20" />
|
||||
<circle
|
||||
cx="365"
|
||||
cy="305"
|
||||
r="8"
|
||||
class="cyan"
|
||||
filter="url(#glowCyan)"
|
||||
id="circle21" />
|
||||
<!-- injector tip -->
|
||||
<path
|
||||
d="m 386,232 49,-20 v 88 l -49,-20 z"
|
||||
fill="url(#bodyGrad)"
|
||||
stroke="#7d6efc"
|
||||
stroke-width="3"
|
||||
id="path21"
|
||||
style="fill:url(#linearGradient29)" />
|
||||
<path
|
||||
d="m 435,244 55,12 -55,12 z"
|
||||
fill="url(#needleGrad)"
|
||||
filter="url(#glowCyan)"
|
||||
id="path22"
|
||||
style="fill:url(#needleGrad)" />
|
||||
<path
|
||||
d="m 490,252 16,4 -16,4 z"
|
||||
fill="#d8fdff"
|
||||
id="path23" />
|
||||
<!-- little rings -->
|
||||
<rect
|
||||
x="156"
|
||||
y="176"
|
||||
rx="6"
|
||||
ry="6"
|
||||
width="12"
|
||||
height="160"
|
||||
fill="#1af2ff"
|
||||
opacity="0.35"
|
||||
id="rect23" />
|
||||
<rect
|
||||
x="328"
|
||||
y="176"
|
||||
rx="6"
|
||||
ry="6"
|
||||
width="12"
|
||||
height="160"
|
||||
fill="#1af2ff"
|
||||
opacity="0.2"
|
||||
id="rect24" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.8 KiB |
Reference in New Issue
Block a user