# Autokey - a desktop automation utility for FreeBSD?



## gofer_touch (Feb 3, 2015)

I have wondered for quite some time now why a good desktop automation utility isn't available for FreeBSD. How does one go about requesting a port for FreeBSD?

Autokey seems to fit the bill. I've used it for some time now and it indeed is a time saver:

https://code.google.com/p/autokey/


----------



## Kiiski (Feb 5, 2015)

If you have time and interest, maybe you could do it yourself?
Good place to get started:
https://www.freebsd.org/doc/en/articles/contributing-ports/article.html

Otherwise "FreeBSD ports mailing list" might be could place to propose new port:
https://lists.freebsd.org/mailman/listinfo/freebsd-ports


----------



## gofer_touch (Feb 5, 2015)

Thanks! I'll try and post on the mailing list. Doing it myself? Lots of interest, very little time unfortunately.


----------



## vermaden (Feb 6, 2015)

gofer_touch said:


> I have wondered for quite some time now why a good desktop automation utility isn't available for FreeBSD. How does one go about requesting a port for FreeBSD?
> 
> Autokey seems to fit the bill. I've used it for some time now and it indeed is a time saver:
> 
> https://code.google.com/p/autokey/



You may use these (*wmctrl*/*xdotool*/*xbindkeys*/*keynav*):


```
% wmctrl --help
wmctrl 1.07
Usage: wmctrl [OPTION]...
Actions:
  -m  Show information about the window manager and
  about the environment.
  -l  List windows managed by the window manager.
  -d  List desktops. The current desktop is marked
  with an asterisk.
  -s <DESK>  Switch to the specified desktop.
  -a <WIN>  Activate the window by switching to its desktop and
  raising it.
  -c <WIN>  Close the window gracefully.
  -R <WIN>  Move the window to the current desktop and
  activate it.
  -r <WIN> -t <DESK>  Move the window to the specified desktop.
  -r <WIN> -e <MVARG>  Resize and move the window around the desktop.
  The format of the <MVARG> argument is described below.
  -r <WIN> -b <STARG>  Change the state of the window. Using this option it's
  possible for example to make the window maximized,
  minimized or fullscreen. The format of the <STARG>
  argument and list of possible states is given below.
  -r <WIN> -N <STR>  Set the name (long title) of the window.
  -r <WIN> -I <STR>  Set the icon name (short title) of the window.
  -r <WIN> -T <STR>  Set both the name and the icon name of the window.
  -k (on|off)  Activate or deactivate window manager's
  "showing the desktop" mode. Many window managers
  do not implement this mode.
  -o <X>,<Y>  Change the viewport for the current desktop.
  The X and Y values are separated with a comma.
  They define the top left corner of the viewport.
  The window manager may ignore the request.
  -n <NUM>  Change number of desktops.
  The window manager may ignore the request.
  -g <W>,<H>  Change geometry (common size) of all desktops.
  The window manager may ignore the request.
  -h  Print help.

Options:
  -i  Interpret <WIN> as a numerical window ID.
  -p  Include PIDs in the window list. Very few
  X applications support this feature.
  -G  Include geometry in the window list.
  -x  Include WM_CLASS in the window list or
  interpret <WIN> as the WM_CLASS name.
  -u  Override auto-detection and force UTF-8 mode.
  -F  Modifies the behavior of the window title matching
  algorithm. It will match only the full window title
  instead of a substring, when this option is used.
  Furthermore it makes the matching case sensitive.
  -v  Be verbose. Useful for debugging.
  -w <WA>  Use a workaround. The option may appear multiple
  times. List of available workarounds is given below.

Arguments:
  <WIN>  This argument specifies the window. By default it's
  interpreted as a string. The string is matched
```


```
% xdotool
Usage: xdotool <cmd> <args>
Available commands:
  getactivewindow
  getwindowfocus
  getwindowname
  getwindowpid
  getwindowgeometry
  getdisplaygeometry
  search
  selectwindow
  help
  version
  behave
  behave_screen_edge
  click
  getmouselocation
  key
  keydown
  keyup
  mousedown
  mousemove
  mousemove_relative
  mouseup
  set_window
  type
  windowactivate
  windowfocus
  windowkill
  windowmap
  windowminimize
  windowmove
  windowraise
  windowreparent
  windowsize
  windowunmap
  set_num_desktops
  get_num_desktops
  set_desktop
  get_desktop
  set_desktop_for_window
  get_desktop_for_window
  get_desktop_viewport
  set_desktop_viewport
  exec
  sleep
```



```
% xbindkeys --help
xbindkeys 1.8.6 by Philippe Brochard
usage: xbindkeys [options]
  where options are:
  -V, --version  Print version and exit
  -d, --defaults  Print a default rc file
  -f, --file  Use an alternative rc file
  -p, --poll-rc  Poll the rc/guile configs for updates
  -h, --help  This help!
  -X, --display  Set X display to use
  -v, --verbose  More information on xbindkeys when it run
  -s, --show  Show the actual keybinding
  -k, --key  Identify one key pressed
 -mk, --multikey  Identify multi key pressed
  -g, --geometry  size and position of window open with -k|-mk option
  -n, --nodaemon  don't start as daemon
```


----------

