Skip to content

Instantly share code, notes, and snippets.

View Arkanic's full-sized avatar

Arkanic

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <wchar.h>
#include <locale.h>
wchar_t byte_to_variant(char byte) {
if(byte < 16) {
return 0xfe00 + (uint32_t)byte;
@Arkanic
Arkanic / qrscan.sh
Created July 10, 2024 02:43
On-screen QR code scanner (KDE)
#!/bin/bash
# requires spectacle, xclip, zbar-tools, and dmtx-utils
# creates a spectacle "rectangle select box", highlight area with QR, barcode, or matrix and press enter - if successful the result will be in your clipboard
spectacle --background --region --nonotify --output /tmp/qrscreenshot.png
(zbarimg -q --raw /tmp/qrscreenshot.png || dmtxread /tmp/qrscreenshot.png) | xclip -selection clipboard