diff --git a/commands/system/dock-autohide-toggle.sh b/commands/system/dock-autohide-toggle.sh new file mode 100755 index 000000000..5b05c740d --- /dev/null +++ b/commands/system/dock-autohide-toggle.sh @@ -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 diff --git a/commands/system/dock-set-autohide.sh b/commands/system/dock-set-autohide.sh new file mode 100755 index 000000000..f3a4c0287 --- /dev/null +++ b/commands/system/dock-set-autohide.sh @@ -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 diff --git a/commands/system/dock-set-position.sh b/commands/system/dock-set-position.sh new file mode 100755 index 000000000..de91f8452 --- /dev/null +++ b/commands/system/dock-set-position.sh @@ -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