From b5d0803c5356138b10486e54df520420c86aa52c Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Mon, 13 Sep 2021 18:41:32 +0800 Subject: [PATCH] remove print function --- README.md | 37 ------------------------------------- lua/zenbones/print.lua | 33 --------------------------------- 2 files changed, 70 deletions(-) delete mode 100644 lua/zenbones/print.lua diff --git a/README.md b/README.md index 64c0fd7..2871bf2 100644 --- a/README.md +++ b/README.md @@ -130,43 +130,6 @@ currently supported. - [WezTerm](extras/wezterm/Zenbones.toml) - [Tmux](extras/tmux/zenbones.tmux) -### Print terminal colors - -You can retrieve the terminal colors by using this command: - -```vim -:lua require("zenbones.print").print_terminal_colors() -``` - -Useful when you want to apply a zenbones theme to your terminal. Recent output: - -``` -Terminal colors -foreground: #2C363C -background: #F0EDEC -ansi color0: #2C363C -ansi color1: #A8334C -ansi color2: #617437 -ansi color3: #944927 -ansi color4: #286486 -ansi color5: #88507D -ansi color6: #3B8992 -ansi color7: #F0EDEC -ansi color8: #44525B -ansi color9: #9C2842 -ansi color10: #55672A -ansi color11: #87411E -ansi color12: #1F5A7A -ansi color13: #864079 -ansi color14: #2F7C85 -ansi color15: #DCD2CE -cursor foreground: #F2F0EF -cursor background: #2C363C -inactive cursor foreground: #F2F0EF -inactive cursor background: #4D5C65 -selection background: #D2DFE7 -``` - It's also possible to generate color configuration files using a template, [this one for Kitty](lua/zenbones/build/kitty.lua) for example. Please feel free to submit a PR if you want to add some more. diff --git a/lua/zenbones/print.lua b/lua/zenbones/print.lua deleted file mode 100644 index 8b090b7..0000000 --- a/lua/zenbones/print.lua +++ /dev/null @@ -1,33 +0,0 @@ -local t = require "zenbones" -local terminal = require "zenbones.terminal" - -local M = {} - -function M.print_terminal_colors() - local lines = {} - - table.insert(lines, "Terminal colors") - table.insert(lines, "foreground: " .. t.Normal.fg.hex) - table.insert(lines, "background: " .. t.Normal.bg.hex) - - for i, v in ipairs(terminal.colors) do - table.insert(lines, "ansi color" .. (i - 1) .. ": " .. v.hex) - -- table.insert(lines, "let g:terminal_color_" .. (i - 1) .. " = '" .. v.hex .. "'") - end - - table.insert(lines, "cursor foreground: " .. t.Cursor.fg.hex) - table.insert(lines, "cursor background: " .. t.Cursor.bg.hex) - - table.insert(lines, "inactive cursor foreground: " .. t.lCursor.fg.hex) - table.insert(lines, "inactive cursor background: " .. t.lCursor.bg.hex) - table.insert(lines, "selection background: " .. t.Visual.bg.hex) - - local buf = vim.api.nvim_create_buf(false, true) - vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines) - - vim.cmd('tabnew') - local win = vim.api.nvim_get_current_win() - vim.api.nvim_win_set_buf(win, buf) -end - -return M