I use a modified winManager.cfg
I modified it to work more or less with most browser-based streaming (Netflix, Youtube, etc)
Space almost always is pause/play
left and right arrow usually works as forward and backward. But not always
volume up and down uses the mixer, so that always works if configured in hook_init
I added a fullscreen (plus icon, key "f") in case you forgot to make it full screen.
It is often a toggle, so you can get out of fullscreen. On some sites it does not work. Escape would get you out of fullscreen, but then you also looses focus.
TODO: Tab and enter could control e.g. subtitles and quality on some sites.
%% anyremote configuration file for basic window manager operations (Server-mode)% With controls for common browser video streaming.% prerequisites: xwd, ImageMagic%% STATUS stable% TODO handle FIRE joystick button on Nokia's% XTEST yes% SOUND no% ENV noGuiAppName=WindowmanagerGuiAppBinary=trueGuiAppType=CustomGuiAppDesc=ShowsscreenofPConscreenofthephone.Beware:CancausejavacrashonsomeNokia's and Samsung'sGuiAppProtocols=Server[Protocol]=Server(Init)=\Include($(CfgDir)/Utils/aliases-server.cfg);\Macro(TEST_IMAGEMAGIC);\Macro(TEST_XWD);\Macro(DISPLAYSIZE);\Make(var,wm_scale,by_value,15);\Make(var,wm_cx,by_value,120);\Make(var,wm_cy,by_value,160);\Make(var,wm_px,by_value,120);\Make(var,wm_py,by_value,160);\Make(var,wm_rotate,by_value,);(Connect)=\Set(parameter,debug,on);Set(status,Press1toseescreenshot);\Set(icons,WinManager,1,folder,2,fullscreen,3,plus,4,vol_down,5,default,6,vol_up,7,prev,8,pause,9,next,*,question,0,no,#,default);\Get(screen_size);TEST_XWD=\Exec(P=`whichxwd2>/dev/null|grepxwd|grep-vno|wc-l|tr-d" "`;\if["x$P"="x1"];thentrue;\else$(CfgDir)/Utils/message.sh"ERROR: xwd is not installed";fi);DISPLAYSIZE=\Make(var,dpy_tmp,xdpyinfo|grepdimensions|tr-s' '|cut-f3-d' ');\Make(var,wm_dx,echo$(dpy_tmp)|cut-f1-d'x');\Make(var,wm_dy,echo$(dpy_tmp)|cut-f2-d'x');Cancel=\Make(exit);**=Set(text,replace,Help,Windowmanager.\n1-toshowscreenshot\nthenusejoysticktomoveacursor);Back=\Set(list,close);Set(text,close);Set(image,close);Set(menu,replace,)0=Make(exit);1=Macro(SHOW);2=Set(fullscreen,toggle);Get(screen_size);3=Emulate(key,f)4=Exec($(default_mixer_down));6=Exec($(default_mixer_up));7=Emulate(key,Left)8=Emulate(key,Space)9=Emulate(key,Right)% sure that SizeY will be second oneSizeX($$)=\Make(var,wm_cx,by_value,$(Index));\Make(var,wm_px,by_value,$(Index));SizeY($$)=\Make(var,wm_cy,by_value,$(Index));\Make(var,wm_py,by_value,$(Index));\Macro(SWAP,if["x$(wm_rotate)"="x-rotate 90"];thenecho0;elseecho1;fi;);\Macro(SETSCALE);% sure that PressedY will be second onePressedX($$)=\Make(var,pr_x,echo"$(Index) $(wm_scale)"|awk'{n=split($0,a);print int(a[1]*a[2]) }');PressedY($$)=\Make(var,pr_y,echo"$(Index) $(wm_scale)"|awk'{n=split($0,a);print int(a[1]*a[2]) }');\Make(var,pos_x,X=$(pr_x);if["x$(wm_rotate)"="x-rotate 90"];thenX=$(pr_y);fi;echo$X);\Make(var,pos_y,Y=$(pr_y);if["x$(wm_rotate)"="x-rotate 90"];thenY=`expr$(wm_dy)-$(pr_x)`;fi;echo$Y);\Emulate(mousemove,$(pos_x),$(pos_y),sleep,200000,mouse,1);\Macro(SHOW2);PosX($$)=\Make(var,pp_x,echo"$(Index) $(wm_scale)"|awk'{n=split($0,a);print int(a[1]*a[2]) }');PosY($$)=\Make(var,pp_y,echo"$(Index) $(wm_scale)"|awk'{n=split($0,a);print int(a[1]*a[2]) }');\Make(var,pos_x,X=$(pp_x);if["x$(wm_rotate)"="x-rotate 90"];thenX=$(pp_y);fi;echo$X);\Make(var,pos_y,Y=$(pp_y);if["x$(wm_rotate)"="x-rotate 90"];thenY=`expr$(wm_dy)-$(pp_x)`;fi;echo$Y);\Emulate(mousemove,$(pos_x),$(pos_y));SWAP=\Make(var,tmp,by_value,$(wm_cx));\Make(var,wm_cx,by_value,$(wm_cy));\Make(var,wm_cy,by_value,$(tmp));WINMENU=\Set(menu,replace,Zoom,CloseWindow,Update,Rotate,CenterCursor,CursortoUL,Dynamic);%GETIMAGEPROPS=\% Make(var,im_x,file -b $(TmpDir)/scr.png|cut -d ',' -f 2|tr -d ' '|cut -d 'x' -f 1);\% Make(var,im_y,file -b $(TmpDir)/scr.png|cut -d ',' -f 2|tr -d ' '|cut -d 'x' -f 2);SETSCALE=\Make(var,wm_scale,echo"$(wm_cx) $(wm_cy) $(wm_dx) $(wm_dy)"|\awk'{n=split($0,a);r1=a[3]/a[1];r2=a[4]/a[2];if(r2>r1) r1=r2; z=sprintf("%f",r1);print z;}');SHOW=\ExecAndSet(image,window,xwd-silent-root|\convertxwd:--resize$(wm_cx)x$(wm_cy)$(wm_rotate)-depth8$(TmpDir)/scr.png;echo$(TmpDir)/scr.png);\Macro(WINMENU);SHOW2=\ExecAndSet(image,window,sleep1;xwd-silent-root|\convertxwd:--resize$(wm_cx)x$(wm_cy)$(wm_rotate)-depth8$(TmpDir)/scr.png;echo$(TmpDir)/scr.png);\Macro(WINMENU);CloseWindow=\Emulate(keydown,Alt_L,key,F4,keyup,Alt_L);\Macro(SHOW2);Update=\Macro(SHOW);Rotate=\Make(var,wm_rotate,if["x$(wm_rotate)"="x"];thenecho"-rotate 90";elseecho"";fi);\Macro(SWAP);\Macro(SETSCALE);\Macro(SHOW2);CursortoUL=\Emulate(mousemove,0,0);\Make(var,cur_tmp,echo"$(wm_dy) $(wm_scale)"|awk'{n=split($0,a);print int(a[1]/a[2]);}');\ExecAndSet(image,set_cursor,XM=$(cur_tmp);OUT='0,0';\if["x$(wm_rotate)"="x-rotate 90"];thenOUT="$XM,0";fi;echo$OUT);CenterCursor=\Make(var,ccx,echo$(wm_dx)|awk'{print $0/2;}');\Make(var,ccy,echo$(wm_dy)|awk'{print $0/2;}');\Emulate(mousemove,$(ccx),$(ccy));\ExecAndSet(image,set_cursor,echo"$(ccx) $(ccy) `echo $(wm_scale)|cut -f 3 -d ' '`"|\awk'{n=split($0,a);z=sprintf("%d,%d",a[1]/a[3],a[2]/a[3]);print z;}');Dynamic=\Set(image,dynamic_cursor);\Set(menu,replace,Zoom,CloseWindow,Update,Rotate,CenterCursor,CursortoUL,NonDynamic);NonDynamic=\Set(image,cursor);\Set(menu,replace,Zoom,CloseWindow,Update,Rotate,CenterCursor,CursortoUL,Dynamic);Zoom=\Make(mode,Zoom);[Mode]=Zoom(EnterMode)=\Macro(WINSIZE);\Macro(SETSCALE);\Macro(SHOWWIN);\Set(menu,replace,Update,Close);\Set(image,nocursor);(ExitMode)=\Macro(DISPLAYSIZE);\Macro(SETSCALE);\Macro(SHOW2);\Macro(WINMENU);\Set(image,cursor);WINSIZE=\Exec(cd$(TmpDir);xwininfo>xwi.tmp);Emulate(sleep,100000,mouse,1);\Make(var,wm_dx,sleep1;cat$(TmpDir)/xwi.tmp|grep"\-geometry"|tr -s ' '|cut -d ' ' -f 3|cut -d 'x' -f 1);\ Make(var,wm_dy,cat $(TmpDir)/xwi.tmp|grep "\-geometry"|tr -s ' '|cut -d ' ' -f 3|cut -d 'x' -f 2|cut -d '-' -f 1);SHOWWIN=\ ExecAndSet(image,window,sleep 1;\ cd $(TmpDir);xwd -id `grep "Windowid"xwi.tmp|\cut-d' '-f4`-silent|convertxwd:--resize$(wm_cx)x$(wm_cy)$(wm_rotate)-depth8scr.png;\echo$(TmpDir)/scr.png);\Macro(GETIMAGEPROPS);Update=\Macro(SHOWWIN);Close=\Make(mode,default);Back=\Make(mode,default);[ModeEnd][End]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use a modified winManager.cfg
I modified it to work more or less with most browser-based streaming (Netflix, Youtube, etc)
Space almost always is pause/play
left and right arrow usually works as forward and backward. But not always
volume up and down uses the mixer, so that always works if configured in hook_init
I added a fullscreen (plus icon, key "f") in case you forgot to make it full screen.
It is often a toggle, so you can get out of fullscreen. On some sites it does not work. Escape would get you out of fullscreen, but then you also looses focus.
TODO: Tab and enter could control e.g. subtitles and quality on some sites.