This script is for OSX only! ;)
First install terminal-notifier app:
brew install terminal-notifier
After that, using this awesome scritp with some customizations in your .emacs.
| <%* | |
| const search = app.workspace.getLeavesOfType("search")[0]; | |
| const editor = app.workspace.activeLeaf.view.editor; | |
| const getCur = editor.getCursor(); | |
| const curLineNum = getCur.line; | |
| const curPos = getCur.ch; | |
| let thisFile = app.workspace.getActiveFile(); | |
| let mdCache = this.app.metadataCache.getFileCache(thisFile); | |
| let mdLinks = mdCache.links; | |
| if (mdLinks) { |
| #!/bin/bash | |
| # You can call this script like this: | |
| # $./volume.sh up | |
| # $./volume.sh down | |
| # $./volume.sh mute | |
| function get_volume { | |
| amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1 | |
| } |
| ;; put this file in ~/.emacs.d/private/org-brain | |
| ;; then add org-brain into your dotspacemacs-configuration-layers in .spacemacs | |
| (defconst org-brain-packages | |
| '(org-brain) | |
| ) | |
| ;; see https://github.com/Kungsgeten/org-brain#setup-and-requirements | |
| (defun org-brain/init-org-brain () | |
| (use-package org-brain |
This script is for OSX only! ;)
First install terminal-notifier app:
brew install terminal-notifier
After that, using this awesome scritp with some customizations in your .emacs.