Compare commits

...

2 Commits

Author SHA1 Message Date
e8163c8b9d refactor: nvim 2026-03-19 02:21:56 +03:00
a89e680872 refactor(waybar): reorganize top bar with groups and add new modules
- config_top.jsonc:
  - Group modules into traygroup, pomodorogroup, bench, general
  - Add weather, language, CPU, memory, temperature modules with icons and states
  - Add pomodoro preset buttons (10m,20m,30m,1h,1h30m)
  - Split battery into #watt (power draw) and #charge (charge level)
  - Add invisible separators for spacing
- config_bottom.jsonc:
  - Remove unused modules from left/right, add margin-top
- style_top.css:
  - Style new groups and modules, define state-based colors for CPU/memory/temperature
  - Add hover effects and critical animation for paused pomodoro
- style_bottom.css:
  - Style minimized taskbar buttons
  - Fix side panel group selector (use #group)
2026-03-19 02:21:29 +03:00
8 changed files with 334 additions and 30 deletions

View File

@@ -0,0 +1,38 @@
return {
"3rd/diagram.nvim",
event = 'BufEnter',
opts = { -- you can just pass {}, defaults below
events = {
render_buffer = { "InsertLeave", "BufWinEnter", "TextChanged" },
clear_buffer = {"BufLeave"},
},
renderer_options = {
mermaid = {
background = "transparent", -- nil | "transparent" | "white" | "#hex"
theme = "dark", -- nil | "default" | "dark" | "forest" | "neutral"
scale = 1, -- nil | 1 (default) | 2 | 3 | ...
width = nil, -- nil | 800 | 400 | ...
height = nil, -- nil | 600 | 300 | ...
cli_args = nil, -- nil | { "--no-sandbox" } | { "-p", "/path/to/puppeteer" } | ...
},
plantuml = {
charset = nil,
cli_args = nil, -- nil | { "-Djava.awt.headless=true" } | ...
},
d2 = {
theme_id = nil,
dark_theme_id = nil,
scale = nil,
layout = nil,
sketch = nil,
cli_args = nil, -- nil | { "--pad", "0" } | ...
},
gnuplot = {
size = nil, -- nil | "800,600" | ...
font = nil, -- nil | "Arial,12" | ...
theme = nil, -- nil | "light" | "dark" | custom theme string
cli_args = nil, -- nil | { "-p" } | { "-c", "config.plt" } | ...
},
},
},
}

View File

@@ -0,0 +1,20 @@
return {{
"k-lar/dynomark.nvim",
dependencies = "nvim-treesitter/nvim-treesitter",
event = 'BufEnter',
opts = { -- Default values
remap_arrows = false,
results_view_location = "vertical", -- Can be "float", "tab", "vertical" or "horizontal"
-- This is only used when results_view_location is "float"
-- By default the window is placed in the upper right of the window
-- If you want to have the window centered, set both offsets to 0.0
float_horizontal_offset = 0.2,
float_vertical_offset = 0.2,
-- Turn this to true if you want the plugin to automatically download
-- the dynomark engine if it's not found in your PATH.
-- This is false by default!
auto_download = true,
},
}}

View File

@@ -1,6 +1,6 @@
return { return {
"3rd/image.nvim", "3rd/image.nvim",
-- event = 'BufEnter', event = 'BufEnter',
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239 build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
config = function() config = function()
require("image").setup({ require("image").setup({
@@ -11,7 +11,7 @@ return {
enabled = true, enabled = true,
clear_in_insert_mode = true, clear_in_insert_mode = true,
download_remote_images = true, download_remote_images = true,
only_render_image_at_cursor = false, only_render_image_at_cursor = true,
only_render_image_at_cursor_mode = "popup", only_render_image_at_cursor_mode = "popup",
floating_windows = false, -- if true, images will be rendered in floating markdown windows floating_windows = false, -- if true, images will be rendered in floating markdown windows
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here

27
nvim/lua/plugins/zk.lua Normal file
View File

@@ -0,0 +1,27 @@
return {
"zk-org/zk-nvim",
event = 'BufEnter',
config = function()
require("zk").setup({
-- Can be "telescope", "fzf", "fzf_lua", "minipick", "snacks_picker",
-- or select" (`vim.ui.select`).
picker = "telescope",
lsp = {
-- `config` is passed to `vim.lsp.start(config)`
config = {
name = "zk",
cmd = { "zk", "lsp" },
filetypes = { "markdown" },
-- on_attach = ...
-- etc, see `:h vim.lsp.start()`
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
},
},
})
end,
}

View File

@@ -7,24 +7,19 @@
"height": 30, "height": 30,
"margin-left": 5, "margin-left": 5,
"margin-right": 5, "margin-right": 5,
"margin-top": 5,
"margin-bottom": 5, "margin-bottom": 5,
"position": "bottom", "position": "bottom",
"layer": "top", "layer": "top",
"spacing": 0, "spacing": 0,
"reload_style_on_change": true, "reload_style_on_change": true,
"modules-left": [ "modules-left": [
"tray",
"custom/pomodoro"
], ],
"modules-center": [ "modules-center": [
"wlr/taskbar", "wlr/taskbar",
"custom/launcher" "custom/launcher"
], ],
"modules-right": [ "modules-right": [
"battery",
"cpu",
"memory",
"temperature"
], ],
"custom/separator": { "custom/separator": {
"format": " ", "format": " ",

View File

@@ -8,22 +8,121 @@
"margin-left": 5, "margin-left": 5,
"margin-right": 5, "margin-right": 5,
"margin-top": 5, "margin-top": 5,
"margin-bottom": 5,
"position": "top",
"layer": "top", "layer": "top",
"spacing": 0, "spacing": 0,
"reload_style_on_change": true, "reload_style_on_change": true,
"modules-left": [ "modules-left": [
"custom/weather",
"custom/separator_invisible",
"group/pomodorogroup",
"custom/separator_invisible",
"mpd" "mpd"
], ],
"modules-center": [ "modules-center": [
"hyprland/workspaces" "hyprland/workspaces"
], ],
"modules-right": [ "modules-right": [
"pulseaudio", "group/traygroup",
"pulseaudio/slider", "custom/separator_invisible",
"battery", "group/bench",
"network", "custom/separator_invisible",
"clock" "group/general"
], ],
"group/traygroup": {
"orientation": "inherit",
"modules": [
"hyprland/language",
"tray"
]
},
"group/pomodorogroup": {
"orientation": "inherit",
"modules": [
"custom/pomodoro",
"custom/pomodoro10",
"custom/pomodoro20",
"custom/pomodoro30",
"custom/pomodoro60",
"custom/pomodoro90"
],
"drawer": {
}
},
"group/bench": {
"orientation": "inherit",
"modules": [
"battery#watt",
"cpu",
"memory",
"temperature"
]
},
"group/general": {
"orientation": "inherit",
"modules": [
"pulseaudio",
"pulseaudio/slider",
"battery#charge",
"network",
"clock"
]
},
"hyprland/language": {
"format": "{}",
"format-en": "🇬🇧",
"format-ru": "🇷🇺"
},
"battery#watt": {
"interval": 5,
"format": "{power:.0f}W |",
"on-click": "sh -c 'swaync-client -cp & ~/.config/rofi/scripts/dmenu_powermodemenu.sh'"
},
"cpu": {
"format": "{icon}",
"tooltip": true,
"interval": 3,
"format-icons": [
"󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"
],
"states": {
"s1": 0,
"s2": 10,
"s3": 30,
"s4": 50,
"s5": 70
},
"on-click": "kitty btop"
},
"memory": {
"format": "{icon}",
"interval": 3,
"format-icons": [
"󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"
],
"states": {
"s1": 20,
"s2": 30,
"s3": 50,
"s4": 60,
"s4": 70
},
"tooltip-format": "{used:0.1f}GiB used",
"tooltip": true,
"on-click": "kitty btop"
},
"temperature": {
"format": "{icon}",
"interval": 10,
"format-icons": [
"󰄰", "󰄰", "󰄰", "󰄰", "󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"
],
"warning-threshold": 60,
"critical-threshold": 80,
"on-click": "kitty btop"
},
"tray": { "tray": {
"icon-size": 18, "icon-size": 18,
"spacing": 10, "spacing": 10,
@@ -131,7 +230,7 @@
"on-click-right": "mode" "on-click-right": "mode"
} }
}, },
"battery": { "battery#charge": {
"full-at": 98, "full-at": 98,
"states": { "states": {
"good": 85, "good": 85,
@@ -179,11 +278,38 @@
"interval": "once", "interval": "once",
"tooltip": false "tooltip": false
}, },
"custom/weather": {
"format": "{}°C",
"tooltip": true,
"interval": 3600,
"exec": "wttrbar --location Moskau --nerd --mph --date-format %d.%m.%Y",
"return-type": "json"
},
"custom/pomodoro": { "custom/pomodoro": {
"format": "{}", "format": "{}",
"return-type": "json", "return-type": "json",
"exec": "~/.local/bin/waybar-module-pomodoro --persist -w 20 -s 5 -l 20 -i 3 -p '' -a '' --autob", "exec": "~/.local/bin/waybar-module-pomodoro --persist -w 20 -s 5 -l 20 -i 3 -p '' -a '' --autob",
"on-click": "~/.local/bin/waybar-module-pomodoro toggle", "on-click": "~/.local/bin/waybar-module-pomodoro toggle",
"on-click-right": "~/.local/bin/waybar-module-pomodoro reset" "on-click-right": "~/.local/bin/waybar-module-pomodoro reset"
},
"custom/pomodoro10": {
"format": "10m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 10"
},
"custom/pomodoro20": {
"format": "20m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 20"
},
"custom/pomodoro30": {
"format": "30m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 30"
},
"custom/pomodoro60": {
"format": "1h",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 60"
},
"custom/pomodoro90": {
"format": "1h30m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 90"
} }
} }

View File

@@ -122,6 +122,10 @@ window#waybar.chromium {
min-height: 20px; min-height: 20px;
} }
#taskbar button.minimized {
color: alpha(@accent, 0.5);
}
#taskbar.empty { #taskbar.empty {
padding: 0; padding: 0;
} }
@@ -158,7 +162,7 @@ window#waybar.chromium {
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
SIDE PANEL GROUPS SIDE PANEL GROUPS
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
.modules-left, .modules-right { #group {
/* Layout & Box Model */ /* Layout & Box Model */
border: 1px solid @border-color; border: 1px solid @border-color;
border-radius: 15px; border-radius: 15px;

View File

@@ -46,19 +46,27 @@ window#waybar.chromium {
#mpd, #mpd,
#mpris, #mpris,
#custom-pomodoro, #custom-pomodoro,
#custom-weather,
#clock, #clock,
#battery, #battery,
#network, #network,
#pulseaudio, #pulseaudio,
#pulseaudio-slider, #pulseaudio-slider,
#custom-separator,
#scratchpad, #scratchpad,
#language,
#cpu,
#memory,
#temperature,
#tray { #tray {
padding: 0 10px; padding: 0 10px;
color: @text-primary; color: @text-primary;
transition: color 0.3s ease, text-shadow 0.3s ease, background 0.3s ease; transition: color 0.3s ease, text-shadow 0.3s ease, background 0.3s ease;
} }
#custom-separator-invisible {
padding: 0 30px;
}
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
WORKSPACES WORKSPACES
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
@@ -124,13 +132,51 @@ window#waybar.chromium {
text-shadow: 0px 0px 8px @text-primary; text-shadow: 0px 0px 8px @text-primary;
} }
/* --------------------------------------------------------------------------
BATTERY
-------------------------------------------------------------------------- */
#language {
padding-right: 0;
padding-left: 12px;
}
/* --------------------------------------------------------------------------
BATTERY
-------------------------------------------------------------------------- */
#battery.watt {
padding-right: 0;
}
/* --------------------------------------------------------------------------
CPU
-------------------------------------------------------------------------- */
#cpu {
font-size: 20px;
}
/* --------------------------------------------------------------------------
MEMORY
-------------------------------------------------------------------------- */
#memory {
font-size: 20px;
padding: 0;
}
/* --------------------------------------------------------------------------
TEMPERATURE
-------------------------------------------------------------------------- */
#temperature {
font-size: 20px;
}
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
SIDE PANEL GROUPS SIDE PANEL GROUPS
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#mpd, #mpris, #workspaces, .modules-right { #general, #bench, #workspaces, #mpd, #traygroup, #custom-weather, #pomodorogroup {
/* Layout & Box Model */ /* Layout & Box Model */
border: 1px solid @border-color; border: 1px solid @border-color;
border-radius: 15px; border-radius: 15px;
margin: 2.5px;
/* Colors */ /* Colors */
background-color: @bg-panel; background-color: @bg-panel;
@@ -176,17 +222,22 @@ window#waybar.chromium {
CUSTOM MODULES CUSTOM MODULES
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#custom-pomodoro { #custom-pomodoro {
color: @text-secondary; color: @text-primary;
border-radius: 0 0 10px 10px; border-radius: 0 0 10px 10px;
} }
#pomodorogroup .drawer-child * {
color: @text-primary;
margin-right: 10px;
}
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
STATE-BASED STYLES STATE-BASED STYLES
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
/* POMODORO STATES */ /* POMODORO STATES */
#custom-pomodoro.work { #custom-pomodoro.work {
color: @accent; color: @attention;
} }
#custom-pomodoro.break { #custom-pomodoro.break {
@@ -195,8 +246,7 @@ window#waybar.chromium {
} }
#custom-pomodoro.pause { #custom-pomodoro.pause {
color: @attention; animation: critical 0.5s 50;
text-shadow: 0px 0px 4px @attention;
} }
/* MPD STATES */ /* MPD STATES */
@@ -219,29 +269,59 @@ window#waybar.chromium {
#mpd.paused, #mpris.paused { #mpd.paused, #mpris.paused {
font-weight: normal; font-weight: normal;
color: @text-secondary; color: @text-primary;
} }
/* BATTERY STATES */ /* BATTERY STATES */
#battery.charging, #battery.charge.charging,
#battery.plugged { #battery.charge.plugged {
color: @success; color: @success;
text-shadow: 0px 0px 8px @success; text-shadow: 0px 0px 8px @success;
transition: color 0.3s, box-shadow 0.3s, background 0.3s; transition: color 0.3s, box-shadow 0.3s, background 0.3s;
} }
#battery.warning:not(.charging) { #battery.charge.warning:not(.charging) {
color: @warning; color: @warning;
text-shadow: 0px 0px 8px @warning; text-shadow: 0px 0px 8px @warning;
transition: color 0.3s, box-shadow 0.3s, background 0.3s; transition: color 0.3s, box-shadow 0.3s, background 0.3s;
} }
#battery.critical:not(.charging) { #battery.charge.critical:not(.charging) {
color: @danger; color: @danger;
text-shadow: 0px 0px 8px @danger; text-shadow: 0px 0px 8px @danger;
transition: color 0.3s, box-shadow 0.3s, background 0.3s; transition: color 0.3s, box-shadow 0.3s, background 0.3s;
} }
/* CPU && MEMORY STATES */
#cpu.s1, #memory.s1, #temperature.s1 {
color: @text-primary;
transition: color 0.3s, text-shadow 0.3s, background 0.3s;
}
#cpu.s2, #memory.s2 {
color: @text-primary;
text-shadow: 0px 0px 2px @text-primary;
transition: color 0.3s, text-shadow 0.3s, background 0.3s;
}
#cpu.s3, #memory.s3 {
color: @attention;
text-shadow: 0px 0px 2px @attention;
transition: color 0.3s, text-shadow 0.3s, background 0.3s;
}
#cpu.s4, #memory.s4, #temperature.warning {
color: @warning;
text-shadow: 0px 0px 2px @warning;
transition: color 0.3s, text-shadow 0.3s, background 0.3s;
}
#cpu.s5, #memory.s5, #temperature.critical {
color: @danger;
text-shadow: 0px 0px 2px @danger;
transition: color 0.3s, text-shadow 0.3s, background 0.3s;
}
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
HOVER EFFECTS HOVER EFFECTS
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
@@ -254,7 +334,10 @@ window#waybar.chromium {
#network:hover, #network:hover,
#pulseaudio:hover, #pulseaudio:hover,
#custom-pomodoro:hover, #custom-pomodoro:hover,
#custom-weather:hover,
#scratchpad:hover, #scratchpad:hover,
#language:hover,
#pomodorogroup .drawer-child *:hover,
#tray:hover { #tray:hover {
color: @accent; color: @accent;
text-shadow: 0px 0px 8px @accent; text-shadow: 0px 0px 8px @accent;
@@ -270,10 +353,6 @@ window#waybar.chromium {
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
LAYOUT UTILITIES LAYOUT UTILITIES
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#window,
#workspaces {
margin: 0 2.5px;
}
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
margin-left: 0; margin-left: 0;
@@ -290,3 +369,18 @@ window#waybar.chromium {
0% { color: @text-primary; } 0% { color: @text-primary; }
100% { color: @accent; } 100% { color: @accent; }
} }
@keyframes critical {
0% {
color: @attention;
text-shadow: 0px 0px 8px @attention;
}
50% {
color: @accent;
text-shadow: 0px 0px 8px @accent;
}
100% {
color: @attention;
text-shadow: 0px 0px 8px @attention;
}
}