summaryrefslogtreecommitdiff
path: root/.config/nushell/screen.nu
diff options
context:
space:
mode:
authorWriterV2 <primary-v2@protonmail.com>2026-04-03 22:46:48 +0200
committerWriterV2 <primary-v2@protonmail.com>2026-04-03 22:46:48 +0200
commita1ec4771740d321df4480e8a7224fa10b59f0569 (patch)
tree5e97e8ced79b4fea057fab6e76f80849c053e401 /.config/nushell/screen.nu
Update repo with git init directly in home dir
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"
+}