From cf19d6f5a9890bf3865457b0da2c809e59cada01 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 14 Jun 2021 22:27:12 +0100 Subject: [PATCH] Configuration for joplin --- .config/joplin/keymap.json | 24 ++++++++++++++++++++++++ .config/zsh/.zshrc | 2 ++ .local/bin/remindernote | 6 ++++++ .local/bin/setup/setupjoplin | 18 +++++++++--------- .local/bin/sysact | 4 ++-- 5 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 .config/joplin/keymap.json create mode 100755 .local/bin/remindernote diff --git a/.config/joplin/keymap.json b/.config/joplin/keymap.json new file mode 100644 index 0000000..ad10c24 --- /dev/null +++ b/.config/joplin/keymap.json @@ -0,0 +1,24 @@ +[ + { "keys": [":", ";"], "type": "function", "command": "enter_command_line_mode" }, + { "keys": ["TAB", "RIGHT", "l"], "type": "function", "command": "focus_next" }, + { "keys": ["SHIFT_TAB", "LEFT", "h"], "type": "function", "command": "focus_previous" }, + { "keys": ["UP", "k"], "type": "function", "command": "move_up" }, + { "keys": ["DOWN", "j"], "type": "function", "command": "move_down" }, + { "keys": ["PAGE_UP", "gg"], "type": "function", "command": "page_up" }, + { "keys": ["PAGE_DOWN", "G"], "type": "function", "command": "page_down" }, + { "keys": ["ENTER"], "type": "function", "command": "activate" }, + { "keys": ["DELETE", "BACKSPACE", "dd"], "type": "function", "command": "delete" }, + { "keys": [" "], "command": "todo toggle $n" }, + { "keys": ["n", "]"], "type": "function", "command": "next_link" }, + { "keys": ["b", "["], "type": "function", "command": "previous_link" }, + { "keys": ["o"], "type": "function", "command": "open_link" }, + { "keys": ["tc"], "type": "function", "command": "toggle_console" }, + { "keys": ["tm"], "type": "function", "command": "toggle_metadata" }, + { "keys": ["/"], "type": "prompt", "command": "search \"\"", "cursorPosition": -2 }, + { "keys": ["mn"], "type": "prompt", "command": "mknote \"\"", "cursorPosition": -2 }, + { "keys": ["mt"], "type": "prompt", "command": "mktodo \"\"", "cursorPosition": -2 }, + { "keys": ["mb"], "type": "prompt", "command": "mkbook \"\"", "cursorPosition": -2 }, + { "keys": ["yn"], "type": "prompt", "command": "cp $n \"\"", "cursorPosition": -2 }, + { "keys": ["dn"], "type": "prompt", "command": "mv $n \"\"", "cursorPosition": -2 }, + { "keys": ["q"], "command": "exit"} +] diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index d29fda4..d5c3cfa 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -88,5 +88,7 @@ setxkbmap gb autoload edit-commandd-line; zle -N edit-command-line bindkey '^e' edit-command-line +set -o ignoreeof # Stop CTRL-D from quitting + # Load syntax highlighting; should be last. source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null diff --git a/.local/bin/remindernote b/.local/bin/remindernote new file mode 100755 index 0000000..866016c --- /dev/null +++ b/.local/bin/remindernote @@ -0,0 +1,6 @@ +#! /usr/bin/zsh + +joplin use "Main" + +joplin edit "Reminder" + diff --git a/.local/bin/setup/setupjoplin b/.local/bin/setup/setupjoplin index a9f1e72..95ac751 100755 --- a/.local/bin/setup/setupjoplin +++ b/.local/bin/setup/setupjoplin @@ -10,21 +10,21 @@ joplin config sync.target 5 joplin config sync.5.path "$path" joplin config sync.5.username "$TOWERUN" joplin config sync.5.password "$TOWERPW" -joplin sync & +joplin sync -echo "$path" | xclip -selection clipboard -i +# echo "$path" | xclip -selection clipboard -i -joplin-desktop & +# joplin-desktop & -clipnotify +# clipnotify -echo "$TOWERUN" | xclip -selection clipboard -i +# echo "$TOWERUN" | xclip -selection clipboard -i -clipnotify +# clipnotify -echo "$TOWERPW" | xclip -selection clipboard -i +# echo "$TOWERPW" | xclip -selection clipboard -i -read -n 1 -r -s -p $'Press enter when you have synced Joplin...\n' +# read -n 1 -r -s -p $'Press enter when you have synced Joplin...\n' -echo "" | xclip -selection clipboard -i +# echo "" | xclip -selection clipboard -i diff --git a/.local/bin/sysact b/.local/bin/sysact index d3cdba8..9b71992 100755 --- a/.local/bin/sysact +++ b/.local/bin/sysact @@ -1,4 +1,4 @@ -#!/bin/sh +#! /usr/bin/zsh # A dmenu wrapper script for system functions. @@ -17,6 +17,6 @@ cmds="\  reboot ${reb:-sudo -A reboot}  shutdown ${shut:-sudo -A shutdown -h now}" -choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" || exit 1 +choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu -n)" || exit 1 `echo "$cmds" | grep "^$choice " | cut -d ' ' -f2-`