nvim: standardise icons

This commit is contained in:
thomasabishop 2024-02-23 14:24:43 +00:00
parent d2b38fd15d
commit 8ce8fcaaeb
9 changed files with 215 additions and 102 deletions

View file

@ -30,3 +30,4 @@ require("thomas.plugins.gitblame")
require("thomas.plugins.zk")
require("thomas.plugins.noice")
require("thomas.plugins.obsidian-nvim")
require("thomas.plugins.nvim-notify")

View file

@ -11,8 +11,8 @@ local function update_hl(group, tbl)
vim.api.nvim_set_hl(0, group, new_hl)
end
-- update_hl("Function", { bold = true })
-- update_hl("Comment", { italic = true })
update_hl("Function", { bold = true })
update_hl("Comment", { italic = true })
update_hl("markdownH1", { bold = true })
update_hl("markdownH2", { bold = true })

View file

@ -37,12 +37,16 @@ return packer.startup(function(use)
-- require("pandoc").setup()
-- end,
-- })
use({ "folke/noice.nvim", requires = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" } })
use({
"folke/noice.nvim",
requires = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
})
use({ "epwalsh/obsidian.nvim", requires = { "nvim-lua/plenary.nvim" } })
use("ellisonleao/gruvbox.nvim")
-- use("ellisonleao/gruvbox.nvim")
use("sainnhe/gruvbox-material")
use("kdheepak/lazygit.nvim")
use("zk-org/zk-nvim")
use("ryanoasis/vim-devicons")
use("tpope/vim-fugitive")
use("rcarriga/nvim-notify")
use("tpope/vim-markdown")

View file

@ -37,11 +37,11 @@ end
local capabilities = cmp_nvim_lsp.default_capabilities()
-- Change the Diagnostic symbols in the sign column (gutter)
-- local signs = { Error = " ", Warn = " ", Hint = "ﴞ ", Info = " " }
-- for type, icon in pairs(signs) do
-- local hl = "DiagnosticSign" .. type
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
-- end
local signs = { Error = "", Warn = "", Hint = "", Info = "󰙎" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
-- Hide diagnostic virtual text by default, but toggle visibility with `lead:lh` command
vim.diagnostic.config({

View file

@ -11,6 +11,7 @@ noice.setup({
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
@ -18,5 +19,43 @@ noice.setup({
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
cmdline = {
format = {
cmdline = { icon = "" },
search_down = { icon = " ⌄" },
search_up = { icon = " ⌃" },
filter = { icon = "" },
lua = { icon = "" },
help = { icon = "󰋖 " },
level = {
icons = {
error = "",
warn = "",
info = "󰙎 ",
},
},
},
},
views = {
cmdline_popup = {
border = {
style = "single",
},
},
popup = {
border = {
style = "single",
},
},
hover = {
border = {
style = "single",
},
},
confirm = {
border = {
style = "single",
},
},
},
})

View file

@ -0,0 +1,17 @@
local notify_setup, notify = pcall(require, "notify")
if not notify_setup then
return
end
notify.setup({
render = "wrapped-compact",
stages = "fade",
icons = {
INFO = "󰙎",
WARN = "",
ERROR = "",
TRACE = "󰏫 ",
DEBUG = "",
},
})

View file

@ -15,6 +15,6 @@ rd.setup({
})
-- change colour values to match One Dark
vim.api.nvim_set_hl(0, "RainbowDelimiterViolet", { foreground = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowDelimiterYellow", { foreground = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowDelimiterCyan", { foreground = "#56B6C2" })
vim.api.nvim_set_hl(0, "RainbowDelimiterViolet", { foreground = "#d3869b" })
vim.api.nvim_set_hl(0, "RainbowDelimiterYellow", { foreground = "#fabd2f" })
vim.api.nvim_set_hl(0, "RainbowDelimiterCyan", { foreground = "#fe8019" })

View file

@ -1,13 +1,19 @@
{
"layer": "top",
"margin": "6 10 -3",
"height": 30,
"spacing": 4,
"modules-left": [
"custom/os",
"hyprland/workspaces"
"hyprland/workspaces",
"wlr/taskbar"
],
"modules-center": [
"custom/spotify",
"custom/toggl",
"custom/wakatime"
],
"modules-right": [
"custom/spotify",
"network",
"bluetooth",
"cpu",
@ -15,10 +21,27 @@
"disk",
"temperature",
"backlight",
"custom/wakatime",
"battery",
"clock"
],
"wlr/taskbar": {
"format": "{icon} {name}",
"icon-size": 20,
"icon-theme": "Numix-Circle",
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": [
"Alacritty"
],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
},
"rewrite": {
"Firefox Web Browser": "Firefox",
"Foot Server": "Terminal"
}
},
"keyboard-state": {
"numlock": true,
"capslock": true,
@ -65,31 +88,30 @@
"spacing": 10
},
"clock": {
"format": "{: %H:%M  %d/%m/%Y}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
"format": "{: %H:%M }",
"format-alt": "{: %d/%m/%Y}"
},
"cpu": {
"format": " {usage}%",
"format": " {usage}%",
"tooltip": false
},
"memory": {
"format": " {}%"
"format": " {}%"
},
"temperature": {
"critical-threshold": 80,
"format": "{icon} {temperatureC}°C",
"format-icons": [
"",
"",
""
"󱩅",
"󱩅",
"󱩅",
]
},
"backlight": {
"device": "acpi_video1",
"format": "{percent}% {icon}",
"format": "{icon} {percent}%",
"format-icons": [
"",
"",
"",
"",
"",
@ -121,11 +143,11 @@
"bat": "BAT2"
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "{ipaddr}/{cidr}",
"tooltip-format": "{ifname} via {gwaddr}",
"format-linked": "{ifname} (No IP)",
"format-disconnected": " Disconnected",
"format-wifi": "󰖩 {essid} ({signalStrength}%)",
"format-ethernet": "{ipaddr}/{cidr}",
"tooltip-format": "{ifname} via {gwaddr}",
"format-linked": "{ifname} (No IP)",
"format-disconnected": "󰖪 Disconnected",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
@ -151,7 +173,7 @@
},
"disk": {
"interval": 30,
"format": " {percentage_used}%",
"format": " {percentage_used}%",
"path": "/home"
},
"bluetooth": {
@ -188,7 +210,13 @@
},
"custom/wakatime": {
"exec": "source $HOME/dotfiles/.env && python3 $HOME/.config/waybar/resources/custom_modules/wakatime.py",
"format": " {}",
"format": " {}",
"return-type": "json",
"interval": 600
},
"custom/toggl": {
"exec": "source $HOME/dotfiles/.env && python3 $HOME/.config/waybar/resources/custom_modules/toggl_controller.py",
"format": "{}",
"return-type": "json",
"interval": 600
}

View file

@ -1,53 +1,61 @@
/* blue yellow green orange purple aqua ..
*/
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, "PragmataPro Mono Liga", Roboto, Helvetica, Arial,
sans-serif;
font-size: 16px;
}
window#waybar {
/* background-color: #282828; */
background-color: rgba(40, 40, 40, 0.8);
}
tooltip {
font-weight: 400;
border-radius: 0;
}
window#waybar.termite {
background-color: #3f3f3f;
}
window#waybar.chromium {
background-color: #000000;
border: none;
font-weight: 400;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
opacity: 1;
}
#workspaces button.active {
background-color: #e78a4a;
background-color: #98971a;
color: #282828;
}
#workspaces button {
font-weight: 600;
padding: 0 3px;
padding: 2px 3px;
color: #282828;
background-color: #a89984;
border-radius: 5px;
margin-right: 3px;
background-color: #928374;
margin-right: 5px;
margin-top: 6px;
margin-bottom: 6px;
}
#workspaces button.urgent {
background-color: #ea6962;
}
#taskbar button {
background-color: #3c3836;
padding: 3px 8px;
margin-top: 6px;
margin-bottom: 6px;
}
#taskbar button.active {
background-color: #98971a;
color: #282828;
/* padding: 3px 10px;
margin-top: 6px;
margin-bottom: 6px; */
}
#clock,
#battery,
#cpu,
@ -68,54 +76,53 @@ button {
#user,
#bluetooth,
#custom-wakatime,
#custom-os {
font-weight: 600;
padding: 3px 12px;
margin: 0;
border-radius: 5px;
#custom-toggl {
font-weight: 400;
padding: 3px 10px;
margin-left: 4px;
margin-top: 6px;
margin-bottom: 6px;
}
#window,
#custom-os {
font-weight: 400;
padding: 3px 10px;
margin-top: 6px;
margin-bottom: 6px;
margin-left: 8px;
}
#windowu,
#workspaces {
margin: 0 3px 0;
font-weight: 600;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
/* margin-left: 0; */
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
/* margin-right: 4; */
font-weight: 400;
}
#clock {
background-color: #a9b665;
background-color: #689d6a;
color: #282828;
margin-right: 6px;
margin-right: 8px;
}
#bluetooth {
background-color: #d8a657;
color: #282828;
background-color: #d65d0e;
color: #f2e5bc;
}
#battery {
background-color: #d8a657;
color: #282828;
background-color: #b16286;
color: #f2e5bc;
}
#battery.charging,
#battery.plugged {
color: #282c34;
background-color: #d8a657;
background-color: #b16286;
color: #f2e5bc;
}
#battery.critical:not(.charging) {
background-color: #ea6962;
color: #ddc7a1;
color: #f2e5bc;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
@ -124,28 +131,33 @@ button {
}
#cpu {
background-color: #a9b665;
background-color: #d79921;
color: #282828;
/* color: #282828; */
}
#memory {
background-color: #e78a4a;
background-color: #d79921;
color: #282828;
}
#disk {
background-color: #d79921;
color: #282828;
background-color: #d3869b;
}
#backlight {
background-color: #a89984;
color: #282828;
background-color: #b16286;
color: #f2e5bc;
}
#network {
background-color: #7daea3;
color: #282828;
background-color: #d65d0e;
color: #f2e5bc;
}
#network.format.icons {
background-color: red;
}
#network.disconnected {
@ -158,13 +170,13 @@ button {
}
#custom-spotify {
background-color: #89b482;
background-color: #689d6a;
color: #282828;
}
#temperature {
background-color: #d79921;
color: #282828;
background-color: #89b482;
}
#temperature.critical {
@ -182,13 +194,25 @@ button {
}
#custom-os {
background-color: #473c29;
color: #d4be98;
font-size: 16px;
margin-left: 6px;
background-color: #458588;
color: #f2e5bc;
}
#custom-wakatime {
background-color: #7daea3;
background-color: #b16286;
color: #f2e5bc;
margin-right: 4px;
}
#custom-toggl {
color: #282828;
}
#custom-toggl.active {
background-color: #98971a;
}
#custom-toggl.inactive {
background-color: #928374;
}