tenseleyflow/hyprkvm / ff44529

Browse files

docs: update README with install instructions and config examples

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
ff4452937ba4eedd39f24b65972700fc6e133c01
Parents
08e584a
Tree
c0af0c6

1 changed file

StatusFile+-
M README.md 167 43
README.mdmodified
@@ -1,7 +1,4 @@
11
 # HyprKVM
2
-(noun) : yer a wizard, 'arry
3
-
4
-### what?
52
 
63
 Hyprland-native software KVM switch that integrates with workspace navigation.
74
 
@@ -9,71 +6,198 @@ Hyprland-native software KVM switch that integrates with workspace navigation.
96
 
107
 - **Workspace-integrated switching**: Move past your last workspace to switch machines
118
 - **Mouse edge switching**: Standard screen-edge triggers like Synergy/Barrier
12
-- **Hyprland keybind switching**: Trigger switches between machines using your movefocus hyprland binds
13
-- **Encrypted connections**: TLS with certificate pinning
14
-- **Clipboard sharing**: Sync clipboard between machines
15
-- **GUI and CLI**: Visual layout editor or config-file driven
9
+- **Hyprland keybind switching**: Trigger switches using your movefocus Hyprland binds
10
+- **TLS encryption**: Secure connections with TOFU (Trust On First Use) certificate pinning
11
+- **Clipboard sharing**: Automatic clipboard sync between machines
1612
 
17
-## Status
13
+## Installation
1814
 
19
-🚧 **Early Development** 
15
+### Arch Linux (AUR)
2016
 
21
-## Building
17
+```bash
18
+yay -S hyprkvm
19
+# or
20
+paru -S hyprkvm
21
+```
2222
 
23
-### Prerequisites
23
+### NixOS / Nix
2424
 
25
-- Rust 1.75+
26
-- GTK4 development libraries (for future GUI)
27
-- Hyprland
25
+Add to your flake inputs:
2826
 
29
-### Arch Linux / CachyOS
27
+```nix
28
+{
29
+  inputs.hyprkvm.url = "github:tenseleyFlow/hyprKVM";
30
+}
31
+```
3032
 
31
-```bash
32
-sudo pacman -S rust gtk4 libadwaita
33
+Then add to your packages:
34
+
35
+```nix
36
+environment.systemPackages = [
37
+  inputs.hyprkvm.packages.${pkgs.system}.default
38
+];
3339
 ```
3440
 
35
-### NixOS
41
+Or use the standalone flake directly:
3642
 
3743
 ```bash
38
-nix develop  # When flake is available
44
+nix run github:tenseleyFlow/hyprKVM -- daemon
3945
 ```
4046
 
41
-### Build
47
+### Build from Source
4248
 
4349
 ```bash
50
+# Clone
51
+git clone https://github.com/tenseleyFlow/hyprKVM.git
52
+cd hyprKVM
53
+
54
+# NixOS
55
+nix develop
4456
 cargo build --release
