-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
34 lines (30 loc) · 1.4 KB
/
Copy pathconfig.example.yaml
File metadata and controls
34 lines (30 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# CleverSwitch configuration example
# Copy to ~/.config/cleverswitch/config.yaml and edit as needed.
# Hook scripts and commands (all optional)
# Hooks are called asynchronously and never block the switch relay.
# Each hook receives event details via environment variables:
#
# CLEVERSWITCH_EVENT switch | connect | disconnect
# CLEVERSWITCH_DEVICE keyboard | mouse
# CLEVERSWITCH_DEVICE_NAME e.g. MX Keys, MX Master 3
# CLEVERSWITCH_TARGET_HOST 1 | 2 | 3 (switch events only, 1-based)
#
# Each hook is a named entry with:
# path a script to run directly (no shell) -- mutually exclusive
# command a shell command (pipes, $VAR expansion) -- with path
# type CONNECT | SWITCH | DISCONNECT, or a list of them
# timeout seconds before the hook is killed (default: 5)
# fire_for_all_devices per-hook override of the global below (omit to inherit)
#
hooks:
# By default, hooks only fire for keyboard events.
# Set to true to fire hooks for all devices (keyboard + mouse).
# fire_for_all_devices: false
notifyOnSwitch:
command: "notify-send 'CleverSwitch' \"Switched to host $CLEVERSWITCH_TARGET_HOST\""
type: SWITCH
syncDisplayInput:
path: "~/.config/cleverswitch/on_connect.sh"
type: [CONNECT, DISCONNECT]
fire_for_all_devices: true # this hook also fires for the mouse
timeout: 10