x_do
Version, currently 0.8.312 versions
- 0.8.3latestApr 10, 2021
- 0.8.2not indexedNov 13, 2022
- 0.8.1not indexedNov 13, 2022
- 0.8.0not indexedNov 13, 2022
- 0.7.1not indexedNov 13, 2022
- 0.7.0not indexedNov 13, 2022
- 0.6.2not indexedNov 13, 2022
- 0.6.1not indexedNov 13, 2022
- 0.6.0not indexedNov 13, 2022
- 0.5.0not indexedNov 13, 2022
- 0.4.0not indexedNov 13, 2022
- 0.3.0not indexedNov 13, 2022
github.com/phil294/x_do.cr
Crystal bindings for libxdo (xdotool)
Installation
# Add this to your shard.yml
dependencies:
x_do:
github: phil294/x_do.cr
version: ~> 0.8.3Then run:
shards installshard.yml
- Crystal
>= 0.35.0- License
- MIT with restrictions
- Author
- William Woodruff
Dependencies
This version declares no dependencies.
README
x_do
XDo is a Crystal interface for libxdo,
the C library that backs xdotool.
It exposes most of the functionality of xdotool, allowing
users to write Crystal programs that manage windows in an X11 instance.
Installation
Add this to your application's shard.yml:
dependencies:
x_do:
github: woodruffw/x_do.cr
libxdo is required. On Debian-based systems, it can be installed via:
$ sudo apt install libxdo-dev
Usage
require "x_do"
XDo.act do
active_window do |win|
win.type "hello from Crystal!"
end
end
Check out the examples folder for some practical examples.
Testing
The unit tests make the following assumptions:
- You're running an instance of X11
- You're running a window manager that's (mostly) ICCCM and EWMH compliant
- You have
xlogoinstalled
To run the unit tests on the default X11 display (DISPLAY, falling back on :0):
$ crystal spec
Alternatively, the tests can be run on another X11 display, like a Xephyr or Xvfb instance:
# replace "99" with your display number
$ DISPLAY=:99 crystal spec
The util/xvfb-spec script can be used to run the tests inside a temporary Xvfb instance running
Openbox:
$ ./util/xvfb-spec
TODO
- Complete bindings (
grep "implement me!") - Add error conditions (check return value of libxdo calls)
Contributing
- Fork it ( https://github.com/woodruffw/x_do/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- woodruffw William Woodruff - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.8.3- Tagged
- Apr 10, 2021
- Commit
d83c60ce9e49- Crystal
>= 0.35.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/phil294/x_do.cr
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 12