From 1910697d0291570b410ab4df757d6a2f5241ee66 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 12 Jul 2025 16:33:04 +0200 Subject: checkpoint --- bin/guiscripts/vrec | 10 ++++++++-- bin/menuscripts/mgame | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/guiscripts/vrec b/bin/guiscripts/vrec index f876da0..91443f4 100755 --- a/bin/guiscripts/vrec +++ b/bin/guiscripts/vrec @@ -5,7 +5,7 @@ # dependencies: # - ffmpeg # - hacksaw: part -# - xdotool: active +# - xdotool: active,window # - xdg-user-dir # - dmenu # - clipp @@ -21,6 +21,7 @@ # - full: record your full screen # - last: copy the latest recording's path to the clipboard # - audio: one of the prior recording commands but with sound +# - window: select a window with xdotool and capture that geometry # Recording: # there is a lock file @@ -87,7 +88,7 @@ fi output="$(date +%F_%H-%M-%S)" if [ -z "${option:="$1"}" ]; then - option="$(printf 'active\npart\nstop\nfull\naudio\nlast\n' | dmenu -c)" + option="$(printf 'active\npart\nstop\nfull\naudio\nlast\nwindow\n' | dmenu -c)" fi [ "$option" ] || exit 1 @@ -96,6 +97,11 @@ case "$option" in record_cmd $(xwininfo -id "$(xdotool getactivewindow)" | sed '/Absolute\|Width:\|Height:/!d;s/.*:\s*//' | tr '\n' ' ') "$dir" "$output" ;; + window) + eval "$(xdotool getwindowgeometry --shell "$(xdotool selectwindow)")" + + record_cmd $X $Y $WIDTH $HEIGHT "$dir" "$output" + ;; part) hacksaw | { IFS=+x read -r w h x y diff --git a/bin/menuscripts/mgame b/bin/menuscripts/mgame index cf23aa0..cd7a7b0 100755 --- a/bin/menuscripts/mgame +++ b/bin/menuscripts/mgame @@ -14,7 +14,7 @@ steam_games() done } -Choice="$(steam_games | cut -f 2- -d' ' | grep -v -i 'brawlhalla' | dmenu -c -i -x)" +Choice="$(steam_games | cut -f 2- -d' ' | dmenu -c -i -x)" [ "$Choice" ] || exit 1 ID="$(steam_games | grep "[0-9]\+ $Choice" | cut -f 1 -d ' ')" -- cgit v1.2.3-70-g09d2