fix : shortline for small screens (#468)
This commit is contained in:
parent
7051afe43c
commit
ac28a9f99e
@ -84,6 +84,9 @@ components.active[1][2] = {
|
|||||||
end
|
end
|
||||||
return " " .. icon .. " " .. filename .. " "
|
return " " .. icon .. " " .. filename .. " "
|
||||||
end,
|
end,
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 70
|
||||||
|
end,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.white,
|
fg = colors.white,
|
||||||
bg = colors.lightbg,
|
bg = colors.lightbg,
|
||||||
@ -98,6 +101,10 @@ components.active[1][3] = {
|
|||||||
return " " .. dir_name .. " "
|
return " " .. dir_name .. " "
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 80
|
||||||
|
end,
|
||||||
|
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.grey_fg2,
|
fg = colors.grey_fg2,
|
||||||
bg = colors.lightbg2,
|
bg = colors.lightbg2,
|
||||||
@ -143,6 +150,7 @@ components.active[1][7] = {
|
|||||||
enabled = function()
|
enabled = function()
|
||||||
return lsp.diagnostics_exist "Error"
|
return lsp.diagnostics_exist "Error"
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hl = { fg = colors.red },
|
hl = { fg = colors.red },
|
||||||
icon = " ",
|
icon = " ",
|
||||||
}
|
}
|
||||||
@ -204,6 +212,9 @@ components.active[2][1] = {
|
|||||||
end
|
end
|
||||||
return ""
|
return ""
|
||||||
end,
|
end,
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 80
|
||||||
|
end,
|
||||||
hl = { fg = colors.green },
|
hl = { fg = colors.green },
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,11 +226,17 @@ components.active[3][1] = {
|
|||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 70
|
||||||
|
end,
|
||||||
hl = { fg = colors.grey_fg2, bg = colors.statusline_bg },
|
hl = { fg = colors.grey_fg2, bg = colors.statusline_bg },
|
||||||
}
|
}
|
||||||
|
|
||||||
components.active[3][2] = {
|
components.active[3][2] = {
|
||||||
provider = "git_branch",
|
provider = "git_branch",
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 70
|
||||||
|
end,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.grey_fg2,
|
fg = colors.grey_fg2,
|
||||||
bg = colors.statusline_bg,
|
bg = colors.statusline_bg,
|
||||||
@ -294,6 +311,9 @@ components.active[3][6] = {
|
|||||||
|
|
||||||
components.active[3][7] = {
|
components.active[3][7] = {
|
||||||
provider = statusline_style.left,
|
provider = statusline_style.left,
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 90
|
||||||
|
end,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.grey,
|
fg = colors.grey,
|
||||||
bg = colors.one_bg,
|
bg = colors.one_bg,
|
||||||
@ -302,6 +322,9 @@ components.active[3][7] = {
|
|||||||
|
|
||||||
components.active[3][8] = {
|
components.active[3][8] = {
|
||||||
provider = statusline_style.left,
|
provider = statusline_style.left,
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 90
|
||||||
|
end,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.green,
|
fg = colors.green,
|
||||||
bg = colors.grey,
|
bg = colors.grey,
|
||||||
@ -310,6 +333,9 @@ components.active[3][8] = {
|
|||||||
|
|
||||||
components.active[3][9] = {
|
components.active[3][9] = {
|
||||||
provider = statusline_style.position_icon,
|
provider = statusline_style.position_icon,
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 90
|
||||||
|
end,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.black,
|
fg = colors.black,
|
||||||
bg = colors.green,
|
bg = colors.green,
|
||||||
@ -330,6 +356,10 @@ components.active[3][10] = {
|
|||||||
return " " .. result .. "%% "
|
return " " .. result .. "%% "
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
enabled = function(winid)
|
||||||
|
return vim.api.nvim_win_get_width(winid) > 90
|
||||||
|
end,
|
||||||
|
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.green,
|
fg = colors.green,
|
||||||
bg = colors.one_bg,
|
bg = colors.one_bg,
|
||||||
|
Loading…
Reference in New Issue
Block a user