markdown · 4096 bytes Raw Blame History

HyprKVM

Hyprland-native software KVM switch that integrates with workspace navigation.

Features

  • Workspace-integrated switching: Move past your last workspace to switch machines
  • Mouse edge switching: Standard screen-edge triggers like Synergy/Barrier
  • Hyprland keybind switching: Trigger switches using your movefocus Hyprland binds
  • TLS encryption: Secure connections with TOFU (Trust On First Use) certificate pinning
  • Clipboard sharing: Automatic clipboard sync between machines

Installation

Arch Linux (AUR)

yay -S hyprkvm
# or
paru -S hyprkvm

RHEL / Fedora / Rocky / Alma / CentOS

# Add the musicsian repository
sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo

# Install hyprkvm
sudo dnf install hyprkvm

Homebrew (Linux)

# Add the tap
brew tap tenseleyFlow/tap

# Install hyprkvm
brew install hyprkvm

NixOS / Nix

Add to your flake inputs:

{
  inputs.hyprkvm.url = "github:tenseleyFlow/hyprKVM";
}

Then add to your packages:

environment.systemPackages = [
  inputs.hyprkvm.packages.${pkgs.system}.default
];

Or use the standalone flake directly:

nix run github:tenseleyFlow/hyprKVM -- daemon

Build from Source

# Clone
git clone https://github.com/tenseleyFlow/hyprKVM.git
cd hyprKVM

# NixOS
nix develop
cargo build --release

# Arch Linux / CachyOS
sudo pacman -S rust wayland libxkbcommon openssl
cargo build --release

# Binaries output to target/release/hyprkvm and target/release/hyprkvm-ctl

Quick Start

1. Configure

Create ~/.config/hyprkvm/hyprkvm.toml:

[machines]
self_name = "laptop"

[[machines.neighbors]]
name = "desktop"
direction = "right"
address = "192.168.1.100:24850"

Each machine needs its own config pointing to its neighbors.

2. Start the Daemon

# If installed via package manager
hyprkvm daemon

# If built from source
./target/release/hyprkvm daemon

3. First Connection

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.

4. Usage

  • Mouse: Move cursor to screen edge with a configured neighbor
  • Escape: Press Scroll Lock (or triple-tap Shift) to return control

CLI Commands

# Start the daemon
hyprkvm daemon

# View logs
hyprkvm-ctl logs

# Check status
hyprkvm-ctl status

Configuration

Neighbor Machines

[[machines.neighbors]]
name = "desktop"
direction = "right"      # left, right, up, down
address = "192.168.1.100:24850"
# fingerprint = "SHA256:..."  # Optional: pre-trust certificate

Network & TLS

[network]
listen_port = 24850
bind_address = "0.0.0.0"
connect_timeout_secs = 5
ping_interval_secs = 5
ping_timeout_secs = 10

[network.tls]
# Auto-generated if missing
cert_path = "~/.config/hyprkvm/cert.pem"
key_path = "~/.config/hyprkvm/key.pem"

Escape Hotkey

[input.escape_hotkey]
key = "scroll_lock"
modifiers = []  # e.g., ["super"] for Super+ScrollLock

[input]
triple_tap_enabled = true
triple_tap_key = "shift"
triple_tap_window_ms = 500

Clipboard

[clipboard]
enabled = true
sync_on_enter = true
sync_on_leave = true
sync_text = true
sync_images = true
max_size = 10485760  # 10MB

Logging

[logging]
level = "info"  # error, warn, info, debug, trace

See config/hyprkvm.example.toml for all options.

Hyprland Keybind Integration (Optional)

Intercept workspace movement to trigger machine switching:

# ~/.config/hypr/hyprland.conf
bind = SUPER, Left,  exec, hyprkvm move left
bind = SUPER, Right, exec, hyprkvm move right
bind = SUPER, Up,    exec, hyprkvm move up
bind = SUPER, Down,  exec, hyprkvm move down

Firewall

Open port 24850 (or your configured port):

# UFW
sudo ufw allow 24850/tcp

# firewalld
sudo firewall-cmd --add-port=24850/tcp --permanent
sudo firewall-cmd --reload

License

MIT License

