updates...
This commit is contained in:
29
working_machine/alfred/addToOmnifocus.js
Normal file
29
working_machine/alfred/addToOmnifocus.js
Normal file
@ -0,0 +1,29 @@
|
||||
function run(argv) {
|
||||
const title = $.NSProcessInfo.processInfo.environment.objectForKey("title").js;
|
||||
const notes = $.NSProcessInfo.processInfo.environment.objectForKey("notes").js
|
||||
|
||||
function addToOmnifocus(transportText) {
|
||||
newTasks = Task.byParsingTransportText(transportText, true);
|
||||
taskID = newTasks[0].id.primaryKey;
|
||||
URL.fromString("omnifocus:///task/" + taskID).open();
|
||||
}
|
||||
|
||||
function generateTransportText(title, notes) {
|
||||
const tag = 'work';
|
||||
let transportText = `${title} @${tag}`;
|
||||
if (notes) {
|
||||
transportText = `${transportText} // ${notes}`
|
||||
}
|
||||
return transportText;
|
||||
}
|
||||
|
||||
const transportText = generateTransportText(title, notes);
|
||||
const encodedFunctionAndInput = `%28${encodeURIComponent(addToOmnifocus.toString())}%29%28argument%29&arg=%22${encodeURIComponent(transportText)}%22`;
|
||||
const omnifocusUrl = `omnifocus://localhost/omnijs-run?script=${encodedFunctionAndInput}`;
|
||||
|
||||
console.log(omnifocusUrl);
|
||||
|
||||
let app = Application.currentApplication();
|
||||
app.includeStandardAdditions = true;
|
||||
app.openLocation(omnifocusUrl);
|
||||
}
|
||||
BIN
working_machine/alfred/omnifocus-alfred.alfredworkflow
Normal file
BIN
working_machine/alfred/omnifocus-alfred.alfredworkflow
Normal file
Binary file not shown.
5
working_machine/zshrc/README.md
Normal file
5
working_machine/zshrc/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# ZSH setup
|
||||
1. Place .zshrc file in home directory
|
||||
2. Create folder called zshrc
|
||||
3. Include all needed .sh files inside the zshcrc folder
|
||||
4. To activate the changes right away, make sure to execute `source .zshrc` from within the home directory in your terminal
|
||||
1
working_machine/zshrc/env.sh
Normal file
1
working_machine/zshrc/env.sh
Normal file
@ -0,0 +1 @@
|
||||
export OP_SERVICE_ACCOUNT_TOKEN="$(pass op-sa_token)"
|
||||
2
working_machine/zshrc/general.sh
Normal file
2
working_machine/zshrc/general.sh
Normal file
@ -0,0 +1,2 @@
|
||||
bindkey -v
|
||||
PS1='%n@%m %~ $ '
|
||||
@ -9,4 +9,4 @@ export PATH="/Users/mucas/.local/share/gem/ruby/3.2.0/bin:$PATH"
|
||||
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init - zsh)"
|
||||
eval "$(pyenv init - zsh)"
|
||||
3
working_machine/zshrc/zshrc
Normal file
3
working_machine/zshrc/zshrc
Normal file
@ -0,0 +1,3 @@
|
||||
for FILE in ~/zshrc/*; do
|
||||
source $FILE
|
||||
done
|
||||
Reference in New Issue
Block a user