quickshell: give slurp a tty-less stdin it can EOF
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
700c85e39a
commit
02efc0a46d
1 changed files with 13 additions and 2 deletions
|
|
@ -106,6 +106,17 @@ in
|
|||
pw=$(${pkgs.zenity}/bin/zenity --password --title="WiFi Password" 2>/dev/null)
|
||||
[ -n "$pw" ] && ${pkgs.networkmanager}/bin/nmcli device wifi connect "$ssid" password "$pw"
|
||||
'';
|
||||
# Region picker for the recorder card. The < /dev/null is the whole
|
||||
# point of this wrapper: "if the standard input is not a TTY, slurp
|
||||
# will read a list of predefined rectangles" (slurp(1)), and
|
||||
# quickshell's Process hands every child a pipe on stdin. So a slurp
|
||||
# spawned from QML silently switches to rectangle-list mode and blocks
|
||||
# on a read that never EOFs — alive, drawing nothing, no layer surface,
|
||||
# no input, forever. hyprshot escapes this only because Hyprland's
|
||||
# exec gives it a tty. -d matches hyprshot: show the size while dragging.
|
||||
slurpRegionScript = pkgs.writeShellScript "slurp-region" ''
|
||||
exec ${pkgs.slurp}/bin/slurp -d < /dev/null
|
||||
'';
|
||||
# Screen recording, driven by the quick-settings card. $1 is a slurp
|
||||
# geometry ("" = whole output), $2 is "audio" or anything else.
|
||||
#
|
||||
|
|
@ -1424,7 +1435,7 @@ in
|
|||
readonly property string wxFetch: "${wxFetchScript}"
|
||||
readonly property string xdgOpen: "${pkgs.xdg-utils}/bin/xdg-open"
|
||||
readonly property string screenRec: "${screenRecScript}"
|
||||
readonly property string slurp: "${pkgs.slurp}/bin/slurp"
|
||||
readonly property string slurpRegion: "${slurpRegionScript}"
|
||||
readonly property string themeApply: "${themeApply}"
|
||||
}
|
||||
'';
|
||||
|
|
@ -6306,7 +6317,7 @@ in
|
|||
// is still waiting for a drag.
|
||||
Process {
|
||||
id: slurpProc
|
||||
command: [Commands.slurp]
|
||||
command: [Commands.slurpRegion]
|
||||
property string geom: ""
|
||||
// SplitParser, not StdioCollector: the line has
|
||||
// to be in hand by the time exited fires.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue