mirror of
https://github.com/correl/dotfiles.git
synced 2024-12-22 19:17:34 +00:00
[provisioning] Add org-protocol linux setup
This commit is contained in:
parent
3fb5c3b0c7
commit
f3c8a50dba
1 changed files with 24 additions and 0 deletions
24
recipes/org-protocol
Normal file
24
recipes/org-protocol
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# Description: Emacs org-protocol
|
||||
set -e
|
||||
|
||||
__disable_chrome_external_protocol_dialog_linux () {
|
||||
sudo mkdir -p /etc/{opt/chrome,chromium-browser}/policies/managed/
|
||||
sudo tee /etc/{opt/chrome,chromium-browser}/policies/managed/external_protocol_dialog.json >/dev/null <<'EOF'
|
||||
{
|
||||
"ExternalProtocolDialogShowAlwaysOpenCheckbox": true
|
||||
}
|
||||
EOF
|
||||
sudo chmod 644 /etc/{opt/chrome,chromium-browser}/policies/managed/external_protocol_dialog.json
|
||||
}
|
||||
|
||||
case $_PLATFORM in
|
||||
linux)
|
||||
_recipe _link
|
||||
mkdir -p ~/.local/share/applications
|
||||
_link ${HOME}/dotfiles/applications/org-protocol.desktop \
|
||||
${HOME}/.local/share/applications/org-protocol.desktop
|
||||
_run "Install org-protocol handler" xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol
|
||||
_run "Disable chrome external protocol dialog" __disable_chrome_external_protocol_dialog_linux
|
||||
;;
|
||||
esac
|
Loading…
Reference in a new issue