fix: also copy output of grim to clipboard
This commit is contained in:
@@ -8,6 +8,9 @@ window-padding-y = 10
|
||||
|
||||
keybind = ctrl+shift+r=reload_config
|
||||
|
||||
keybind = ctrl+shift+h=write_screen_file:copy
|
||||
keybind = ctrl+shift+j=text:ghostty-capture\n
|
||||
|
||||
command = exec fish
|
||||
|
||||
confirm-close-surface = false
|
||||
|
||||
@@ -22,3 +22,5 @@ cursor-style = bar
|
||||
adjust-cursor-thickness = 3
|
||||
|
||||
custom-shader = cursor-shaders/cursor-smear.glsl
|
||||
|
||||
quit-after-last-window-closed = false
|
||||
@@ -25,7 +25,7 @@ file=${1:-$(wl-paste --no-newline)}
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -f "$file" ] || {
|
||||
[ -e "$file" ] || {
|
||||
echo "File does not exist: $file" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ def take_screenshot(filepath: Path, typeStr: str):
|
||||
# and the selection ui is drawn inside of niri without its state exposed to external programs.
|
||||
# so we use grim + slurp for area mode and niri's built-in commands for others.
|
||||
ScreenshotType.FULL: "niri msg action screenshot-screen",
|
||||
ScreenshotType.AREA: f" grim -g \"$(slurp)\" -t png {niriScreenshotPath}",
|
||||
ScreenshotType.AREA: f" grim -g \"$(slurp)\" -t png {niriScreenshotPath} && cat {niriScreenshotPath} | wl-copy",
|
||||
ScreenshotType.WINDOW: "niri msg action screenshot-window",
|
||||
}
|
||||
if niriScreenshotPath.exists():
|
||||
|
||||
Reference in New Issue
Block a user