-
Notifications
You must be signed in to change notification settings - Fork 887
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Dock Orientation/Autohide (#933)
* feat: Add Dock Orientation/Autohide * Apply suggestions from code review Co-authored-by: Thiago Holanda <[email protected]> * Rename script --------- Co-authored-by: Thiago Holanda <[email protected]>
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Required parameters: | ||
# @raycast.schemaVersion 1 | ||
# @raycast.title Toggle Dock Autohide | ||
# @raycast.mode silent | ||
|
||
# Optional parameters: | ||
# @raycast.icon 🤖 | ||
# @raycast.packageName System | ||
|
||
# Documentation: | ||
# @raycast.description Toggle the Dock Autohide | ||
# @raycast.author Jelte Lagendijk | ||
# @raycast.authorURL https://raycast.com/j3lte | ||
|
||
autohide=$(defaults read com.apple.dock autohide) | ||
|
||
if [[ $autohide == 1 ]]; then | ||
defaults write com.apple.dock autohide -bool false; killall Dock | ||
else | ||
defaults write com.apple.dock autohide -bool true; killall Dock | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Required parameters: | ||
# @raycast.schemaVersion 1 | ||
# @raycast.title Dock Set Autohide | ||
# @raycast.mode silent | ||
|
||
# Optional parameters: | ||
# @raycast.icon 🤖 | ||
# @raycast.argument1 { "type": "dropdown", "placeholder": "On/Off", "data": [{"title": "Off", "value": "false"}, {"title": "On", "value": "true"}] } | ||
# @raycast.packageName System | ||
|
||
# Documentation: | ||
# @raycast.description Set the Dock autohide | ||
# @raycast.author Jelte Lagendijk | ||
# @raycast.authorURL https://raycast.com/j3lte | ||
|
||
defaults write com.apple.dock autohide -bool $1; killall Dock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Required parameters: | ||
# @raycast.schemaVersion 1 | ||
# @raycast.title Dock Position | ||
# @raycast.mode silent | ||
|
||
# Optional parameters: | ||
# @raycast.icon 🤖 | ||
# @raycast.argument1 { "type": "dropdown", "placeholder": "Position on Screen", "data": [{"title": "Left", "value": "left"}, {"title": "Right", "value": "right"}, {"title": "Bottom", "value": "bottom"}] } | ||
# @raycast.packageName System | ||
|
||
# Documentation: | ||
# @raycast.description Set the position of the Dock in the screen | ||
# @raycast.author Jelte Lagendijk | ||
# @raycast.authorURL https://raycast.com/j3lte | ||
|
||
defaults write com.apple.dock orientation -string $1; killall Dock |