From e7a3068ce4c9fa9509ebb51e0d0d87ca4447fd18 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Fri, 8 Aug 2025 00:06:11 +0200 Subject: [PATCH] Updated scripts --- black.py | 39 +++++++++++++++++++++++++++++++++++++++ config/hypr/hypridle.conf | 9 ++++----- config/hypr/hyprland.conf | 8 +++----- update_arch.sh | 2 +- 4 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 black.py diff --git a/black.py b/black.py new file mode 100644 index 0000000..f7dbe1d --- /dev/null +++ b/black.py @@ -0,0 +1,39 @@ +import tkinter as tk +import socket +import sys + +PORT = 65432 + + +def check_if_already_running(): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + try: + sock.bind(("127.0.0.1", PORT)) + except OSError: + print("Already running.") + sys.exit(0) + return sock + + +def exit_app(event=None): + root.destroy() + + +def bind_input_events(): + root.bind("", exit_app) + root.bind("", exit_app) + root.bind("