Move to Chezmoi
This commit is contained in:
parent
f216c4ff2c
commit
e3498e73b5
59 changed files with 499 additions and 2240 deletions
chezmoi/dot_zshrc.d
17
chezmoi/dot_zshrc.d/executable_camera.zsh
Normal file
17
chezmoi/dot_zshrc.d/executable_camera.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
if command -v mpv &> /dev/null && command -v fzf &> /dev/null; then
|
||||
if [[ "$OSTYPE" = linux* ]]; then
|
||||
function camera() {
|
||||
(
|
||||
set -euo pipefail
|
||||
|
||||
printf "%s\0" /dev/video* |
|
||||
fzf --print0 --read0 -m -1 --height="$((LINES/4))" |
|
||||
xargs -0 -P 0 -I {} mpv \
|
||||
-vf=hflip \
|
||||
--demuxer-lavf-format=video4linux2 \
|
||||
--demuxer-lavf-o-set=input_format=mjpeg \
|
||||
av://v4l2:{}
|
||||
)
|
||||
}
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue