Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShareFrame

A virtual window container for screen sharing on Wayland / Hyprland.

The problem: On a big monitor, screen-sharing in Google Meet / Zoom is painful. Sharing the full screen shows everything. Sharing individual windows means constantly switching what you're sharing — slow, clunky, breaks the flow.

The fix: ShareFrame is a single window that mirrors other windows inside it via continuous screenshots. You share ShareFrame in your video call, then hotkey-swap which window it's showing. No re-sharing dialogs. No fumbling. The shared window gets a green border so you always know what you're broadcasting.

┌─────────────────────────────────────────────────┐
│ ShareFrame     [+ Add ▾] [⊞ Grab]  [✕ Release] │
├─────────────────────────────────────────────────┤
│ [Alacritty]  [Firefox]  [Code]                  │  ← tabs
├─────────────────────────────────────────────────┤
│                                                 │
│     Whatever window you're mirroring            │
│     shows up right here — live, ~15fps          │
│                                                 │
├─────────────────────────────────────────────────┤
│ Sharing: Alacritty                              │
└─────────────────────────────────────────────────┘

Quick start

./install.sh       # checks deps, symlinks to ~/.local/bin
shareframe          # launch the container window

In another terminal (or via hotkey): shareframe grab — instantly captures whatever you're focused on. Done.

Then in Google Meet → Share Screen → pick "ShareFrame".

How it works

  1. hyprctl -j clients lists all windows — ShareFrame builds its own OBS-like dropdown. No system picker dialogs.

  2. grim -g screenshots the target window's region at ~15fps (JPEG, ~22ms per frame). Loaded into a GdkPixbuf and rendered via Cairo.

  3. shareframe grab reads hyprctl -j activewindow to capture whatever you're focused on. Bind it to a hotkey for instant "share this now."

  4. Hyprland tags — captured windows get tagged with shareframe, and a dynamic window rule paints their border green. You always see what you're broadcasting.

  5. Unix socket IPC — CLI commands (grab, next, prev) talk to the running GUI, so Hyprland hotkeys work perfectly.

Usage

# GUI
shareframe                         # launch (default 1920×1080)
shareframe --width 1280 --height 720 --fps 10

# CLI (talk to running instance)
shareframe grab               # capture the focused window RIGHT NOW
shareframe add                # open the window picker dropdown
shareframe next               # switch to next window
shareframe prev               # switch to previous window
shareframe remove             # release the active window
shareframe list               # show captured windows
shareframe quit               # close ShareFrame

Keyboard shortcuts

Shortcut Action
Ctrl+G Grab focused window (the killer feature)
Ctrl+N Open the window picker
Ctrl+Tab Next window
Ctrl+Shift+Tab Previous window
Ctrl+1Ctrl+9 Jump to window by number
Ctrl+W Release active window
Ctrl+Q Quit

Hyprland keybindings

Add to ~/.config/hypr/hyprland.conf:

bind = SUPER SHIFT, S, exec, shareframe
bind = SUPER SHIFT, A, exec, shareframe grab
bind = SUPER SHIFT, bracketright, exec, shareframe next
bind = SUPER SHIFT, bracketleft, exec, shareframe prev

The green border

When a window is being captured, its Hyprland border turns green so you always know what's being shared:

  • Active + Inactive borders both change — no surprises when you switch focus
  • Border resets automatically when you release the window
  • Uses Hyprland's native tagwindow + windowrule system (zero overhead)

Dependencies

All standard on a Hyprland + PipeWire setup:

What Arch package
Python 3 + PyGObject python-gobject
grim (screenshots) grim
Hyprland (IPC) hyprland

No GStreamer, no PipeWire capture, no portal — just grim and hyprctl.

Tips

  • Window overlap: Since we capture a screen region, position ShareFrame so it doesn't overlap the window being shared. On a big monitor this is easy — tile them side by side or put ShareFrame on a second monitor.

  • FPS: Default 15fps is fine for code/slides. Use --fps 30 for smoother demos, or --fps 5 to save CPU.

  • Multiple windows: Grab several windows up front, then flip between them with Ctrl+Tab or number keys during your call.

License

MIT

About

Virtual window container for screen sharing on Wayland/Hyprland. Click-to-pick window capture via PipeWire.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages