diff --git a/Makefile b/Makefile index cb02f73..f4919dd 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,14 @@ dotfiles_put: cp -rp \ dotfiles/.ipython/profile_default/ipython_config.py \ ~/.ipython/profile_default/ipython_config.py + D1=Code\ -\ OSS; \ + for p in \ + "dotfiles/.config/$$D1/User/keybindings.json" \ + "dotfiles/.config/$$D1/User/settings.json"; do \ + commands install -f -p "dotfiles/.config/$$D1" -s "$$p" -t ~/.config/"$$D1"; \ + done + #commands install -f -p dotfiles -s dotfiles/ -t ~/.config/ dotfiles_fetch: - commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/keybindings.json -t dotfiles \ No newline at end of file + commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/keybindings.json -t dotfiles + commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/settings.json -t dotfiles diff --git a/dotfiles/.config/Code - OSS/User/keybindings.json/keybindings.json b/dotfiles/.config/Code - OSS/User/keybindings.json similarity index 100% rename from dotfiles/.config/Code - OSS/User/keybindings.json/keybindings.json rename to dotfiles/.config/Code - OSS/User/keybindings.json diff --git a/dotfiles/.config/Code - OSS/User/settings.json b/dotfiles/.config/Code - OSS/User/settings.json new file mode 100644 index 0000000..98f6ce0 --- /dev/null +++ b/dotfiles/.config/Code - OSS/User/settings.json @@ -0,0 +1,6 @@ +{ + "editor.wordWrap": "on", + "editor.minimap.autohide": true, + "editor.minimap.maxColumn": 80, + "editor.minimap.size": "fit" +} \ No newline at end of file diff --git a/dotfiles/.local/bin/commands b/dotfiles/.local/bin/commands index 7fce9e1..315d470 100755 --- a/dotfiles/.local/bin/commands +++ b/dotfiles/.local/bin/commands @@ -3746,17 +3746,30 @@ def install(argv: list[str]) -> None: if not options.overwrite: raise NotImplementedError - shutil.rmtree(str(final_target)) + if final_target.is_dir(): + shutil.rmtree(final_target) + else: + os.unlink(final_target) if options.source.is_dir() and not options.recursive: raise NotImplementedError - os.makedirs(final_target, exist_ok=True,) + if options.source.is_dir(): + os.makedirs(final_target, exist_ok=True,) + else: + os.makedirs(final_target.parent, exist_ok=True,) - shutil.copy( - options.source, - final_target, - ) + subprocess.check_call([ + 'cp', '-rp', + str(options.source), + '-T', + str(final_target), + ]) + + #shutil.copy( + # options.source, + # final_target.parent, + #) logger.info(dict(msg='done'))