Skip to content

Instantly share code, notes, and snippets.

View starry-shivam's full-sized avatar
🌟
Focusing

Stɑrry Shivɑm starry-shivam

🌟
Focusing
View GitHub Profile
@starry-shivam
starry-shivam / MiuiCheck.kt
Last active October 12, 2024 08:36
Check if the device is running either on MIUI or HyperOS
object MiuiCheck {
/**
* Check if the device is running on MIUI.
*
* By default, HyperOS is excluded from the check.
* If you want to include HyperOS in the check, set excludeHyperOS to false.
*
* @param excludeHyperOS Whether to exclude HyperOS
* @return True if the device is running on MIUI, false otherwise
@starry-shivam
starry-shivam / LogcatFlow.kt
Created May 27, 2024 08:03
Get logcat for your app as a Kotlin flow
import android.os.Process
import android.util.Log
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.io.BufferedReader
[/]
animate-appicon-hover-animation-extent={'RIPPLE': 4, 'PLANK': 4, 'SIMPLE': 1}
appicon-margin=0
appicon-padding=8
available-monitors=[0]
dot-position='BOTTOM'
dot-style-focused='SEGMENTED'
dot-style-unfocused='DASHES'
hotkeys-overlay-combo='TEMPORARILY'
leftbox-padding=-1