更新脚本

This commit is contained in:
mofeng
2023-11-25 19:47:31 +08:00
parent fcbe1fb472
commit 4bcc60fcc8
10 changed files with 469 additions and 0 deletions

62
config/main.yaml Normal file
View File

@@ -0,0 +1,62 @@
# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
override: !include [override.d, override.yaml]
logging: !include logging.yaml
kvmd:
auth: !include auth.yaml
hid:
type: otg
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
atx:
type: disabled
msd:
type: otg
streamer:
quality: 0
resolution:
default: 1280x720
available:
- 1920x1080
- 1600x1200
- 1360x768
- 1280x1024
- 1280x960
- 1280x720
- 1024x768
- 800x600
- 720x576
- 720x480
cmd:
- "/usr/bin/ustreamer"
- "--device=/dev/kvmd-video"
- "--persistent"
- "--format=mjpeg"
- "--encoder=cpu"
- "--resolution={resolution}"
- "--desired-fps={desired_fps}"
- "--drop-same-frames=30"
- "--last-as-blank=0"
- "--unix={unix}"
- "--unix-rm"
- "--unix-mode=0660"
- "--exit-on-parent-death"
- "--process-name-prefix={process_name_prefix}"
- "--notify-parent"
- "--no-log-colors"
- "--sink=kvmd::ustreamer::jpeg"
- "--sink-mode=0660"
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"

69
config/override.yaml Normal file
View File

@@ -0,0 +1,69 @@
####################################################################
# #
# Override Pi-KVM system settings. This file uses the YAML syntax. #
# #
# https://github.com/pikvm/pikvm/blob/master/pages/config.md #
# #
# All overridden parameters will be applied AFTER other configs #
# and "!include" directives and BEFORE validation. #
# Not: Sections should be combined under shared keys. #
# #
####################################################################
#
#########
# Wrong #
#########
#kvmd:
# gpio:
# drivers: ...
#kvmd:
# gpio:
# scheme: ...
#
###########
# Correct #
###########
#kvmd:
# gpio:
# drivers: ...
# scheme: ...
#
###########
# Example #
###########
vnc:
# See https://github.com/pikvm/pikvm/blob/master/pages/vnc.md
keymap: /usr/share/kvmd/keymaps/ru # Set russian keymap
auth:
vncauth:
enabled: true # Enable auth via /etc/kvmd/vncpasswd
kvmd:
msd:
type: disabled
gpio:
drivers:
short_press:
type: cmd
cmd: [/usr/bin/sudo, short_press_gpio420]
long_press:
type: cmd
cmd: [/usr/bin/sudo, long_press_gpio420]
scheme:
short_button:
driver: short_press
pin: 0
mode: output
switch: false
long_button:
driver: long_press
pin: 0
mode: output
switch: false
view:
header:
title: ATX
table:
- ["#电源管理"]
- []
- ["#短按(开/关机):", short_button|按下]
- ["#长按(强制关机):", long_button|按下]