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
| # Konsole light/dark auto-switch — broadcasts native Konsole color-schemes | |
| # across all open tabs based on XDG Desktop Portal color-scheme changes. | |
| # | |
| # SPDX-License-Identifier: MIT | |
| # Copyright (c) 2026 Andreas Donig | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| # jsonrepair.py - Repair invalid JSON documents in Python | |
| # | |
| # Just https://github.com/josdejong/jsonrepair ported from TypeScript to Python. | |
| # | |
| # This port won't get updates, because the goal should be to generate this library instead. | |
| # | |
| # See: https://github.com/josdejong/jsonrepair/issues/84 | |
| # | |
| import json |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Klokantech Basic GL Style using ol-mapbox-style preview</title> | |
| <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans" /> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.19.1/ol.css"> | |
| <style> | |
| html, body { | |
| height: 100%; | |
| margin: 0; |
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
| #!/bin/bash | |
| code | |
| while true; do | |
| WINDOW_ID=$(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5 | cut -c 1-9) | |
| WINDOW_CLASS=$(xprop -id $WINDOW_ID WM_CLASS | sed 's/.*= "\([^"]*\)".*/\1/') | |
| if [ "${WINDOW_CLASS,,}" = "code" ]; then | |
| break | |
| fi | |
| done | |
| wmctrl -r :ACTIVE: -b toggle,maximized_vert,maximized_horz |
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
| from contextlib import AbstractContextManager | |
| from types import SimpleNamespace | |
| class Context(SimpleNamespace, AbstractContextManager): | |
| def __enter__(self): | |
| self._globals = dict(globals()) | |
| globals().update(self.__dict__) | |
| return self |