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
// compile: gcc -O2 terminput_parser.c -o input | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
// #define PRINT_POS // enables mouse position printing | |
// #define DEBUG // print the numeric representation of the key + raw received string | |
typedef u_int32_t u32; | |
// Tin = terminal input |
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
// compile: gcc -O2 terminput.c -o terminput | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main(int argc, char* argv[]) { | |
system("/bin/stty raw -echo"); | |
int optCnt = argc > 4 ? argc - 1 : 4; | |
char** opts = malloc(optCnt * sizeof(char*)); | |
opts[0] = ">1u"; // kitty keyboard protocol |
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
#!/usr/bin/env bash | |
# sam = System APK Manager | |
if [ -z "$(adb devices | sed 's/^List.*$//')" ]; then | |
printf "No devices are connected, please attach a usb cable or use 'adb connect'.\n" | |
exit 0 | |
fi | |
# Display a menu for disabling applications as long as there is a selection | |
disable() { |