summaryrefslogtreecommitdiff
path: root/.config/nushell/screen.nu
diff options
context:
space:
mode:
Diffstat (limited to '.config/nushell/screen.nu')
-rw-r--r--.config/nushell/screen.nu17
1 files changed, 17 insertions, 0 deletions
diff --git a/.config/nushell/screen.nu b/.config/nushell/screen.nu
new file mode 100644
index 0000000..88c72f5
--- /dev/null
+++ b/.config/nushell/screen.nu
@@ -0,0 +1,17 @@
+export def shot [] {
+ maim -s $"($env.SCREENS_PATH)/(date now | format date %s)-screen.png"
+}
+
+export def shoot [--duration: int, --delay: int] {
+ mut args = []
+
+ if $duration != null {
+ $args = $args | append "-t" | append $duration
+ }
+ if $delay != null {
+ $args = $args | append $"-ss" | append $delay
+ }
+
+
+ ffmpeg -video_size 1900x1080 -framerate 25 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec aac -vf setpts=N/FR/TB ...$args $"($env.RECORDINGS_PATH)(date now | format date %s)-recording.mp4"
+}