From d95c6c607349557896eb0fc1c16fb6204b2f2ab7 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:12:29 +0700 Subject: [PATCH 1/3] record script: not hard code output sink --- .config/ags/scripts/record-script.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/ags/scripts/record-script.sh b/.config/ags/scripts/record-script.sh index bc5013238..1fcad3afb 100755 --- a/.config/ags/scripts/record-script.sh +++ b/.config/ags/scripts/record-script.sh @@ -3,6 +3,9 @@ getdate() { date '+%Y%m%d_%H-%M-%S' } +getaudiooutput() { + pactl list sources | grep 'Name' | grep 'monitor' | cut -d ' ' -f2 +} cd ~/Videos || exit if pgrep wf-recorder > /dev/null; then @@ -11,9 +14,9 @@ if pgrep wf-recorder > /dev/null; then else notify-send "Starting recording" 'recording_'"$(getdate)"'.mp4' -a 'record-script.sh' if [[ "$1" == "--sound" ]]; then - wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" --audio=alsa_output.pci-0000_08_00.6.analog-stereo.monitor & disown + wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" --audio="$(getaudiooutput)" & disown elif [[ "$1" == "--fullscreen-sound" ]]; then - wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --audio=alsa_output.pci-0000_08_00.6.analog-stereo.monitor & disown + wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --audio="$(getaudiooutput)" & disown elif [[ "$1" == "--fullscreen" ]]; then wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t & disown else From 0bc6a46c22cdfbf0388bf76939be399a606b7b22 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 18 Feb 2024 10:22:43 +0700 Subject: [PATCH 2/3] record script: erik dubois says this is good --- .config/ags/scripts/record-script.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.config/ags/scripts/record-script.sh b/.config/ags/scripts/record-script.sh index 1fcad3afb..cfa354fc3 100755 --- a/.config/ags/scripts/record-script.sh +++ b/.config/ags/scripts/record-script.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +## hmm +# --pixel-format yuv420p + getdate() { date '+%Y%m%d_%H-%M-%S' } @@ -14,12 +17,13 @@ if pgrep wf-recorder > /dev/null; then else notify-send "Starting recording" 'recording_'"$(getdate)"'.mp4' -a 'record-script.sh' if [[ "$1" == "--sound" ]]; then - wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" --audio="$(getaudiooutput)" & disown + wf-recorder -c h264_vaapi -d /dev/dri/renderD128 -C aac -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" --audio="$(getaudiooutput)" & disown elif [[ "$1" == "--fullscreen-sound" ]]; then - wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --audio="$(getaudiooutput)" & disown + wf-recorder -c h264_vaapi -d /dev/dri/renderD128 -C aac -f './recording_'"$(getdate)"'.mp4' -t --audio="$(getaudiooutput)" & disown elif [[ "$1" == "--fullscreen" ]]; then - wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t & disown + wf-recorder -c h264_vaapi -d /dev/dri/renderD128 -C aac -f './recording_'"$(getdate)"'.mp4' -t & disown else - wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" & disown + wf-recorder -c h264_vaapi -d /dev/dri/renderD128 -C aac -f './recording_'"$(getdate)"'.mp4' -t --geometry "$(slurp)" & disown fi fi + From 8f2a4e52c25f4fd277d09cdb7e4e844f5c3708bb Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 18 Feb 2024 11:08:55 +0700 Subject: [PATCH 3/3] add anyrun config --- .config/anyrun/config.ron | 13 ++++++++ .config/anyrun/style.css | 66 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100755 .config/anyrun/config.ron create mode 100755 .config/anyrun/style.css diff --git a/.config/anyrun/config.ron b/.config/anyrun/config.ron new file mode 100755 index 000000000..c3eafd7a8 --- /dev/null +++ b/.config/anyrun/config.ron @@ -0,0 +1,13 @@ +Config( + x: Fraction(0.500000), + y: Absolute(15), + width: Fraction(0.300000), + height: Absolute(0), + hide_icons: false, + ignore_exclusive_zones: false, + layer: Overlay, + hide_plugin_info: true, + close_on_click: true, + show_results_immediately: false, + max_entries: None, +) diff --git a/.config/anyrun/style.css b/.config/anyrun/style.css new file mode 100755 index 000000000..ca45f260d --- /dev/null +++ b/.config/anyrun/style.css @@ -0,0 +1,66 @@ +* { + all: unset; + font-size: 1.3rem; +} + +#window, +#match, +#entry, +#plugin, +#main { + background: transparent; +} + +#match.activatable { + border-radius: 16px; + padding: 0.3rem 0.9rem; + margin-top: 0.01rem; +} +#match.activatable:first-child { + margin-top: 0.7rem; +} +#match.activatable:last-child { + margin-bottom: 0.6rem; +} + +#plugin:hover #match.activatable { + border-radius: 10px; + padding: 0.3rem; + margin-top: 0.01rem; + margin-bottom: 0; +} + +#match:selected, +#match:hover, +#plugin:hover { + background: #2e3131; +} + +#entry { + background: #0b0f10; + border: 1px solid #0b0f10; + border-radius: 16px; + margin: 0.5rem; + padding: 0.3rem 1rem; +} + +list > #plugin { + border-radius: 16px; + margin: 0 0.3rem; +} +list > #plugin:first-child { + margin-top: 0.3rem; +} +list > #plugin:last-child { + margin-bottom: 0.3rem; +} +list > #plugin:hover { + padding: 0.6rem; +} + +box#main { + background: #0b0f10; + box-shadow: inset 0 0 0 1px #0b0f10, 0 0 0 1px #0b0f10; + border-radius: 24px; + padding: 0.3rem; +}