aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-01-10 04:53:30 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-01-10 04:53:30 +0300
commit1519d69d7fb785d35d50afb64cf9f0e91da03c79 (patch)
tree9b152e56a4de3f022d6031c29d1591193ebcf202
parent56378af36068d4f214299bc31c62d84928c921f5 (diff)
parent8238771a166cd5cdbeb02d67b8552999e2a53486 (diff)
downloadswayrice-1519d69d7fb785d35d50afb64cf9f0e91da03c79.tar.gz
swayrice-1519d69d7fb785d35d50afb64cf9f0e91da03c79.zip
Merge branch 'master' of git.yaroslavps.com:public/configs/swayrice
-rw-r--r--dotfiles/.config/mpv/input.conf3
-rw-r--r--dotfiles/.config/zsh/shortcuts1
-rwxr-xr-xdotfiles/.local/bin/swayrecord12
3 files changed, 8 insertions, 8 deletions
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
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";}
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