Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 29, 2024
1 parent 49a0249 commit 766a6b4
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 118 deletions.
12 changes: 6 additions & 6 deletions config/hypr/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ env = XCURSOR_SIZE,24
env = XCURSOR_THEME,Adwaita

### Auto Start ###
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY
exec-once = systemctl --user import-environment
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = gnome-keyring-daemon --start
exec-once = ags
exec-once = easyeffects --gapplication-service
exec-once = hypridle
exec-once = hyprpaper
exec-once = hyprshade auto
exec = hyprshade auto
exec-once = microsoft-edge-dev
exec-once = safeeyes -e
exec-once = wl-clip-persist --clipboard regular
Expand Down Expand Up @@ -64,7 +64,7 @@ bind = $meh, E, exec, element-desktop
bind = $meh, I, exec, microsoft-edge-dev
bind = $meh, L, exec, swaylock -f
bind = $meh, N, exec, makoctl dismiss -a
bind = $meh, space, exec, rofi -show drun
bind = $meh, space, exec, ags -t launcher
bind = ,Print, exec, ags -r 'recorder.screenshot()'
bind = SUPER,Print, exec, ags -r 'recorder.screenshot(true)'
bind = SUPER ALT,Print, exec, ags -r 'recorder.start()'
Expand All @@ -76,8 +76,8 @@ bind = ,XF86MonBrightnessDown, exec, lightctl down
bind = ,XF86MonBrightnessUp, exec, lightctl up
bind = ,XF86PowerOff, exec, ags -t powermenu
bind = SUPER ALT, A, exec, ags -q; ags
bind = SUPER ALT, E, exec, rofimoji -a clipboard
bind = SUPER ALT, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
bind = SUPER ALT, E, exec, ags -r 'launcher.open(":em ")'
bind = SUPER ALT, V, exec, ags -r 'launcher.open(":ch ")'
bind = SUPER ALT, return, exec, wezterm
bind = SUPER, B, exec, microsoft-edge-dev
bind = SUPER, E, exec, element-desktop
Expand Down
1 change: 1 addition & 0 deletions config/hypr/hyprvars.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ input {
}

