hyprland: auto-allow screenshare restore tokens

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-07-09 12:16:27 +01:00
parent d416fb99cb
commit 629fd708d7

View file

@ -78,6 +78,19 @@ in
# separate hyprpaper daemon.
stylix.targets.hyprpaper.enable = false;
# Screenshare picker: auto-allow restore tokens (the "allow a restore
# token" checkbox) so Vesktop/Discord gets a token on the first pick
# instead of re-prompting. XDPH parses "[SELECTION]<flags>/..." from the
# picker's stdout; flag 'r' = token allowed, so inject it always.
xdg.configFile."hypr/xdph.conf".text = ''
screencopy {
custom_picker_binary = ${pkgs.writeShellScript "share-picker-auto-restore" ''
${pkgs.xdg-desktop-portal-hyprland}/bin/hyprland-share-picker "$@" \
| ${pkgs.gnused}/bin/sed 's/^\[SELECTION\]/[SELECTION]r/'
''}
}
'';
wayland.windowManager.hyprland = {
enable = true;
configType = "lua";