57
+
58
+# Arch Linux / CachyOS
59
+sudo pacman -S rust wayland libxkbcommon openssl
60
+cargo build --release
61
+
62
+# Binaries output to target/release/hyprkvm and target/release/hyprkvm-ctl
4563
 ```
4664
 
4765
 ## Quick Start
4866
 
49
-1. Start the daemon:
50
-   ```bash
51
-   ./target/release/hyprkvm daemon
52
-   ```
53
-
54
-2. Configure neighbor machines in `~/.config/hyprkvm/hyprkvm.toml`:
55
-   ```toml
56
-   [machines]
57
-   self_name = "my-laptop"
58
-
59
-   [[machines.neighbors]]
60
-   name = "desktop"
61
-   direction = "right"
62
-   address = "desktop.local:24850"
63
-   ```
64
-
65
-3. Optionally, install keybinding interceptors in your `hyprland.conf`:
66
-   ```ini
67
-   bind = SUPER, Left,  exec, ~/.config/hypr/scripts/hyprkvm-move.sh left
68
-   bind = SUPER, Right, exec, ~/.config/hypr/scripts/hyprkvm-move.sh right
69
-   bind = SUPER, Up,    exec, ~/.config/hypr/scripts/hyprkvm-move.sh up
70
-   bind = SUPER, Down,  exec, ~/.config/hypr/scripts/hyprkvm-move.sh down
71
-   ```
67
+### 1. Configure
68
+
69
+Create `~/.config/hyprkvm/hyprkvm.toml`:
70
+
71
+```toml
72
+[machines]
73
+self_name = "laptop"
74
+
75
+[[machines.neighbors]]
76
+name = "desktop"
77
+direction = "right"
78
+address = "192.168.1.100:24850"
79
+```
80
+
81
+Each machine needs its own config pointing to its neighbors.
82
+
83
+### 2. Start the Daemon
84
+
85
+```bash
86
+# If installed via package manager
87
+hyprkvm daemon
88
+
89
+# If built from source
90
+./target/release/hyprkvm daemon
91
+```
92
+
93
+### 3. First Connection
94
+
95
+On first connection, you'll be prompted to trust the remote machine's certificate fingerprint. This is stored in `~/.config/hyprkvm/known_hosts.toml` for future connections.
96
+
97
+### 4. Usage
98
+
99
+- **Mouse**: Move cursor to screen edge with a configured neighbor
100
+- **Escape**: Press Scroll Lock (or triple-tap Shift) to return control
101
+
102
+## CLI Commands
103
+
104
+```bash
105
+# Start the daemon
106
+hyprkvm daemon
107
+
108
+# View logs
109
+hyprkvm-ctl logs
110
+
111
+# Check status
112
+hyprkvm-ctl status
113
+```
72114
 
73115
 ## Configuration
74116
 
117
+### Neighbor Machines
118
+
119
+```toml
120
+[[machines.neighbors]]
121
+name = "desktop"
122
+direction = "right"      # left, right, up, down
123
+address = "192.168.1.100:24850"
124
+# fingerprint = "SHA256:..."  # Optional: pre-trust certificate
125
+```
126
+
127
+### Network & TLS
128
+
129
+```toml
130
+[network]
131
+listen_port = 24850
132
+bind_address = "0.0.0.0"
133
+connect_timeout_secs = 5
134
+ping_interval_secs = 5
135
+ping_timeout_secs = 10
136
+
137
+[network.tls]
138
+# Auto-generated if missing
139
+cert_path = "~/.config/hyprkvm/cert.pem"
140
+key_path = "~/.config/hyprkvm/key.pem"
141
+```
142
+
143
+### Escape Hotkey
144
+
145
+```toml
146
+[input.escape_hotkey]
147
+key = "scroll_lock"
148
+modifiers = []  # e.g., ["super"] for Super+ScrollLock
149
+
150
+[input]
151
+triple_tap_enabled = true
152
+triple_tap_key = "shift"
153
+triple_tap_window_ms = 500
154
+```
155
+
156
+### Clipboard
157
+
158
+```toml
159
+[clipboard]
160
+enabled = true
161
+sync_on_enter = true
162
+sync_on_leave = true
163
+sync_text = true
164
+sync_images = true
165
+max_size = 10485760  # 10MB
166
+```
167
+
168
+### Logging
169
+
170
+```toml
171
+[logging]
172
+level = "info"  # error, warn, info, debug, trace
173
+```
174
+
75175
 See [config/hyprkvm.example.toml](config/hyprkvm.example.toml) for all options.
76176
 
177
+## Hyprland Keybind Integration (Optional)
178
+
179
+Intercept workspace movement to trigger machine switching:
180
+
181
+```ini
182
+# ~/.config/hypr/hyprland.conf
183
+bind = SUPER, Left,  exec, hyprkvm-ctl move left
184
+bind = SUPER, Right, exec, hyprkvm-ctl move right
185
+bind = SUPER, Up,    exec, hyprkvm-ctl move up
186
+bind = SUPER, Down,  exec, hyprkvm-ctl move down
187
+```
188
+
189
+## Firewall
190
+
191
+Open port 24850 (or your configured port):
192
+
193
+```bash
194
+# UFW
195
+sudo ufw allow 24850/tcp
196
+
197
+# firewalld
198
+sudo firewall-cmd --add-port=24850/tcp --permanent
199
+sudo firewall-cmd --reload
200
+```
77201
 
78202
 ## License
79203