Skip to content

Instantly share code, notes, and snippets.

@qwertyz15
qwertyz15 / devilspie-vscode-transparency.sh
Created March 22, 2021 06:04 — forked from marcel-dempers/devilspie-vscode-transparency.sh
How to make VSCode transparent in Linux
#!/bin/bash
sudo apt-get install -y devilspie
mkdir -p ~/.devilspie
echo '
(if (contains (window_class) "Code")
(begin
(spawn_async (str "xprop -id " (window_xid) " -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 "))
(spawn_async (str "xprop -id " (window_xid) " -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xD8000000"))
import os
import warnings
from argparse import ArgumentParser
import threading
import concurrent.futures
from typing import Match
import numpy as np
from PIL import Image
import shutil
import os
@qwertyz15
qwertyz15 / put_text.py
Last active June 26, 2023 06:51
python put_text.py
def draw_str(dst, target, s):
x, y = target
cv.putText(dst, s, (x+1, y+1), cv.FONT_HERSHEY_PLAIN, 1.0, (0, 0, 0), thickness = 2, lineType=cv.LINE_AA)
cv.putText(dst, s, (x, y), cv.FONT_HERSHEY_PLAIN, 1.0, (255, 255, 255), lineType=cv.LINE_AA)
draw_str(res, (20, 20), "threaded : " + str(threaded_mode))
draw_str(res, (20, 40), "latency : %.1f ms" % (latency.value*1000))
draw_str(res, (20, 60), "frame interval : %.1f ms" % (frame_interval.value*1000))
draw_str(res, (20, 80), "fps : %.1f" % (1/frame_interval.value))