Skip to content

Instantly share code, notes, and snippets.

import ctypes as ct
import time
from BlurWindow.blurWindow import *
def enable_blur(win, dark_mode=True):
global DRAG
get_parent = ct.windll.user32.GetParent
HWND = get_parent(win.winfo_id())
import ctypes as ct
def dark_title_bar(window):
"""
MORE INFO:
https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
"""
window.update()
DWMWA_USE_IMMERSIVE_DARK_MODE = 20
set_window_attribute = ct.windll.dwmapi.DwmSetWindowAttribute
get_parent = ct.windll.user32.GetParent
@banderlog
banderlog / snake.pas
Created February 28, 2017 08:46
Snake game on Pascal
{snake.pas}
{classic game: avoid your tail and walls, go for apples}
{TODO?: - if press key perpendicular to move + backwards - eats itself}
program SnakeGame;
uses crt; {ncurses analogue}
const
DelayDuration = 100; {movement delay}
TRIESNUM = 128; {umber of tries to find a free space}
MAXHEIGHT = 40; {heght of a game field}