From dea3bdf5dcf5dced5641747cea1032797c909437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Mon, 14 Dec 2020 03:59:12 +0300 Subject: swayrecord: fix for single monitor cases Turns out jq returns the value with quotes by default. --- dotfiles/.local/bin/swayrecord | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dotfiles') diff --git a/dotfiles/.local/bin/swayrecord b/dotfiles/.local/bin/swayrecord index 13b6e4d..27593be 100755 --- a/dotfiles/.local/bin/swayrecord +++ b/dotfiles/.local/bin/swayrecord @@ -10,7 +10,7 @@ if ! [ -d $AREC_DIR ]; then mkdir -p $AREC_DIR fi -DISPLAY="" +MONITOR="" OUTPUT="$(date '+%y%m%d-%H%M-%S')" TYPE="$1" VIDEO_PID="" @@ -70,7 +70,7 @@ killrecording () { } video () { - wf-recorder -o "$DISPLAY" -f "$VREC_DIR/video-$OUTPUT.mp4" & + wf-recorder -o "$MONITOR" -f "$VREC_DIR/video-$OUTPUT.mp4" & VIDEO_PID=$! echo $$ > ~/.cache/recordingpid echo "🔴" > ~/.cache/recordingicon @@ -84,7 +84,7 @@ screenshare () { loopbackcam="$(v4l2-ctl --list-devices | \ grep v4l2loopback -m1 -A1 | \ sed -e '1d' -e 's/\s//g')" - wf-recorder -o "$DISPLAY" -x yuv420p -c rawvideo -m v4l2 -f $loopbackcam & + wf-recorder -o "$MONITOR" -x yuv420p -c rawvideo -m v4l2 -f $loopbackcam & VIDEO_PID=$! echo $$ > ~/.cache/recordingpid echo "📺" > ~/.cache/recordingicon @@ -94,7 +94,7 @@ screenshare () { } screencast () { - wf-recorder -o "$DISPLAY" -f "$VREC_DIR/temp-$OUTPUT.mp4" & + wf-recorder -o "$MONITOR" -f "$VREC_DIR/temp-$OUTPUT.mp4" & VIDEO_PID=$! ffmpeg -f alsa -i default -c:a mp3 "$VREC_DIR/temp-$OUTPUT.mp3" & AUDIO_PID=$! @@ -132,9 +132,9 @@ if [ -f "$HOME/.cache/recordingpid" ]; then fi if [ $(swaymsg -t get_outputs | jq '. | length') -gt 1 ]; then -DISPLAY=$(swaymsg -t get_outputs | grep -E "name" | sed "s/^.*\"name\": \"//g;s/\",$//g;" | bemenu -p "Select display for capture: " --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR") +MONITOR=$(swaymsg -t get_outputs | grep -E "name" | sed "s/^.*\"name\": \"//g;s/\",$//g;" | bemenu -p "Select display for capture: " --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR") else - DISPLAY="$(swaymsg -t get_outputs | jq '.[0][\"name\"]')" + MONITOR="$(swaymsg -t get_outputs | jq -r '.[0]["name"]')" fi case $1 in -- cgit v1.2.3 From 44263315c21e688901d80434a6fe9aa6cd3cc71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Mon, 28 Dec 2020 10:26:08 +0300 Subject: mpv: change loop bindings --- dotfiles/.config/mpv/input.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dotfiles') diff --git a/dotfiles/.config/mpv/input.conf b/dotfiles/.config/mpv/input.conf index 81997b0..87aa9d1 100644 --- a/dotfiles/.config/mpv/input.conf +++ b/dotfiles/.config/mpv/input.conf @@ -198,8 +198,7 @@ H seek -60 exact L seek 60 exact Ctrl+h seek -1 exact Ctrl+l seek 1 exact -Alt+l ab-loop # Set/clear A-B loop points -Alt+L cycle-values loop "inf" "no" # toggle infinite looping +Alt+l cycle-values loop "inf" "no" # toggle infinite looping j add volume -2 k add volume 2 -- cgit v1.2.3 From 8238771a166cd5cdbeb02d67b8552999e2a53486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Wed, 30 Dec 2020 12:39:25 +0300 Subject: zsh: alias to list displays in sway --- dotfiles/.config/zsh/shortcuts | 1 + 1 file changed, 1 insertion(+) (limited to 'dotfiles') diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts index cf5a188..67f9652 100644 --- a/dotfiles/.config/zsh/shortcuts +++ b/dotfiles/.config/zsh/shortcuts @@ -8,6 +8,7 @@ alias ls="ls -hN --color=auto --group-directories-first" alias tmux="tmux -f $HOME/.config/tmux/tmux.conf" alias units="units -H ''" alias trans="trans -v -pager='less -R'" +alias lsdp="swaymsg -pt get_outputs | less" alias op="xdg-open" corona() { curl -s https://corona-stats.online/$1 ;} # It's corona time wintitle() { printf "\033]2;%s\a" "$1";} -- cgit v1.2.3