From dd9f312bdb167e1c06fcd0284222e12b465bff05 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Mon, 29 Aug 2022 22:54:43 +0200 Subject: [PATCH] nvim: Color OS tabline icon --- home/config/nvim/nifoc/tabline.fnl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/home/config/nvim/nifoc/tabline.fnl b/home/config/nvim/nifoc/tabline.fnl index 550542f..dc5443b 100644 --- a/home/config/nvim/nifoc/tabline.fnl +++ b/home/config/nvim/nifoc/tabline.fnl @@ -73,12 +73,16 @@ :hl (fn [self] (if self.is_active {:fg colors.purple :bg bg-active :bold true} {:fg fg-inactive :bg bg-inactive :bold true}))}) - (set mod.os-indicator {:static {:uname (vim.loop.os_uname) - :os {:Darwin "" :Linux ""}} - :hl {:fg colors.white :bg bg-active} + (set mod.os-indicator {:static {:uname (. (vim.loop.os_uname) :sysname) + :os {:Darwin "" :Linux ""} + :os-color {:Darwin colors.white + :Linux "#7ebae4"}} + :hl (fn [self] + (let [fg-color (. self :os-color self.uname)] + {:fg fg-color :bg bg-active})) 1 {:provider " "} 2 {:provider (fn [self] - (. self :os self.uname.sysname))} + (. self :os self.uname))} 3 {:provider " "}}) ;; Block (set mod.buffer-block [mod.active-indicator