migrate: stow → chezmoi
- restructure repo to chezmoi conventions (dot_ prefix, private_dot_ssh/) - add nvim config (was untracked) - encrypt restic pass.txt with age - remove stow artifacts (.stow-local-ignore, stow package dirs) - update bootstrap.sh to use chezmoi apply - remove runtime files from tracking (micro buffers, zed backup)
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
|
||||
[terminal.shell]
|
||||
program = "/usr/bin/zsh"
|
||||
args = ["-l", "-c", "exec tmux new-session -A -s main 'fastfetch; exec zsh -l'"]
|
||||
|
||||
[window]
|
||||
decorations = "None" # без рамок и заголовка
|
||||
startup_mode = "Maximized" # просто растянутое окно
|
||||
opacity = 0.90
|
||||
padding = { x = 10, y = 1 }
|
||||
|
||||
[font]
|
||||
size = 15.0
|
||||
|
||||
[font.normal]
|
||||
family = "FiraCode Nerd Font Mono"
|
||||
style = "Regular"
|
||||
|
||||
[font.bold]
|
||||
family = "FiraCode Nerd Font Mono"
|
||||
style = "Bold"
|
||||
|
||||
[font.italic]
|
||||
family = "FiraCode Nerd Font Mono"
|
||||
style = "Italic"
|
||||
|
||||
[scrolling]
|
||||
history = 10000
|
||||
multiplier = 5
|
||||
|
||||
[selection]
|
||||
save_to_clipboard = true
|
||||
semantic_escape_chars = "@-./_~?&=%+#"
|
||||
|
||||
[mouse]
|
||||
hide_when_typing = false
|
||||
|
||||
[cursor]
|
||||
# kitty: beam + blinking
|
||||
blink_interval = 500
|
||||
thickness = 0.15
|
||||
|
||||
[cursor.style]
|
||||
shape = "Beam"
|
||||
blinking = "On"
|
||||
|
||||
[bell]
|
||||
# Disable visual bell by setting duration to 0; keep a valid easing to satisfy parser
|
||||
animation = "EaseOutExpo"
|
||||
duration = 0
|
||||
|
||||
# Nord color scheme
|
||||
# https://www.nordtheme.com/
|
||||
[colors.primary]
|
||||
background = "#2E3440"
|
||||
foreground = "#D8DEE9"
|
||||
|
||||
[colors.cursor]
|
||||
text = "#2E3440"
|
||||
cursor = "#D8DEE9"
|
||||
|
||||
[colors.selection]
|
||||
text = "#D8DEE9"
|
||||
background = "#434C5E"
|
||||
|
||||
[colors.normal]
|
||||
black = "#3B4252"
|
||||
red = "#BF616A"
|
||||
green = "#A3BE8C"
|
||||
yellow = "#EBCB8B"
|
||||
blue = "#81A1C1"
|
||||
magenta = "#B48EAD"
|
||||
cyan = "#88C0D0"
|
||||
white = "#E5E9F0"
|
||||
|
||||
[colors.bright]
|
||||
black = "#4C566A"
|
||||
red = "#BF616A"
|
||||
green = "#A3BE8C"
|
||||
yellow = "#EBCB8B"
|
||||
blue = "#81A1C1"
|
||||
magenta = "#B48EAD"
|
||||
cyan = "#8FBCBB"
|
||||
white = "#ECEFF4"
|
||||
|
||||
# Key bindings translated where possible
|
||||
[[keyboard.bindings]]
|
||||
key = "C"
|
||||
mods = "Control|Shift"
|
||||
action = "Copy"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "V"
|
||||
mods = "Control|Shift"
|
||||
action = "Paste"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Enter"
|
||||
mods = "Control|Shift"
|
||||
action = "SpawnNewInstance"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "F11"
|
||||
mods = "Control|Shift"
|
||||
action = "ToggleFullscreen"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Equals"
|
||||
mods = "Control|Shift"
|
||||
action = "IncreaseFontSize"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Minus"
|
||||
mods = "Control|Shift"
|
||||
action = "DecreaseFontSize"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Key0"
|
||||
mods = "Control|Shift"
|
||||
action = "ResetFontSize"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Up"
|
||||
mods = "Control|Shift"
|
||||
action = "ScrollLineUp"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Down"
|
||||
mods = "Control|Shift"
|
||||
action = "ScrollLineDown"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "PageUp"
|
||||
mods = "Control|Shift"
|
||||
action = "ScrollPageUp"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "PageDown"
|
||||
mods = "Control|Shift"
|
||||
action = "ScrollPageDown"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Home"
|
||||
mods = "Control|Shift"
|
||||
action = "ScrollToTop"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "End"
|
||||
mods = "Control|Shift"
|
||||
action = "ScrollToBottom"
|
||||
|
||||
[general]
|
||||
live_config_reload = true
|
||||
|
||||
[terminal]
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/master/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "small",
|
||||
"position": "left",
|
||||
"printRemaining": false,
|
||||
"padding": {
|
||||
"top": 2,
|
||||
"right": 1
|
||||
}
|
||||
},
|
||||
"display": {
|
||||
"separator": " ",
|
||||
"brightColor": false,
|
||||
"color": {
|
||||
"keys": "blue",
|
||||
"title": "cyan",
|
||||
"separator": "bright_black",
|
||||
"output": "white"
|
||||
},
|
||||
"key": {
|
||||
"width": 3,
|
||||
"type": "icon"
|
||||
},
|
||||
"duration": {
|
||||
"abbreviation": true
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
"title",
|
||||
"separator",
|
||||
{
|
||||
"type": "os",
|
||||
"key": "os",
|
||||
"format": "{name}"
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"key": "kernel",
|
||||
"format": "{release}"
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": "uptime"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"key": "age",
|
||||
"shell": "/bin/sh",
|
||||
"param": "-c",
|
||||
"text": "first=\"$(sed -n '1{s/^\\[\\([^]]*\\)\\].*/\\1/p;q}' /var/log/pacman.log)\"; if [ -n \"$first\" ]; then start=\"${first%%+*}\"; now=$(date +%s); then_ts=$(date -d \"$start\" +%s 2>/dev/null || true); if [ -n \"$then_ts\" ]; then days=$(( (now-then_ts)/86400 )); years=$(( days/365 )); rem=$(( days%365 )); if [ \"$years\" -gt 0 ]; then printf '%sy %sd\\n' \"$years\" \"$rem\"; else printf '%sd\\n' \"$days\"; fi; else echo n/a; fi; else echo n/a; fi"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"key": "shell",
|
||||
"format": "{pretty-name}"
|
||||
},
|
||||
{
|
||||
"type": "terminal",
|
||||
"key": "term",
|
||||
"format": "{pretty-name}"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "ram",
|
||||
"format": "{used}/{total} ({percentage})"
|
||||
},
|
||||
{
|
||||
"type": "disk",
|
||||
"key": "disk",
|
||||
"format": "{size-used}/{size-total} ({size-percentage})"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
# Adapted from alacritty/.config/alacritty/alacritty.toml
|
||||
# Reference: https://sw.kovidgoyal.net/kitty/conf/
|
||||
|
||||
# Launch shell and attach/create tmux session
|
||||
shell /usr/bin/zsh -l -c "tmux new-session -A -s main"
|
||||
|
||||
# Window appearance
|
||||
hide_window_decorations yes
|
||||
background_opacity 0.90
|
||||
# window_padding_width 1 1
|
||||
enable_tab_bar no
|
||||
# Alacritty startup_mode=maximized has no direct kitty.conf equivalent.
|
||||
# Use: kitty --start-as maximized
|
||||
|
||||
# Font
|
||||
font_family FiraCode Nerd Font Mono
|
||||
bold_font FiraCode Nerd Font Mono Bold
|
||||
italic_font FiraCode Nerd Font Mono Italic
|
||||
font_size 15.0
|
||||
|
||||
# Scrollback
|
||||
scrollback_lines 10000
|
||||
wheel_scroll_multiplier 5.0
|
||||
|
||||
# Selection behavior
|
||||
copy_on_select clipboard
|
||||
select_by_word_characters @-./_~?&=%+#
|
||||
|
||||
# Keep mouse cursor visible while typing
|
||||
mouse_hide_wait 0.0
|
||||
|
||||
# Cursor
|
||||
cursor_shape beam
|
||||
cursor_blink_interval 0.5
|
||||
cursor_beam_thickness 1.5
|
||||
|
||||
# Bell (disable visual bell)
|
||||
visual_bell_duration 0.0
|
||||
|
||||
# Nord color scheme
|
||||
foreground #D8DEE9
|
||||
background #2E3440
|
||||
|
||||
cursor #D8DEE9
|
||||
cursor_text_color #2E3440
|
||||
|
||||
selection_foreground #D8DEE9
|
||||
selection_background #434C5E
|
||||
|
||||
color0 #3B4252
|
||||
color1 #BF616A
|
||||
color2 #A3BE8C
|
||||
color3 #EBCB8B
|
||||
color4 #81A1C1
|
||||
color5 #B48EAD
|
||||
color6 #88C0D0
|
||||
color7 #E5E9F0
|
||||
|
||||
color8 #4C566A
|
||||
color9 #BF616A
|
||||
color10 #A3BE8C
|
||||
color11 #EBCB8B
|
||||
color12 #81A1C1
|
||||
color13 #B48EAD
|
||||
color14 #8FBCBB
|
||||
color15 #ECEFF4
|
||||
|
||||
# Key bindings aligned with Alacritty config
|
||||
map ctrl+shift+c copy_to_clipboard
|
||||
map ctrl+shift+v paste_from_clipboard
|
||||
map ctrl+shift+enter new_os_window
|
||||
map ctrl+shift+f11 toggle_fullscreen
|
||||
|
||||
map ctrl+shift+equal change_font_size all +2.0
|
||||
map ctrl+shift+minus change_font_size all -2.0
|
||||
map ctrl+shift+0 change_font_size all 0
|
||||
|
||||
map ctrl+shift+up scroll_line_up
|
||||
map ctrl+shift+down scroll_line_down
|
||||
map ctrl+shift+page_up scroll_page_up
|
||||
map ctrl+shift+page_down scroll_page_down
|
||||
map ctrl+shift+home scroll_home
|
||||
map ctrl+shift+end scroll_end
|
||||
@@ -0,0 +1 @@
|
||||
launch zsh -i -c 'fastfetch; exec zsh -l'
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"Alt-/": "lua:comment.comment",
|
||||
"Ctrl-Down": "CursorDown,CursorDown,CursorDown,CursorDown,CursorDown",
|
||||
"Ctrl-Up": "CursorUp,CursorUp,CursorUp,CursorUp,CursorUp",
|
||||
"CtrlUnderscore": "lua:comment.comment"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"autosu": true,
|
||||
"colorscheme": "simple",
|
||||
"mkparents": true,
|
||||
"rmtrailingws": true,
|
||||
"savecursor": true,
|
||||
"saveundo": true,
|
||||
"scrollbar": true,
|
||||
"statusformatl": "$(filename) $(modified)($(line),$(col)) $(opt:filetype) $(opt:fileformat)",
|
||||
"tabstospaces": true
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,4 @@
|
||||
# 💤 LazyVim
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"LazyVim": { "branch": "main", "commit": "83d90f339defdb109a6ede333865a66ffc7ef6aa" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "0c303573345e710a233f5ba75f9aadc05852771b" },
|
||||
"blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
|
||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
|
||||
"conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" },
|
||||
"copilot.lua": { "branch": "master", "commit": "adff470bca742b7658228ed144589250ecb3dc0a" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "21604255d0e8f9968322f61f2b6c09e5efe1285a" },
|
||||
"langmapper.nvim": { "branch": "main", "commit": "49462fd9f4f33cf8cfbaa779ba07d3c0b255cc06" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" },
|
||||
"mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" },
|
||||
"mini.ai": { "branch": "main", "commit": "43eb2074843950a3a25aae56a5f41362ec043bfa" },
|
||||
"mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" },
|
||||
"mini.pairs": { "branch": "main", "commit": "42387c7fe68fc0b6e95eaf37f1bb76e7bffaa0d9" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nord.nvim": { "branch": "main", "commit": "87394d4fc35c901bbe38326a78d31ab1ead826b6" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "81878de76c0de4ce289513734ad80c31ec7871b8" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.ai.copilot",
|
||||
"lazyvim.plugins.extras.lang.json"
|
||||
],
|
||||
"install_version": 8,
|
||||
"news": {
|
||||
"NEWS.md": "11866"
|
||||
},
|
||||
"version": 8
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
--
|
||||
-- Add any additional autocmds here
|
||||
-- with `vim.api.nvim_create_autocmd`
|
||||
--
|
||||
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
@@ -0,0 +1,53 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
{
|
||||
"gbprod/nord.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
transparent = false,
|
||||
terminal_colors = true,
|
||||
diff = { mode = "bg" },
|
||||
borders = true,
|
||||
errors = { mode = "bg" },
|
||||
styles = {
|
||||
comments = { italic = true },
|
||||
keywords = { bold = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "nord",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
{
|
||||
"Wansmer/langmapper.nvim",
|
||||
lazy = false,
|
||||
priority = 1,
|
||||
config = function()
|
||||
require("langmapper").setup({
|
||||
-- автоматически перехватывает все vim.keymap.set и дублирует для RU
|
||||
hack_keymap = true,
|
||||
-- стандартная ЙЦУКЕН — дефолт, явно не нужна
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
@@ -0,0 +1,114 @@
|
||||
# --- Контроль версий ---
|
||||
.git/
|
||||
.gitignore
|
||||
.hg/
|
||||
.svn/
|
||||
.fossil/
|
||||
|
||||
# --- Кэши пакетов и зависимостей ---
|
||||
.cache/pip/
|
||||
.cache/npm/
|
||||
.yarn/cache/
|
||||
.cargo/registry/
|
||||
~/.gradle/
|
||||
~/.m2/
|
||||
|
||||
# --- Зависимости (самое тяжелое) ---
|
||||
venv/
|
||||
.venv/
|
||||
env/
|
||||
node_modules/
|
||||
vendor/
|
||||
target/
|
||||
bin/
|
||||
obj/
|
||||
.gradle/
|
||||
.bundle/
|
||||
site-packages/
|
||||
|
||||
# --- Python ---
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
.pytest_cache/
|
||||
.mypy_cache/
|
||||
.hypothesis/
|
||||
.tox/
|
||||
.coverage/
|
||||
htmlcov/
|
||||
|
||||
# --- Ruby ---
|
||||
.rakeTasks
|
||||
InstalledFiles
|
||||
pkg/
|
||||
spec/reports/
|
||||
test/tmp/
|
||||
*.gem
|
||||
.ruby-version
|
||||
|
||||
# --- JavaScript / Node.js ---
|
||||
.npm/
|
||||
.eslintcache
|
||||
.parcel-cache/
|
||||
.next/
|
||||
.nuxt/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# --- Go ---
|
||||
vendor/
|
||||
*.o
|
||||
*.a
|
||||
|
||||
# --- Rust ---
|
||||
target/
|
||||
Cargo.lock
|
||||
|
||||
# --- Java ---
|
||||
*.class
|
||||
*.jar
|
||||
target/
|
||||
|
||||
# --- Системный мусор и IDE ---
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.idea/
|
||||
.vscode/
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
.eclipse/
|
||||
.gradle/
|
||||
.mvn/
|
||||
|
||||
# --- Логи и временные файлы ---
|
||||
*.log
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.sass-cache/
|
||||
.cache/
|
||||
tmp/
|
||||
temp/
|
||||
|
||||
# --- Системные каталоги ---
|
||||
.Trash-*/
|
||||
.trash/
|
||||
lost+found/
|
||||
|
||||
# --- Браузеры и интернет ---
|
||||
.mozilla/
|
||||
.cache/google-chrome/
|
||||
.cache/chromium/
|
||||
|
||||
# --- Виртуальные машины ---
|
||||
.vagrant/
|
||||
VirtualBox VMs/
|
||||
|
||||
# --- Прочее ---
|
||||
.git/history
|
||||
.git/refs/
|
||||
*.lock
|
||||
.env.local
|
||||
.env.*.local
|
||||
@@ -0,0 +1,5 @@
|
||||
age-encryption.org/v1
|
||||
-> X25519 EIZIyjM8GxEL7eAtSebeqD+0Byf+OOAYNJjPIhQ51BY
|
||||
gYWk1Emv5NbIZOGEWRAcJBSkMEROUeLTEEYDd9KxuAg
|
||||
--- Dk6oyb1AYDJCOa38S3bj1Q06t9AZe1FYfeAJypQWNwI
|
||||
gë—¨øJ£$Yz±6®-bƒ\¦™.ÿx™‰[~HBºAÔÔ`¾é‘iEƒ8Š:£
|
||||
@@ -0,0 +1,122 @@
|
||||
groups:
|
||||
all:
|
||||
- projects
|
||||
- projects-local
|
||||
- vaults
|
||||
- vaults-local
|
||||
- files
|
||||
- files-local
|
||||
- pictures
|
||||
- pictures-local
|
||||
schedule: "0 * * * *"
|
||||
|
||||
projects:
|
||||
repository: "rclone:yadisk:System/Backups/ada-x1/Documents/Projects"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Documents/Projects
|
||||
schedule: "*-*-* 20:30:00" # каждый час в 15 минут
|
||||
forget:
|
||||
keep-last: 24
|
||||
keep-daily: 14
|
||||
keep-monthly: 3
|
||||
exclude:
|
||||
- "**/.git"
|
||||
- "**/node_modules"
|
||||
- "**/.venv"
|
||||
- "**/target"
|
||||
|
||||
# Локальное зеркало projects
|
||||
projects-local:
|
||||
repository: "rclone:home-smb:backup/backups/ada-x1/Documents/Projects"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Documents/Projects
|
||||
forget:
|
||||
keep-last: 24
|
||||
keep-daily: 14
|
||||
keep-monthly: 3
|
||||
exclude:
|
||||
- "**/.git"
|
||||
- "**/node_modules"
|
||||
- "**/.venv"
|
||||
- "**/target"
|
||||
|
||||
# Важные данные
|
||||
vaults:
|
||||
repository: "rclone:yadisk:System/Backups/ada-x1/Documents/Vaults"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Documents/Vaults
|
||||
schedule: "*-*-* 20:30:00"
|
||||
forget:
|
||||
keep-last: 12
|
||||
keep-daily: 7
|
||||
keep-monthly: 12
|
||||
|
||||
# Локальное зеркало vaults
|
||||
vaults-local:
|
||||
repository: "rclone:home-smb:backup/backups/ada-x1/Documents/Vaults"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Documents/Vaults
|
||||
forget:
|
||||
keep-last: 12
|
||||
keep-daily: 7
|
||||
keep-monthly: 12
|
||||
|
||||
# Документы
|
||||
files:
|
||||
repository: "rclone:yadisk:System/Backups/ada-x1/Documents/Files"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Documents/Files
|
||||
schedule: "*-*-* 20:30:00" # 02:15 каждый день
|
||||
forget:
|
||||
keep-daily: 30
|
||||
keep-weekly: 12
|
||||
keep-yearly: 1
|
||||
|
||||
# Локальное зеркало files
|
||||
files-local:
|
||||
repository: "rclone:home-smb:backup/backups/ada-x1/Documents/Files"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Documents/Files
|
||||
forget:
|
||||
keep-daily: 30
|
||||
keep-weekly: 12
|
||||
keep-yearly: 1
|
||||
|
||||
# Фотографии и видео
|
||||
pictures:
|
||||
repository: "rclone:yadisk:System/Backups/ada-x1/Pictures"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Pictures
|
||||
schedule: "*-*-* 20:30:00" # 03:30 каждый день
|
||||
forget:
|
||||
keep-daily: 14
|
||||
keep-weekly: 8
|
||||
keep-monthly: 12
|
||||
keep-yearly: 2
|
||||
|
||||
# Локальное зеркало pictures
|
||||
pictures-local:
|
||||
repository: "rclone:home-smb:backup/backups/ada-x1/Pictures"
|
||||
password-file: "/home/ada/.config/resticprofile/pass.txt"
|
||||
backup:
|
||||
source:
|
||||
- /home/ada/Pictures
|
||||
forget:
|
||||
keep-daily: 14
|
||||
keep-weekly: 8
|
||||
keep-monthly: 12
|
||||
keep-yearly: 2
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"disable_ai": true,
|
||||
"restore_on_startup": "launchpad",
|
||||
"base_keymap": "VSCode",
|
||||
"use_smartcase_search": true,
|
||||
"minimap": {
|
||||
"show": "never",
|
||||
},
|
||||
"scrollbar": {
|
||||
"axes": {
|
||||
"horizontal": true,
|
||||
"vertical": true,
|
||||
},
|
||||
},
|
||||
"cursor_blink": true,
|
||||
"colorize_brackets": true,
|
||||
"auto_indent_on_paste": true,
|
||||
"show_whitespaces": "selection",
|
||||
"ensure_final_newline_on_save": true,
|
||||
"indent_guides": {
|
||||
"enabled": true,
|
||||
},
|
||||
"preferred_line_length": 100,
|
||||
"soft_wrap": "editor_width",
|
||||
"hard_tabs": false,
|
||||
"tab_size": 4,
|
||||
"session": {
|
||||
"trust_all_worktrees": true,
|
||||
},
|
||||
"edit_predictions": {
|
||||
"provider": "none",
|
||||
},
|
||||
"outline_panel": {
|
||||
"git_status": true,
|
||||
"auto_fold_dirs": true,
|
||||
},
|
||||
"use_system_window_tabs": true,
|
||||
"centered_layout": {
|
||||
"left_padding": 0.2,
|
||||
},
|
||||
"redact_private_values": true,
|
||||
"cursor_shape": "bar",
|
||||
"autosave": {
|
||||
"after_delay": {
|
||||
"milliseconds": 5000,
|
||||
},
|
||||
},
|
||||
"preview_tabs": {
|
||||
"enabled": true,
|
||||
"enable_preview_from_multibuffer": true,
|
||||
"enable_preview_from_file_finder": false,
|
||||
},
|
||||
"pane_split_direction_vertical": "right",
|
||||
"zoomed_padding": true,
|
||||
"active_pane_modifiers": {
|
||||
"inactive_opacity": 1.0,
|
||||
"border_size": 0.0,
|
||||
},
|
||||
"status_bar": {
|
||||
"experimental.show": true,
|
||||
"active_language_button": true,
|
||||
"cursor_position_button": true,
|
||||
},
|
||||
"terminal": {
|
||||
"font_family": "FiraCode Nerd Font Mono",
|
||||
"font_size": 14.0,
|
||||
"dock": "bottom",
|
||||
"button": true,
|
||||
},
|
||||
"diagnostics": {
|
||||
"button": true,
|
||||
},
|
||||
"search": {
|
||||
"button": true,
|
||||
},
|
||||
"debugger": {
|
||||
"button": true,
|
||||
},
|
||||
"tabs": {
|
||||
"show_diagnostics": "errors",
|
||||
"close_position": "right",
|
||||
"file_icons": true,
|
||||
"git_status": true,
|
||||
},
|
||||
"tab_bar": {
|
||||
"show": true,
|
||||
},
|
||||
"title_bar": {
|
||||
"show_menus": false,
|
||||
"show_user_picture": false,
|
||||
"show_onboarding_banner": true,
|
||||
"show_project_items": true,
|
||||
"show_branch_name": true,
|
||||
"show_branch_icon": true,
|
||||
},
|
||||
"project_panel": {
|
||||
"sort_mode": "directories_first",
|
||||
"dock": "right",
|
||||
"hide_root": true,
|
||||
"button": true,
|
||||
"indent_size": 15.0,
|
||||
"git_status": true,
|
||||
"folder_icons": true,
|
||||
"file_icons": true,
|
||||
"hide_gitignore": false,
|
||||
},
|
||||
"agent": {
|
||||
"enable_feedback": false,
|
||||
"tool_permissions": {
|
||||
"default": "allow",
|
||||
},
|
||||
"button": true,
|
||||
"inline_assistant_model": {
|
||||
"provider": "copilot_chat",
|
||||
"model": "grok-code-fast-1",
|
||||
},
|
||||
"default_profile": "write",
|
||||
"default_model": {
|
||||
"effort": "high",
|
||||
"provider": "copilot_chat",
|
||||
"model": "gpt-5.4-mini",
|
||||
},
|
||||
"model_parameters": [],
|
||||
},
|
||||
"collaboration_panel": {
|
||||
"button": false,
|
||||
"dock": "right",
|
||||
},
|
||||
"ui_font_family": "FiraCode Nerd Font Mono",
|
||||
"telemetry": {
|
||||
"diagnostics": false,
|
||||
"metrics": false,
|
||||
},
|
||||
"buffer_font_weight": 400.0,
|
||||
"ui_font_weight": 400.0,
|
||||
"buffer_font_family": "FiraCode Nerd Font Propo",
|
||||
"buffer_line_height": "comfortable",
|
||||
"icon_theme": {
|
||||
"mode": "system",
|
||||
"light": "Material Icon Theme",
|
||||
"dark": "Material Icon Theme",
|
||||
},
|
||||
"ui_font_size": 16.0,
|
||||
"buffer_font_size": 14.0,
|
||||
"proxy": "socks5://127.0.0.1:7897",
|
||||
// "proxy": "socks5://ada:%3FHolivarr588856@157.22.231.198:1081",
|
||||
"theme": {
|
||||
"mode": "system",
|
||||
"light": "Ayu Light",
|
||||
"dark": "Nordfox - blurred",
|
||||
},
|
||||
"features": {
|
||||
"notebooks": true,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Aliases
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Навигация ═════════════════════════════════════════════
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
|
||||
# Быстрый переход в часто используемые директории
|
||||
alias dl='cd ~/Downloads'
|
||||
alias dt='cd ~/Desktop'
|
||||
alias doc='cd ~/Documents'
|
||||
alias dev='cd ~/dev'
|
||||
|
||||
# zoxide - умная навигация (если установлен)
|
||||
if command -v zoxide &>/dev/null; then
|
||||
alias cd='z' # заменить cd на z
|
||||
alias cdi='zi' # интерактивный выбор через fzf
|
||||
alias cdq='zoxide query'
|
||||
alias cdr='zoxide remove'
|
||||
fi
|
||||
|
||||
# ═══ Списки файлов ═════════════════════════════════════════
|
||||
# Использовать eza если доступен, иначе ls с цветами
|
||||
if command -v eza &>/dev/null; then
|
||||
alias ls='eza --icons --group-directories-first'
|
||||
alias ll='eza -l --icons --group-directories-first --git'
|
||||
alias la='eza -la --icons --group-directories-first --git'
|
||||
alias lt='eza --tree --level=2 --icons'
|
||||
alias l='eza -lah --icons --group-directories-first --git'
|
||||
else
|
||||
alias ls='ls --color=auto --group-directories-first'
|
||||
alias ll='ls -lh --color=auto --group-directories-first'
|
||||
alias la='ls -lAh --color=auto --group-directories-first'
|
||||
alias l='ls -lah --color=auto --group-directories-first'
|
||||
fi
|
||||
|
||||
# ═══ Безопасность ══════════════════════════════════════════
|
||||
alias rm='rm -i'
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
|
||||
# ═══ Системные команды ═════════════════════════════════════
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
alias df='df -h'
|
||||
alias du='du -h'
|
||||
alias free='free -h'
|
||||
|
||||
# ═══ Сеть ══════════════════════════════════════════════════
|
||||
alias ping='ping -c 5'
|
||||
alias ports='netstat -tulanp'
|
||||
# myip определена как функция в functions.zsh (более полная версия)
|
||||
alias localip="ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v 127.0.0.1"
|
||||
|
||||
# Proxy
|
||||
# Включение прокси (HTTP, HTTPS и SOCKS5h для DNS через прокси)
|
||||
alias proxy-on='export http_proxy="http://127.0.0.1:7897" https_proxy="http://127.0.0.1:7897" ALL_PROXY="socks5://127.0.0.1:7897" all_proxy="socks5://127.0.0.1:7897" && echo " Proxy enabled (127.0.0.1:7897)"'
|
||||
|
||||
# Полное отключение всех переменных прокси
|
||||
alias proxy-off='unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY && echo " Proxy disabled"'
|
||||
alias proxy-status='env | grep -i proxy'
|
||||
|
||||
|
||||
# ═══ Git ═══════════════════════════════════════════════════
|
||||
alias g='git'
|
||||
alias gs='git status'
|
||||
alias gst='git --no-pager status' # без пейджера
|
||||
alias ga='git add'
|
||||
alias gaa='git add .'
|
||||
alias gc='git commit'
|
||||
alias gcm='git commit -m'
|
||||
alias gp='git push'
|
||||
alias gpl='git pull'
|
||||
alias gd='git diff'
|
||||
alias gco='git checkout'
|
||||
alias gb='git branch'
|
||||
alias gl='git log --oneline --graph --decorate'
|
||||
alias glog='git log --oneline --graph --decorate --all'
|
||||
|
||||
# ═══ Docker ════════════════════════════════════════════════
|
||||
if command -v docker &>/dev/null; then
|
||||
alias d='docker'
|
||||
alias dc='docker-compose'
|
||||
alias dps='docker ps'
|
||||
alias dpsa='docker ps -a'
|
||||
alias di='docker images'
|
||||
alias dex='docker exec -it'
|
||||
alias dlog='docker logs -f'
|
||||
alias dstop='docker stop $(docker ps -aq)'
|
||||
alias drm='docker rm $(docker ps -aq)'
|
||||
alias drmi='docker rmi $(docker images -q)'
|
||||
alias dclean='docker system prune -af --volumes'
|
||||
fi
|
||||
|
||||
# ═══ Kubectl ═══════════════════════════════════════════════
|
||||
if command -v kubectl &>/dev/null; then
|
||||
alias k='kubectl'
|
||||
alias kgp='kubectl get pods'
|
||||
alias kgs='kubectl get services'
|
||||
alias kgd='kubectl get deployments'
|
||||
alias kdp='kubectl describe pod'
|
||||
alias kds='kubectl describe service'
|
||||
alias kdd='kubectl describe deployment'
|
||||
alias kl='kubectl logs -f'
|
||||
alias kex='kubectl exec -it'
|
||||
fi
|
||||
|
||||
# ═══ Ruby (rbenv) ══════════════════════════════════════════
|
||||
if command -v rbenv &>/dev/null; then
|
||||
alias rb='ruby'
|
||||
alias be='bundle exec'
|
||||
alias bi='bundle install'
|
||||
alias bu='bundle update'
|
||||
fi
|
||||
|
||||
# ═══ Python ════════════════════════════════════════════════
|
||||
alias py='python3'
|
||||
alias pip='pip3'
|
||||
alias venv='python3 -m venv'
|
||||
|
||||
# ═══ Node.js ═══════════════════════════════════════════════
|
||||
alias ni='npm install'
|
||||
alias nid='npm install --save-dev'
|
||||
|
||||
alias nig='npm install -g'
|
||||
alias nr='npm run'
|
||||
alias ns='npm start'
|
||||
alias nt='npm test'
|
||||
|
||||
# ═══ Утилиты ═══════════════════════════════════════════════
|
||||
alias reload='source ~/.config/zsh/.zshrc'
|
||||
alias path='echo $PATH | tr ":" "\n"'
|
||||
alias h='history'
|
||||
alias c='clear'
|
||||
alias x='exit'
|
||||
alias rsend='sudo rsync -avhP --stats'
|
||||
alias wakemac='ssh vps "wakeonlan -i 192.168.1.255 FC:34:97:E1:08:E9"'
|
||||
|
||||
alias zshrc='${EDITOR} ~/.config/zsh/.zshrc'
|
||||
alias reload='source ~/.config/zsh/.zshrc'
|
||||
alias path='echo $PATH | tr ":" "\n"'
|
||||
|
||||
# Использовать bat вместо cat, если установлен
|
||||
if command -v bat &>/dev/null; then
|
||||
alias cat='bat'
|
||||
fi
|
||||
|
||||
alias h='history'
|
||||
alias c='clear'
|
||||
alias x='exit'
|
||||
alias rsend='sudo rsync -avhP --stats'
|
||||
alias wakemac='ssh vps "wakeonlan -i 192.168.1.255 FC:34:97:E1:08:E9"'
|
||||
|
||||
|
||||
|
||||
# Быстрое обновление системы (для разных дистрибутивов)
|
||||
if command -v apt &>/dev/null; then
|
||||
alias update='sudo apt update && sudo apt upgrade -y'
|
||||
elif command -v pacman &>/dev/null; then
|
||||
alias update='sudo pacman -Syu'
|
||||
elif command -v dnf &>/dev/null; then
|
||||
alias update='sudo dnf upgrade -y'
|
||||
elif command -v zypper &>/dev/null; then
|
||||
alias update='sudo zypper refresh && sudo zypper update -y'
|
||||
fi
|
||||
|
||||
# Универсальная установка пакетов (для разных дистрибутивов)
|
||||
if command -v apt &>/dev/null; then
|
||||
alias install='sudo apt install -y'
|
||||
elif command -v pacman &>/dev/null; then
|
||||
alias install='sudo pacman -S --noconfirm'
|
||||
elif command -v dnf &>/dev/null; then
|
||||
alias install='sudo dnf install -y'
|
||||
elif command -v zypper &>/dev/null; then
|
||||
alias install='sudo zypper install -y'
|
||||
fi
|
||||
|
||||
# ═══ Прочее ════════════════════════════════════════════════
|
||||
alias cheat='curl cheat.sh'
|
||||
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
|
||||
alias lidon='sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target'
|
||||
alias lidoff='sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target'
|
||||
# alias gemini='NODE_NO_WARNINGS=1 npx @google/gemini-cli'
|
||||
alias sshvpn='sshuttle --dns -r fl-vps 0/0 -X ~/.dotfiles/configs/.exclude-ip.txt'
|
||||
|
||||
alias sshp-fg='ssh -D 127.0.0.1:1080 fl-vps -v sleep 9999'
|
||||
|
||||
alias gbackup='git add . && git commit -m "backup: $(date +"%Y-%m-%d %H:%M")" && git push && git remote get-url upstream &>/dev/null && git push upstream || true'
|
||||
|
||||
alias db_rev='rails db:drop && rails db:create && rails db:migrate && rails db:seed'
|
||||
|
||||
alias zed='zeditor'
|
||||
alias dotfiles='$VISUAL ~/dotfiles'
|
||||
alias ua-drop-caches='sudo paccache -rk3; paru -Sc --noconfirm'
|
||||
alias ua-update-all='export TMPFILE="$(mktemp)"; \
|
||||
sudo true; \
|
||||
rate-mirrors --save=$TMPFILE arch --max-delay=21600 \
|
||||
&& sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup \
|
||||
&& sudo mv $TMPFILE /etc/pacman.d/mirrorlist \
|
||||
&& paru -Syyu --noconfirm \
|
||||
&& ua-drop-caches'
|
||||
@@ -0,0 +1,94 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Completion Settings
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Инициализация ═════════════════════════════════════════
|
||||
autoload -Uz compinit
|
||||
|
||||
# Проверять новые автодополнения раз в день
|
||||
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
|
||||
compinit
|
||||
touch ${ZDOTDIR}/.zcompdump
|
||||
else
|
||||
compinit -C
|
||||
fi
|
||||
|
||||
# ═══ Кэш дополнений ════════════════════════════════════════
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path "${XDG_CACHE_HOME}/zsh/zcompcache"
|
||||
|
||||
# Создать директорию для кэша если не существует
|
||||
[[ ! -d "${XDG_CACHE_HOME}/zsh" ]] && mkdir -p "${XDG_CACHE_HOME}/zsh"
|
||||
|
||||
# ═══ Меню выбора ═══════════════════════════════════════════
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' verbose yes
|
||||
|
||||
# ═══ Форматирование ════════════════════════════════════════
|
||||
zstyle ':completion:*:descriptions' format '%F{blue}-- %d --%f'
|
||||
zstyle ':completion:*:messages' format '%F{purple}-- %d --%f'
|
||||
zstyle ':completion:*:warnings' format '%F{red}-- no matches found --%f'
|
||||
zstyle ':completion:*:corrections' format '%F{yellow}-- %d (errors: %e) --%f'
|
||||
|
||||
# ═══ Сопоставление ═════════════════════════════════════════
|
||||
zstyle ':completion:*' matcher-list \
|
||||
'm:{a-zA-Z}={A-Za-z}' \
|
||||
'r:|[._-]=* r:|=*' \
|
||||
'l:|=* r:|=*'
|
||||
|
||||
# ═══ Цвета ═════════════════════════════════════════════════
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' list-colors ''
|
||||
|
||||
# ═══ Процессы ══════════════════════════════════════════════
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
|
||||
|
||||
# Не предлагать уже использованные опции
|
||||
zstyle ':completion:*:*:kill:*' ignore-line yes
|
||||
|
||||
# ═══ Команды ═══════════════════════════════════════════════
|
||||
# Игнорировать внутренние функции (начинающиеся с _)
|
||||
zstyle ':completion:*:functions' ignored-patterns '_*'
|
||||
|
||||
# ═══ Директории ════════════════════════════════════════════
|
||||
zstyle ':completion:*' special-dirs true
|
||||
zstyle ':completion:*' list-dirs-first true
|
||||
|
||||
# Игнорировать родительскую директорию
|
||||
zstyle ':completion:*:cd:*' ignore-parents parent pwd
|
||||
|
||||
# ═══ Хосты ═════════════════════════════════════════════════
|
||||
zstyle ':completion:*:ssh:*' hosts off
|
||||
zstyle ':completion:*:scp:*' hosts off
|
||||
|
||||
# Читать хосты из ~/.ssh/config
|
||||
if [[ -f ~/.ssh/config ]]; then
|
||||
h=()
|
||||
if [[ -r ~/.ssh/config ]]; then
|
||||
h=(${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*})
|
||||
fi
|
||||
zstyle ':completion:*:ssh:*' hosts $h
|
||||
zstyle ':completion:*:scp:*' hosts $h
|
||||
fi
|
||||
|
||||
# ═══ Man страницы ══════════════════════════════════════════
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
|
||||
# ═══ Автодополнение для sudo ═══════════════════════════════
|
||||
zstyle ':completion:*:sudo:*' command-path \
|
||||
/usr/local/sbin \
|
||||
/usr/local/bin \
|
||||
/usr/sbin \
|
||||
/usr/bin \
|
||||
/sbin \
|
||||
/bin
|
||||
|
||||
# ═══ Массивы ═══════════════════════════════════════════════
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
|
||||
# ═══ Расширения ════════════════════════════════════════════
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
zstyle ':completion:*' expand yes
|
||||
@@ -0,0 +1,96 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Environment Variables
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Основные пути ═════════════════════════════════════════
|
||||
export EDITOR="${EDITOR:-nano}"
|
||||
export VISUAL="${VISUAL:-zeditor}"
|
||||
export PAGER="less"
|
||||
export SUDO_EDITOR="zeditor --wait"
|
||||
|
||||
# ═══ XDG Base Directories ══════════════════════════════════
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
|
||||
# ═══ История команд ════════════════════════════════════════
|
||||
export HISTFILE="${XDG_STATE_HOME}/zsh/history"
|
||||
export HISTSIZE=50000
|
||||
export SAVEHIST=50000
|
||||
|
||||
# Создать директорию для истории если не существует
|
||||
[[ ! -d "$(dirname $HISTFILE)" ]] && mkdir -p "$(dirname $HISTFILE)"
|
||||
|
||||
# Добавить Zed в PATH
|
||||
export PATH="${HOME}/.local/bin/zed:${PATH}"
|
||||
export PATH="${HOME}/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/cli-bin:${PATH}"
|
||||
|
||||
# ═══ Less ══════════════════════════════════════════════════
|
||||
export LESS='-R -M -i -j10'
|
||||
export LESSHISTFILE="${XDG_CACHE_HOME}/less/history"
|
||||
|
||||
# ═══ Ruby (rbenv) ══════════════════════════════════════════
|
||||
if [[ -d "${HOME}/.rbenv" ]]; then
|
||||
export PATH="${HOME}/.rbenv/bin:${PATH}"
|
||||
command -v rbenv &>/dev/null && eval "$(rbenv init - zsh)"
|
||||
fi
|
||||
|
||||
# ═══ asdf ══ ═════════════════════════════════════════════
|
||||
if [[ -f "$HOME/.asdf/asdf.sh" ]]; then
|
||||
. "$HOME/.asdf/asdf.sh"
|
||||
fi
|
||||
|
||||
# ═══ Node.js ═══════════════════════════════════════════════
|
||||
# Если используете nvm
|
||||
export NVM_DIR="${XDG_CONFIG_HOME}/nvm"
|
||||
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" --no-use # Ленивая загрузка
|
||||
|
||||
# ═══ Python ════════════════════════════════════════════════
|
||||
# Отключить создание .pyc файлов
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
# export PYENV_ROOT="$HOME/.pyenv"
|
||||
# export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
# ═══ Go ════════════════════════════════════════════════════
|
||||
export GOPATH="${HOME}/go"
|
||||
export PATH="${GOPATH}/bin:${PATH}"
|
||||
|
||||
# ═══ Rust ══════════════════════════════════════════════════
|
||||
export CARGO_HOME="${HOME}/.cargo"
|
||||
export PATH="${CARGO_HOME}/bin:${PATH}"
|
||||
|
||||
# ═══ Локальные бинарники ═══════════════════════════════════
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
|
||||
# ═══ Цвета ═════════════════════════════════════════════════
|
||||
export CLICOLOR=1
|
||||
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43'
|
||||
|
||||
# ═══ FZF ═══════════════════════════════════════════════════
|
||||
export FZF_DEFAULT_OPTS="
|
||||
--height 40%
|
||||
--layout=reverse
|
||||
--border
|
||||
--inline-info
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc
|
||||
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8
|
||||
"
|
||||
|
||||
# Использовать fd вместо find если доступен
|
||||
if command -v fd &>/dev/null; then
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
fi
|
||||
|
||||
if command -v zoxide &>/dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
if command -v direnv >/dev/null 2>&1; then
|
||||
eval "$(direnv hook zsh)"
|
||||
fi
|
||||
|
||||
export SSH_AUTH_SOCK='/home/ada/.bitwarden-ssh-agent.sock'
|
||||
@@ -0,0 +1,287 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Custom Functions
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Навигация ═════════════════════════════════════════════
|
||||
|
||||
# mkcd - создать директорию и перейти в неё
|
||||
mkcd() {
|
||||
mkdir -p "$1" && cd "$1"
|
||||
}
|
||||
|
||||
# up - подняться на N уровней вверх
|
||||
up() {
|
||||
local d=""
|
||||
local limit="${1:-1}"
|
||||
for ((i=1; i<=limit; i++)); do
|
||||
d="../$d"
|
||||
done
|
||||
|
||||
if [[ -z "$d" ]]; then
|
||||
d=..
|
||||
fi
|
||||
|
||||
cd "$d" || return
|
||||
}
|
||||
|
||||
# ═══ Поиск ═════════════════════════════════════════════════
|
||||
|
||||
# ff - быстрый поиск файлов
|
||||
ff() {
|
||||
if command -v fd &>/dev/null; then
|
||||
fd "$@"
|
||||
else
|
||||
find . -iname "*$1*"
|
||||
fi
|
||||
}
|
||||
|
||||
# fh - поиск в истории команд с fzf
|
||||
fh() {
|
||||
if command -v fzf &>/dev/null; then
|
||||
print -z $(history -n 1 | fzf --tac --no-sort)
|
||||
else
|
||||
history | grep "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# ═══ Файлы и директории ════════════════════════════════════
|
||||
|
||||
# extract - универсальная распаковка (если плагин не загружен)
|
||||
if ! command -v extract &>/dev/null; then
|
||||
extract() {
|
||||
if [[ -f $1 ]]; then
|
||||
case $1 in
|
||||
*.tar.bz2) tar xjf "$1" ;;
|
||||
*.tar.gz) tar xzf "$1" ;;
|
||||
*.tar.xz) tar xJf "$1" ;;
|
||||
*.bz2) bunzip2 "$1" ;;
|
||||
*.rar) unrar x "$1" ;;
|
||||
*.gz) gunzip "$1" ;;
|
||||
*.tar) tar xf "$1" ;;
|
||||
*.tbz2) tar xjf "$1" ;;
|
||||
*.tgz) tar xzf "$1" ;;
|
||||
*.zip) unzip "$1" ;;
|
||||
*.Z) uncompress "$1" ;;
|
||||
*.7z) 7z x "$1" ;;
|
||||
*) echo "'$1' cannot be extracted via extract()" ;;
|
||||
esac
|
||||
else
|
||||
echo "'$1' is not a valid file"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
# backup - создать резервную копию файла
|
||||
backup() {
|
||||
if [[ -f $1 ]]; then
|
||||
cp "$1"{,.backup-$(date +%Y%m%d-%H%M%S)}
|
||||
echo "Backup created: $1.backup-$(date +%Y%m%d-%H%M%S)"
|
||||
else
|
||||
echo "File not found: $1"
|
||||
fi
|
||||
}
|
||||
|
||||
# ═══ Размер файлов ═════════════════════════════════════════
|
||||
|
||||
# dirsize - показать размер директории
|
||||
dirsize() {
|
||||
du -sh "${1:-.}" 2>/dev/null || echo "Directory not found"
|
||||
}
|
||||
|
||||
# largest - показать N самых больших файлов в директории
|
||||
largest() {
|
||||
local num=${1:-10}
|
||||
du -ah "${2:-.}" | sort -rh | head -n "$num"
|
||||
}
|
||||
|
||||
# ═══ Процессы ══════════════════════════════════════════════
|
||||
|
||||
# psgrep - поиск процессов
|
||||
psgrep() {
|
||||
ps aux | grep -v grep | grep -i -e VSZ -e "$1"
|
||||
}
|
||||
|
||||
# kill процесс по имени
|
||||
killp() {
|
||||
local pid
|
||||
pid=$(ps aux | grep -v grep | grep "$1" | awk '{print $2}')
|
||||
if [[ -n $pid ]]; then
|
||||
echo "Killing process: $1 (PID: $pid)"
|
||||
kill -9 "$pid"
|
||||
else
|
||||
echo "Process not found: $1"
|
||||
fi
|
||||
}
|
||||
|
||||
# ═══ Сеть ══════════════════════════════════════════════════
|
||||
|
||||
# myip - показать все IP адреса
|
||||
myip() {
|
||||
echo "External IP: $(curl -s ifconfig.me)"
|
||||
echo "Local IPs:"
|
||||
ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v 127.0.0.1
|
||||
}
|
||||
|
||||
# ports - показать открытые порты
|
||||
openports() {
|
||||
sudo netstat -tulanp | grep LISTEN
|
||||
}
|
||||
|
||||
# ═══ Git ═══════════════════════════════════════════════════
|
||||
|
||||
# gitignore - скачать .gitignore для языка
|
||||
gitignore() {
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: gitignore <language>"
|
||||
return 1
|
||||
fi
|
||||
curl -sL "https://www.toptal.com/developers/gitignore/api/$1" -o .gitignore
|
||||
echo ".gitignore created for: $1"
|
||||
}
|
||||
|
||||
# gclone - клонировать репозиторий и перейти в него
|
||||
gclone() {
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: gclone <repository>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local repo_name=$(basename "$1" .git)
|
||||
git clone "$1" && cd "$repo_name" || return
|
||||
}
|
||||
|
||||
# ═══ Разработка ════════════════════════════════════════════
|
||||
|
||||
# serve - быстрый HTTP сервер
|
||||
serve() {
|
||||
local port="${1:-8000}"
|
||||
if command -v python3 &>/dev/null; then
|
||||
echo "Starting server on http://localhost:$port"
|
||||
python3 -m http.server "$port"
|
||||
else
|
||||
echo "Python3 not found"
|
||||
fi
|
||||
}
|
||||
|
||||
# json - форматировать JSON
|
||||
json() {
|
||||
if [[ -f $1 ]]; then
|
||||
python3 -m json.tool "$1"
|
||||
else
|
||||
echo "$1" | python3 -m json.tool
|
||||
fi
|
||||
}
|
||||
|
||||
# ═══ Утилиты ═══════════════════════════════════════════════
|
||||
|
||||
# weather - погода для города
|
||||
weather() {
|
||||
local city="${1:-Moscow}"
|
||||
curl -s "wttr.in/$city?format=3"
|
||||
}
|
||||
|
||||
# Функция для монтирования облаков
|
||||
mount-clouds() {
|
||||
mkdir -p ~/YaDisk ~/GDrive
|
||||
echo "Монтирую диски..."
|
||||
|
||||
# Яндекс.Диск
|
||||
rclone mount yadisk: ~/YaDisk \
|
||||
--vfs-cache-mode writes \
|
||||
--vfs-cache-max-size 10G \
|
||||
--vfs-cache-max-age 2h \
|
||||
--allow-non-empty \
|
||||
--daemon
|
||||
|
||||
# Google Drive
|
||||
rclone mount gdrive: ~/GDrive \
|
||||
--vfs-cache-mode writes \
|
||||
--vfs-cache-max-size 10G \
|
||||
--vfs-cache-max-age 2h \
|
||||
--allow-non-empty \
|
||||
--daemon
|
||||
|
||||
echo "Готово! Проверяю монтирование:"
|
||||
ls ~/YaDisk >/dev/null 2>&1 && echo "✅ YaDisk смонтирован" || echo "⚠️ Ошибка монтирования YaDisk"
|
||||
ls ~/GDrive >/dev/null 2>&1 && echo "✅ GDrive смонтирован" || echo "⚠️ Ошибка монтирования GDrive"
|
||||
}
|
||||
# Функция для размонтирования
|
||||
unmount-clouds() {
|
||||
echo "Отключаю диски..."
|
||||
|
||||
fusermount -uz ~/YaDisk 2>/dev/null && echo "✅ YaDisk отключен" || echo "⚠️ YaDisk не был примонтирован"
|
||||
fusermount -uz ~/GDrive 2>/dev/null && echo "✅ GDrive отключен" || echo "⚠️ GDrive не был примонтирован"
|
||||
}
|
||||
|
||||
|
||||
SSH_PROXY_PID_FILE="/tmp/ssh_proxy.pid"
|
||||
# Адрес Privoxy, который слушает HTTP и перенаправляет в SOCKS5
|
||||
# 1. Запуск
|
||||
sshp-start() {
|
||||
if [ -f "$SSH_PROXY_PID_FILE" ] && kill -0 $(cat "$SSH_PROXY_PID_FILE") 2>/dev/null; then
|
||||
echo "Ошибка: Прокси уже запущен (PID: $(cat $SSH_PROXY_PID_FILE))"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Запуск SSH в фоновом режиме
|
||||
ssh -fN -D 127.0.0.1:1080 fl-vps
|
||||
|
||||
# Сохранение PID последнего запущенного процесса
|
||||
pgrep -f "ssh -fN -D 127.0.0.1:1080 fl-vps" > "$SSH_PROXY_PID_FILE"
|
||||
echo "SSH прокси (SOCKS5) запущен на 127.0.0.1:1080."
|
||||
}
|
||||
|
||||
# 2. Остановка
|
||||
sshp-stop() {
|
||||
if [ -f "$SSH_PROXY_PID_FILE" ]; then
|
||||
PID=$(cat "$SSH_PROXY_PID_FILE")
|
||||
if kill "$PID" 2>/dev/null; then
|
||||
rm -f "$SSH_PROXY_PID_FILE"
|
||||
echo "SSH прокси (PID $PID) остановлен."
|
||||
else
|
||||
echo "Процесс $PID не найден. Очистка PID-файла..."
|
||||
rm -f "$SSH_PROXY_PID_FILE"
|
||||
fi
|
||||
else
|
||||
echo "Ошибка: Прокси не запущен."
|
||||
fi
|
||||
}
|
||||
|
||||
# 3. Статус
|
||||
sshp-status() {
|
||||
if [ -f "$SSH_PROXY_PID_FILE" ] && kill -0 $(cat "$SSH_PROXY_PID_FILE") 2>/dev/null; then
|
||||
PID=$(cat "$SSH_PROXY_PID_FILE")
|
||||
echo "Статус: РАБОТАЕТ (PID: $PID)"
|
||||
# Проверка прослушивания порта
|
||||
lsof -i -nP | grep "$PID" | grep LISTEN
|
||||
else
|
||||
echo "Статус: ОСТАНОВЛЕН"
|
||||
fi
|
||||
}
|
||||
|
||||
sshp-restart() {
|
||||
sshp-stop
|
||||
sleep 1
|
||||
sshp-start
|
||||
}
|
||||
|
||||
|
||||
activate() {
|
||||
local venv_dir=""
|
||||
if [[ -d ".venv" ]]; then
|
||||
venv_dir=".venv"
|
||||
elif [[ -d "venv" ]]; then
|
||||
venv_dir="venv"
|
||||
else
|
||||
for venv_dir in **/.venv **/venv; do
|
||||
[[ -d "$venv_dir" ]] && break
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -n "$venv_dir" && -f "$venv_dir/bin/activate" ]]; then
|
||||
source "$venv_dir/bin/activate"
|
||||
else
|
||||
echo "venv/.venv not found"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Keybindings
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Режим редактирования ══════════════════════════════════
|
||||
# Использовать emacs режим (можно переключить на vi)
|
||||
bindkey -e
|
||||
|
||||
# Для vi режима раскомментируйте:
|
||||
# bindkey -v
|
||||
|
||||
# ═══ Навигация по строке ═══════════════════════════════════
|
||||
bindkey '^A' beginning-of-line # Ctrl+A - начало строки
|
||||
bindkey '^E' end-of-line # Ctrl+E - конец строки
|
||||
bindkey '^[[H' beginning-of-line # Home - начало строки
|
||||
bindkey '^[[F' end-of-line # End - конец строки
|
||||
|
||||
# ═══ Редактирование ════════════════════════════════════════
|
||||
bindkey '^K' kill-line # Ctrl+K - удалить до конца
|
||||
bindkey '^U' backward-kill-line # Ctrl+U - удалить до начала
|
||||
bindkey '^W' backward-kill-word # Ctrl+W - удалить слово назад
|
||||
bindkey '^Y' yank # Ctrl+Y - вставить
|
||||
|
||||
# ═══ Навигация по словам ═══════════════════════════════════
|
||||
bindkey '^[[1;5C' forward-word # Ctrl+Right - вперёд на слово
|
||||
bindkey '^[[1;5D' backward-word # Ctrl+Left - назад на слово
|
||||
bindkey '^[^[[C' forward-word # Alt+Right - вперёд на слово
|
||||
bindkey '^[^[[D' backward-word # Alt+Left - назад на слово
|
||||
|
||||
# ═══ История команд ════════════════════════════════════════
|
||||
|
||||
bindkey '^P' up-history # Ctrl+P - просто вверх
|
||||
bindkey '^N' down-history # Ctrl+N - просто вниз
|
||||
|
||||
# Оставляем Alt+Стрелки для чего-то другого или удаляем,
|
||||
# если они дублируют функционал.
|
||||
|
||||
# ═══ Автодополнение ════════════════════════════════════════
|
||||
bindkey '^I' complete-word # Tab - автодополнение
|
||||
bindkey '^[[Z' reverse-menu-complete # Shift+Tab - назад по меню
|
||||
|
||||
# Принять автопредложение (если загружен autosuggestions)
|
||||
if (( $+widgets[autosuggest-accept] )); then
|
||||
bindkey '^F' autosuggest-accept # Ctrl+F - принять предложение
|
||||
bindkey '^[[C' forward-char # Right - вперёд на символ (не принимая)
|
||||
bindkey '^ ' autosuggest-accept # Ctrl+Space - принять предложение
|
||||
fi
|
||||
|
||||
# ═══ FZF ═══════════════════════════════════════════════════
|
||||
# FZF key-bindings загружаются в plugins.zsh
|
||||
# Здесь можно переопределить привязки если нужно
|
||||
if command -v fzf &>/dev/null; then
|
||||
# Привязки уже установлены в plugins.zsh через key-bindings.zsh
|
||||
# Можно добавить дополнительные кастомные привязки здесь
|
||||
:
|
||||
fi
|
||||
# ═══ Полезные команды ══════════════════════════════════════
|
||||
bindkey '^L' clear-screen # Ctrl+L - очистить экран
|
||||
bindkey '^X^E' edit-command-line # Ctrl+X Ctrl+E - редактировать в $EDITOR
|
||||
|
||||
# Загрузить edit-command-line если нужно
|
||||
autoload -Uz edit-command-line
|
||||
zle -N edit-command-line
|
||||
|
||||
# ═══ Дополнительные привязки ═══════════════════════════════
|
||||
bindkey '^D' delete-char-or-list # Ctrl+D - удалить символ или показать список
|
||||
bindkey '^H' backward-delete-char # Ctrl+H - удалить символ назад
|
||||
bindkey '^?' backward-delete-char # Backspace - удалить символ назад
|
||||
|
||||
# ═══ Копирование/вставка (xclip) ══════════════════════════
|
||||
if command -v xclip &>/dev/null; then
|
||||
# Скопировать текущую команду в буфер обмена
|
||||
function _copy_command_to_clipboard() {
|
||||
echo -n "$BUFFER" | xclip -selection clipboard
|
||||
zle -M "Copied to clipboard"
|
||||
}
|
||||
zle -N _copy_command_to_clipboard
|
||||
bindkey '^X^C' _copy_command_to_clipboard # Ctrl+X Ctrl+C
|
||||
fi
|
||||
@@ -0,0 +1,48 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Shell Options
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ История ═══════════════════════════════════════════════
|
||||
setopt EXTENDED_HISTORY # Записывать timestamp в историю
|
||||
setopt HIST_EXPIRE_DUPS_FIRST # Удалять дубликаты в первую очередь
|
||||
setopt HIST_IGNORE_DUPS # Не записывать дубликаты подряд
|
||||
setopt HIST_IGNORE_ALL_DUPS # Удалить старую запись если новая - дубликат
|
||||
setopt HIST_FIND_NO_DUPS # Не показывать дубликаты при поиске
|
||||
setopt HIST_IGNORE_SPACE # Не записывать команды начинающиеся с пробела
|
||||
setopt HIST_SAVE_NO_DUPS # Не сохранять дубликаты
|
||||
setopt HIST_REDUCE_BLANKS # Убирать лишние пробелы
|
||||
setopt HIST_VERIFY # Показывать команду перед выполнением из истории
|
||||
setopt SHARE_HISTORY # Делиться историей между сессиями
|
||||
|
||||
# ═══ Навигация ═════════════════════════════════════════════
|
||||
setopt AUTO_CD # cd в директорию просто набрав её имя
|
||||
setopt AUTO_PUSHD # Автоматически делать pushd
|
||||
setopt PUSHD_IGNORE_DUPS # Не добавлять дубликаты в стек директорий
|
||||
setopt PUSHD_SILENT # Не печатать стек после pushd/popd
|
||||
setopt PUSHD_TO_HOME # pushd без аргументов = pushd $HOME
|
||||
|
||||
# ═══ Дополнение ════════════════════════════════════════════
|
||||
setopt ALWAYS_TO_END # Курсор в конец при автодополнении
|
||||
setopt AUTO_MENU # Показывать меню при повторном tab
|
||||
setopt AUTO_LIST # Автоматически показывать список вариантов
|
||||
setopt COMPLETE_IN_WORD # Дополнять внутри слова
|
||||
unsetopt MENU_COMPLETE # Не вставлять первый вариант автоматически
|
||||
|
||||
# ═══ Глобы и расширения ════════════════════════════════════
|
||||
setopt EXTENDED_GLOB # Расширенный синтаксис глобов
|
||||
setopt GLOB_DOTS # Включать скрытые файлы в глобы
|
||||
setopt NOMATCH # Ошибка если паттерн не совпал
|
||||
setopt NUMERIC_GLOB_SORT # Сортировать числовые имена файлов численно
|
||||
|
||||
# ═══ Работа с командами ════════════════════════════════════
|
||||
setopt CORRECT # Исправлять опечатки в командах
|
||||
setopt CORRECT_ALL # Исправлять опечатки в аргументах
|
||||
setopt INTERACTIVE_COMMENTS # Разрешить комментарии в интерактивном режиме
|
||||
setopt MULTIOS # Множественные перенаправления
|
||||
setopt LONG_LIST_JOBS # Подробный вывод jobs
|
||||
|
||||
# ═══ Другое ════════════════════════════════════════════════
|
||||
setopt NOTIFY # Сообщать о завершении фоновых задач немедленно
|
||||
setopt NO_BEEP # Отключить звуковые сигналы
|
||||
setopt NO_HUP # Не убивать фоновые задачи при выходе
|
||||
setopt PROMPT_SUBST # Разрешить подстановки в промпте
|
||||
@@ -0,0 +1,107 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Plugins (via Zinit)
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Powerlevel10k Theme ═══════════════════════════════════
|
||||
# Загружаем ПЕРВЫМ для instant prompt
|
||||
zinit ice depth=1
|
||||
zinit light romkatv/powerlevel10k
|
||||
|
||||
# ═══ Turbo Mode ════════════════════════════════════════════
|
||||
# Плагины загружаются асинхронно для ускорения старта
|
||||
|
||||
# ═══ FZF key-bindings ══════════════════════════════════════
|
||||
# Загружаем ПЕРВЫМ, чтобы виджеты были определены до syntax-highlighting
|
||||
if command -v fzf &>/dev/null; then
|
||||
# Попробовать разные пути установки fzf
|
||||
if [[ -f /usr/share/fzf/key-bindings.zsh ]]; then
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
elif [[ -f /usr/share/doc/fzf/examples/key-bindings.zsh ]]; then
|
||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||
elif [[ -f ~/.fzf.zsh ]]; then
|
||||
source ~/.fzf.zsh
|
||||
fi
|
||||
fi
|
||||
|
||||
# ═══ Автодополнение ════════════════════════════════════════
|
||||
# zsh-completions - дополнительные автодополнения
|
||||
zinit ice wait lucid blockf atpull'zinit creinstall -q .'
|
||||
zinit light zsh-users/zsh-completions
|
||||
|
||||
# ═══ Автопредложения ═══════════════════════════════════════
|
||||
# zsh-autosuggestions - предложения из истории
|
||||
zinit ice wait lucid atload'_zsh_autosuggest_start'
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
|
||||
# Настройки autosuggestions
|
||||
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#585b70'
|
||||
export ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||
|
||||
# ═══ История ═══════════════════════════════════════════════
|
||||
zinit ice wait"0" lucid atload'
|
||||
# Привязываем стрелки к плагину (теперь они не будут глючить)
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
|
||||
# Настройка цветов (по желанию)
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="fg=magenta,bold"
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND="fg=red,bold"
|
||||
'
|
||||
zinit light zsh-users/zsh-history-substring-search
|
||||
|
||||
# ═══ FZF ═══════════════════════════════════════════════════
|
||||
# fzf - интерактивный поиск
|
||||
if command -v fzf &>/dev/null; then
|
||||
# fzf-tab - fzf для автодополнения
|
||||
zinit ice wait lucid
|
||||
zinit light Aloxaf/fzf-tab
|
||||
|
||||
# Настройки fzf-tab
|
||||
zstyle ':fzf-tab:*' fzf-command fzf
|
||||
zstyle ':fzf-tab:*' fzf-pad 4
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath 2>/dev/null || ls -1 --color=always $realpath'
|
||||
zstyle ':fzf-tab:complete:*:*' fzf-preview 'less ${(Q)realpath} 2>/dev/null || eza -1 --color=always ${(Q)realpath} 2>/dev/null || ls -1 --color=always ${(Q)realpath}'
|
||||
fi
|
||||
|
||||
# ═══ Навигация ═════════════════════════════════════════════
|
||||
# zoxide - умный cd с историей
|
||||
if command -v zoxide &>/dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
# ═══ Git ═══════════════════════════════════════════════════
|
||||
# Быстрые git алиасы и функции
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/git/git.plugin.zsh
|
||||
|
||||
# ═══ Дополнительные инструменты ════════════════════════════
|
||||
# sudo - нажать ESC дважды чтобы добавить sudo
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh
|
||||
|
||||
# extract - универсальная распаковка архивов
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/extract/extract.plugin.zsh
|
||||
|
||||
# colored-man-pages - цветные man страницы
|
||||
zinit ice wait lucid
|
||||
zinit snippet OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh
|
||||
|
||||
# docker - автодополнение для docker
|
||||
if command -v docker &>/dev/null; then
|
||||
zinit ice wait lucid as'completion'
|
||||
zinit snippet OMZP::docker
|
||||
fi
|
||||
|
||||
# kubectl - автодополнение для kubectl
|
||||
if command -v kubectl &>/dev/null; then
|
||||
zinit ice wait lucid as'completion'
|
||||
zinit snippet OMZ::plugins/kubectl/kubectl.plugin.zsh
|
||||
fi
|
||||
|
||||
# ═══ Подсветка синтаксиса (ПОСЛЕДНИЙ плагин) ═══════════════
|
||||
# zsh-syntax-highlighting - ОБЯЗАТЕЛЬНО загружать последним
|
||||
# Это гарантирует, что все виджеты уже определены
|
||||
zinit ice wait lucid atinit'zpcompinit; zpcdreplay'
|
||||
zinit light zsh-users/zsh-syntax-highlighting
|
||||
@@ -0,0 +1,24 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Prompt Configuration (Powerlevel10k)
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Powerlevel10k Instant Prompt ══════════════════════════
|
||||
# Должен быть в самом начале ~/.zshrc для мгновенного промпта
|
||||
# Перенесен сюда для модульности, но в идеале должен быть раньше
|
||||
|
||||
# Включить Powerlevel10k instant prompt. Должно быть близко к началу ~/.config/zsh/.zshrc.
|
||||
# Инициализация кода, который может требовать ввод консоли или печать, должна идти выше этого блока.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# ═══ Powerlevel10k Theme ═══════════════════════════════════
|
||||
# Загрузка через zinit (будет установлена автоматически)
|
||||
# Примечание: этот блок должен быть в plugins.zsh, но оставлен здесь для ясности
|
||||
# zinit ice depth=1
|
||||
# zinit light romkatv/powerlevel10k
|
||||
|
||||
# ═══ P10k Configuration ════════════════════════════════════
|
||||
# Загрузка конфигурации p10k
|
||||
# Для настройки запустите: p10k configure
|
||||
[[ -f ~/.config/zsh/.p10k.zsh ]] && source ~/.config/zsh/.p10k.zsh
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,61 @@
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# Ada's Modular ZSH Configuration
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
# ═══ Powerlevel10k Instant Prompt ══════════════════════════
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# Путь к конфигурации zsh
|
||||
export ZDOTDIR="${ZDOTDIR:-${HOME}/.config/zsh}"
|
||||
ZSH_CONFIG_DIR="${ZDOTDIR}/config"
|
||||
|
||||
# ═══ Zinit (Plugin Manager) ════════════════════════════════
|
||||
# Автоматическая установка zinit при первом запуске
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||
if [[ ! -d "$ZINIT_HOME" ]]; then
|
||||
print -P "%F{blue}▓▒░ Установка zinit...%f"
|
||||
mkdir -p "$(dirname $ZINIT_HOME)"
|
||||
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||
fi
|
||||
|
||||
# Загрузка zinit
|
||||
source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
# ═══ Загрузка модулей ══════════════════════════════════════
|
||||
# Порядок загрузки важен!
|
||||
source "${ZSH_CONFIG_DIR}/env.zsh" # Переменные окружения
|
||||
source "${ZSH_CONFIG_DIR}/options.zsh" # Настройки оболочки
|
||||
source "${ZSH_CONFIG_DIR}/plugins.zsh" # Плагины через zinit
|
||||
source "${ZSH_CONFIG_DIR}/completion.zsh" # Автодополнение
|
||||
source "${ZSH_CONFIG_DIR}/aliases.zsh" # Алиасы
|
||||
source "${ZSH_CONFIG_DIR}/functions.zsh" # Пользовательские функции
|
||||
source "${ZSH_CONFIG_DIR}/keybindings.zsh" # Горячие клавиши
|
||||
source "${ZSH_CONFIG_DIR}/prompt.zsh" # Настройка промпта (starship)
|
||||
|
||||
|
||||
# ═══ Локальные настройки (опционально) ═════════════════════
|
||||
# Для машинно-специфичных настроек
|
||||
[[ -f "${ZSH_CONFIG_DIR}/local.zsh" ]] && source "${ZSH_CONFIG_DIR}/local.zsh"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit /home/ada/.config/zsh/.p10k.zsh.
|
||||
[[ ! -f /home/ada/.config/zsh/.p10k.zsh ]] || source /home/ada/.config/zsh/.p10k.zsh
|
||||
|
||||
|
||||
|
||||
export NVM_DIR="$HOME/.config/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
|
||||
# . "$HOME/.local/share/../bin/env"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.dotfiles/zsh/.config/zsh/.p10k.zsh.
|
||||
[[ ! -f ~/.dotfiles/zsh/.config/zsh/.p10k.zsh ]] || source ~/.dotfiles/zsh/.config/zsh/.p10k.zsh
|
||||
Reference in New Issue
Block a user