Automatically make kitty toggle between light and dark themes to follow the theme you set. Just put it into autostart.
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
#!/bin/bash | |
# https://github.com/dianariyanto/virtual-display-linux/ | |
# https://bbs.archlinux.org/viewtopic.php?id=180904 | |
# https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg | |
set -euo pipefail | |
set -x | |
resolution="1920x1080" | |
screen="HDMI-2" |
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
@Throws(IllegalStateException::class) | |
private fun saveImageToDisk(bitmap: Bitmap) { | |
val fileName = "..." | |
if (Build.VERSION.SDK_INT < 29) { | |
val canWriteStorage = | |
Build.VERSION.SDK_INT < 23 || checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED | |
check(canWriteStorage) { "no storage permission" } | |
val directory = pictureFolder |