Giter Club home page Giter Club logo

osxdotool's Introduction

osxdotool

osxdotool is a drop-in xdotool replacement for macOS users.

osxdotool utilizes CLSwift, a CLI framework for Swift. CLSwift is still in active early development so the public api is subject to breaking changes.

Features

Below is a list of commands that need to be ported from xdotool. You can see a complete list here. I've bolded the ones that are probably pretty easy. Anything to do with windows and desktops might need to use accesability libraries. Not really sure right now, but I'll start really pulling appart the AmethystWM when I get to that point.

  • key
    • window
    • clearmodifiers
    • delay
  • keydown
    • window
    • clearmodifiers
    • delay
  • keyup
  • type
    • delay
    • window
    • clearmodifiers
  • mousemove
    • window
    • screen
    • polar
    • clearmodifiers
    • sync
  • mouseMoveRelative
    • sync
    • polar
    • clearmodifiers
  • click
    • clearmodifiers
    • repeat
    • delay
    • window
  • mousedown
    • clearmodifiers
    • repeat
    • delay
    • window
  • mouseup
    • clearmodifiers
    • repeat
    • delay
    • window
  • getMouseLocation
    • shell
  • behaveScreenEdge
    • delay
    • quiesce
  • search
    • class
    • classname
    • maxdepth
    • name
    • onlyvisible
    • pid
    • screen
    • desktop
    • limit
    • title
    • all
    • any
    • sync
  • selectWindow
  • behave
  • getWindowPID
  • getWindowName
  • getWindowGeometry
    • shell
  • getWindowFocus
  • windowSize
    • usehints
    • sync
  • windowMove
    • sync
    • relative
  • windowFocus
    • sync
  • windowMap
    • sync
  • windowMinimize
    • sync
  • windowRaise
  • windowReparent
  • windowKill
  • windowUnmap
    • sync
  • setWindow
    • name
    • iconName
    • role
    • classname
    • class
    • overridedirect
  • windowActivate
    • sync
  • getActiveWindow
  • setNumDesktops
  • getNumDesktops
  • getDesktopViewport
    • shell
  • setDesktopViewport
  • setDesktop
    • relative
  • getDesktop
  • setDesktopForWindow
  • getDesktopForWindow
  • sleep

osxdotool's People

Contributors

twof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

osxdotool's Issues

Does not build on Mojave

Showing Recent Issues

Prepare build
note: Using new build systemnote: Planning buildnote: Using build description from memory


Build target osxdotoolPackageDescription of project osxdotool with configuration Debug

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: osxdotoolPackageDescription)
    cd /Users/n/Documents/Code/osxdotool
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name osxdotoolPackageDescription -Onone -enable-batch-mode -enforce-exclusivity=checked -DSWIFT_PACKAGE -swift-version 4 -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -target x86_64-apple-macosx10.10 -g -module-cache-path /Users/n/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -index-store-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Index/DataStore -swift-version 4 -I /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -F /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -c -j4 /Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift /Users/n/Documents/Code/osxdotool/Package.swift -output-file-map /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/osxdotoolPackageDescription-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/osxdotoolPackageDescription.swiftmodule -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/swift-overrides.hmap -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug/include -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources/x86_64 -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/osxdotoolPackageDescription-Swift.h -Xcc -working-directory/Users/n/Documents/Code/osxdotool

CompileSwift normal x86_64 /Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift (in target: osxdotoolPackageDescription)
    cd /Users/n/Documents/Code/osxdotool
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift /Users/n/Documents/Code/osxdotool/Package.swift -emit-module-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper~partial.swiftmodule -emit-module-doc-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper~partial.swiftdoc -serialize-diagnostics-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.dia -emit-dependencies-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.d -emit-reference-dependencies-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.swiftdeps -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -I /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -F /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug -g -module-cache-path /Users/n/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 4 -enforce-exclusivity=checked -Onone -D SWIFT_PACKAGE -serialize-debugging-options -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/swift-overrides.hmap -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Products/Debug/include -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources/x86_64 -Xcc -I/Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/DerivedSources -Xcc -working-directory/Users/n/Documents/Code/osxdotool -module-name osxdotoolPackageDescription -o /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Build/Intermediates.noindex/osxdotool.build/Debug/osxdotoolPackageDescription.build/Objects-normal/x86_64/AccessibilityHelper.o -index-store-path /Users/n/Library/Developer/Xcode/DerivedData/osxdotool-gjtiwuuamlxhgcciseyodtmgvhmi/Index/DataStore -index-system-modules

/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:28:58: error: cannot convert value of type 'AnyObject?' to expected argument type 'AXUIElement'
        AXUIElementCopyAttributeValue(applicationElement.pointee,
                                      ~~~~~~~~~~~~~~~~~~~^~~~~~~
                                                                 as! AXUIElement
/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:35:53: warning: forced cast from 'AXUIElement?' to 'AXUIElement' only unwraps optionals; did you mean to use '!'?
        AXUIElementGetPid(elementAtPosition.pointee as! AXUIElement, windowPID)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
                                                   ! 
/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:38:51: error: 'CFString' is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?
        let _window: String = windowTitle.pointee as! CFString
                                                  ^
                              (                               ) as String
/Users/n/Documents/Code/osxdotool/Sources/osxdotoolCore/Helpers/AccessibilityHelper.swift:39:60: error: 'CFString' is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?
        let _application: String = applicationName.pointee as! CFString
                                                           ^
                                   (                                   ) as String



Build failed    18/10/2018, 22:48    0.3 seconds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.