Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Respect the order in which -b and -w are given

With this, only -w specified after -b will include window borders.
This enables the user to include borders for only some of the windows.

This can also be a double-edged sword, in that now the user has finer
control, but (s)he must be fully aware of the effects of the order in
which options are given.  Yes, you should.
However, the user will most likely want to specify -b at the very
first, which gives the old behavior of a "global" switch.
  • Loading branch information...
commit 170f5f51154c6e303daa9eb9e7f983a0ac6028bf 1 parent 13e9fc8
@lolilolicon authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 ffcast.bash
View
8 ffcast.bash
@@ -216,7 +216,7 @@ Usage: ${0##*/} [arguments] [ffmpeg command]
Arguments:
-s select a rectangular region by mouse
-w select a window by mouse click
- -b include borders of selected window
+ -b include window borders hereafter
-m trim selected region to be mod 16
-p print region geometry only
-l list supported screencast commands
@@ -281,7 +281,7 @@ while getopts 'bhlmpqsvw' opt; do
region_select_action+='w'
;;
b)
- borderless=0
+ region_select_action+='b'
;;
p)
print_geometry_only=1
@@ -333,6 +333,10 @@ while read -n 1; do
corners_list[i++]=$(select_window_get_corners)
debug "corners: %s" "${corners_list[-1]}"
;;
+ 'b')
+ borderless=0
+ debug "windows: now including borders"
+ ;;
esac
done <<< "$region_select_action"
Please sign in to comment.
Something went wrong with that request. Please try again.