This file contains hidden or 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/zsh | |
fzf-package-install() { | |
(( $+commands[yay] && $+commands[pacman] )) || return 1 | |
setopt localoptions pipefail no_aliases 2> /dev/null | |
local preview="yay -Si {1}" | |
local yay_search="yay -Salq" | |
local pacman_search="pacman -Slq" |
This file contains hidden or 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
// File extension function. Get the RecursiveFileWatcher instance from File. | |
fun File.asRecursiveFileWatcher(scope: CoroutineScope, recreateRootDir: Boolean = true) = | |
RecursiveFileWatcher(scope = scope, rootDir = this, recreateRootDir) | |
class RecursiveFileWatcher( | |
private val scope: CoroutineScope, | |
private val rootDir: File, | |
private val recreateRootDir: Boolean = true | |
) { |
This file contains hidden or 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
// Coroutine dispatcher | |
private val ioDispatcher = Dispatchers.IO | |
// App drive folder | |
private val DRIVE_FOLDER = | |
ContentType.create("application/vnd.google-apps.folder", Consts.ISO_8859_1) | |
val APPLICATION_ZIP: ContentType | |
get() = ContentType.create("application/zip", Consts.ISO_8859_1) |
This file contains hidden or 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
private fun buildGoogleSignInClient(): GoogleSignInClient { | |
val signInOptions = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).run { | |
requestEmail() | |
requestScopes(Scope(DriveScopes.DRIVE_FILE)) | |
build() | |
} | |
return GoogleSignIn.getClient(this, signInOptions) | |
} | |
private fun launchSignInIntent(resultLauncher: ActivityResultLauncher<Intent>) { |
This file contains hidden or 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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="autohint"> | |
<bool>false</bool> | |
</edit> | |
<edit mode="assign" name="antialias"> | |
<bool>true</bool> | |
</edit> |