Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function autoresize_cherrytree_codebox() {
- cherry_tree_id=$(xdotool search --onlyvisible --name "CherryTree 0.38")
- xdotool windowactivate $cherry_tree_id
- sleep 0.1
- xdotool key ctrl+a
- xdotool key ctrl+c
- xdotool key Right
- r_clip=$(xsel -b)
- line_num=$(echo "$r_clip" | wc -l)
- # echo $line_num
- (( line_num_mod=($line_num-5)*8/5 ))
- # echo $line_num_mod
- if [[ $line_num_mod -ge 1 ]]; then
- for (( i=1; i <= $line_num_mod; i++ ))
- do
- xdotool key ctrl+0x2c
- done
- fi
- xdotool key F11
- sleep 0.1
- eval $(xdotool getwindowgeometry --shell $cherry_tree_id)
- cherry_x_dekstop=$X
- cherry_y_desktop=$Y
- cherry_width_desktop=$WIDTH
- cherry_height_desktop=$HEIGHT
- (( cherry_x_mod=$cherry_x_dekstop+$cherry_width_desktop/4 ))
- (( cherry_y_mod=$cherry_height_desktop*7/8 ))
- xdotool mousemove $cherry_x_mod $cherry_y_mod
- xdotool key ctrl+0x2c
- xdotool click --repeat 10 5
- xdotool key F11
- xdotool key ctrl+space
- xdotool key ctrl+End
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement