Bring over commits accidentally only on local_machine branch to main

This commit is contained in:
Martin Larsson 2025-07-09 23:58:22 +02:00
parent 07471f5d48
commit 332c883a48
11 changed files with 59 additions and 11 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
############################# #############################
# Icons for Linux Battery # Icons for Linux Battery

View file

@ -63,4 +63,3 @@ keybind = alt+left=unbind
keybind = alt+right=unbind keybind = alt+right=unbind
keybind = ctrl+shift+left=unbind keybind = ctrl+shift+left=unbind
keybind = ctrl+shift+right=unbind keybind = ctrl+shift+right=unbind

View file

@ -54,6 +54,8 @@ in
bitwarden-cli bitwarden-cli
sway-audio-idle-inhibit sway-audio-idle-inhibit
qutebrowser qutebrowser
ffmpeg
imv
]; ];
file = utils.mk_symlinks { inherit config dotfiles; }; file = utils.mk_symlinks { inherit config dotfiles; };

View file

@ -8,7 +8,7 @@ local handle_count = 1
function M.setup() function M.setup()
utils.set_keymap_list({ utils.set_keymap_list({
{ {
"q", "<Leader>q",
function() function()
for _, cb in ipairs(callbacks) do for _, cb in ipairs(callbacks) do
if cb ~= nil then if cb ~= nil then

16
nvim/lua/colors.lua Normal file
View file

@ -0,0 +1,16 @@
local has_generated = false
local colors = require("ayu.colors")
colors.generate(true)
local M = {}
function M.get()
if not has_generated then
colors.generate(true)
has_generated = true
end
return colors
end
return M

View file

@ -66,6 +66,16 @@ utils.foreach({
vim.cmd.normal({ cmd }) vim.cmd.normal({ cmd })
end end
end }, end },
{ "<C-t>", ":$tabnew %<CR>", { silent = true }, },
{ "<Leader>1", ":1tabn<CR>", { silent = true }, },
{ "<Leader>2", ":2tabn<CR>", { silent = true }, },
{ "<Leader>3", ":3tabn<CR>", { silent = true }, },
{ "<Leader>4", ":4tabn<CR>", { silent = true }, },
{ "<Leader>5", ":5tabn<CR>", { silent = true }, },
{ "<Leader>6", ":6tabn<CR>", { silent = true }, },
{ "<Leader>7", ":7tabn<CR>", { silent = true }, },
{ "<Leader>8", ":8tabn<CR>", { silent = true }, },
{ "<Leader>9", ":9tabn<CR>", { silent = true }, },
} }
}, },
{ {

View file

@ -1,7 +1,5 @@
local saved_hlsearch = false local saved_hlsearch = false
local saved_highlights = {} local saved_highlights = {}
local colors = require("ayu.colors")
colors.generate(true)
local function leap_across_windows() local function leap_across_windows()
require("leap").leap({ require("leap").leap({
@ -25,7 +23,7 @@ end
local function save_and_set_invisible_inlay_hints_hl() local function save_and_set_invisible_inlay_hints_hl()
saved_highlights = vim.api.nvim_get_hl(0, { name = "LspInlayHint" }) saved_highlights = vim.api.nvim_get_hl(0, { name = "LspInlayHint" })
vim.api.nvim_set_hl(0, "LspInlayHint", { fg = colors.bg, bg = "none" }) vim.api.nvim_set_hl(0, "LspInlayHint", { fg = require("colors").get().bg, bg = "none" })
end end
local function restore_inlay_hints_hl() local function restore_inlay_hints_hl()

View file

@ -1,11 +1,24 @@
local function resize_mode() local function resize_mode()
if require("window_management").is_in_resizing_mode() then if require("window_management").is_in_resizing_mode() then
return "▲ Resizing ▼" return "▲ Resizing ▼"
else else
return "" return " "
end end
end end
local tabs = {
"tabs",
use_mode_colors = true,
tabs_color = {
active = "lualine_b_command",
},
show_modified_status = false,
component_separators = {
left = "",
right = ""
},
}
return { return {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = { dependencies = {
@ -38,7 +51,7 @@ return {
}, },
resize_mode, resize_mode,
}, },
lualine_c = { "buffers" }, lualine_c = { tabs },
lualine_x = { "encoding", "fileformat", "filetype" }, lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" }, lualine_y = { "progress" },
lualine_z = { "location" } lualine_z = { "location" }

View file

@ -11,6 +11,15 @@ return {
["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true, ["vim.lsp.util.stylize_markdown"] = true,
}, },
signature = {
auto_open = true,
opts = {
position = {
row = 2,
col = 0,
},
},
},
}, },
presets = { presets = {
bottom_search = true, -- use a classic bottom cmdline for search bottom_search = true, -- use a classic bottom cmdline for search

View file

@ -1,6 +1,6 @@
local opt = vim.opt local opt = vim.opt
-- Disable tabs, will use telescope and harpoon instead -- Disable tabs
opt.showtabline = 0 opt.showtabline = 0
-- Make Vim use the system clipboard -- Make Vim use the system clipboard
@ -71,7 +71,7 @@ opt.scrolloff = 4
opt.list = false opt.list = false
-- Sessions -- Sessions
opt.sessionoptions = { "buffers", "curdir", "winsize", "winpos", "skiprtp" } opt.sessionoptions = { "buffers", "curdir", "winsize", "winpos", "tabpages", "skiprtp" }
-- Builtin LSP completion tweaks -- Builtin LSP completion tweaks
-- See comment in lspsetup autocmd for LspAttach -- See comment in lspsetup autocmd for LspAttach

View file

@ -145,6 +145,7 @@ alias gap="git add --patch"
alias gi="git init" alias gi="git init"
alias gcl="git clone" alias gcl="git clone"
alias gd="git diff --output-indicator-new=' ' --output-indicator-old=' '" alias gd="git diff --output-indicator-new=' ' --output-indicator-old=' '"
alias gds="git diff --staged --output-indicator-new=' ' --output-indicator-old=' '"
alias gl="git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'" alias gl="git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'"
alias gm="git merge" alias gm="git merge"