xBar Command Listing
All commands are meant to be used as command line arguments. Syntax is, of course, extremely important. Please Note: The syntax for xBar has changed 100% from the last release. Meaning, you need to read this part!! Also note: Not all commands use double quotes to enclose information. Some, as shown in the examples, may be in plain text, and may not work when enclosed in quotes.
Clipboard:
$clip$ - when placed anywhere in a xBar command, will substitute in the contents of the clipboard. Can be combined specifically with the program launching commands to provide flexibility and power.
ex.-exec "c:\program files\k-meleon\k-meleon http://google.ca/search?q=$clip$"
Hiding / Showing / Closing:
-hide startbutton toolbars tasks clock systray9x tray systrayxp deskicons taskbar
-show startbutton toolbars tasks clock systray9x tray systrayxp deskicons taskbar
-close startbutton tray deskicons taskbar
The above commands will ( quite obviously ) do the associated function to the specified windows component. Note that while you can use only one switch, you can specify more than one item to follow the switch. ex. xbar -hide startbutton tasks deskicons
Program Launching:
-exec "program name"
Yeah, even I admit that's pretty boring. Where the power is here though, is in the optional commands to follow...
-top - starts the program top-most
-bot - starts the program underneath all other windows
-pos "x y height width" - specifies a startup position and size for the program
-max - starts the program maximized. ignored if -pos is used.
-min - starts the program minimized. ignored if -pos is used.
-title " new title" - obvious again, specifies a title for the program to start with.
Now the reasoning behind all those nice fun commands up there is to mix and match them to allow for some very powerful program launching. Some examples:
-exec "notepad" -top -pos "100 100 400 600" -title "my notepad!"
-exec "c:\program files\k-meleon\k-meleon www.virtualplastic.net" -bot -max
Note that the program name will accept file paths with spaces, as well as arguments. The only restrictions to the -exec command are that you cannot nest the double quotes, and you can only use it to launch programs. That's what the -open command is for.
-open "document name"
Although much more flexible in that it wil allow you to open any document or program on your computer, it is far more limited in that it will only accept two optional commands: -min & -max.
Desktop Work Area:
-desk left-margin top-margin right-margin bottom-margin
Although this looks confusing, it's actually very simple. The first two numbers represent the left and top of the desktop workarea. The second two numbers represent the right and bottom. On a 1024 x 768 resolution, your current desktop workarea ( allowing for the taskbar, and based on a standard taskbar placement ) would be equivilent to '0 0 1024 740'. To adjust these margins, simply add on to the first two, and subtract from the last two. So to add a 100 pixel margin to the left side of your screen, you would specify '100 0 1024 740'. To specify a 100 pixel margin on the right side, you would specify '0 0 924 740'. like I said, fairly simple, right?
Note that you'll have a hard time dragging windows into this area. However, with the ability to launch programs into this area, and with the below ability to move already running programs, you can set up a desktop that allows you to maximize windows as you please without covering up important ones already open.
To find your curernt desktop workarea, use this command:
-desk info
System & General Commands:
-logoff optional: f to force logoff ex. xbar -logoff f
-shutdown optional: f
-reboot optional: f
-sleep
The above commands shutdown, reboot, etc. When used the the optional f argument, they will shutdown or reboot without saving any data - very quick, but will not save anything. You've been warned!
-top partialwindowtitle
-notop partialwindowtitle
The above two commands will, when given a word from the title of an application, give that application top-most status. Or else take that status away.
-move partialwindowtitle (or) #windowhandle xpos ypos
-size partialwindowtitle (or) #windowhandle width height
The above two commands are responsible for moving and or resizing any existing windows. They can either be fed a word from the window title, or the window's handle preceded by a '#'. The handle to a window may be found by using xBar's spy console.
-kill partialwindowtitle (or) #windowhandle (or) all
Very powerful, xBar's kill command can, like move and size, be fed a partial window title or else a specific window handle. As well, it can also be given the argument 'all', to close all open windows.
-pause milliseconds
Mainly used for scripting purposes, this allows pausing between commands.
-ver
Shows a messagebox with the current program version.
-spy
Shows the xBar spy console. from here, you have hands on ability to alter and manipulate many parts of your desktop, and windows.
On Screen Display:
-osd "text to print"
Several optional commands are provided to allow for placing and customizing of the on screen text:
-xy "xpos ypos"
-sec "seconds to display"
-col "colour" - a number corresponding to a colour: 1 = Black, 2 = Red, 3 = Blue, 4 = White, nothing = Green.
Example: -osd "hi there" -xy "450 10" -sec "4" -col "1"
-osdcls - clears the osd display. may be used if the -sec option above is not used.
File Associations:
Although more can be found on .xbs scripts and xBar below, this single command is integral to allowing xBar to use scripts:
-assoc on (or) off
The above when specified 'on', will create a file association in the registry for the .xbs file extension. It will also link an icon to the file. To remove this association from the registry, simply run the command again with 'off' specified.
xTrayTasks Control:
These commands offer control over the application xTrayTasks; allowing that program to be launched without it's usual program icon:
-traytaskson - begins an instance of xTrayTasks, equal to running that program with the argument '-noicon'
-traytasksoff - ends a running instance of xTrayTasks
To use xBar with xTrayTasks, a copy of that program's .exe must be placed into the main xBar directory. For more information on that program and it's usage, please see it's own readme document. |
|