For the first two, yes, those are the actions performed in the given segments (Though, you seem to have the format wrong for the second?). However, the third isn't a script - it's a style file for fluxbox.

The first action you have there would have to be run by lua, in with the function definition loaded (which may be local to the file you got it from?), and the second could be run either from lua as execute('xsri --color=#996660') or from bash as xsri --color=#996660

First, what type of script are you working on? Bash? Lua? Perl? Other?

updateXserverrc() is a function inside /usr/sbin/xvesa.lua. It will not be available outside of this script. You will need to copy that fuction into your script if you're using Lua, or rewrite the function if you're using something else.

If "99,66,60" are hex values then it would be xsri --color=#996660If they are rgb values I don't know if they'd work with xsri. The colorBtn formats the rgb values that lua fltk uses into a hex value that xsri uses.

Fluxbox styles are not scripts. They are resource files, like .Xdefaults. If you want to have fluxbox always use a particular style, make sure .fluxbox/init has the appropriate one listed after "session.styleFile".

The filename extension doesn't really matter for anything other than letting you know what kind of script it is.

You can run a script from just abut anywhere, other than a partition that is mounted without executeable permission. If these are all X-related actions, you could put commands into .xintrc to have it set up automatically.