diff options
| -rw-r--r-- | arch/hyprland/.config/hypr/keybinds.conf | 9 | ||||
| -rw-r--r-- | arch/hyprland/.config/hypr/windowrules.conf | 12 | ||||
| -rw-r--r-- | arch/nvim/.config/nvim/lua/plugins/ui.lua | 98 |
3 files changed, 66 insertions, 53 deletions
diff --git a/arch/hyprland/.config/hypr/keybinds.conf b/arch/hyprland/.config/hypr/keybinds.conf index 5541010..0a9311e 100644 --- a/arch/hyprland/.config/hypr/keybinds.conf +++ b/arch/hyprland/.config/hypr/keybinds.conf @@ -59,14 +59,15 @@ bind = $mainMod SHIFT, 0, movetoworkspace, 10 bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 -# ── Special workspaces (scratchpads) ───────────────────────────────────────── +# ── Special workspaces ───────────────────────────────────────── bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic +bind = $mainMod, P, exec, hyprctl dispatch togglespecialworkspace spotify # ── Screenshots ─────────────────────────────────────────────────────────────── -bind = , Print, exec, grim -g "$(slurp)" - | wl-copy -bind = $mainMod, Print, exec, grim - | wl-copy -bind = $mainMod SHIFT, Print, exec, grim -g "$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | wl-copy +bind = , Print, exec, grim -g "$(slurp)" - | wl-copy +bind = $mainMod, Print, exec, grim - | wl-copy +bind = $mainMod SHIFT, Print, exec, grim -g "$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | wl-copy # ── Resize submap ───────────────────────────────────────────────────────────── bind = $mainMod CTRL, R, submap, resize diff --git a/arch/hyprland/.config/hypr/windowrules.conf b/arch/hyprland/.config/hypr/windowrules.conf index dc04c62..3408cbf 100644 --- a/arch/hyprland/.config/hypr/windowrules.conf +++ b/arch/hyprland/.config/hypr/windowrules.conf @@ -1,13 +1,17 @@ -# ── Spotify transparency ────────────────────────────────────────────────────── -# Barely-noticeable opacity lets Hyprland's compositor blur show wallpaper -# bleed-through behind the CSS rgba panels in the spicetify theme. +# ── Spotify ────────────────────────────────────────────────────── windowrule { name = spotify-transparency match:class = Spotify opacity = 0.90 override } -# ── Floating terminal (Super+Q with float-term class) ───────────────────────── +windowrule { + name = spotify-special + match:class = Spotify + workspace = special:spotify silent +} + +# ── Floating terminal ───────────────────────── windowrule { name = float-term match:class = float-term diff --git a/arch/nvim/.config/nvim/lua/plugins/ui.lua b/arch/nvim/.config/nvim/lua/plugins/ui.lua index f0f8a27..cada32c 100644 --- a/arch/nvim/.config/nvim/lua/plugins/ui.lua +++ b/arch/nvim/.config/nvim/lua/plugins/ui.lua @@ -7,37 +7,40 @@ return { local function make_theme() local ok, p = pcall(dofile, vim.fn.expand("~/.cache/wallust/nvim.lua")) if not ok then - p = { base0D = "#89b4fa", base05 = "#cdd6f4", base04 = "#585b70", - base0B = "#a6e3a1", base0E = "#cba6f7", base08 = "#f38ba8", base0A = "#f9e2af" } + p = { + base0D = "#89b4fa", + base05 = "#cdd6f4", + base04 = "#585b70", + base0B = "#a6e3a1", + base0E = "#cba6f7", + base08 = "#f38ba8", + base0A = "#f9e2af", + } end return { - normal = { a = { fg = p.base0D, bg = "NONE", gui = "bold" }, b = { fg = p.base05, bg = "NONE" }, c = { fg = p.base04, bg = "NONE" } }, - insert = { a = { fg = p.base0B, bg = "NONE", gui = "bold" } }, - visual = { a = { fg = p.base0E, bg = "NONE", gui = "bold" } }, - replace = { a = { fg = p.base08, bg = "NONE", gui = "bold" } }, - command = { a = { fg = p.base0A, bg = "NONE", gui = "bold" } }, - inactive = { a = { fg = p.base04, bg = "NONE" }, b = { fg = p.base04, bg = "NONE" }, c = { fg = p.base04, bg = "NONE" } }, + normal = { + a = { fg = p.base0D, bg = "NONE", gui = "bold" }, + b = { fg = p.base05, bg = "NONE" }, + c = { fg = p.base04, bg = "NONE" }, + }, + insert = { a = { fg = p.base0B, bg = "NONE", gui = "bold" } }, + visual = { a = { fg = p.base0E, bg = "NONE", gui = "bold" } }, + replace = { a = { fg = p.base08, bg = "NONE", gui = "bold" } }, + command = { a = { fg = p.base0A, bg = "NONE", gui = "bold" } }, + inactive = { + a = { fg = p.base04, bg = "NONE" }, + b = { fg = p.base04, bg = "NONE" }, + c = { fg = p.base04, bg = "NONE" }, + }, } end - -- lualine.setup() (and every ColorScheme reload of it) asserts - -- laststatus=3. Register the guard first so it catches every future - -- write, then immediately fix the one we're about to trigger. - vim.api.nvim_create_autocmd("OptionSet", { - pattern = "laststatus", - callback = function() - if vim.o.laststatus ~= 0 then - vim.o.laststatus = 0 - end - end, - }) - require("lualine").setup({ options = { - theme = make_theme(), - globalstatus = true, + theme = make_theme(), + globalstatus = true, component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, }, sections = { lualine_a = { "mode" }, @@ -48,7 +51,21 @@ return { lualine_z = { "location" }, }, }) - vim.o.laststatus = 0 -- synchronous fix for the setup() call above + + vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI", "BufEnter" }, { + group = vim.api.nvim_create_augroup("ScrollOffEOF", {}), + callback = function() + local win_h = vim.api.nvim_win_get_height(0) + local off = math.min(vim.o.scrolloff, math.floor(win_h / 2)) + local dist = vim.fn.line("$") - vim.fn.line(".") + local rem = vim.fn.line("w$") - vim.fn.line("w0") + 1 + if dist < off and win_h - rem + dist < off then + local view = vim.fn.winsaveview() + view.topline = view.topline + off - (win_h - rem + dist) + vim.fn.winrestview(view) + end + end, + }) vim.api.nvim_create_autocmd("ColorScheme", { callback = function() @@ -58,33 +75,24 @@ return { }) end, }, - -- Pipe lualine into the tmux status bar - { - "vimpostor/vim-tpipeline", - event = "VeryLazy", - init = function() - vim.g.tpipeline_restore = 0 -- clear files on exit rather than restore broken format - vim.g.tpipeline_embedopts = {} -- tmux.conf owns status-left/right format - end, - }, - -- Buffer tabs + -- -- Buffer tabs { "akinsho/bufferline.nvim", version = "*", event = "VeryLazy", keys = { - { "<leader>bp", "<cmd>BufferLinePick<CR>", desc = "Pick buffer" }, + { "<leader>bp", "<cmd>BufferLinePick<CR>", desc = "Pick buffer" }, { "<leader>bo", "<cmd>BufferLineCloseOthers<CR>", desc = "Close others" }, - { "<leader>bc", "<cmd>BufferLinePickClose<CR>", desc = "Close (pick)" }, + { "<leader>bc", "<cmd>BufferLinePickClose<CR>", desc = "Close (pick)" }, }, opts = { options = { - mode = "buffers", + mode = "buffers", show_buffer_close_icons = false, - show_close_icon = false, - separator_style = "thin", - always_show_bufferline = false, - diagnostics = "nvim_lsp", + show_close_icon = false, + separator_style = "thin", + always_show_bufferline = false, + diagnostics = "nvim_lsp", }, }, }, @@ -94,10 +102,10 @@ return { event = { "BufReadPre", "BufNewFile" }, opts = { signs = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, changedelete = { text = "▎" }, }, }, |