View source
1 # HyprKVM
2
3 Hyprland-native software KVM switch that integrates with workspace navigation.
4
5 ## Features
6
7 - **Workspace-integrated switching**: Move past your last workspace to switch machines
8 - **Mouse edge switching**: Standard screen-edge triggers like Synergy/Barrier
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
12
13 ## Installation
14
15 ### Arch Linux (AUR)
16
17 ```bash
18 yay -S hyprkvm
19 # or
20 paru -S hyprkvm
21 ```
22
23 ### RHEL / Fedora / Rocky / Alma / CentOS
24
25 ```bash
26 # Add the musicsian repository
27 sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
28
29 # Install hyprkvm
30 sudo dnf install hyprkvm
31 ```
32
33 ### Homebrew (Linux)
34
35 ```bash
36 # Add the tap
37 brew tap tenseleyFlow/tap
38
39 # Install hyprkvm
40 brew install hyprkvm
41 ```
42
43 ### NixOS / Nix
44
45 Add to your flake inputs:
46
47 ```nix
48 {
49 inputs.hyprkvm.url = "github:tenseleyFlow/hyprKVM";
50 }
51 ```
52
53 Then add to your packages:
54
55 ```nix
56 environment.systemPackages = [
57 inputs.hyprkvm.packages.${pkgs.system}.default
58 ];
59 ```
60
61 Or use the standalone flake directly:
62
63 ```bash
64 nix run github:tenseleyFlow/hyprKVM -- daemon
65 ```
66
67 ### Build from Source
68
69 ```bash
70 # Clone
71 git clone https://github.com/tenseleyFlow/hyprKVM.git
72 cd hyprKVM
73
74 # NixOS
75 nix develop
76 cargo build --release
77
78 # Arch Linux / CachyOS
79 sudo pacman -S rust wayland libxkbcommon openssl
80 cargo build --release
81
82 # Binaries output to target/release/hyprkvm and target/release/hyprkvm-ctl
83 ```
84
85 ## Quick Start
86
87 ### 1. Configure
88
89 Create `~/.config/hyprkvm/hyprkvm.toml`:
90
91 ```toml
92 [machines]
93 self_name = "laptop"
94
95 [[machines.neighbors]]
96 name = "desktop"
97 direction = "right"
98 address = "192.168.1.100:24850"
99 ```
100
101 Each machine needs its own config pointing to its neighbors.
102
103 ### 2. Start the Daemon
104
105 ```bash
106 # If installed via package manager
107 hyprkvm daemon
108
109 # If built from source
110 ./target/release/hyprkvm daemon
111 ```
112
113 ### 3. First Connection
114
115 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.
116
117 ### 4. Usage
118
119 - **Mouse**: Move cursor to screen edge with a configured neighbor
120 - **Escape**: Press Scroll Lock (or triple-tap Shift) to return control
121
122 ## CLI Commands
123
124 ```bash
125 # Start the daemon
126 hyprkvm daemon
127
128 # View logs
129 hyprkvm-ctl logs
130
131 # Check status
132 hyprkvm-ctl status
133 ```
134
135 ## Configuration
136
137 ### Neighbor Machines
138
139 ```toml
140 [[machines.neighbors]]
141 name = "desktop"
142 direction = "right" # left, right, up, down
143 address = "192.168.1.100:24850"
144 # fingerprint = "SHA256:..." # Optional: pre-trust certificate
145 ```
146
147 ### Network & TLS
148
149 ```toml
150 [network]
151 listen_port = 24850
152 bind_address = "0.0.0.0"
153 connect_timeout_secs = 5
154 ping_interval_secs = 5
155 ping_timeout_secs = 10
156
157 [network.tls]
158 # Auto-generated if missing
159 cert_path = "~/.config/hyprkvm/cert.pem"
160 key_path = "~/.config/hyprkvm/key.pem"
161 ```
162
163 ### Escape Hotkey
164
165 ```toml
166 [input.escape_hotkey]
167 key = "scroll_lock"
168 modifiers = [] # e.g., ["super"] for Super+ScrollLock
169
170 [input]
171 triple_tap_enabled = true
172 triple_tap_key = "shift"
173 triple_tap_window_ms = 500
174 ```
175
176 ### Clipboard
177
178 ```toml
179 [clipboard]
180 enabled = true
181 sync_on_enter = true
182 sync_on_leave = true
183 sync_text = true
184 sync_images = true
185 max_size = 10485760 # 10MB
186 ```
187
188 ### Logging
189
190 ```toml
191 [logging]
192 level = "info" # error, warn, info, debug, trace
193 ```
194
195 See [config/hyprkvm.example.toml](config/hyprkvm.example.toml) for all options.
196
197 ## Hyprland Keybind Integration (Optional)
198
199 Intercept workspace movement to trigger machine switching:
200
201 ```ini
202 # ~/.config/hypr/hyprland.conf
203 bind = SUPER, Left, exec, hyprkvm move left
204 bind = SUPER, Right, exec, hyprkvm move right
205 bind = SUPER, Up, exec, hyprkvm move up
206 bind = SUPER, Down, exec, hyprkvm move down
207 ```
208
209 ## Firewall
210
211 Open port 24850 (or your configured port):
212
213 ```bash
214 # UFW
215 sudo ufw allow 24850/tcp
216
217 # firewalld
218 sudo firewall-cmd --add-port=24850/tcp --permanent
219 sudo firewall-cmd --reload
220 ```
221
222 ## License
223
224 MIT License