-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add script for importing Raycast settings #19
Add script for importing Raycast settings #19
Conversation
7f5b60a
to
fc4d579
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arunvelsriram - pls check if these are valid.
@@ -28,7 +28,7 @@ local target_file="${target_dir}/Raycast.rayconfig" | |||
ensure_dir_exists "${target_dir}" | |||
|
|||
if [[ "${1}" == 'e' ]]; then | |||
rm -rfv "${target_dir}"/Raycast*.rayconfig | |||
[ -f "${target_dir}"/Raycast.rayconfig ] && rm -rfv "${target_dir}"/Raycast.rayconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the ~/.shellrc
file is loaded, let's use the functions defined in it.
[ -f "${target_dir}"/Raycast.rayconfig ] && rm -rfv "${target_dir}"/Raycast.rayconfig | |
is_file "${target_dir}"/Raycast.rayconfig && rm -rfv "${target_dir}"/Raycast.rayconfig |
@@ -58,20 +58,41 @@ EOF | |||
elif [[ "${1}" == 'i' ]]; then | |||
! is_file "${target_file}" && error "Couldn't find file: '$(yellow "${target_file}")' for import operation; Aborting!!!" | |||
|
|||
# TODO: Get this from password manager | |||
password=$RAYCAST_SETTINGS_PASSWORD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
password=$RAYCAST_SETTINGS_PASSWORD | |
password="${RAYCAST_SETTINGS_PASSWORD}" |
scripts/capture-raycast-configs.sh
Outdated
osascript <<EOF | ||
tell application "System Events" | ||
key code 36 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the tell
has a corresponding end tell
should the nested lines be indented? I'm not sure.
key code 36 | ||
delay 0.3 | ||
|
||
keystroke "$password" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keystroke "$password" | |
keystroke "${password}" |
2fcabcf
to
c8e3d5b
Compare
Dependent PR: #14