mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
-added config for showing tabs always
This commit is contained in:
parent
d2ebadb631
commit
d385f4b8c5
3 changed files with 16 additions and 8 deletions
|
|
@ -31,9 +31,10 @@ marker_marked = { fg = "lightcyan", bg = "lightcyan" }
|
|||
marker_selected = { fg = "lightyellow", bg = "lightyellow" }
|
||||
|
||||
# Tab
|
||||
tab_active = { reversed = true }
|
||||
tab_inactive = {}
|
||||
tab_width = 1
|
||||
tab_active = { reversed = true }
|
||||
tab_inactive = {}
|
||||
tab_width = 1
|
||||
tab_show_always = false
|
||||
|
||||
# Count
|
||||
count_copied = { fg = "white", bg = "green" }
|
||||
|
|
|
|||
|
|
@ -64,10 +64,11 @@ pub struct Manager {
|
|||
marker_selected: Style,
|
||||
|
||||
// Tab
|
||||
tab_active: Style,
|
||||
tab_inactive: Style,
|
||||
tab_active: Style,
|
||||
tab_inactive: Style,
|
||||
#[validate(range(min = 1, message = "Must be greater than 0"))]
|
||||
tab_width: u8,
|
||||
tab_width: u8,
|
||||
tab_show_always: bool,
|
||||
|
||||
// Count
|
||||
count_copied: Style,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ end
|
|||
|
||||
function Header:tabs()
|
||||
local tabs = #cx.tabs
|
||||
if tabs == 1 then
|
||||
if tabs == 1 and not THEME.manager.tab_show_always then
|
||||
return ui.Line {}
|
||||
end
|
||||
|
||||
|
|
@ -102,7 +102,13 @@ function Header:render()
|
|||
end
|
||||
|
||||
-- Mouse events
|
||||
function Header:click(event, up) end
|
||||
function Header:click(event, up)
|
||||
if up or not event.is_left then
|
||||
return
|
||||
end
|
||||
|
||||
ya.manager_emit("tab_switch", { 0 })
|
||||
end
|
||||
|
||||
function Header:scroll(event, step) end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue