diff options
author | Devaev Maxim <[email protected]> | 2019-02-18 06:22:59 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-02-18 06:22:59 +0300 |
commit | 6a0de7c329e45d406d12453b4de397f3d983f1d0 (patch) | |
tree | 69d00acd56a32a6962e59594348146f3431a1e89 | |
parent | d555f1d4823938022914b4cbbeef40a197ca8069 (diff) |
license
43 files changed, 1010 insertions, 18 deletions
@@ -1,6 +1,28 @@ #!/usr/bin/env python3 +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # +import textwrap + from typing import List from typing import NamedTuple @@ -27,18 +49,66 @@ def main() -> None: js_key=parts[2], )) - with open("kvmd/data/keymap.yaml", "w") as keymap_yaml_file: + path = "kvmd/data/keymap.yaml" + with open(path, "w") as keymap_yaml_file: + keymap_yaml_file.write(textwrap.dedent(""" + # ========================================================================== # + # # + # KVMD - The The main Pi-KVM daemon. # + # # + # Copyright (C) 2018 Maxim Devaev <[email protected]> # + # # + # This program is free software: you can redistribute it and/or modify # + # it under the terms of the GNU General Public License as published by # + # the Free Software Foundation, either version 3 of the License, or # + # (at your option) any later version. # + # # + # This program is distributed in the hope that it will be useful, # + # but WITHOUT ANY WARRANTY; without even the implied warranty of # + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # + # GNU General Public License for more details. # + # # + # You should have received a copy of the GNU General Public License # + # along with this program. If not, see <https://www.gnu.org/licenses/>. # + # # + # ========================================================================== # + """).strip() + "\n\n\n") yaml.dump({ km.js_key: km.kvmd_code for km in keymap }, keymap_yaml_file, indent=4, default_flow_style=False) + print("Generated:", path) - with open("hid/src/keymap.h", "w") as hid_header_file: + path = "hid/src/keymap.h" + with open(path, "w") as hid_header_file: + hid_header_file.write(textwrap.dedent(""" + /***************************************************************************** + # # + # KVMD - The The main Pi-KVM daemon. # + # # + # Copyright (C) 2018 Maxim Devaev <[email protected]> # + # # + # This program is free software: you can redistribute it and/or modify # + # it under the terms of the GNU General Public License as published by # + # the Free Software Foundation, either version 3 of the License, or # + # (at your option) any later version. # + # # + # This program is distributed in the hope that it will be useful, # + # but WITHOUT ANY WARRANTY; without even the implied warranty of # + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # + # GNU General Public License for more details. # + # # + # You should have received a copy of the GNU General Public License # + # along with this program. If not, see <https://www.gnu.org/licenses/>. # + # # + *****************************************************************************/ + """).strip() + "\n\n\n") hid_header_file.write("#pragma once\n\n#include <HID-Project.h>\n\n#include \"inline.h\"\n\n\n") hid_header_file.write("INLINE KeyboardKeycode keymap(uint8_t code) {\n\tswitch(code) {\n") for km in sorted(keymap, key=(lambda km: km.arduino_hid_key)): hid_header_file.write("\t\tcase {km.kvmd_code}: return {km.arduino_hid_key};\n".format(km=km)) hid_header_file.write("\t\tdefault: return KEY_ERROR_UNDEFINED;\n\t}\n}\n") + print("Generated:", path) if __name__ == "__main__": diff --git a/hid/src/inline.h b/hid/src/inline.h index 337aa9b9..e9dd90bd 100644 --- a/hid/src/inline.h +++ b/hid/src/inline.h @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + #pragma once diff --git a/hid/src/keymap.h b/hid/src/keymap.h index c2302601..f652101e 100644 --- a/hid/src/keymap.h +++ b/hid/src/keymap.h @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + #pragma once #include <HID-Project.h> diff --git a/hid/src/main.cpp b/hid/src/main.cpp index a7867981..509e0a24 100644 --- a/hid/src/main.cpp +++ b/hid/src/main.cpp @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + #include <Arduino.h> #include <HID-Project.h> #include <TimerOne.h> @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # +# +# # https://github.com/NicoHood/HID/blob/master/src/HID-APIs/ImprovedKeylayouts.h # https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code # diff --git a/kvmd/__init__.py b/kvmd/__init__.py index cd442d1c..7839c576 100644 --- a/kvmd/__init__.py +++ b/kvmd/__init__.py @@ -1 +1,23 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + __version__ = "0.138" diff --git a/kvmd/aioregion.py b/kvmd/aioregion.py index c2b335f4..4ec2ba17 100644 --- a/kvmd/aioregion.py +++ b/kvmd/aioregion.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import types from typing import Type diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py index 73524cfb..bbe7c29a 100644 --- a/kvmd/apps/__init__.py +++ b/kvmd/apps/__init__.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import sys import os import argparse diff --git a/kvmd/apps/cleanup/__init__.py b/kvmd/apps/cleanup/__init__.py index 179ec2f1..f64d6f75 100644 --- a/kvmd/apps/cleanup/__init__.py +++ b/kvmd/apps/cleanup/__init__.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import subprocess import time diff --git a/kvmd/apps/cleanup/__main__.py b/kvmd/apps/cleanup/__main__.py index 031df43e..7d92324d 100644 --- a/kvmd/apps/cleanup/__main__.py +++ b/kvmd/apps/cleanup/__main__.py @@ -1,2 +1,24 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + from . import main main() diff --git a/kvmd/apps/htpasswd/__init__.py b/kvmd/apps/htpasswd/__init__.py index c39243fe..4906c581 100644 --- a/kvmd/apps/htpasswd/__init__.py +++ b/kvmd/apps/htpasswd/__init__.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import sys import os import re diff --git a/kvmd/apps/htpasswd/__main__.py b/kvmd/apps/htpasswd/__main__.py index 031df43e..7d92324d 100644 --- a/kvmd/apps/htpasswd/__main__.py +++ b/kvmd/apps/htpasswd/__main__.py @@ -1,2 +1,24 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + from . import main main() diff --git a/kvmd/apps/kvmd/__init__.py b/kvmd/apps/kvmd/__init__.py index a78bdb97..85dd552f 100644 --- a/kvmd/apps/kvmd/__init__.py +++ b/kvmd/apps/kvmd/__init__.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import asyncio from ...logging import get_logger diff --git a/kvmd/apps/kvmd/__main__.py b/kvmd/apps/kvmd/__main__.py index 031df43e..7d92324d 100644 --- a/kvmd/apps/kvmd/__main__.py +++ b/kvmd/apps/kvmd/__main__.py @@ -1,2 +1,24 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + from . import main main() diff --git a/kvmd/apps/kvmd/atx.py b/kvmd/apps/kvmd/atx.py index 8bc34260..4d42c6cc 100644 --- a/kvmd/apps/kvmd/atx.py +++ b/kvmd/apps/kvmd/atx.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import asyncio from typing import Dict diff --git a/kvmd/apps/kvmd/auth.py b/kvmd/apps/kvmd/auth.py index 923a06fe..051091e8 100644 --- a/kvmd/apps/kvmd/auth.py +++ b/kvmd/apps/kvmd/auth.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import secrets from typing import Dict diff --git a/kvmd/apps/kvmd/hid.py b/kvmd/apps/kvmd/hid.py index 2ed148f0..1a7ad4a3 100644 --- a/kvmd/apps/kvmd/hid.py +++ b/kvmd/apps/kvmd/hid.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import signal import asyncio diff --git a/kvmd/apps/kvmd/info.py b/kvmd/apps/kvmd/info.py index 5fc21efb..bf739b3d 100644 --- a/kvmd/apps/kvmd/info.py +++ b/kvmd/apps/kvmd/info.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import asyncio diff --git a/kvmd/apps/kvmd/logreader.py b/kvmd/apps/kvmd/logreader.py index 5ade240e..fedd48a5 100644 --- a/kvmd/apps/kvmd/logreader.py +++ b/kvmd/apps/kvmd/logreader.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import re import asyncio import time diff --git a/kvmd/apps/kvmd/msd.py b/kvmd/apps/kvmd/msd.py index 5d029487..8ec7c3b8 100644 --- a/kvmd/apps/kvmd/msd.py +++ b/kvmd/apps/kvmd/msd.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import struct import asyncio diff --git a/kvmd/apps/kvmd/server.py b/kvmd/apps/kvmd/server.py index 7049ba32..ed25f82a 100644 --- a/kvmd/apps/kvmd/server.py +++ b/kvmd/apps/kvmd/server.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import re import signal diff --git a/kvmd/apps/kvmd/streamer.py b/kvmd/apps/kvmd/streamer.py index 7e287b99..ab5e8d59 100644 --- a/kvmd/apps/kvmd/streamer.py +++ b/kvmd/apps/kvmd/streamer.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import signal import asyncio diff --git a/kvmd/data/keymap.yaml b/kvmd/data/keymap.yaml index be7fee25..4471aa52 100644 --- a/kvmd/data/keymap.yaml +++ b/kvmd/data/keymap.yaml @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + AltLeft: 79 AltRight: 83 ArrowDown: 75 diff --git a/kvmd/gpio.py b/kvmd/gpio.py index deb583ca..fccdf936 100644 --- a/kvmd/gpio.py +++ b/kvmd/gpio.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import contextlib from typing import Generator diff --git a/kvmd/logging.py b/kvmd/logging.py index 838e13d1..c551a414 100644 --- a/kvmd/logging.py +++ b/kvmd/logging.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import sys import logging diff --git a/kvmd/yamlconf/__init__.py b/kvmd/yamlconf/__init__.py index 60be81a3..893def88 100644 --- a/kvmd/yamlconf/__init__.py +++ b/kvmd/yamlconf/__init__.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import json from typing import Tuple diff --git a/kvmd/yamlconf/dumper.py b/kvmd/yamlconf/dumper.py index 28be57ae..2c9e1ce1 100644 --- a/kvmd/yamlconf/dumper.py +++ b/kvmd/yamlconf/dumper.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import textwrap import operator diff --git a/kvmd/yamlconf/loader.py b/kvmd/yamlconf/loader.py index cd7ae4fd..a4c17e99 100644 --- a/kvmd/yamlconf/loader.py +++ b/kvmd/yamlconf/loader.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os from typing import IO diff --git a/scripts/kvmd-gencert b/scripts/kvmd-gencert index ddbb2fa2..60fbd962 100755 --- a/scripts/kvmd-gencert +++ b/scripts/kvmd-gencert @@ -1,4 +1,26 @@ #!/bin/bash +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + set -x set -e @@ -1,4 +1,24 @@ #!/usr/bin/env python3 +# ========================================================================== # +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # from setuptools import setup diff --git a/web/share/js/bb.js b/web/share/js/bb.js index 565a3ab4..65c917b0 100644 --- a/web/share/js/bb.js +++ b/web/share/js/bb.js @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function checkBrowser() { if ( !window.navigator diff --git a/web/share/js/index/main.js b/web/share/js/index/main.js index edc52073..a972b543 100644 --- a/web/share/js/index/main.js +++ b/web/share/js/index/main.js @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + var wm; function main() { diff --git a/web/share/js/kvm/atx.js b/web/share/js/kvm/atx.js index ed5f045e..a81abe45 100644 --- a/web/share/js/kvm/atx.js +++ b/web/share/js/kvm/atx.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Atx() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __init__ = function() { $("atx-power-led").title = "Power Led"; @@ -12,7 +34,7 @@ function Atx() { tools.setOnClick($("atx-reset-button"), () => __clickButton("reset", "Are you sure to reboot the server?")); }; - /********************************************************************************/ + /************************************************************************/ self.setState = function(state) { $("atx-power-led").className = ((state && state.leds.power) ? "led-green" : "led-gray"); diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js index b6896955..f927d401 100644 --- a/web/share/js/kvm/hid.js +++ b/web/share/js/kvm/hid.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Hid() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __ws = null; @@ -51,7 +73,7 @@ function Hid() { }); }; - /********************************************************************************/ + /************************************************************************/ self.setSocket = function(ws) { wm.switchDisabled($("hid-pak-text"), !ws); diff --git a/web/share/js/kvm/keyboard.js b/web/share/js/kvm/keyboard.js index 9b898925..a804dce4 100644 --- a/web/share/js/kvm/keyboard.js +++ b/web/share/js/kvm/keyboard.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Keyboard() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __ws = null; var __ok = true; @@ -44,7 +66,7 @@ function Keyboard() { } }; - /********************************************************************************/ + /************************************************************************/ self.setSocket = function(ws) { if (ws !== __ws) { diff --git a/web/share/js/kvm/main.js b/web/share/js/kvm/main.js index 5c6d775a..00c32d79 100644 --- a/web/share/js/kvm/main.js +++ b/web/share/js/kvm/main.js @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + var wm; function main() { diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js index 13807ec7..9eee06e4 100644 --- a/web/share/js/kvm/mouse.js +++ b/web/share/js/kvm/mouse.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Mouse() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __ws = null; var __ok = true; @@ -33,7 +55,7 @@ function Mouse() { setInterval(__sendMove, 100); }; - /********************************************************************************/ + /************************************************************************/ self.setSocket = function(ws) { __ws = ws; diff --git a/web/share/js/kvm/msd.js b/web/share/js/kvm/msd.js index c23de99d..7f00162a 100644 --- a/web/share/js/kvm/msd.js +++ b/web/share/js/kvm/msd.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Msd() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __state = null; var __upload_http = null; @@ -22,7 +44,7 @@ function Msd() { tools.setOnClick($("msd-reset-button"), __clickResetButton); }; - /********************************************************************************/ + /************************************************************************/ self.setState = function(state) { __state = state; diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js index 7f2100bd..800a46d8 100644 --- a/web/share/js/kvm/session.js +++ b/web/share/js/kvm/session.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Session() { // var self = this; - /********************************************************************************/ + /************************************************************************/ var __ws = null; @@ -17,7 +39,7 @@ function Session() { __startSession(); }; - /********************************************************************************/ + /************************************************************************/ var __setKvmdInfo = function(state) { if (state.meta) { diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index c1ed4df5..cbd69d32 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function Streamer() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __resolution = {width: 640, height: 480}; var __size_factor = 1; @@ -36,7 +58,7 @@ function Streamer() { tools.setOnClick($("stream-reset-button"), __clickResetButton); }; - /********************************************************************************/ + /************************************************************************/ self.setState = function(state) { if (state && state.state) { diff --git a/web/share/js/login/main.js b/web/share/js/login/main.js index 42e614f0..0eb9411a 100644 --- a/web/share/js/login/main.js +++ b/web/share/js/login/main.js @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + var wm; function main() { diff --git a/web/share/js/tools.js b/web/share/js/tools.js index fe240d00..3993e065 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -1,3 +1,25 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + var tools = new function() { var __debug = (new URL(window.location.href)).searchParams.get("debug"); diff --git a/web/share/js/wm.js b/web/share/js/wm.js index 550c7a32..3a456b5b 100644 --- a/web/share/js/wm.js +++ b/web/share/js/wm.js @@ -1,7 +1,29 @@ +/***************************************************************************** +# # +# KVMD - The The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +*****************************************************************************/ + + function WindowManager() { var self = this; - /********************************************************************************/ + /************************************************************************/ var __top_z_index = 0; var __windows = []; @@ -44,7 +66,7 @@ function WindowManager() { window.addEventListener("orientationchange", () => __organizeWindowsOnResize(true)); }; - /********************************************************************************/ + /************************************************************************/ self.error = (...args) => __modalDialog("Error", args.join(" "), true, false); self.confirm = (...args) => __modalDialog("Question", args.join(" "), true, true); |