200 != 300
This commit is contained in:
@@ -66,7 +66,7 @@ animations {
|
|||||||
// slowdown 3.0
|
// slowdown 3.0
|
||||||
|
|
||||||
workspace-switch {
|
workspace-switch {
|
||||||
duration-ms 200
|
duration-ms 300
|
||||||
curve "ease-out-cubic"
|
curve "ease-out-cubic"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
# keybind = ctrl+shift+j=text:ghostty-capture\n
|
# keybind = ctrl+shift+j=text:ghostty-capture\n
|
||||||
# Or without wl-paste:
|
# Or without wl-paste:
|
||||||
# # ctrl+shift+h>j > Enter to open the screen buffer in editor
|
# # ctrl+shift+h>j > Enter to open the screen buffer in editor
|
||||||
# keybind = ctrl+shift+j=text:ghostty-capture\x20
|
# keybind = ctrl+shift+h=text:ghostty-capture\x20
|
||||||
# keybind = ctrl+shift+h=write_screen_file:paste
|
# keybind = ctrl+shift+j=write_screen_file:paste
|
||||||
|
|
||||||
if [ -z "$1" ] && ! command -v wl-paste &> /dev/null; then
|
if [ -z "$1" ] && ! command -v wl-paste &> /dev/null; then
|
||||||
echo "Error: wl-paste not found." >&2
|
echo "Error: wl-paste not found." >&2
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ hash = "699fe07e0d2d1b4af8dafb84168eeb04"
|
|||||||
|
|
||||||
[[plugin.deps]]
|
[[plugin.deps]]
|
||||||
use = "KKV9/compress"
|
use = "KKV9/compress"
|
||||||
rev = "cb6e8ec"
|
rev = "46a6b9f"
|
||||||
hash = "424ada4807b20ccd4fc85d1d7c26d1e4"
|
hash = "771af2becc575a3f43d0542de823969d"
|
||||||
|
|
||||||
[[plugin.deps]]
|
[[plugin.deps]]
|
||||||
use = "llanosrocas/yaziline"
|
use = "llanosrocas/yaziline"
|
||||||
@@ -25,8 +25,8 @@ hash = "b6073aadf2f9a1d5389a6d389f33f69c"
|
|||||||
|
|
||||||
[[plugin.deps]]
|
[[plugin.deps]]
|
||||||
use = "Rolv-Apneseth/starship"
|
use = "Rolv-Apneseth/starship"
|
||||||
rev = "eca1861"
|
rev = "a837101"
|
||||||
hash = "e519d894e94ded741e06aae4d4775981"
|
hash = "635b0feb9215772d22020eb0abf0bb34"
|
||||||
|
|
||||||
[flavor]
|
[flavor]
|
||||||
deps = []
|
deps = []
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ desc = "Archive selected files (password+header+level)"
|
|||||||
- `-p` Password protect (zip/7z/rar)
|
- `-p` Password protect (zip/7z/rar)
|
||||||
- `-h` Encrypt header (7z/rar)
|
- `-h` Encrypt header (7z/rar)
|
||||||
- `-l` Set compression level (all compression algorithims)
|
- `-l` Set compression level (all compression algorithims)
|
||||||
|
- `-s` Silence success message
|
||||||
- `<extention>` Specify a default extention (eg., `7z`, `tar.gz`)
|
- `<extention>` Specify a default extention (eg., `7z`, `tar.gz`)
|
||||||
|
|
||||||
#### Combining multiple flags:
|
#### Combining multiple flags:
|
||||||
|
|||||||
@@ -4,9 +4,14 @@
|
|||||||
local is_windows = ya.target_family() == "windows"
|
local is_windows = ya.target_family() == "windows"
|
||||||
|
|
||||||
-- Define default flags and strings
|
-- Define default flags and strings
|
||||||
local is_password, is_encrypted, is_level = false, false, false
|
local is_password, is_encrypted, is_level, is_silent_success = false, false, false, false
|
||||||
local default_extension = "zip"
|
local default_extension = "zip"
|
||||||
|
|
||||||
|
-- Allow dots when matching file extension arguments
|
||||||
|
local function extension_pattern(ext)
|
||||||
|
return "%." .. ext:gsub("%.", "%%.") .. "$"
|
||||||
|
end
|
||||||
|
|
||||||
-- Function to check valid filename
|
-- Function to check valid filename
|
||||||
local function is_valid_filename(name)
|
local function is_valid_filename(name)
|
||||||
-- Trim whitespace from both ends
|
-- Trim whitespace from both ends
|
||||||
@@ -342,11 +347,13 @@ return {
|
|||||||
is_encrypted = true
|
is_encrypted = true
|
||||||
elseif flag == "l" then
|
elseif flag == "l" then
|
||||||
is_level = true
|
is_level = true
|
||||||
|
elseif flag == "s" then
|
||||||
|
is_silent_success = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif arg:match("^[%w%.]+$") then
|
elseif arg:match("^[%w%.]+$") then
|
||||||
-- Handle default extension (e.g., 7z, zip)
|
-- Handle default extension (e.g., 7z, zip)
|
||||||
if archive_commands["%." .. arg .. "$"] then
|
if archive_commands[extension_pattern(arg)] then
|
||||||
default_extension = arg
|
default_extension = arg
|
||||||
else
|
else
|
||||||
notify(string.format("Unsupported extension: %s", arg), "warn")
|
notify(string.format("Unsupported extension: %s", arg), "warn")
|
||||||
@@ -563,6 +570,8 @@ return {
|
|||||||
cleanup_temp_dir(temp_dir)
|
cleanup_temp_dir(temp_dir)
|
||||||
|
|
||||||
-- Notify user of success
|
-- Notify user of success
|
||||||
notify(string.format("Successfully created archive: %s", ya.quote(to.name)), "info")
|
if not is_silent_success then
|
||||||
|
notify(string.format("Successfully created archive: %s", ya.quote(to.name)), "info")
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ local old_build = Tab.build
|
|||||||
Tab.build = function(self, ...)
|
Tab.build = function(self, ...)
|
||||||
local bar = function(c, x, y)
|
local bar = function(c, x, y)
|
||||||
if x <= 0 or x == self._area.w - 1 then
|
if x <= 0 or x == self._area.w - 1 then
|
||||||
return ui.Bar(ui.Bar.TOP):area(ui.Rect.default)
|
return ui.Bar(ui.Edge.TOP):area(ui.Rect.default)
|
||||||
end
|
end
|
||||||
|
|
||||||
return ui.Bar(ui.Bar.TOP)
|
return ui.Bar(ui.Edge.TOP)
|
||||||
:area(ui.Rect({
|
:area(ui.Rect({
|
||||||
x = x,
|
x = x,
|
||||||
y = math.max(0, y),
|
y = math.max(0, y),
|
||||||
@@ -91,11 +91,7 @@ Tab.build = function(self, ...)
|
|||||||
c[3]:pad(ui.Pad.y(1)),
|
c[3]:pad(ui.Pad.y(1)),
|
||||||
}
|
}
|
||||||
|
|
||||||
local style = th.mgr.border_style
|
|
||||||
self._base = ya.list_merge(self._base or {}, {
|
self._base = ya.list_merge(self._base or {}, {
|
||||||
ui.Bar(ui.Bar.RIGHT):area(self._chunks[1]):style(style),
|
|
||||||
ui.Bar(ui.Bar.LEFT):area(self._chunks[1]):style(style),
|
|
||||||
|
|
||||||
bar("┬", c[1].right - 1, c[1].y),
|
bar("┬", c[1].right - 1, c[1].y),
|
||||||
bar("┴", c[1].right - 1, c[1].bottom - 1),
|
bar("┴", c[1].right - 1, c[1].bottom - 1),
|
||||||
bar("┬", c[2].right, c[2].y),
|
bar("┬", c[2].right, c[2].y),
|
||||||
@@ -113,4 +109,8 @@ end
|
|||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
|
|
||||||
- [sxyazi](https://github.com/sxyazi) for providing the code for this plugin and the demo video [in this comment](https://github.com/sxyazi/yazi/issues/767#issuecomment-1977082834)
|
- [sxyazi](https://github.com/sxyazi) for creating and maintaining Yazi, and also
|
||||||
|
for providing the initial code and the demo video for this plugin
|
||||||
|
in [this comment](https://github.com/sxyazi/yazi/issues/767#issuecomment-1977082834)
|
||||||
|
- The authors and maintainers of [starship](https://github.com/starship/starship), which has been my
|
||||||
|
prompt of choice for many years
|
||||||
|
|||||||
+3
-11
@@ -344,7 +344,7 @@ fi
|
|||||||
如果不想写脚本, 也可以直接在 shell 里执行以下命令:
|
如果不想写脚本, 也可以直接在 shell 里执行以下命令:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://tgp.uyani.de/query)
|
curl -fsSL https://tgp.uyani.de/query | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
这将会根据上述原理检测当前终端模拟器支持的图像协议, 并输出结果. 当然, 这需要联网并且信任该脚本的来源. 请务必先拉取并查看脚本内容以确认无害后再执行.
|
这将会根据上述原理检测当前终端模拟器支持的图像协议, 并输出结果. 当然, 这需要联网并且信任该脚本的来源. 请务必先拉取并查看脚本内容以确认无害后再执行.
|
||||||
@@ -352,18 +352,10 @@ bash <(curl -fsSL https://tgp.uyani.de/query)
|
|||||||
将网址中的 `query` 替换为 `kitty` / `iterm` / `sixels` 可以通过显示测试图片的方式验证对应协议的支持情况, 例如:
|
将网址中的 `query` 替换为 `kitty` / `iterm` / `sixels` 可以通过显示测试图片的方式验证对应协议的支持情况, 例如:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://tgp.uyani.de/kitty)
|
curl -fsSL https://tgp.uyani.de/kitty | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
将会尝试用 KGP 显示一张测试图片, 如果显示成功则说明支持 KGP, 反之则(大概率)不支持.
|
将会尝试用 KGP 显示一张测试图片, 如果成功显示则说明支持 KGP, 反之则(大概率)不支持.
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
>
|
|
||||||
> 对于 fish shell, 类似 `cmdA <(cmdB)` 的语法可被替换为 `cmdA (cmdB | psub)`, 因此上述命令在 fish 里可以写为:
|
|
||||||
>
|
|
||||||
> ```fish
|
|
||||||
> bash (curl -fsSL https://tgp.uyani.de/query | psub)
|
|
||||||
> ```
|
|
||||||
|
|
||||||
### 显示效果
|
### 显示效果
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user