general {
allow_tearing = true
gaps_in = 10
gaps_out = 10
border_size = 3
Expand Down
23 changes: 12 additions & 11 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"CopilotChat.nvim": { "branch": "canary", "commit": "c340352d29184940d5f221a564461678b378169e" },
"CopilotChat.nvim": { "branch": "canary", "commit": "c21c87d23da2f4cf95549cb043f4ab009f521860" },
"SchemaStore.nvim": { "branch": "main", "commit": "931f9f3b7b60ec976159cb01b4a40da3829ac2fd" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
"catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" },
Expand All @@ -13,7 +13,7 @@
"dashboard-nvim": { "branch": "master", "commit": "5182c09ac8085dc73b78ad0ea9f5479c9a866fc4" },
"dial.nvim": { "branch": "master", "commit": "7af2daaaf933b0617ded0f78b49f4d5fc45f9f64" },
"dressing.nvim": { "branch": "master", "commit": "3c38ac861e1b8d4077ff46a779cde17330b29f3a" },
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
"friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" },
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
"inc-rename.nvim": { "branch": "main", "commit": "7c6125b1ee476b56708a6518a37b2a3357f57bfc" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
Expand All @@ -26,7 +26,7 @@
"mini.ai": { "branch": "main", "commit": "7859b6344f5cee567a94f173859d25e20ba1a77e" },
"mini.align": { "branch": "main", "commit": "68a8d3205f0e7ce1bded057f4a851f42ef8fc584" },
"mini.animate": { "branch": "main", "commit": "0a35f6db55cfac04a0999abe3465f7b692dc56a7" },
"mini.diff": { "branch": "main", "commit": "15ab4bb369b235abe7908a2347178b0bde4c7a99" },
"mini.diff": { "branch": "main", "commit": "d357afcb7b9614b91bd96115e637841fda20418b" },
"mini.hipatterns": { "branch": "main", "commit": "427712c754bfdccd8da7073576cd8e2586c0fe93" },
"mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" },
"mini.surround": { "branch": "main", "commit": "27096c1a27324ee8f2044ea2adc77366d8a782de" },
Expand All @@ -38,17 +38,17 @@
"nerdy.nvim": { "branch": "main", "commit": "7d256222fda0031feae405f14d7a9414c7b6529f" },
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-dap": { "branch": "master", "commit": "922ebc75c2fa9305e36402fbd8c984c8638770a0" },
"nvim-dap": { "branch": "master", "commit": "abb238f631609ea4be496ba7946f4f3aaec86c6a" },
"nvim-dap-python": { "branch": "master", "commit": "3dffa58541d1f52c121fe58ced046268c838d802" },
"nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" },
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
"nvim-lint": { "branch": "master", "commit": "e19842a05aae484957ad20710444757bc0a61d63" },
"nvim-lspconfig": { "branch": "master", "commit": "d70633830acf605ec03d9728698d9e7232442eb4" },
"nvim-lspconfig": { "branch": "master", "commit": "38de86f82efd9ba0881203767d6a8e1815abca28" },
"nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-snippets": { "branch": "main", "commit": "67f44a552f03b5de23af1900d01af3256a3da2bc" },
"nvim-snippets": { "branch": "main", "commit": "0b86938397512dad4c0790b4ea4a835ad65dc0f6" },
"nvim-spectre": { "branch": "master", "commit": "366f46fdd4a1593cc237aea13d5ef113739a472c" },
"nvim-treesitter": { "branch": "master", "commit": "aa02427dfeaead86fae038024ae7b29299f08b8c" },
"nvim-treesitter": { "branch": "master", "commit": "ea2b137f35fb1e87a6471ec311805920fdf45745" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
"nvim-ts-autotag": { "branch": "main", "commit": "8ae54b90e36ef1fc5267214b30c2cbff71525fe4" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
Expand All @@ -59,10 +59,11 @@
"rustaceanvim": { "branch": "master", "commit": "e306c742bd7f7183e371cd91268b72d9db1bbae0" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "4c96370cf93e2ba287548da12d673442d0ffecc3" },
"telescope.nvim": { "branch": "master", "commit": "2df52609a1632de5d77a0b2416db6ad9cf32e463" },
"tree-sitter-caddy": { "branch": "master", "commit": "65b60437983933d00809c8927e7d8a29ca26dfa3" },
"tree-sitter-just": { "branch": "main", "commit": "fd814fc6c579f68c2a642f5e0268cf69daae92d7" },
"treesj": { "branch": "main", "commit": "e1e82ab4237619d342c7102c9f13d4b9833bfd39" },
"treesj": { "branch": "main", "commit": "f98deb33805485b56a8d44d1a27d16874af00d7f" },
"venv-selector.nvim": { "branch": "main", "commit": "6a1b15eb35bbb827b6db428055087e2dbf32838f" },
"wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" }
"wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" },
"yanky.nvim": { "branch": "main", "commit": "79338563e85a868e59cda02c51b54d90a5514a12" }
}
10 changes: 5 additions & 5 deletions nvim/lazyvim.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"extras": [
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.test.core",
"lazyvim.plugins.extras.ui.edgy",
"lazyvim.plugins.extras.coding.copilot",
"lazyvim.plugins.extras.coding.copilot-chat",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.coding.yanky",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.dap.nlua",
"lazyvim.plugins.extras.editor.dial",
"lazyvim.plugins.extras.editor.mini-diff",
"lazyvim.plugins.extras.editor.trouble-v3",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
Expand All @@ -19,11 +20,10 @@
"lazyvim.plugins.extras.lang.vue",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.linting.eslint",
"lazyvim.plugins.extras.test.core",
"lazyvim.plugins.extras.ui.edgy",
"lazyvim.plugins.extras.ui.mini-animate",
"lazyvim.plugins.extras.util.dot",
"lazyvim.plugins.extras.util.mini-hipatterns"
"lazyvim.plugins.extras.util.mini-hipatterns",
"lazyvim.plugins.extras.editor.trouble-v3"
],
"news": {
"NEWS.md": "4964",
Expand Down
3 changes: 0 additions & 3 deletions nvim/lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,3 @@ end

-- change word with <c-c>
vim.keymap.set("n", "<C-c>", "<cmd>normal! ciw<cr>a")

-- run lua
vim.keymap.set("n", "<leader>cR", util.runlua, { desc = "Run Lua" })
12 changes: 11 additions & 1 deletion nvim/lua/plugins/tmp.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
return {
{
"CopilotC-Nvim/CopilotChat.nvim",
-- dev = true,
opts = { show_help = false },
},
{
"garymjr/nvim-snippets",
-- dev = true,
},
{
"folke/trouble.nvim",
opts = { debug = true },
-- opts = { debug = true },
},
{
"fei6409/log-highlight.nvim",
event = "BufRead *.log",
opts = {},
},
-- { "gbprod/yanky.nvim", dev = true },
-- {
-- enabled = false,
-- "nvimdev/indentmini.nvim",
Expand Down
92 changes: 0 additions & 92 deletions nvim/lua/util/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,6 @@ end

local M = {}

function M.exists(fname)
local stat = vim.uv.fs_stat(fname)
return (stat and stat.type) or false
end

function M.fqn(fname)
fname = vim.fn.fnamemodify(fname, ":p")
return vim.uv.fs_realpath(fname) or fname
end

function M.clipman()
local file = M.fqn("~/.local/share/clipman.json")
if M.exists(file) then
local f = io.open(file)
if not f then
return
end
local data = f:read("*a")
f:close()

-- allow empty files
data = vim.trim(data)
if data ~= "" then
local ok, json = pcall(vim.fn.json_decode, data)
if ok and json then
local items = {}
for i = #json, 1, -1 do
items[#items + 1] = json[i]
end
vim.ui.select(items, {
prompt = "Clipman",
}, function(choice)
if choice then
vim.api.nvim_paste(choice, true, 1)
end
end)
else
vim.notify(("failed to load clipman from %s"):format(file), vim.log.levels.ERROR)
end
end
end
end

function M.test(is_file)
local file = is_file and vim.fn.expand("%:p") or "./tests"
local init = vim.fn.glob("tests/*init*")
Expand All @@ -73,55 +30,6 @@ function M.version()
end
end

function M.runlua()
local ns = vim.api.nvim_create_namespace("runlua")
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
vim.api.nvim_buf_clear_namespace(buf, ns, 0, -1)
vim.diagnostic.reset(ns, buf)
end

local global = _G
---@type {lnum:number, col:number, message:string}[]
local diagnostics = {}

local function get_source()
local info = debug.getinfo(3, "Sl")
---@diagnostic disable-next-line: param-type-mismatch
local buf = vim.fn.bufload(info.source:sub(2))
local row = info.currentline - 1
return buf, row
end

local G = setmetatable({
error = function(msg, level)
local buf, row = get_source()
diagnostics[#diagnostics + 1] = { lnum = row, col = 0, message = msg or "error" }
vim.diagnostic.set(ns, buf, diagnostics)
global.error(msg, level)
end,
print = function(...)
local buf, row = get_source()
local str = table.concat(
vim.tbl_map(function(o)
if type(o) == "table" then
return vim.inspect(o)
end
return tostring(o)
end, { ... }),
" "
)
local indent = #vim.api.nvim_buf_get_lines(buf, row, row + 1, false)[1]:match("^%s+")
local lines = vim.split(str, "\n")
---@param line string
local virt_lines = vim.tbl_map(function(line)
return { { string.rep(" ", indent * 2) .. "", "DiagnosticInfo" }, { line, "MsgArea" } }
end, lines)
vim.api.nvim_buf_set_extmark(buf, ns, row, 0, { virt_lines = virt_lines })
end,
}, { __index = _G })
require("lazy.core.util").try(loadfile(vim.api.nvim_buf_get_name(0), "bt", G))
end

function M.cowboy()
---@type table?
local id
Expand Down

0 comments on commit 766a6b4

Please sign in to comment.