-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:dakesan/mydotfiles
- Loading branch information
Showing
13 changed files
with
638 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule nvim
updated
7 files
+10 −6 | README.md | |
+103 −58 | init.lua | |
+388 −305 | lua/custom/plugins/init.lua | |
+3 −3 | lua/kickstart/health.lua | |
+22 −13 | lua/kickstart/plugins/debug.lua | |
+1 −1 | lua/kickstart/plugins/lint.lua | |
+1 −1 | lua/kickstart/plugins/neo-tree.lua |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[plugin] | ||
deps = [{ use = "yazi-rs/plugins#full-border", commit = "2dc65ab" }] | ||
|
||
[flavor] | ||
deps = [] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 yazi-rs | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# full-border.yazi | ||
|
||
Add a full border to Yazi to make it look fancier. | ||
|
||
![full-border](https://github.com/yazi-rs/plugins/assets/17523360/ef81b560-2465-4d36-abf2-5d21dcb7b987) | ||
|
||
## Installation | ||
|
||
```sh | ||
ya pack -a yazi-rs/plugins#full-border | ||
``` | ||
|
||
## Usage | ||
|
||
Add this to your `init.lua` to enable the plugin: | ||
|
||
```lua | ||
require("full-border"):setup() | ||
``` | ||
|
||
Or you can customize the border type: | ||
|
||
```lua | ||
require("full-border"):setup { | ||
-- Available values: ui.Border.PLAIN, ui.Border.ROUNDED | ||
type = ui.Border.ROUNDED, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
local function setup(_, opts) | ||
local type = opts and opts.type or ui.Border.ROUNDED | ||
local old_build = Tab.build | ||
|
||
Tab.build = function(self, ...) | ||
local bar = function(c, x, y) | ||
if x <= 0 or x == self._area.w - 1 then | ||
return ui.Bar(ui.Rect.default, ui.Bar.TOP) | ||
end | ||
|
||
return ui.Bar( | ||
ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) }, | ||
ui.Bar.TOP | ||
):symbol(c) | ||
end | ||
|
||
local c = self._chunks | ||
self._chunks = { | ||
c[1]:padding(ui.Padding.y(1)), | ||
c[2]:padding(ui.Padding(c[1].w > 0 and 0 or 1, c[3].w > 0 and 0 or 1, 1, 1)), | ||
c[3]:padding(ui.Padding.y(1)), | ||
} | ||
|
||
local style = THEME.manager.border_style | ||
self._base = ya.list_merge(self._base or {}, { | ||
ui.Border(self._area, ui.Border.ALL):type(type):style(style), | ||
ui.Bar(self._chunks[1], ui.Bar.RIGHT):style(style), | ||
ui.Bar(self._chunks[3], ui.Bar.LEFT):style(style), | ||
|
||
bar("┬", c[1].right - 1, c[1].y), | ||
bar("┴", c[1].right - 1, c[1].bottom - 1), | ||
bar("┬", c[2].right, c[2].y), | ||
bar("┴", c[2].right, c[2].bottom - 1), | ||
}) | ||
|
||
old_build(self, ...) | ||
end | ||
end | ||
|
||
return { setup = setup } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flavor] | ||
use = "catppuccin-macchiato" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json" | ||
|
||
[manager] | ||
ratio = [ 1, 4, 3 ] | ||
sort_by = "size" | ||
sort_sensitive = false | ||
sort_reverse = false | ||
sort_dir_first = true | ||
linemode = "size" | ||
show_hidden = true | ||
show_symlink = true | ||
|
||
[preview] | ||
tab_size = 2 | ||
max_width = 600 | ||
max_height = 900 | ||
cache_dir = "" | ||
image_filter = "triangle" | ||
image_quality = 75 | ||
sixel_fraction = 15 | ||
ueberzug_scale = 1 | ||
ueberzug_offset = [ 0, 0, 0, 0 ] | ||
|
||
[opener] | ||
edit = [ | ||
{ run = 'nvim "$@"', block = true, for = "unix" }, | ||
{ run = 'code "%*"', orphan = true, for = "windows" }, | ||
] | ||
open = [ | ||
{ run = 'xdg-open "$@"', desc = "Open", for = "linux" }, | ||
{ run = 'open "$@"', desc = "Open", for = "macos" }, | ||
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" } | ||
] | ||
reveal = [ | ||
{ run = 'open -R "$1"', desc = "Reveal", for = "macos" }, | ||
{ run = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" }, | ||
{ run = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" }, | ||
] | ||
extract = [ | ||
{ run = 'unar "$1"', desc = "Extract here", for = "unix" }, | ||
{ run = 'unar "%1"', desc = "Extract here", for = "windows" }, | ||
] | ||
play = [ | ||
{ run = 'mpv "$@"', orphan = true, for = "unix" }, | ||
{ run = 'mpv "%1"', orphan = true, for = "windows" }, | ||
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show media info", for = "unix" }, | ||
] | ||
|
||
text = [ | ||
{ run = 'nvim "$@"', block = true }, | ||
] | ||
|
||
[open] | ||
rules = [ | ||
{ name = "*/", use = [ "edit", "open", "reveal" ] }, | ||
|
||
{ mime = "text/*", use = [ "edit", "reveal" ] }, | ||
{ mime = "image/*", use = [ "open", "reveal" ] }, | ||
{ mime = "video/*", use = [ "play", "reveal" ] }, | ||
{ mime = "audio/*", use = [ "play", "reveal" ] }, | ||
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] }, | ||
|
||
{ mime = "application/json", use = [ "edit", "reveal" ] }, | ||
{ mime = "*/javascript", use = [ "edit", "reveal" ] }, | ||
|
||
{ mime = "application/zip", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/gzip", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/x-tar", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/x-bzip", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/x-bzip2", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/x-7z-compressed", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/x-rar", use = [ "extract", "reveal" ] }, | ||
{ mime = "application/xz", use = [ "extract", "reveal" ] }, | ||
|
||
{ mime = "*", use = [ "open", "reveal" ] }, | ||
] | ||
|
||
[tasks] | ||
micro_workers = 10 | ||
macro_workers = 25 | ||
bizarre_retry = 5 | ||
image_alloc = 536870912 # 512MB | ||
image_bound = [ 0, 0 ] | ||
suppress_preload = false | ||
|
||
[plugin] | ||
|
||
preloaders = [ | ||
# Image | ||
{ mime = "image/vnd.djvu", run = "noop" }, | ||
{ mime = "image/*", run = "image" }, | ||
# Video | ||
{ mime = "video/*", run = "video" }, | ||
{ mime = "application/pdf", run = "pdf" }, | ||
] | ||
previewers = [ | ||
{ name = "*/", run = "folder", sync = true }, | ||
# Code | ||
{ mime = "text/*", run = "code" }, | ||
{ mime = "*/xml", run = "code" }, | ||
{ mime = "*/javascript", run = "code" }, | ||
{ mime = "*/x-wine-extension-ini", run = "code" }, | ||
# JSON | ||
{ mime = "application/json", run = "json" }, | ||
# Image | ||
{ mime = "image/vnd.djvu", run = "noop" }, | ||
{ mime = "image/*", run = "image" }, | ||
# Video | ||
{ mime = "video/*", run = "video" }, | ||
{ mime = "application/pdf", run = "pdf" }, | ||
# Archive | ||
{ mime = "application/zip", run = "archive" }, | ||
{ mime = "application/gzip", run = "archive" }, | ||
{ mime = "application/x-tar", run = "archive" }, | ||
{ mime = "application/x-bzip", run = "archive" }, | ||
{ mime = "application/x-bzip2", run = "archive" }, | ||
{ mime = "application/x-7z-compressed", run = "archive" }, | ||
{ mime = "application/x-rar", run = "archive" }, | ||
{ mime = "application/xz", run = "archive" }, | ||
# Fallback | ||
{ name = "*", run = "file" }, | ||
] | ||
|
||
[input] | ||
# cd | ||
cd_title = "Change directory:" | ||
cd_origin = "top-center" | ||
cd_offset = [ 0, 2, 50, 3 ] | ||
|
||
# create | ||
create_title = "Create:" | ||
create_origin = "top-center" | ||
create_offset = [ 0, 2, 50, 3 ] | ||
|
||
# rename | ||
rename_title = "Rename:" | ||
rename_origin = "hovered" | ||
rename_offset = [ 0, 1, 50, 3 ] | ||
|
||
# trash | ||
trash_title = "Move {n} selected file{s} to trash? (y/N)" | ||
trash_origin = "top-center" | ||
trash_offset = [ 0, 2, 50, 3 ] | ||
|
||
# delete | ||
delete_title = "Delete {n} selected file{s} permanently? (y/N)" | ||
delete_origin = "top-center" | ||
delete_offset = [ 0, 2, 50, 3 ] | ||
|
||
# filter | ||
filter_title = "Filter:" | ||
filter_origin = "top-center" | ||
filter_offset = [ 0, 2, 50, 3 ] | ||
|
||
# find | ||
find_title = [ "Find next:", "Find previous:" ] | ||
find_origin = "top-center" | ||
find_offset = [ 0, 2, 50, 3 ] | ||
|
||
# search | ||
search_title = "Search via {n}:" | ||
search_origin = "top-center" | ||
search_offset = [ 0, 2, 50, 3 ] | ||
|
||
# shell | ||
shell_title = [ "Shell:", "Shell (block):" ] | ||
shell_origin = "top-center" | ||
shell_offset = [ 0, 2, 50, 3 ] | ||
|
||
# overwrite | ||
overwrite_title = "Overwrite an existing file? (y/N)" | ||
overwrite_origin = "top-center" | ||
overwrite_offset = [ 0, 2, 50, 3 ] | ||
|
||
# quit | ||
quit_title = "{n} task{s} running, sure to quit? (y/N)" | ||
quit_origin = "top-center" | ||
quit_offset = [ 0, 2, 50, 3 ] | ||
|
||
[select] | ||
open_title = "Open with:" | ||
open_origin = "hovered" | ||
open_offset = [ 0, 1, 50, 7 ] | ||
|
||
[log] | ||
enabled = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
[submodule ".config/nvim"] | ||
path = .config/nvim | ||
url = https://github.com/dakesan/kickstart.nvim.git | ||
|
||
[submodule ".config/yazi/flavors"] | ||
path = .config/yazi/flavors | ||
url = https://github.com/yazi-rs/flavors.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters