Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make apps available on every space #12

Closed
acheronfail opened this issue Mar 5, 2018 · 2 comments
Closed

Make apps available on every space #12

acheronfail opened this issue Mar 5, 2018 · 2 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@acheronfail
Copy link
Owner

Haven't looked into it - not sure if it's possible. It would be nice if the activated apps were available on every space.

Meaning, automating:

  1. right-click on dock icon
  2. click on Options
  3. select All Desktops

Or something which provides the same functionality.

@acheronfail acheronfail added the investigate Further information is needed label Mar 6, 2018
@acheronfail
Copy link
Owner Author

acheronfail commented Mar 6, 2018

After some research, it seems it might not be possible to do this easily to other applications. For an application we own, it's trivial (https://stackoverflow.com/a/12233351/5552584) but there doesn't seem to be any way to get an NSWindow reference of another application.

We can probably automate this via the accessibility API, here's a proof of concept applescript:

tell application "Dock" to activate
tell application "System Events"
	tell process "Dock"
		set frontmost to true
		activate
		
		tell list 1
			perform action "AXShowMenu" of UI element "<APP_NAME>"
			keystroke "Options"
			keystroke return
			keystroke "All Desktops"
			keystroke return
		end tell
	end tell
end tell

I wonder if there are any alternative ways of doing this (maybe modifying some system plists? com.apple.dock?).

@acheronfail acheronfail added wontfix This will not be worked on and removed investigate Further information is needed labels Mar 14, 2018
@acheronfail
Copy link
Owner Author

Not sure if there's a legit non-hacky way to do this via the normal APIs, so gonna close this for now.

@acheronfail acheronfail added the enhancement New feature or request label Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant