diff --git a/bootstrap b/bootstrap index 3880ff7..568a3e7 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,18 @@ #!/usr/bin/env bash set -e +create_links_in_dir_recursively() { + local base_dir="$PWD/$1" + local target_dir="$2" + + for dir in $(find "$base_dir/" -type d); do + mkdir -p "$HOME/$target_dir${dir#$base_dir}" + for file in $(find "$dir" -maxdepth 1 -type f); do + ln -sf "$file" "$HOME/$target_dir${file#$base_dir}" + done + done +} + ln -sf "$PWD/zshrc" "$HOME/.zshrc" ln -sf "$PWD/gitconfig" "$HOME/.gitconfig" ln -sf "$PWD/tmux.conf" "$HOME/.tmux.conf" @@ -10,15 +22,9 @@ for file in $(find "$PWD/bin" -type f); do ln -sf "$file" "$HOME/bin" done -mkdir -p "$HOME/.config/" +create_links_in_dir_recursively "config" ".config" ln -sf "$PWD/config/alacritty.yml" "$HOME/.config/alacritty.yml" ln -sf "$PWD/config/electron-flags.conf" "$HOME/.config/electron-flags.conf" ln -sf "$PWD/config/starship.toml" "$HOME/.config/starship.toml" -for dir in $(find "$PWD/config/" -type d); do - mkdir -p "$HOME/.config${dir#$PWD/config}" - - for file in $(find "$dir" -maxdepth 1 -type f); do - ln -sf "$file" "$HOME/.config${file#$PWD/config}" - done -done +create_links_in_dir_recursively "logseq" ".logseq" diff --git a/logseq/config/config.edn b/logseq/config/config.edn new file mode 100644 index 0000000..d43e6c7 --- /dev/null +++ b/logseq/config/config.edn @@ -0,0 +1,15 @@ +;; This global config file applies a configuration to all graphs. Any config +;; keys from a graph's logseq/config.edn can used here. A graph's +;; logseq/config.edn overrides config keys in this file except for maps which +;; are merged. As an example of merging, the following global and local configs: +;; {:shortcuts {:ui/toggle-theme "t z"}} +;; {:shortcuts {:ui/toggle-brackets "t b"}} +;; +;; would result in the final config: +;; {:shortcuts {:ui/toggle-theme "t z" +;; :ui/toggle-brackets "t b"}} + +{:shortcuts {:auto-complete/complete ["enter" "tab"] + :whiteboard/bring-forward ["close-square-bracket" "ctrl+o"] + :editor/backward-kill-word ["ctrl+w"] + :window/close []}} diff --git a/logseq/config/plugins.edn b/logseq/config/plugins.edn new file mode 100644 index 0000000..6de48a4 --- /dev/null +++ b/logseq/config/plugins.edn @@ -0,0 +1,2 @@ +{:logseq-bullet-threading {:version "v1.1.4", :repo "pengx17/logseq-plugin-bullet-threading", :effect false, :theme false} + :logseq-vim-shortcuts {:version "v0.1.22", :repo "vipzhicheng/logseq-plugin-vim-shortcuts", :effect true, :theme false}}