anual update

This commit is contained in:
Lucas Barbieri 2023-07-15 02:11:21 -03:00
parent d903c5c002
commit 41415a9b24
44 changed files with 1426 additions and 1091 deletions

6
configs/feh/buttons Normal file
View File

@ -0,0 +1,6 @@
# Unbind existing scroll operations
prev_img
next_img
# Set <action> <mouse button>
zoom_in 4
zoom_out 5

View File

@ -1,30 +0,0 @@
-- -- import nvim-autopairs safely
-- local autopairs_setup, autopairs = pcall(require, "nvim-autopairs")
-- if not autopairs_setup then
-- return
-- end
--
-- -- configure autopairs
-- autopairs.setup({
-- check_ts = true, -- enable treesitter
-- ts_config = {
-- lua = { "string" }, -- don't add pairs in lua string treesitter nodes
-- javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes
-- java = false, -- don't check treesitter on java
-- },
-- })
--
-- -- import nvim-autopairs completion functionality safely
-- local cmp_autopairs_setup, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
-- if not cmp_autopairs_setup then
-- return
-- end
--
-- -- import nvim-cmp plugin safely (completions plugin)
-- local cmp_setup, cmp = pcall(require, "cmp")
-- if not cmp_setup then
-- return
-- end
--
-- -- make autopairs and completion work together
-- cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())

View File

@ -1,98 +0,0 @@
-- Set barbar's options
require'bufferline'.setup()
-- -- Enable/disable animations
-- animation = true,
--
-- -- Enable/disable auto-hiding the tab bar when there is a single buffer
-- auto_hide = false,
--
-- -- Enable/disable current/total tabpages indicator (top right corner)
-- tabpages = true,
--
-- -- Enable/disable close button
-- closable = true,
--
-- -- Enables/disable clickable tabs
-- -- - left-click: go to buffer
-- -- - middle-click: delete buffer
-- clickable = true,
--
-- -- Enables / disables diagnostic symbols
-- diagnostics = {
-- -- you can use a list
-- {enabled = true, icon = 'ff'}, -- ERROR
-- {enabled = false}, -- WARN
-- {enabled = false}, -- INFO
-- {enabled = true}, -- HINT
--
-- -- OR `vim.diagnostic.severity`
-- [vim.diagnostic.severity.ERROR] = {enabled = true, icon = 'ff'},
-- [vim.diagnostic.severity.WARN] = {enabled = false},
-- [vim.diagnostic.severity.INFO] = {enabled = false},
-- [vim.diagnostic.severity.HINT] = {enabled = true},
-- },
--
-- -- Excludes buffers from the tabline
-- exclude_ft = {'javascript'},
-- exclude_name = {'package.json'},
--
-- -- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
-- hide = {extensions = true, inactive = true},
--
-- -- Disable highlighting alternate buffers
-- highlight_alternate = false,
--
-- -- Disable highlighting file icons in inactive buffers
-- highlight_inactive_file_icons = false,
--
-- -- Enable highlighting visible buffers
-- highlight_visible = true,
--
-- -- Enable/disable icons
-- -- if set to 'numbers', will show buffer index in the tabline
-- -- if set to 'both', will show buffer index and icons in the tabline
-- icons = true,
--
-- -- If set, the icon color will follow its corresponding buffer
-- -- highlight group. By default, the Buffer*Icon group is linked to the
-- -- Buffer* group (see Highlighting below). Otherwise, it will take its
-- -- default value as defined by devicons.
-- icon_custom_colors = false,
--
-- -- Configure icons on the bufferline.
-- icon_separator_active = '▎',
-- icon_separator_inactive = '▎',
-- icon_close_tab = '',
-- icon_close_tab_modified = '●',
-- icon_pinned = '車',
--
-- -- If true, new buffers will be inserted at the start/end of the list.
-- -- Default is to insert after current buffer.
-- insert_at_end = false,
-- insert_at_start = false,
--
-- -- Sets the maximum padding width with which to surround each tab
-- maximum_padding = 1,
--
-- -- Sets the minimum padding width with which to surround each tab
-- minimum_padding = 1,
--
-- -- Sets the maximum buffer name length.
-- maximum_length = 30,
--
-- -- If set, the letters for each buffer in buffer-pick mode will be
-- -- assigned based on their name. Otherwise or in case all letters are
-- -- already assigned, the behavior is to assign letters in order of
-- -- usability (see order below)
-- semantic_letters = true,
--
-- -- New buffer letters are assigned in this order. This order is
-- -- optimal for the qwerty keyboard layout but might need adjustement
-- -- for other layouts.
-- letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP',
--
-- -- Sets the name of unnamed buffers. By default format is "[Buffer X]"
-- -- where X is the buffer number. But only a static string is accepted here.
-- no_name_title = nil,
-- }
--

View File

@ -1,47 +0,0 @@
local status, cmp = pcall(require, "cmp")
if not status then
return
end
local lspkind = require("lspkind")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.scroll_docs(-4),
["<C-j>"] = cmp.mapping.scroll_docs(4),
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = 'luasnip'},
{ name = 'path'}
}),
formatting = {
format = lspkind.cmp_format({ with_text = false, maxwidth = 40 }),
},
})
vim.api.nvim_set_keymap('i', '<Tab>', 'luasnip#expand_or_jumpable() ? "<Plug>luasnip-expand-or-jump" : "<Tab>"', {expr=true, silent=true})
vim.api.nvim_set_keymap('i', '<S-Tab>', '<cmd>lua require("luasnip").jump(-1)<CR>', {silent=true})
vim.api.nvim_set_keymap('s', '<Tab>', '<cmd>lua require("luasnip").jump(1)<CR>', {silent=true})
vim.api.nvim_set_keymap('s', '<S-Tab>', '<cmd>lua require("luasnip").jump(-1)<CR>', {silent=true})
vim.api.nvim_set_keymap('i', '<C-F>', 'luasnip#choice_active() ? "<Plug>luasnip-next-choice" : "<C-E>"', {expr=true, silent=true})
vim.api.nvim_set_keymap('s', '<C-F>', 'luasnip#choice_active() ? "<Plug>luasnip-next-choice" : "<C-E>"', {expr=true, silent=true})
vim.cmd([[
set completeopt=menuone,noinsert,noselect
highlight! default link CmpItemKind CmpItemMenuDefault
]])

View File

@ -3,4 +3,13 @@ if not status then
return return
end end
colorizer.setup() colorizer.setup{
css = {
rgb_fn = true;
rgb = true;
names = true;
};
html = {
names = true;
}
}

View File

@ -1,296 +0,0 @@
---depends om https://github.com/feline-nvim/feline.nvim
local present, feline = pcall(require, "feline")
if not present then
return
end
local theme = {
aqua = "#7AB0DF",
bg = "#1C212A",
blue = "#5FB0FC",
cyan = "#70C0BA",
darkred = "#FB7373",
fg = "#C7C7CA",
gray = "#222730",
green = "#79DCAA",
lime = "#54CED6",
orange = "#FFD064",
pink = "#D997C8",
purple = "#C397D8",
red = "#F87070",
yellow = "#FFE59E"
}
local mode_theme = {
["NORMAL"] = theme.green,
["OP"] = theme.cyan,
["INSERT"] = theme.aqua,
["VISUAL"] = theme.yellow,
["LINES"] = theme.darkred,
["BLOCK"] = theme.orange,
["REPLACE"] = theme.purple,
["V-REPLACE"] = theme.pink,
["ENTER"] = theme.pink,
["MORE"] = theme.pink,
["SELECT"] = theme.darkred,
["SHELL"] = theme.cyan,
["TERM"] = theme.lime,
["NONE"] = theme.gray,
["COMMAND"] = theme.blue,
}
local component = {}
component.vim_mode = {
provider = function()
return vim.api.nvim_get_mode().mode:upper()
end,
hl = function()
return {
fg = "bg",
bg = require("feline.providers.vi_mode").get_mode_color(),
style = "bold",
name = "NeovimModeHLColor",
}
end,
left_sep = "block",
right_sep = "block",
}
component.git_branch = {
provider = "git_branch",
hl = {
fg = "fg",
bg = "bg",
style = "bold",
},
left_sep = "block",
right_sep = "",
}
component.git_add = {
provider = "git_diff_added",
hl = {
fg = "green",
bg = "bg",
},
left_sep = "",
right_sep = "",
}
component.git_delete = {
provider = "git_diff_removed",
hl = {
fg = "red",
bg = "bg",
},
left_sep = "",
right_sep = "",
}
component.git_change = {
provider = "git_diff_changed",
hl = {
fg = "purple",
bg = "bg",
},
left_sep = "",
right_sep = "",
}
component.separator = {
provider = "",
hl = {
fg = "bg",
bg = "bg",
},
}
component.diagnostic_errors = {
provider = "diagnostic_errors",
hl = {
fg = "red",
},
}
component.diagnostic_warnings = {
provider = "diagnostic_warnings",
hl = {
fg = "yellow",
},
}
component.diagnostic_hints = {
provider = "diagnostic_hints",
hl = {
fg = "aqua",
},
}
component.diagnostic_info = {
provider = "diagnostic_info",
}
component.lsp = {
provider = function()
if not rawget(vim, "lsp") then
return ""
end
local progress = vim.lsp.util.get_progress_messages()[1]
if vim.o.columns < 120 then
return ""
end
local clients = vim.lsp.get_active_clients({ bufnr = 0 })
if #clients ~= 0 then
if progress then
local spinners = {
"",
"",
"",
"",
"",
"",
}
local ms = vim.loop.hrtime() / 1000000
local frame = math.floor(ms / 120) % #spinners
local content = string.format("%%<%s", spinners[frame + 1])
return content or ""
else
return "לּ LSP"
end
end
return ""
end,
hl = function()
local progress = vim.lsp.util.get_progress_messages()[1]
return {
fg = progress and "yellow" or "green",
bg = "gray",
style = "bold",
}
end,
left_sep = "",
right_sep = "block",
}
component.file_type = {
provider = {
name = "file_type",
opts = {
filetype_icon = true,
},
},
hl = {
fg = "fg",
bg = "gray",
},
left_sep = "block",
right_sep = "block",
}
component.scroll_bar = {
provider = function()
local chars = {
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
}
local line_ratio = vim.api.nvim_win_get_cursor(0)[1] / vim.api.nvim_buf_line_count(0)
local position = math.floor(line_ratio * 100)
if position <= 5 then
position = " TOP"
elseif position >= 95 then
position = " BOT"
else
position = chars[math.floor(line_ratio * #chars)] .. position
end
return position
end,
hl = function()
local position = math.floor(vim.api.nvim_win_get_cursor(0)[1] / vim.api.nvim_buf_line_count(0) * 100)
local fg
local style
if position <= 5 then
fg = "aqua"
style = "bold"
elseif position >= 95 then
fg = "red"
style = "bold"
else
fg = "purple"
style = nil
end
return {
fg = fg,
style = "bold",
bg = "bg",
}
end,
left_sep = "block",
right_sep = "block",
}
local left = {
component.vim_mode,
}
local middle = {}
local right = {
component.file_type,
component.lsp,
component.git_branch,
component.git_add,
component.git_delete,
component.git_change,
component.separator,
component.diagnostic_errors,
component.diagnostic_warnings,
component.diagnostic_info,
component.diagnostic_hints,
component.scroll_bar,
}
local components = {
active = {
left,
middle,
right,
},
}
feline.setup({
components = components,
theme = theme,
vi_mode_colors = mode_theme,
})
---vim:filetype=lua

View File

@ -1,24 +0,0 @@
-- function ColorMyPencils(color)
-- color = color or "rose-pine"
-- vim.cmd.colorscheme(color)
--
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none"})
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none"})
-- end
--
-- ColorMyPencils()
require("transparent").setup({
enable = true, -- boolean: enable transparent
extra_groups = { -- table/string: additional groups that should be cleared
-- In particular, when you set it to 'all', that means all available groups
-- example of akinsho/nvim-bufferline.lua
"BufferLineTabClose",
"BufferlineBufferSelected",
"BufferLineFill",
"BufferLineBackground",
"BufferLineSeparator",
"BufferLineIndicatorSelected",
},
exclude = {}, -- table: groups you don't want to clear
})

View File

@ -6,9 +6,11 @@ vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu) vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-m>", function() ui.nav_file(1) end) vim.keymap.set("n", "<A-1>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end) vim.keymap.set("n", "<A-2>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end) vim.keymap.set("n", "<A-3>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end) vim.keymap.set("n", "<A-4>", function() ui.nav_file(4) end)
vim.keymap.set("n", "<A-5>", function() ui.nav_file(5) end)
vim.keymap.set("n", "<A-6>", function() ui.nav_file(6) end)
vim.keymap.set("n", "<leader>t", function() term.gotoTerminal(1) end) vim.keymap.set("n", "<leader>t", function() term.gotoTerminal(1) end)

View File

@ -0,0 +1,189 @@
-- ufo
vim.o.foldcolumn = "1"
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
-- Using ufo provider need remap `zR` and `zM`.
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
require("ufo").setup()
local lsp = require("lsp-zero")
lsp.preset("lsp-only")
lsp.ensure_installed({
"tsserver",
"eslint",
"pyright",
"lua_ls",
"rust_analyzer",
})
-- Fix Undefined global 'vim'
lsp.configure("lua_ls", {
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
},
},
})
lsp.set_preferences({
suggest_lsp_servers = false,
sign_icons = {
error = "E",
warn = "W",
hint = "H",
info = "I",
},
})
lsp.set_server_config({
on_init = function(client)
client.server_capabilities.semanticTokensProvider = nil
end,
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = true,
},
},
foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
},
},
},
})
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
-- if client.name == "eslint" then
-- vim.cmd.LspStop("eslint")
-- return
-- end
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<leader>vws", vim.lsp.buf.workspace_symbol, opts)
vim.keymap.set("n", "<leader>vd", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "<leader>vca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>vrr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "<leader>vrn", vim.lsp.buf.rename, opts)
vim.keymap.set("i", "<C-h>", vim.lsp.buf.signature_help, opts)
end)
-- local cmp_autopairs_setup, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
-- if not cmp_autopairs_setup then
-- return
-- end
--
-- cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
require("luasnip.loaders.from_vscode").lazy_load()
lsp.setup()
vim.diagnostic.config({
virtual_text = true,
})
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.black,
},
})
-- See mason-null-ls.nvim's documentation for more details:
-- https://github.com/jay-babu/mason-null-ls.nvim#setup
require("mason-null-ls").setup({
ensure_installed = nil,
automatic_installation = false,
handlers = {},
})
local cmp = require("cmp")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp_action = require("lsp-zero").cmp_action()
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
sorting = {
-- TODO: Would be cool to add stuff like "See variable names before method names" in rust, or something like that.
comparators = {
cmp.config.compare.offset,
cmp.config.compare.exact,
cmp.config.compare.score,
-- copied from cmp-under, but I don't think I need the plugin for this.
-- I might add some more of my own.
function(entry1, entry2)
local _, entry1_under = entry1.completion_item.label:find("^_+")
local _, entry2_under = entry2.completion_item.label:find("^_+")
entry1_under = entry1_under or 0
entry2_under = entry2_under or 0
if entry1_under > entry2_under then
return false
elseif entry1_under < entry2_under then
return true
end
end,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.scroll_docs(-4),
["<C-j>"] = cmp.mapping.scroll_docs(4),
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<Tab>"] = cmp_action.luasnip_supertab(),
["<S-Tab>"] = cmp_action.luasnip_shift_supertab(),
["<CR>"] = cmp.mapping.confirm({
select = false,
}),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
}),
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = " " .. (strings[1] or "") .. " "
kind.menu = " (" .. (strings[2] or "") .. ")"
return kind
end,
},
window = {
completion = cmp.config.window.bordered({}),
documentation = cmp.config.window.bordered({}),
},
})
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())

View File

@ -1,98 +0,0 @@
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.ensure_installed({
'tsserver',
'eslint',
'pyright',
'sumneko_lua',
'rust_analyzer',
})
-- Fix Undefined global 'vim'
lsp.configure('sumneko_lua', {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
})
local cmp = require('cmp')
local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-k>'] = cmp.mapping.scroll_docs(-4),
['<C-j>'] = cmp.mapping.scroll_docs(4),
['<CR>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
})
-- disable completion with tab
-- this helps with copilot setup
cmp_mappings['<Tab>'] = nil
cmp_mappings['<S-Tab>'] = nil
lsp.setup_nvim_cmp({
mapping = cmp_mappings
})
lsp.set_preferences({
suggest_lsp_servers = false,
sign_icons = {
error = 'E',
warn = 'W',
hint = 'H',
info = 'I'
}
})
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
if client.name == "eslint" then
vim.cmd.LspStop('eslint')
return
end
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<leader>vws", vim.lsp.buf.workspace_symbol, opts)
vim.keymap.set("n", "<leader>vd", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "<leader>vca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>vrr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "<leader>vrn", vim.lsp.buf.rename, opts)
vim.keymap.set("i", "<C-h>", vim.lsp.buf.signature_help, opts)
end)
-- local cmp_autopairs_setup, cmp_autopairs = pcall(require, "nvim-autopairs.completion.cmp")
-- if not cmp_autopairs_setup then
-- return
-- end
--
-- cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
require("luasnip.loaders.from_vscode").lazy_load()
lsp.setup()
vim.diagnostic.config({
virtual_text = true,
})
local mason_nullls = require("mason-null-ls")
mason_nullls.setup({
automatic_installation = true,
automatic_setup = true,
})
mason_nullls.setup_handlers({})

View File

@ -6,42 +6,40 @@ lspkind.init({
-- --
-- default: true -- default: true
mode = 'symbol', mode = 'symbol',
-- default symbol map -- default symbol map
-- can be either 'default' (requires nerd-fonts font) or -- can be either 'default' (requires nerd-fonts font) or
-- 'codicons' for codicon preset (requires vscode-codicons font) -- 'codicons' for codicon preset (requires vscode-codicons font)
-- --
-- default: 'default' -- default: 'default'
preset = 'codicons', preset = 'codicons',
-- override preset symbols -- override preset symbols
-- --
-- default: {} -- default: {}
symbol_map = { symbol_map = {
Text = "", Text = "",
Method = "", Method = " ",
Function = "", Function = " ",
Constructor = "", Constructor = " ",
Field = "", Field = "",
Variable = "", Variable = "",
Class = "", Class = " ",
Interface = "", Interface = " ",
Module = "", Module = " ",
Property = "", Property = " ",
Unit = "", Unit = "",
Value = "", Value = " ",
Enum = "", Enum = "",
Keyword = "", Keyword = " ",
Snippet = "", Snippet = " ",
Color = "", Color = " ",
File = "", File = " ",
Reference = "", Reference = "",
Folder = "", Folder = " ",
EnumMember = "", EnumMember = " ",
Constant = "", Constant = " ",
Struct = "", Struct = "",
Event = "", Event = " ",
Operator = "", Operator = " ",
TypeParameter = "" TypeParameter = ""
}, },
}) })

View File

@ -9,6 +9,7 @@ saga.setup({
title = true, title = true,
-- Border type can be single, double, rounded, solid, shadow. -- Border type can be single, double, rounded, solid, shadow.
border = "rounded", border = "rounded",
-- theme ="round",
winblend = 0, winblend = 0,
expand = "", expand = "",
collapse = "", collapse = "",
@ -25,8 +26,8 @@ vim.keymap.set("n", "<C-z>", "<Cmd>Lspsaga diagnostic_jump_next<CR>", opts)
vim.keymap.set("n", "K", "<Cmd>Lspsaga hover_doc<CR>", opts) vim.keymap.set("n", "K", "<Cmd>Lspsaga hover_doc<CR>", opts)
-- vim.keymap.set('n', 'gd', '<Cmd>Lspsaga lsp_finder<CR>', opts) -- vim.keymap.set('n', 'gd', '<Cmd>Lspsaga lsp_finder<CR>', opts)
vim.keymap.set("i", "<C-x>", "<Cmd>Lspsaga signature_help<CR>", opts) vim.keymap.set("i", "<C-x>", "<Cmd>Lspsaga signature_help<CR>", opts)
vim.keymap.set("n", "gp", "<Cmd>Lspsaga preview_definition<CR>", opts) vim.keymap.set("n", "gp", "<Cmd>Lspsaga peek_definition<CR>", opts)
vim.keymap.set("n", "gr", "<Cmd>Lspsaga rename<CR>", opts) vim.keymap.set("n", "<leader>gr", "<Cmd>Lspsaga rename<CR>", opts)
-- code action -- code action
local codeaction = require("lspsaga.codeaction") local codeaction = require("lspsaga.codeaction")

View File

@ -1,43 +0,0 @@
local status, lualine = pcall(require, "lualine")
if (not status) then return end
lualine.setup {
options = {
icons_enabled = true,
theme = 'solarized_dark',
section_separators = { left = '', right = '' },
component_separators = { left = '', right = '' },
disabled_filetypes = {}
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch' },
lualine_c = { {
'filename',
file_status = true, -- displays file status (readonly status, modified status)
path = 0 -- 0 = just filename, 1 = relative path, 2 = absolute path
} },
lualine_x = {
{ 'diagnostics', sources = { "nvim_diagnostic" }, symbols = { error = '', warn = '', info = '',
hint = '' } },
'encoding',
'filetype'
},
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { {
'filename',
file_status = true, -- displays file status (readonly status, modified status)
path = 1 -- 0 = just filename, 1 = relative path, 2 = absolute path
} },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = { 'fugitive' }
}

View File

@ -1,58 +0,0 @@
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "lua_ls", "rust_analyzer", "pyright", "cssls", "hls", "html", "tsserver" },
})
local status, nvim_lsp = pcall(require, "lspconfig")
if not status then
return
end
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"rust_analyzer",
"tsserver",
"html",
"pyright"
},
})
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
local lsp_attach = function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
-- Create your keybindings here...
if client.name == "eslint" then
vim.cmd.LspStop("eslint")
return
end
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<leader>vws", vim.lsp.buf.workspace_symbol, opts)
vim.keymap.set("n", "<leader>vd", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "<leader>vca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>vrr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "<leader>vrn", vim.lsp.buf.rename, opts)
vim.keymap.set("i", "<C-h>", vim.lsp.buf.signature_help, opts)
end
require("luasnip.loaders.from_vscode").lazy_load()
local lspconfig = require("lspconfig")
require("mason-lspconfig").setup_handlers({
function(server_name)
lspconfig[server_name].setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
on_attach = lsp_attach,
capabilities = lsp_capabilities,
})
end,
})

View File

@ -13,6 +13,7 @@ local Group = cb.Group
local groups = cb.groups local groups = cb.groups
local styles = cb.styles local styles = cb.styles
Color.new('white', '#ffffff')
Color.new('black', '#000000') Color.new('black', '#000000')
Group.new('CursorLine', colors.none, colors.base03, styles.NONE, colors.base1) Group.new('CursorLine', colors.none, colors.base03, styles.NONE, colors.base1)
Group.new('CursorLineNr', colors.yellow, colors.black, styles.NONE, colors.base1) Group.new('CursorLineNr', colors.yellow, colors.black, styles.NONE, colors.base1)
@ -32,10 +33,11 @@ Group.new("DiagnosticUnderlineWarn", colors.none, colors.none, styles.undercurl,
Group.new("DiagnosticUnderlineInfo", colors.none, colors.none, styles.undercurl, cInfo) Group.new("DiagnosticUnderlineInfo", colors.none, colors.none, styles.undercurl, cInfo)
Group.new("DiagnosticUnderlineHint", colors.none, colors.none, styles.undercurl, cHint) Group.new("DiagnosticUnderlineHint", colors.none, colors.none, styles.undercurl, cHint)
Group.new("Macro", groups.PreProc, colors.none, styles.italic + styles.bold) Group.new("Macro", groups.PreProc, colors.none, styles.italic + styles.bold)
Group.new("Function", groups.Function, colors.none, styles.italic) Group.link("Function", groups.Function, colors.none, styles.italic)
Group.new("Conditional", groups.Statement, colors.none, styles.italic) Group.new("Conditional", groups.Statement, colors.none, styles.italic)
Group.new("Boolean", groups.Constant, colors.none, styles.bold) Group.new("Boolean", groups.Constant, colors.none, styles.bold)
-- Group.new("HoverBorder", colors.yellow, colors.none, styles.NONE)
-- local success, solarized = pcall(require, 'solarized') -- local success, solarized = pcall(require, 'solarized')
-- --
-- if not success then -- if not success then
@ -51,3 +53,10 @@ Group.new("Boolean", groups.Constant, colors.none, styles.bold)
-- solarized.setup(default_config) -- solarized.setup(default_config)
-- --
-- vim.cmd 'colorscheme solarized' -- vim.cmd 'colorscheme solarized'
--
-- local g = vim.g
-- g.nord_contrast = true
-- g.nord_borders = false
-- g.nord_italic = true
-- g.nord_bold = true
-- require("nord").set()

View File

@ -1,25 +0,0 @@
local status, null_ls = pcall(require, "null-ls")
if not status then
return
end
require("mason-null-ls").setup({
automatic_setup = true,
ensure_installed = { "rust", "javascript", "typescript", "html", "css", "python", "ruby" },
})
require("mason-null-ls").setup_handlers({
function(source_name, methods)
-- all sources with no handler get passed here
-- To keep the original functionality of `automatic_setup = true`,
-- please add the below.
require("mason-null-ls.automatic_setup")(source_name, methods)
end,
stylua = function(source_name, methods)
null_ls.register(null_ls.builtins.formatting.stylua)
end,
})
-- will setup any installed and configured sources above
null_ls.setup()

View File

@ -1,17 +0,0 @@
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
if not null_ls_status_ok then
return
end
local formatting = null_ls.builtins.formatting
local diagnostics = null_ls.builtins.diagnostics
null_ls.setup({
debug = false,
sources = {
formatting.prettier.with({ extra_args = {"--no-semi"}}),
formatting.black.with({ extra_args = {"--fast"}}),
-- formatting.rustfmt({}),
},
})

View File

@ -9,8 +9,6 @@ local function telescope_buffer_dir()
return vim.fn.expand("%:p:h") return vim.fn.expand("%:p:h")
end end
local fb_actions = require("telescope").extensions.file_browser.actions
telescope.setup({ telescope.setup({
defaults = { defaults = {
mappings = { mappings = {
@ -19,45 +17,7 @@ telescope.setup({
}, },
}, },
}, },
extensions = {
file_browser = {
theme = "dropdown",
-- disables netrw and use telescope-file-browser in its place
hijack_netrw = true,
mappings = {
-- your custom insert mode mappings
["i"] = {
["<C-w>"] = function()
vim.cmd("normal vbd")
end,
},
["n"] = {
-- your custom normal mode mappings
["N"] = fb_actions.create,
["R"] = fb_actions.rename,
["h"] = fb_actions.goto_parent_dir,
["/"] = function()
vim.cmd("startinsert")
end,
},
},
},
},
}) })
telescope.load_extension("file_browser")
vim.keymap.set("n", "sf", function()
telescope.extensions.file_browser.file_browser({
path = "%:p:h",
cwd = telescope_buffer_dir(),
respect_gitignore = false,
hidden = true,
grouped = true,
previewer = false,
initial_mode = "normal",
layout_config = { height = 40 },
})
end)
vim.keymap.set("n", "<leader>pf", builtin.find_files, {}) vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {}) vim.keymap.set("n", "<C-p>", builtin.git_files, {})

View File

@ -1,8 +1,10 @@
require("transparent").setup({ require("transparent").setup({
enable = true, -- boolean: enable transparent -- enable = true, -- boolean: enable transparent
extra_groups = { -- table/string: additional groups that should be cleared -- extra_groups = { -- table/string: additional groups that should be cleared
"all", -- "all",
}, -- },
exclude = {}, -- table: groups you don't want to clear -- exclude = {}, -- table: groups you don't want to clear
ignore_linked_group = true, -- boolean: don't clear a group that links to another group -- ignore_linked_group = true, -- boolean: don't clear a group that links to another group
}) })
vim.cmd[[TransparentEnable]]

View File

@ -1,20 +0,0 @@
-- require("nvim-tree").setup({
-- sort_by = "case_sensitive",
-- -- view = {
-- -- adaptive_size = true,
-- -- prefer_startup_root = true,
-- -- update_focused_file = {
-- -- { update_root = true },
-- -- },
-- -- mappings = {
-- -- list = {
-- -- { key = "u", action = "dir_up" },
-- -- },
-- -- },
-- renderer = {
-- group_empty = true,
-- },
-- filters = {
-- dotfiles = true,
-- },
-- })

View File

@ -1,4 +1,4 @@
require 'nvim-treesitter.configs'.setup { require("nvim-treesitter.configs").setup({
-- a list of parser names, or "all" -- a list of parser names, or "all"
ensure_installed = { ensure_installed = {
"help", "help",
@ -45,7 +45,7 @@ require 'nvim-treesitter.configs'.setup {
node_decremental = "<bs>", node_decremental = "<bs>",
}, },
}, },
} })
local parser_config = require "nvim-treesitter.parsers".get_parser_configs() local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" } parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" }

View File

@ -9,7 +9,3 @@ if vim.g.neovide then
-- vim.cmd("hi Normal guibg=#78997a") -- vim.cmd("hi Normal guibg=#78997a")
end end
vim.g.solarized_italic_comments = true
vim.g.solarized_italic_keywords = false
vim.g.solarized_italic_functions = true
vim.g.solarized_italic_variables = false

View File

@ -1,43 +0,0 @@
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
-- Re-order to previous/next
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
-- Goto buffer in position...
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Wipeout buffer
-- :BufferWipeout
-- Close commands
-- :BufferCloseAllButCurrent
-- :BufferCloseAllButPinned
-- :BufferCloseAllButCurrentOrPinned
-- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight
-- Magic buffer-picking mode
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
-- Sort automatically by...
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
-- Other:
-- :BarbarEnable - enables barbar (enabled by default)
-- :BarbarDisable - very bad command, should never be used

View File

@ -1,4 +1,3 @@
require("jabuxas.remap") require("jabuxas.remap")
require("jabuxas.set") require("jabuxas.set")
require("jabuxas.bar")
require("jabuxas.packer") require("jabuxas.packer")

View File

@ -36,7 +36,12 @@ return require("packer").startup(function(use)
}) })
use("norcalli/nvim-colorizer.lua") use("norcalli/nvim-colorizer.lua")
use("ThePrimeagen/vim-be-good") use("ThePrimeagen/vim-be-good")
use("declancm/maximize.nvim") use({
"declancm/maximize.nvim",
config = function()
require("maximize").setup()
end,
})
use("andweeb/presence.nvim") use("andweeb/presence.nvim")
use("nvim-lualine/lualine.nvim") use("nvim-lualine/lualine.nvim")
use({ use({
@ -52,13 +57,10 @@ return require("packer").startup(function(use)
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
}) })
use("nvim-telescope/telescope.nvim") use("nvim-telescope/telescope.nvim")
use("nvim-telescope/telescope-file-browser.nvim")
use({ "akinsho/bufferline.nvim", tag = "v3.*", requires = "nvim-tree/nvim-web-devicons" })
use({ use({
"glepnir/lspsaga.nvim", "glepnir/lspsaga.nvim",
branch = "main", branch = "main",
}) })
use({ "romgrk/barbar.nvim", requires = "nvim-web-devicons" })
use({ use({
"jose-elias-alvarez/null-ls.nvim", "jose-elias-alvarez/null-ls.nvim",
"jay-babu/mason-null-ls.nvim", "jay-babu/mason-null-ls.nvim",
@ -73,11 +75,45 @@ return require("packer").startup(function(use)
}) })
use({ use({
"xiyaowong/nvim-transparent", "xiyaowong/nvim-transparent",
config = function() -- config = function()
require("transparent").setup({ enable = true }) -- require("transparent").setup({ enable = true })
vim.g.transparent_percentage = 80 -- vim.g.transparent_percentage = 80
end, -- end,
}) })
use("folke/zen-mode.nvim") use("folke/zen-mode.nvim")
use("folke/lsp-colors.nvim") use("folke/lsp-colors.nvim")
use("AlexvZyl/nordic.nvim")
use({
"VonHeikemen/lsp-zero.nvim",
branch = "v2.x",
requires = {
-- LSP Support
{ "neovim/nvim-lspconfig" }, -- Required
{
-- Optional
"williamboman/mason.nvim",
run = function()
pcall(vim.cmd, "MasonUpdate")
end,
},
{ "williamboman/mason-lspconfig.nvim" }, -- Optional
-- Autocompletion
{ "hrsh7th/nvim-cmp" }, -- Required
{ "hrsh7th/cmp-nvim-lsp" }, -- Required
{ "L3MON4D3/LuaSnip" }, -- Required
{ "jay-babu/mason-null-ls.nvim" },
},
})
use({ "kevinhwang91/nvim-ufo", requires = "kevinhwang91/promise-async" })
use("shaunsingh/nord.nvim")
use("sindrets/diffview.nvim")
-- install without yarn or npm
use({
"iamcco/markdown-preview.nvim",
run = function()
vim.fn["mkdp#util#install"]()
end,
})
use("mattn/emmet-vim")
end) end)

View File

@ -1,12 +1,10 @@
local keymap = vim.keymap local keymap = vim.keymap
local nvim_tmux_nav = require('nvim-tmux-navigation') local nvim_tmux_nav = require("nvim-tmux-navigation")
keymap.set("n", "<leader>pv", vim.cmd.Ex) keymap.set("n", "<leader>pv", vim.cmd.Ex)
keymap.set("i", "jk", "<Esc>")
vim.g.mapleader = " " vim.g.mapleader = " "
keymap.set("n", "<leader>pv", vim.cmd.Ex) keymap.set("n", "sf", vim.cmd.Ex)
-- keymap.set("n", "<leader>e", vim.cmd.NreeToggle) -- keymap.set("n", "<leader>e", vim.cmd.NreeToggle)
keymap.set("v", "J", ":m '>+1<CR>gv=gv") keymap.set("v", "J", ":m '>+1<CR>gv=gv")
@ -45,11 +43,22 @@ keymap.set("n", "<leader>sx", ":close<CR>")
keymap.set("n", "<leader>s=", "<C-w>+") keymap.set("n", "<leader>s=", "<C-w>+")
keymap.set("n", "<leader>s-", "<C-w>-") keymap.set("n", "<leader>s-", "<C-w>-")
keymap.set('n', "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft) keymap.set("n", "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft)
keymap.set('n', "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown) keymap.set("n", "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown)
keymap.set('n', "<C-k>", nvim_tmux_nav.NvimTmuxNavigateUp) keymap.set("n", "<C-k>", nvim_tmux_nav.NvimTmuxNavigateUp)
keymap.set('n', "<C-l>", nvim_tmux_nav.NvimTmuxNavigateRight) keymap.set("n", "<C-l>", nvim_tmux_nav.NvimTmuxNavigateRight)
keymap.set('n', "<C-\\>", nvim_tmux_nav.NvimTmuxNavigateLastActive) keymap.set("n", "<C-\\>", nvim_tmux_nav.NvimTmuxNavigateLastActive)
keymap.set('n', "<C-Space>", nvim_tmux_nav.NvimTmuxNavigateNext) keymap.set("n", "<C-Space>", nvim_tmux_nav.NvimTmuxNavigateNext)
keymap.set('n', '<Leader>sm', "<Cmd>lua require('maximize').toggle()<CR>") keymap.set("n", "<leader>sm", "<Cmd>lua require('maximize').toggle()<CR>")
keymap.set("n", "<leader>d", "<cmd>DiffviewFileHistory %<CR>")
keymap.set("n", "+", "<C-a>")
keymap.set("n", "-", "<C-x>")
keymap.set("n", "<left>", "<C-w><")
keymap.set("n", "<right>", "<C-w>>")
keymap.set("n", "<up>", "<C-w>+")
keymap.set("n", "<down>", "<C-w>-")
keymap.set("n", "<leader>e", function ()
vim.cmd(string.format("Emmet %s", vim.fn.input("Emmet: ")))
end)

View File

@ -43,7 +43,13 @@ vim.opt.termguicolors = true
vim.cmd([[let &t_Cs = "\e[4:3m"]]) vim.cmd([[let &t_Cs = "\e[4:3m"]])
vim.cmd([[let &t_Ce = "\e[4:0m"]]) vim.cmd([[let &t_Ce = "\e[4:0m"]])
-- vim.o.foldcolumn = 1 vim.g.netrw_browse_split = 0
-- vim.o.foldlevel = 99 vim.g.netrw_banner = 0
-- vim.o.foldlevelstart= 0 vim.g.netrw_winsize = 25
-- vim.o.foldenable = true
vim.g.user_emmet_leader_key = ","
vim.g.user_emmet_install_global = 0
local autocmd = vim.api.nvim_create_autocmd
autocmd("FileType", {pattern = "html", command = [[EmmetInstall]]})
autocmd("FileType", {pattern = "css", command = [[EmmetInstall]]})

View File

@ -16,7 +16,7 @@ rounded-corners-exclude = [
"class_g = 'Conky'", "class_g = 'Conky'",
"class_g = 'Thunderbird'", "class_g = 'Thunderbird'",
"class_g ?= 'xfce4-panel' && window_type = 'dock'", "class_g ?= 'xfce4-panel' && window_type = 'dock'",
"class_g = 'xmobar'" "class_g ?= 'xmobar' && window_type = 'dock'"
]; ];
round-borders = 1; round-borders = 1;
round-borders-exclude = [ round-borders-exclude = [
@ -35,8 +35,7 @@ round-borders-rule = [
"3:class_g = 'XTerm'", "3:class_g = 'XTerm'",
"3:class_g = 'URxvt'", "3:class_g = 'URxvt'",
"10:class_g = 'Alacritty'", "10:class_g = 'Alacritty'",
"15:class_g = 'Signal'", "15:class_g = 'Signal'"
"0:class_g = 'xmobar'"
]; ];
################################# #################################
@ -176,10 +175,12 @@ opacity-rule = [
"90:class_g = 'URxvt'", "90:class_g = 'URxvt'",
# "100:class_g = 'kitty'", # "100:class_g = 'kitty'",
"95:class_g = 'Emacs'", "95:class_g = 'Emacs'",
"95:class_g = 'obsidian'",
"100:class_g = 'Alacritty'", "100:class_g = 'Alacritty'",
"100:class_g = 'Polybar'", "100:class_g = 'Polybar'",
"100:class_g = 'code-oss'", "100:class_g = 'code-oss'",
"100:class_g = 'Meld'", "100:class_g = 'Meld'",
"100:class_g = 'xfce4-panel'",
"70:class_g = 'TelegramDesktop'", "70:class_g = 'TelegramDesktop'",
"90:class_g = 'Joplin'", "90:class_g = 'Joplin'",
"100:class_g = 'firefox'", "100:class_g = 'firefox'",
@ -207,39 +208,36 @@ opacity-rule = [
# Parameters for background blurring, see the *BLUR* section for more information. # Parameters for background blurring, see the *BLUR* section for more information.
# blur-method = # blur-method =
blur: { blur: {
# requires: https://github.com/ibhagwan/picom
method = "dual_kawase"; method = "dual_kawase";
#method = "kernel"; strength = 4;
strength = 2; deviation = 2;
deviation = 1.0; size = 4;
size = 2;
# kernel = "11x11gaussian";
background = false; background = false;
background-frame = false; background-frame = false;
background-fixed = false; background-fixed = false;
kern = "3x3box"; kern = "3x3box";
} }
# #
blur-deviation = false # blur-deviation = false
# #
blur-strength = 5 # blur-strength = 5
# Blur background of semi-transparent / ARGB windows. # Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior. # Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications. # The name of the switch may change without prior notifications.
# #
blur-background = true; # blur-background = true;
# Blur background of windows when the window frame is not opaque. # Blur background of windows when the window frame is not opaque.
# Implies: # Implies:
# blur-background # blur-background
# Bad in performance, with driver-dependent behavior. The name may change. # Bad in performance, with driver-dependent behavior. The name may change.
# #
blur-background-frame = false; # blur-background-frame = false;
# Use fixed blur strength rather than adjusting according to window opacity. # Use fixed blur strength rather than adjusting according to window opacity.
blur-background-fixed = true; # blur-background-fixed = true;
# Specify the blur convolution kernel, with the following format: # Specify the blur convolution kernel, with the following format:

@ -0,0 +1 @@
Subproject commit 4675ad4adf92d0d51c48b70e92fa8eb0b85a8986

@ -0,0 +1 @@
Subproject commit 4d07f3cc1ce2bdc0c8391290c5b0cf098abddddc

@ -0,0 +1 @@
Subproject commit 95585303a70bb39b17d37b6f2b362b4237fb3265

@ -0,0 +1 @@
Subproject commit 9bba871bd7af93026715b5b232fa3e9e3d9e7a01

View File

@ -2,7 +2,7 @@ set -g prefix C-a
unbind C-b unbind C-b
bind-key C-a send-prefix bind-key C-a send-prefix
set -g default-terminal "screen-256color" set -g default-terminal "tmux-256color"
set-option -sa terminal-overrides ",xterm-kitty:RGB" set-option -sa terminal-overrides ",xterm-kitty:RGB"
unbind % unbind %
@ -14,6 +14,8 @@ bind _ split-window -v
unbind r unbind r
bind r source-file ~/.config/tmux/tmux.conf bind r source-file ~/.config/tmux/tmux.conf
bind C-z set-option -g status
bind -r j resize-pane -D 5 bind -r j resize-pane -D 5
bind -r k resize-pane -U 5 bind -r k resize-pane -U 5
bind -r l resize-pane -R 5 bind -r l resize-pane -R 5
@ -52,13 +54,21 @@ bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jimeh/tmux-themepack' # set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/default/yellow'
set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @plugin 'seebi/tmux-colors-solarized'
# set -g @plugin "vladovidiu/rose-pine-tmux"
set -g @plugin "janoamaral/tokyo-night-tmux"
set -g @plugin 'vascomfnunes/tmux-ludanta'
set -g @resurrect-capture-pane-contents 'on' set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on' set -g @continuum-restore 'on'
set -g status-right "#{mpd_now_playing}"
# set -g @colors-solarized 'light'
# set -g status off
run '~/.config/tmux/plugins/tpm/tpm' run '~/.config/tmux/plugins/tpm/tpm'

546
configs/xmonad/3 Normal file
View File

@ -0,0 +1,546 @@
{-# LANGUAGE
MultiWayIf -- Required for `toggleFull` in `myAdditionalKeys`
, LambdaCase -- Required for `(\case)` statement in `myXmobarPP`
, FlexibleContexts
, OverloadedStrings
#-}
{-# OPTIONS_GHC -Wno-missing-signatures
-Wno-orphans #-}
-- Data Imports
import Data.Functor
import Data.List (isInfixOf)
import qualified Data.Map as M
import Data.Monoid
-- Used in io exitSuccess
import System.Environment (getEnv)
import System.Exit
import System.IO.Unsafe (unsafeDupablePerformIO)
-- XMonad imports
import XMonad
import XMonad.Actions.NoBorders (toggleBorder)
import XMonad.Actions.ToggleFullFloat
import XMonad.Hooks.DebugEvents
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDebug
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.SetWMName
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.UrgencyHook (doAskUrgent)
import XMonad.Hooks.WindowSwallowing
import XMonad.Layout.FocusTracking
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spacing
import qualified XMonad.StackSet as W
import XMonad.Util.ClickableWorkspaces
import XMonad.Util.Cursor
import XMonad.Util.EZConfig
import qualified XMonad.Util.Hacks as Hacks
import XMonad.Util.NamedScratchpad
import XMonad.Util.SpawnOnce
import XMonad.Util.Ungrab
-- import qualified DBus as D
-- import qualified DBus.Client as D
main :: IO ()
main =
do
xmonad
$ debugManageHookOn "M-S-d"
. docks
. setEwmhActivateHook doAskUrgent
-- . ewmhFullscreen -- breaks league of legends
. toggleFullFloatEwmhFullscreen
-- . fullscreenSupport -- breaks game launchers #450
. ewmh -- modal dialogs #452
. Hacks.javaHack
-- . withEasySB xmobar toggleSB
-- . withSB xmobar2
$ myConfig
-- where
-- toggleSB XConfig {modMask = modm} = (modm, xK_m)
myModMask :: KeyMask
myModMask = mod4Mask
-- Default Terminal
myTerminal :: String
myTerminal = "kitty"
-- Default Launcher
myLauncher :: String
myLauncher = myHomeDir ++ "/.config/rofi/launchers/type-6/launcher.sh"
-- Default Launcher
myFileManager :: String
-- myFileManager = "kitty -e ranger"
myFileManager = "thunar"
-- Default Browser
myBrowser :: String
myBrowser = "brave-bin"
myPowerMenu :: String
myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh"
-- Workspaces
myWorkspaces :: [String]
myWorkspaces = ["term", "www", "comms", "games", "misc", "vm", "trash", "stm"]
-- myWorkspaces = map show [1 .. 9]
-- Border Width
myBorderWidth :: Dimension
myBorderWidth = 2
-- Formal Unfocused Color
myNormColor :: String
myNormColor = "#383830"
-- Focused Color
myFocusColor :: String
myFocusColor = "#cb4b16"
-- Home Directory
myHomeDir :: String
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
-- focus follows the mouse pointer
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
myKeys conf@(XConfig {XMonad.modMask = modm}) =
M.fromList $
[ ((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_9, xK_0],
(f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
]
++ [ ((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_comma, xK_period, xK_semicolon] [0 ..],
(f, m) <- [(W.view, 0), (W.shift, shiftMask)]
]
myAdditionalKeys :: [(String, X ())]
myAdditionalKeys =
base
++ window
++ applications
++ multimedia
where
-- Force killing a frozen window.
forceKillWindow :: Window -> X ()
forceKillWindow w = withDisplay $ \d ->
io $ void $ killClient d w
-- Making a window have a full float over a workspace.
toggleFull :: Window -> X ()
toggleFull w = windows $ \s ->
if
| M.lookup w (W.floating s) == Just fullscreen -> W.sink w s
| otherwise -> W.float w fullscreen s
where
fullscreen = W.RationalRect 0 0 1 1
-- Screenshots
screenShotSelection = myHomeDir ++ "/.local/bin/print-select" :: String
screenShotFullscreen = myHomeDir ++ "/.local/bin/print-fullscreen" :: String
screenShotTmp = myHomeDir ++ "/.local/bin/print-tmp" :: String
screenShotApp = myHomeDir ++ "/.local/bin/print-window.sh" :: String
-- XMonad base keybinds.
base =
[ ("M-g", withFocused toggleBorder),
("M-S-c", kill),
("M-S-x", withFocused forceKillWindow),
("M-<Space>", sendMessage NextLayout),
("M-n", refresh),
("M-S-q", io exitSuccess),
("C-S-r", spawn "xmonad --recompile && killall xmobar2 ; killall xmobar ; xmonad --restart"),
("C-S-q", spawn "pkill -KILL -u $USER")
]
-- Window management keybinds.
window =
[ ("M-<Tab>", windows W.focusDown),
("M-j", windows W.focusDown),
("M-k", windows W.focusUp),
("M-S-m", windows W.focusMaster),
("M-m", sendMessage ToggleStruts),
("M-p", windows W.swapMaster),
("M-S-j", windows W.swapDown),
("M-S-h", windows W.swapDown),
("M-S-k", windows W.swapUp),
("M-S-l", windows W.swapUp),
("M-h", sendMessage Shrink),
("M-l", sendMessage Expand),
("M-t", withFocused $ windows . W.sink),
("M-f", withFocused toggleFull),
("M-C-S-6", withFocused $ \w -> spawn $ "xprop -id " ++ show w ++ " | ${XMONAD_XMESSAGE:-xmessage} -file -"),
("M-S-f", withFocused toggleFullFloat)
]
-- Spawning applications.
applications =
[ ("M-<Return>", spawn myTerminal),
("M-S-m", namedScratchpadAction myScratchpads "ncmpcpp"),
("M-C-<Return>", namedScratchpadAction myScratchpads "terminal"),
("M-S-<Escape>", spawn myPowerMenu),
("M-b", spawn myBrowser),
("M-v", spawn "code"),
("M-S-s", spawn "flatpak run com.valvesoftware.Steam --noverifyfiles"),
("S-<Print>", unGrab *> spawn screenShotSelection),
("C-S-<Print>", unGrab *> spawn screenShotTmp),
("C-<Print>", unGrab *> spawn screenShotApp),
("<Print>", spawn screenShotFullscreen),
("M-S-<Return>", spawn myLauncher),
-- ("M1-<Tab>", spawn myWinSwitch),
("M-e", spawn myFileManager),
("C-S-m", spawn "~/scripts/macro.sh")
]
-- Multimedia keybinds.
multimedia =
[ ("<XF86AudioPlay>", spawn "playerctl play-pause"),
("<XF86AudioPrev>", spawn "playerctl previous"),
("<XF86AudioNext>", spawn "playerctl next"),
("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle"),
("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -1.5%"),
("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1.5%"),
("<Pause>", spawn "amixer sset Capture toggle"),
("M-<Escape>", spawn "mpc toggle"),
("M-<F1>", spawn "mpc prev"),
("M-<F2>", spawn "mpc next")
]
myMouseBindings :: XConfig l -> M.Map (KeyMask, Button) (Window -> X ())
myMouseBindings XConfig {XMonad.modMask = modm} =
M.fromList
-- Set the window to floating mode and move by dragging.
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
-- Raise the window to the top of the stack.
((modm, button2), \w -> focus w >> windows W.shiftMaster),
-- Set the window to floating mode and resize by dragging.
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
]
myStartupHook :: X ()
myStartupHook = do
-- _ <-
-- traverse
-- spawnOnce
-- [ "sh ~/scripts/screenlayout.sh",
-- "feh --bg-center ~/Pictures/wallpapers/felca.jpg",
-- "touch ~/tmp/touchy && rm -rf ~/tmp/*",
-- myHomeDir ++ "/.local/bin/picom-ibhagwan -b --experimental-backends &",
-- "xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.5",
-- "setxkbmap -option ctrl:nocaps br abnt2",
-- "trayer-srg --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x2F2F2F --height 25 --distance 0 --margin 0 --alpha 0 --monitor 1 --transparent true", -- normal bar
-- -- "trayer-srg --edge bottom --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x002b36 --height 30 --transparent false --distance 1 --margin 6 --alpha 0 --monitor 0 --transparent true", -- spaced bar
-- "dunst &",
-- "lxqt-policykit-agent &",
-- "xrdb -load ~/.Xresources",
-- -- "redshift -t 4500:2500 -l -23.5475:-46.63611"
-- ]
setDefaultCursor xC_left_ptr
setWMName "xfce+xmonad"
isInstance (ClassApp c _) = className =? c
isInstance (TitleApp t _) = title =? t
isInstance (NameApp n _) = appName =? n
type AppName = String
type AppTitle = String
type AppClassName = String
type AppCommand = String
data App
= ClassApp AppClassName AppCommand
| TitleApp AppTitle AppCommand
| NameApp AppName AppCommand
deriving (Show)
gimp = ClassApp "Gimp" "gimp"
gimp2 = ClassApp "Gimp-2.99" "gimp-2.99"
multimc = ClassApp "MultiMC" "MultiMC"
about = TitleApp "About Mozilla Firefox" "About Mozilla Firefox"
message = ClassApp "Xmessage" "Xmessage"
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
-- Like '=?' but matches substrings.
q =?? x = fmap (isInfixOf x) q
myManageHook = manageRules
where
-- Hides windows without ignoring it, see doHideIgnore in XMonad contrib.
doHide = ask >>= doF . W.delete :: ManageHook
-- WM_WINDOW_ROLE will be parsed with the role variable.
isRole = stringProperty "WM_WINDOW_ROLE"
-- To match multiple properties with one operator.
anyOf = foldl (<||>) (pure False) :: [Query Bool] -> Query Bool
-- To match multiple classNames with one operator.
match = anyOf . fmap isInstance :: [App] -> Query Bool
-- Checking for splash dialogs.
isSplash = isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_SPLASH"
-- Checking for pop-ups.
isPopup = isRole =? "pop-up"
-- Checking for file chooser dialog.
isFileChooserDialog = isRole =? "GtkFileChooserDialog"
-- Managing rules for applications.
manageRules =
composeOne
[ transience,
isDialog -?> doCenterFloat,
isFullscreen -?> (doF W.focusDown <> doFullFloat),
match
[ gimp,
gimp2,
about,
message
]
-?> doFloat,
match
[ multimc
]
-?> doCenterFloat,
anyOf
[ isFileChooserDialog,
isDialog,
isPopup,
isSplash
]
-?> doCenterFloat
]
<> composeAll
[ manageDocks <> namedScratchpadManageHook myScratchpads,
className =? "firefox" <&&> title =? "File Upload" --> doFloat,
className =? "firefox" <&&> title =? "Library" --> doCenterFloat,
className =? "firefox" <&&> title ^? "Save" --> doFloat,
className =? "firefox" <&&> resource =? "Toolkit" --> doFloat,
className =? "firefox" <&&> title ^? "Sign in" --> doFloat,
className ^? "jetbrains-" <&&> title ^? "Welcome to " --> doCenterFloat,
className ^? "jetbrains-" <&&> title =? "splash" --> doFloat,
className ^? "Visual " <&&> isDialog --> doCenterFloat,
className =? "firefox-esr" --> doShift "www",
className =? "Chromium-browser-chromium" --> doShift "www",
className =? "Brave-browser" --> doShift "www",
className =? "Virt-manager" --> doShift "vm",
className =? "discord" --> doShift "comms",
className =? "discord-screenaudio" --> doShift "comms",
className =? "Spotify" --> doShift "msc",
className =? "thunderbird" --> doShift "trash",
className =? "Steam" --> doShift "stm",
className =? "steam" --> doShift "stm",
className =? "steamwebhelper" --> doShift "stm",
className =? "obs" --> doShift "misc",
className =? "Lutris" --> doShift "misc",
className =? "PrismLauncher" --> doShift "misc",
className =? "explorer.exe" --> doShift "games",
className =? "starrail.exe" --> doShift "games",
className =? "An Anime Game Launcher" --> doShift "misc" <> doCenterFloat <> hasBorder False,
className =? "heroic" --> doShift "misc" <> doCenterFloat <> hasBorder False,
className =? "riotclientux.exe" --> doShift "games",
className =?? "dauntless" --> doShift "games",
className =? "battle.net.exe" --> doShift "games" <> doFloat,
className =? "Pcmanfm" --> doFloat,
className =? "Thunar" --> doFloat,
className =? "Pavucontrol" --> doFloat,
className =? "Nitrogen" --> doFloat,
className =? "Wrapper-2.0" --> doFloat,
className =? "TeamSpeak 3" --> doShift "comms",
className =? "easyeffects" --> doFloat <> doShift "misc",
className =? "Arandr" --> doFloat,
resource =? "desktop_window" --> doIgnore,
resource =? "kdesktop" --> doIgnore,
className =? "Conky" --> doIgnore,
isRole ^? "About" <||> isRole ^? "about" --> doFloat,
"_NET_WM_WINDOW_TYPE" `isInProperty` "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE" --> doIgnore <> doRaise,
-- Steam Game Fixes
className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide, -- Prevents black screen when fullscreening.
className =? "Steam" <&&> title ~? "News" --> doHide,
className =? "Xfce4-panel" --> doCenterFloat <> hasBorder False,
className =?? "league" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "deceive" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "riot" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "Minecraft" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "csgo" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =? "gamescope" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =? "diablo iv.exe" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =? "obsidian" --> doShift "trash" <> hasBorder True,
className =? "libreoffice-writer" --> doShift "trash",
title =? "Wine System Tray" --> doHide, -- Prevents Wine System Trays from taking input focus.
className =?? "steam_" --> doShift "games" <> hasBorder False <> doCenterFloat
]
{- May be useful one day
doClose = ask >>= liftX . killWindow >> mempty :: ManageHook
doForceKill = ask >>= liftX . forceKillWindow >> mempty :: ManageHook
-}
myEventHook :: Event -> X All
myEventHook _ = return (All True)
myLayoutHook =
avoidStruts $
lessBorders OnlyScreenFloat $
spacingRaw False (Border w w w w) True (Border w w w w) True $
focusTracking (tiled ||| Full)
where
tiled = Tall nmaster delta ratio
nmaster = 1 -- Default number of windows in the master pane.
ratio = 1 / 2 -- Default proportion of screen occupied by master panes.
delta = 3 / 100 -- Percent of screen increment by when resizing panes.
w = 2 -- Width of pixel size between windows while tiled.
myXmobarPP :: X PP
myXmobarPP =
clickablePP $
filterOutWsPP ["NSP"] $
def
{ ppCurrent = xmobarColor "#ece1d7" "" . xmobarBorder "Bottom" "#89b3b6" 3,
ppVisible = xmobarColor "#ece1d7" "",
ppHidden = xmobarColor "#c1a78e" "" . xmobarBorder "Top" "#f0c674" 2,
ppHiddenNoWindows = xmobarColor "#c1a78e" "",
-- { ppVisible = xmobarColor "#dddddd" "" . const "\xf10c",
-- ppCurrent = xmobarColor "#dddddd" "" . const "\xf192",
-- ppHidden = xmobarColor "#777777" "" . const "\xf10c",
-- ppHiddenNoWindows = xmobarColor "#444444" "" . const "\xf10c",
ppVisibleNoWindows = Just (xmobarBorder "Bottom" "#78997a" 2 . xmobarColor "#A0A0A0" ""),
-- ppVisibleNoWindows = Just (xmobarColor "#dddddd" "" . const "\xf10c"),
ppUrgent = xmobarColor "#D47786" "" . wrap "!" "!",
ppTitle = xmobarColor "#ece1d7" "" . shorten 40,
ppSep = wrapSep " ",
ppTitleSanitize = xmobarStrip,
ppWsSep = " ",
ppLayout =
xmobarColor "#002B36" ""
. ( \case
"Spacing Tall" -> "<icon=tiled.xpm/>"
-- "Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
"Spacing Full" -> "<icon=full.xpm/>"
-- "Spacing Simple Float" -> "<icon=floating.xpm/>"
-- "Simple Float" -> "<icon=floating.xpm/>"
)
}
where
wrapSep :: String -> String
-- wrapSep = (++ xmobarColor "#002b36" "#002B36" (xmobarFont 2 "\xe0b4 "))
wrapSep = (++ xmobarColor "#292522" "#292522" (xmobarFont 2 "\xe0b4 "))
-- wrap
-- (xmobarColor "#002B36" "#002B36" (xmobarFont 2 "\xe0b4"))
-- (xmobarColor "#002B36" "#002B36" (xmobarFont 2 "\xe0b6"))
myXmobar :: String
myXmobar = (myHomeDir ++ "/.local/bin/xmobar " ++ "-x 1")
xmobar :: StatusBarConfig
xmobar = statusBarProp myXmobar myXmobarPP
myXmobar2 :: String
myXmobar2 = (myHomeDir ++ "/.local/bin/xmobar2 " ++ "-x 1")
xmobar2 :: StatusBarConfig
xmobar2 = statusBarProp myXmobar2 myXmobarPP
myConfig =
def
{ modMask = myModMask,
focusFollowsMouse = myFocusFollowsMouse,
terminal = myTerminal,
mouseBindings = myMouseBindings,
borderWidth = myBorderWidth,
normalBorderColor = myNormColor,
focusedBorderColor = myFocusColor,
layoutHook = myLayoutHook,
startupHook = myStartupHook,
manageHook = myManageHook,
handleEventHook =
swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
-- <> Hacks.windowedFullscreenFixEventHook -- #450
<> Hacks.trayerPaddingXmobarEventHook
-- <> debugEventsHook
<> myEventHook,
workspaces = myWorkspaces,
keys = myKeys
}
`additionalKeysP` myAdditionalKeys
myScratchpads =
[ NS "terminal" spawnTerm findTerm manageTerm,
NS "ncmpcpp" spawnncmpcpp findncmpcpp managencmpcpp
]
where
spawnTerm = myTerminal ++ " --name scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.9
w = 0.9
t = 0.95 - h
l = 0.95 - w
spawnncmpcpp = myTerminal ++ " --name ncmpcpp -e ncmpcpp"
findncmpcpp = resource =? "ncmpcpp"
managencmpcpp = customFloating $ W.RationalRect l t w h
where
h = 0.9
w = 0.9
t = 0.95 - h
l = 0.95 - w
-- I GIVE UP ON DBUS.
-- logTitle :: D.Client -> X ()
-- logTitle ch = dynamicLogWithPP def
-- {ppCurrent = unPango
-- ,ppVisible = pangoInactive
-- ,ppHidden = const ""
-- ,ppHiddenNoWindows = const ""
-- ,ppUrgent = pangoBold
-- ,ppTitle = unPango
-- ,ppLayout = unPango
-- ,ppWsSep = ""
-- ,ppSep = "⋮"
-- ,ppOrder = swapIcons
-- ,ppSort = getSortByXineramaPhysicalRule horizontalScreenOrderer
-- ,ppOutput = dbusOutput ch
-- }
-- where swapIcons (ws:l:t:nsp:xs) = ws:l:nsp:t:xs
-- -- @@@ so why do the first 4 invocations *only* not match?!
-- swapIcons xs = xs
-- getWellKnownName :: D.Client -> IO ()
-- getWellKnownName ch = do
-- _ <- D.requestName ch
-- (D.busName_ "org.xmonad.Log")
-- [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
-- return ()
-- dbusOutput :: D.Client -> String -> IO ()
-- dbusOutput ch s = do
-- let sig = (D.signal "/org/xmonad/Log" "org.xmonad.Log" "Update")
-- {D.signalBody = [D.toVariant s]}
-- D.emit ch sig
-- -- quick and dirty escaping of HTMLish Pango markup
-- unPango :: String -> String
-- unPango [] = []
-- unPango ('<':xs) = "&lt;" ++ unPango xs
-- unPango ('&':xs) = "&amp;" ++ unPango xs
-- unPango ('>':xs) = "&gt;" ++ unPango xs
-- unPango (x :xs) = x:unPango xs
-- -- show a string as inactive
-- -- @@@ should use gtk theme somehow...
-- pangoInactive :: String -> String
-- pangoInactive s = "<span foreground=\"#8f8f8f\">" ++ unPango s ++ "</span>"
-- -- show a string with highlight
-- pangoBold :: String -> String
-- pangoBold s = "<span weight=\"bold\" foreground=\"#ff2f2f\">" ++ unPango s ++ "</span>"

View File

@ -12,6 +12,7 @@ ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-pattern
dependencies: dependencies:
- base - base
- xmonad-contrib >= 0.16 - xmonad-contrib >= 0.16
- dbus
source-dirs: src source-dirs: src

View File

@ -1,12 +0,0 @@
module Main (main) where
import XMonad
import qualified XMonad.Util.Hacks as Hacks
main :: IO ()
main =
xmonad $
fullscreenSupport
def
{ handleEventHook = handleEventHook def <> Hacks.windowedFullscreenFixEventHook
}

View File

@ -21,6 +21,8 @@ import System.IO.Unsafe (unsafeDupablePerformIO)
-- XMonad imports -- XMonad imports
import XMonad import XMonad
import XMonad.Actions.NoBorders (toggleBorder) import XMonad.Actions.NoBorders (toggleBorder)
import XMonad.Actions.ToggleFullFloat
import XMonad.Hooks.DebugEvents
import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDebug import XMonad.Hooks.ManageDebug
import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageDocks
@ -30,9 +32,9 @@ import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.UrgencyHook (doAskUrgent) import XMonad.Hooks.UrgencyHook (doAskUrgent)
import XMonad.Hooks.WindowSwallowing import XMonad.Hooks.WindowSwallowing
import XMonad.Layout.FocusTracking
import XMonad.Layout.Fullscreen import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders import XMonad.Layout.NoBorders
import XMonad.Layout.SimpleFloat
import XMonad.Layout.Spacing import XMonad.Layout.Spacing
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import XMonad.Util.ClickableWorkspaces import XMonad.Util.ClickableWorkspaces
@ -53,17 +55,17 @@ main =
$ debugManageHookOn "M-S-d" $ debugManageHookOn "M-S-d"
. docks . docks
. setEwmhActivateHook doAskUrgent . setEwmhActivateHook doAskUrgent
. ewmhFullscreen -- . ewmhFullscreen -- breaks league of legends
-- . fullscreenSupport . toggleFullFloatEwmhFullscreen
. ewmh -- . fullscreenSupport -- breaks game launchers #450
. ewmh -- modal dialogs #452
. Hacks.javaHack . Hacks.javaHack
. withEasySB xmobar toggleSB -- . withEasySB xmobar toggleSB
. withSB xmobar2 -- . withSB xmobar2
$ myConfig $ myConfig
where -- where
toggleSB XConfig {modMask = modm} = (modm, xK_m) -- toggleSB XConfig {modMask = modm} = (modm, xK_m)
-- Windows key/Super key
myModMask :: KeyMask myModMask :: KeyMask
myModMask = mod4Mask myModMask = mod4Mask
@ -75,10 +77,6 @@ myTerminal = "kitty"
myLauncher :: String myLauncher :: String
myLauncher = myHomeDir ++ "/.config/rofi/launchers/type-6/launcher.sh" myLauncher = myHomeDir ++ "/.config/rofi/launchers/type-6/launcher.sh"
-- Default Launcher
-- myWinSwitch :: String
-- myWinSwitch = myHomeDir ++ "/.config/rofi/launchers/type-6/tab.sh"
-- Default Launcher -- Default Launcher
myFileManager :: String myFileManager :: String
-- myFileManager = "kitty -e ranger" -- myFileManager = "kitty -e ranger"
@ -86,7 +84,7 @@ myFileManager = "thunar"
-- Default Browser -- Default Browser
myBrowser :: String myBrowser :: String
myBrowser = "brave-bin" myBrowser = "firefox-bin"
myPowerMenu :: String myPowerMenu :: String
myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh" myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh"
@ -94,7 +92,6 @@ myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh"
-- Workspaces -- Workspaces
myWorkspaces :: [String] myWorkspaces :: [String]
myWorkspaces = ["term", "www", "comms", "games", "misc", "vm", "trash", "stm"] myWorkspaces = ["term", "www", "comms", "games", "misc", "vm", "trash", "stm"]
-- myWorkspaces = map show [1 .. 9] -- myWorkspaces = map show [1 .. 9]
-- Border Width -- Border Width
@ -107,7 +104,7 @@ myNormColor = "#383830"
-- Focused Color -- Focused Color
myFocusColor :: String myFocusColor :: String
myFocusColor = "#FF0000" myFocusColor = "#cb4b16"
-- Home Directory -- Home Directory
myHomeDir :: String myHomeDir :: String
@ -124,7 +121,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) =
(f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)] (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
] ]
++ [ ((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) ++ [ ((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_comma, xK_period, xK_z] [0 ..], | (key, sc) <- zip [xK_comma, xK_period, xK_semicolon] [0 ..],
(f, m) <- [(W.view, 0), (W.shift, shiftMask)] (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
] ]
@ -152,6 +149,9 @@ myAdditionalKeys =
screenShotFullscreen = myHomeDir ++ "/.local/bin/print-fullscreen" :: String screenShotFullscreen = myHomeDir ++ "/.local/bin/print-fullscreen" :: String
screenShotTmp = myHomeDir ++ "/.local/bin/print-tmp" :: String screenShotTmp = myHomeDir ++ "/.local/bin/print-tmp" :: String
screenShotApp = myHomeDir ++ "/.local/bin/print-window.sh" :: String screenShotApp = myHomeDir ++ "/.local/bin/print-window.sh" :: String
myMainBrowser = myBrowser ++ " -p main" :: String
myDevBrowser = myBrowser ++ " -p dev" :: String
mySchoolBrowser = myBrowser ++ " -p school" :: String
-- XMonad base keybinds. -- XMonad base keybinds.
base = base =
[ ("M-g", withFocused toggleBorder), [ ("M-g", withFocused toggleBorder),
@ -178,7 +178,9 @@ myAdditionalKeys =
("M-h", sendMessage Shrink), ("M-h", sendMessage Shrink),
("M-l", sendMessage Expand), ("M-l", sendMessage Expand),
("M-t", withFocused $ windows . W.sink), ("M-t", withFocused $ windows . W.sink),
("M-f", withFocused toggleFull) ("M-f", withFocused toggleFull),
("M-C-S-6", withFocused $ \w -> spawn $ "xprop -id " ++ show w ++ " | ${XMONAD_XMESSAGE:-xmessage} -file -"),
("M-S-f", withFocused toggleFullFloat)
] ]
-- Spawning applications. -- Spawning applications.
applications = applications =
@ -186,16 +188,20 @@ myAdditionalKeys =
("M-S-m", namedScratchpadAction myScratchpads "ncmpcpp"), ("M-S-m", namedScratchpadAction myScratchpads "ncmpcpp"),
("M-C-<Return>", namedScratchpadAction myScratchpads "terminal"), ("M-C-<Return>", namedScratchpadAction myScratchpads "terminal"),
("M-S-<Escape>", spawn myPowerMenu), ("M-S-<Escape>", spawn myPowerMenu),
("M-b", spawn myBrowser), ("M-b", spawn myMainBrowser),
("M-S-b", spawn myDevBrowser),
("M-C-b", spawn mySchoolBrowser),
("M-v", spawn "code"), ("M-v", spawn "code"),
("M-S-s", spawn "~/steam/steam.sh"), ("M-S-s", spawn "flatpak run com.valvesoftware.Steam --noverifyfiles"),
("S-<Print>", unGrab *> spawn screenShotSelection), ("S-<Print>", unGrab *> spawn screenShotSelection),
("C-S-<Print>", unGrab *> spawn screenShotTmp), ("C-S-<Print>", unGrab *> spawn screenShotTmp),
("C-<Print>", unGrab *> spawn screenShotApp), ("C-<Print>", unGrab *> spawn screenShotApp),
("<Print>", spawn screenShotFullscreen), ("<Print>", spawn screenShotFullscreen),
("M-S-<Return>", spawn myLauncher), ("M-S-<Return>", spawn myLauncher),
-- ("M1-<Tab>", spawn myWinSwitch), -- ("M1-<Tab>", spawn myWinSwitch),
("M-e", spawn myFileManager) ("M-e", spawn myFileManager),
("C-S-m", spawn "~/scripts/macro.sh"),
("M-C-x", spawn "GTK_THEME=Orchis-Dark xournalpp")
] ]
-- Multimedia keybinds. -- Multimedia keybinds.
multimedia = multimedia =
@ -224,27 +230,24 @@ myMouseBindings XConfig {XMonad.modMask = modm} =
myStartupHook :: X () myStartupHook :: X ()
myStartupHook = do myStartupHook = do
_ <- -- _ <-
traverse -- traverse
spawnOnce -- spawnOnce
[ "sh ~/scripts/screenlayout.sh", -- [ "sh ~/scripts/screenlayout.sh",
-- "nitrogen --restore &", -- "feh --bg-center ~/Pictures/wallpapers/felca.jpg",
"feh --bg-center ~/Pictures/wallpapers/felca.jpg", -- "touch ~/tmp/touchy && rm -rf ~/tmp/*",
-- "sh ~/scripts/wallpaper.sh", -- myHomeDir ++ "/.local/bin/picom-ibhagwan -b --experimental-backends &",
"touch ~/tmp/touchy && rm -rf ~/tmp/*", -- "xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.5",
myHomeDir ++ "/.local/bin/picom-ibhagwan -b --experimental-backends &", -- "setxkbmap -option ctrl:nocaps br abnt2",
"nm-applet &", -- "trayer-srg --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x2F2F2F --height 25 --distance 0 --margin 0 --alpha 0 --monitor 1 --transparent true", -- normal bar
"xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.5", -- -- "trayer-srg --edge bottom --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x002b36 --height 30 --transparent false --distance 1 --margin 6 --alpha 0 --monitor 0 --transparent true", -- spaced bar
"setxkbmap -option ctrl:nocaps br abnt2", -- "dunst &",
"trayer-srg --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x2F2F2F --height 25 --distance 0 --margin 0 --alpha 0 --monitor 0 --transparent true", -- normal bar -- "lxqt-policykit-agent &",
-- "trayer-srg --edge bottom --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x002b36 --height 30 --transparent false --distance 1 --margin 6 --alpha 0 --monitor 0 --transparent true", -- spaced bar -- "xrdb -load ~/.Xresources",
"dunst &", -- -- "redshift -t 4500:2500 -l -23.5475:-46.63611"
"lxqt-policykit-agent &", -- ]
"xrdb -load ~/.Xresources",
"redshift -t 4500:2500 -l -23.5475:-46.63611"
]
setDefaultCursor xC_left_ptr setDefaultCursor xC_left_ptr
setWMName "zmonad" setWMName "xfce+xmonad"
isInstance (ClassApp c _) = className =? c isInstance (ClassApp c _) = className =? c
isInstance (TitleApp t _) = title =? t isInstance (TitleApp t _) = title =? t
@ -331,29 +334,31 @@ myManageHook = manageRules
className ^? "jetbrains-" <&&> title =? "splash" --> doFloat, className ^? "jetbrains-" <&&> title =? "splash" --> doFloat,
className ^? "Visual " <&&> isDialog --> doCenterFloat, className ^? "Visual " <&&> isDialog --> doCenterFloat,
className =? "firefox-esr" --> doShift "www", className =? "firefox-esr" --> doShift "www",
className =? "Chromium-browser-chromium" --> doShift "www",
className =? "Brave-browser" --> doShift "www",
className =? "Virt-manager" --> doShift "vm", className =? "Virt-manager" --> doShift "vm",
className =? "discord" --> doShift "comms", className =? "discord" --> doShift "misc",
className =? "discord-screenaudio" --> doShift "comms", className =? "discord-screenaudio" --> doShift "misc",
className =? "Spotify" --> doShift "msc",
className =? "thunderbird" --> doShift "trash",
className =? "Steam" --> doShift "stm", className =? "Steam" --> doShift "stm",
className =? "steam" --> doShift "stm", className =? "steam" --> doShift "stm",
className =? "steamwebhelper" --> doShift "stm",
className =? "obs" --> doShift "misc", className =? "obs" --> doShift "misc",
className =? "Lutris" --> doShift "misc", className =? "Lutris" --> doShift "misc",
className =? "PrismLauncher" --> doShift "misc",
className =? "explorer.exe" --> doShift "games", className =? "explorer.exe" --> doShift "games",
className =? "starrail.exe" --> doShift "games",
className =? "An Anime Game Launcher" --> doShift "misc" <> doCenterFloat <> hasBorder False, className =? "An Anime Game Launcher" --> doShift "misc" <> doCenterFloat <> hasBorder False,
className =? "heroic" --> doShift "misc" <> doCenterFloat <> hasBorder False, className =? "heroic" --> doShift "misc" <> hasBorder False,
className =? "parsecd" --> doShift "misc" <> hasBorder False,
className =? "riotclientux.exe" --> doShift "games", className =? "riotclientux.exe" --> doShift "games",
className =?? "dauntless" --> doShift "games", className =?? "dauntless" --> doShift "games",
className =? "battle.net.exe" --> doShift "games" <> doFloat, className =? "battle.net.exe" --> doShift "games" <> doFloat,
className =? "Pcmanfm" --> doFloat, className =? "Pcmanfm" --> doFloat,
className =? "Mousepad" --> doFloat,
className =? "Thunar" --> doFloat, className =? "Thunar" --> doFloat,
className =? "amberol" --> doFloat,
className =? "Pavucontrol" --> doFloat, className =? "Pavucontrol" --> doFloat,
className =? "Nitrogen" --> doFloat, className =? "Nitrogen" --> doFloat,
className =? "Wrapper-2.0" --> doFloat, className =? "Wrapper-2.0" --> doFloat,
className =? "TeamSpeak 3" --> doShift "comms", className =? "TeamSpeak 3" --> doShift "misc",
className =? "easyeffects" --> doFloat <> doShift "misc", className =? "easyeffects" --> doFloat <> doShift "misc",
className =? "Arandr" --> doFloat, className =? "Arandr" --> doFloat,
resource =? "desktop_window" --> doIgnore, resource =? "desktop_window" --> doIgnore,
@ -364,12 +369,18 @@ myManageHook = manageRules
-- Steam Game Fixes -- Steam Game Fixes
className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide, -- Prevents black screen when fullscreening. className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide, -- Prevents black screen when fullscreening.
className =? "Steam" <&&> title ~? "News" --> doHide, className =? "Steam" <&&> title ~? "News" --> doHide,
className =? "Xfce4-panel" --> doCenterFloat <> hasBorder False,
className =?? "league" --> doShift "games" <> doCenterFloat <> hasBorder False, className =?? "league" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "deceive" --> doShift "games" <> doCenterFloat <> hasBorder False, className =?? "deceive" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "riot" --> doShift "games" <> doCenterFloat <> hasBorder False, className =?? "riot" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "Minecraft" --> doShift "games" <> doCenterFloat <> hasBorder False, className =?? "Minecraft" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =?? "csgo" --> doShift "games" <> doCenterFloat <> hasBorder False, className =?? "csgo" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =? "gamescope" --> doShift "games" <> doCenterFloat <> hasBorder False, className =? "gamescope" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =? "diablo iv.exe" --> doShift "games" <> doCenterFloat <> hasBorder False,
className =? "Transformice" --> doShift "games",
className =? "obsidian" --> doShift "games",
className =? "Xournalpp" --> doShift "games",
className =?? "libreoffice" --> doShift "games",
title =? "Wine System Tray" --> doHide, -- Prevents Wine System Trays from taking input focus. title =? "Wine System Tray" --> doHide, -- Prevents Wine System Trays from taking input focus.
className =?? "steam_" --> doShift "games" <> hasBorder False <> doCenterFloat className =?? "steam_" --> doShift "games" <> hasBorder False <> doCenterFloat
] ]
@ -382,15 +393,11 @@ doForceKill = ask >>= liftX . forceKillWindow >> mempty :: ManageHook
myEventHook :: Event -> X All myEventHook :: Event -> X All
myEventHook _ = return (All True) myEventHook _ = return (All True)
-- myActivateHook :: ManageHook
-- myActivateHook = composeAll
-- [ className =? "steam_app_1284210" --> doAskUrgent ]
myLayoutHook = myLayoutHook =
avoidStruts $ avoidStruts $
lessBorders OnlyScreenFloat $ lessBorders OnlyScreenFloat $
spacingRaw False (Border w w w w) True (Border w w w w) True $ spacingRaw False (Border w w w w) True (Border w w w w) True $
tiled ||| simpleFloat ||| Mirror tiled ||| Full focusTracking (tiled ||| Full)
where where
tiled = Tall nmaster delta ratio tiled = Tall nmaster delta ratio
nmaster = 1 -- Default number of windows in the master pane. nmaster = 1 -- Default number of windows in the master pane.
@ -422,10 +429,10 @@ myXmobarPP =
xmobarColor "#002B36" "" xmobarColor "#002B36" ""
. ( \case . ( \case
"Spacing Tall" -> "<icon=tiled.xpm/>" "Spacing Tall" -> "<icon=tiled.xpm/>"
"Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>" -- "Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
"Spacing Full" -> "<icon=full.xpm/>" "Spacing Full" -> "<icon=full.xpm/>"
"Spacing Simple Float" -> "<icon=floating.xpm/>" -- "Spacing Simple Float" -> "<icon=floating.xpm/>"
"Simple Float" -> "<icon=floating.xpm/>" -- "Simple Float" -> "<icon=floating.xpm/>"
) )
} }
where where
@ -438,7 +445,7 @@ myXmobarPP =
-- (xmobarColor "#002B36" "#002B36" (xmobarFont 2 "\xe0b6")) -- (xmobarColor "#002B36" "#002B36" (xmobarFont 2 "\xe0b6"))
myXmobar :: String myXmobar :: String
myXmobar = (myHomeDir ++ "/.local/bin/xmobar " ++ "-x 0") myXmobar = (myHomeDir ++ "/.local/bin/xmobar " ++ "-x 1")
xmobar :: StatusBarConfig xmobar :: StatusBarConfig
xmobar = statusBarProp myXmobar myXmobarPP xmobar = statusBarProp myXmobar myXmobarPP
@ -462,9 +469,10 @@ myConfig =
startupHook = myStartupHook, startupHook = myStartupHook,
manageHook = myManageHook, manageHook = myManageHook,
handleEventHook = handleEventHook =
-- Hacks.windowedFullscreenFixEventHook
swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True) swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
-- <> Hacks.windowedFullscreenFixEventHook -- #450
<> Hacks.trayerPaddingXmobarEventHook <> Hacks.trayerPaddingXmobarEventHook
-- <> debugEventsHook
<> myEventHook, <> myEventHook,
workspaces = myWorkspaces, workspaces = myWorkspaces,
keys = myKeys keys = myKeys

View File

@ -5,8 +5,6 @@ import Xmobar
main :: IO () main :: IO ()
main = xmobar =<< configFromArgs =<< myConfig main = xmobar =<< configFromArgs =<< myConfig
-- main = xmobar =<< myConfig
myHomeDir :: String myHomeDir :: String
myHomeDir = unsafeDupablePerformIO (getEnv "HOME") myHomeDir = unsafeDupablePerformIO (getEnv "HOME")

View File

@ -15,7 +15,6 @@ extra-deps:
- pango-0.13.8.2@sha256:d4057ebddade4cde3e25d7755b5e030e7a7e56fe7365afd37916a7bba46d3fd9,3917 - pango-0.13.8.2@sha256:d4057ebddade4cde3e25d7755b5e030e7a7e56fe7365afd37916a7bba46d3fd9,3917
- glib-0.13.8.2@sha256:f44b829e741b3c3244d523f60b058701dfc067ff64c2ba61d43be4cccfc2663d,3156 - glib-0.13.8.2@sha256:f44b829e741b3c3244d523f60b058701dfc067ff64c2ba61d43be4cccfc2663d,3156
flags: flags:
xmobar: xmobar:
with_xpm: true with_xpm: true

View File

@ -1,6 +1,9 @@
-- heavily copied from github.com/scherso, all rights to him
cabal-version: 1.12 cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.0.
--
-- see: https://github.com/sol/hpack
name: zmonad name: zmonad
version: 0.1.0 version: 0.1.0
synopsis: xmonad but z synopsis: xmonad but z
@ -19,10 +22,9 @@ executable xmobar
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N
build-depends: build-depends:
base base
, dbus
, xmobar , xmobar
, xmonad-contrib >=0.16 , xmonad-contrib >=0.16
, cairo >=0.13
, pango >=0.13
default-language: Haskell2010 default-language: Haskell2010
executable xmobar2 executable xmobar2
@ -34,10 +36,9 @@ executable xmobar2
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N
build-depends: build-depends:
base base
, dbus
, xmobar , xmobar
, xmonad-contrib >=0.16 , xmonad-contrib >=0.16
, cairo >=0.13
, pango >=0.13
default-language: Haskell2010 default-language: Haskell2010
executable xmonad executable xmonad
@ -51,6 +52,7 @@ executable xmonad
X11 >=1.10 X11 >=1.10
, base , base
, containers , containers
, dbus
, xmonad , xmonad
, xmonad-contrib >=0.16 , xmonad-contrib >=0.16
default-language: Haskell2010 default-language: Haskell2010

View File

@ -4,19 +4,28 @@ export PATH="$HOME/.local/bin:$PATH"
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/.npm-global/bin:$PATH"
export R2MOD_INSTALL_DIR="$HOME/steam/.local/share/Steam/steamapps/common/Risk of Rain 2/"
export R2MOD_COMPAT_DIR="$HOME/steam/.local/share/Steam/steamapps/compatdata/632360"
export EDITOR="/usr/bin/nvim" export EDITOR="/usr/bin/nvim"
export EDITOR=nvim export VISUAL="nvim"
export VISUAL=nvim
# Set name of the theme to load --- if set to "random", it will # Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case, # load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME # to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
#ZSH_THEME="jnrowe" #ZSH_THEME="jnrowe"
ZSH_THEME="headline" #ZSH_THEME="headline"
#fpath+=$HOME/.zsh/typewritten ZSH_THEME=""
#autoload -U promptinit; promptinit fpath+=$HOME/Documents/typewritten
#prompt typewritten fpath+=$HOME/.config/zsh
autoload -Uz async && async
autoload -U promptinit; promptinit
prompt typewritten
export TYPEWRITTEN_PROMPT_LAYOUT="half_pure"
export TYPEWRITTEN_RELATIVE_PATH="git"
export TYPEWRITTEN_COLOR_MAPPINGS="primary:yellow"
# export TYPEWRITTEN_LEFT_PROMPT_PREFIX_FUNCTION=(date +%H:%M)
# Set list of themes to pick from when loading at random # Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load # Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/ # a theme from this variable instead of looking in $ZSH/themes/
@ -31,9 +40,9 @@ ZSH_THEME="headline"
# HYPHEN_INSENSITIVE="true" # HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior # Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking # zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days). # Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13 # zstyle ':omz:update' frequency 13
@ -59,7 +68,7 @@ ZSH_THEME="headline"
# Uncomment the following line if you want to disable marking untracked files # Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories # under VCS as dirty. This makes repository status check for large repositories
# much, much faster. # much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true" DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time # Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output. # stamp shown in the history command output.
@ -80,7 +89,9 @@ ZSH_THEME="headline"
plugins=( plugins=(
git git
zsh-autosuggestions zsh-autosuggestions
zsh-syntax-highlighting fast-syntax-highlighting
rust
nvm
) )
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
@ -93,23 +104,25 @@ source $ZSH/oh-my-zsh.sh
# export LANG=en_US.UTF-8 # export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions # Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim' export EDITOR='vim'
# else else
# export EDITOR='mvim' export EDITOR='nvim'
# fi fi
# Compilation flags # Compilation flags
# export ARCHFLAGS="-arch x86_64" # export ARCHFLAGS="-arch x86_64"
# #
# #
# Adding LS COLORS VARIABLE # Adding LS COLORS VARIABLE
cd # export LS_COLORS="$(vivid generate solarized-dark)"
export LS_COLORS="$(vivid generate iceberg-dark)"
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#67828c,bold,underline"
#Adding Doom Emacs to PATH #Adding Doom Emacs to PATH
export PATH="$HOME/.emacs.d/bin:$PATH" export PATH="$HOME/.emacs.d/bin:$PATH"
[ -f "/home/jab/.ghcup/env" ] && source "/home/jab/.ghcup/env" # ghcup-env
# Adding XDG compliance # Adding XDG compliance
export XDG_DATA_HOME=$HOME/.local/share export XDG_DATA_HOME=$HOME/.local/share
@ -125,15 +138,15 @@ export XDG_CACHE_HOME=$HOME/.cache
#export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history #export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
#alias nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings #alias nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings
#export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java #export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
#
# GPG shenanigans
export GPG_TTY=$(tty)
# Add cargo/bin to PATH # Add cargo/bin to PATH
export PATH=/home/lucas/.cargo/bin:$PATH export PATH="$HOME/.cargo/bin:$PATH"
# Add spicetify to path if [[ "${TERM}" != "" && "${TERM}" == "kitty" ]]
export PATH=$PATH:/home/lucas/.spicetify
if [[ "${TERM}" != "" && "${TERM}" == "alacritty" ]]
then then
precmd() precmd()
{ {
@ -151,25 +164,32 @@ then
} }
fi fi
function 0x0.st () {
local CMD="curl -F'file=@-' https://0x0.st"
if [ ! -t 0 ]; then
cat | eval $CMD
else
for i in "$@"; do
cat "$i"
done | eval $CMD
fi
}
export BAT_THEME="Solarized (dark)"
## Aliases
alias xmorc="xmonad --recompile; xmonad --restart" alias ls="exa --numeric --octal-permissions --git --group --icons"
alias xmonadc="nvim ~/.config/xmonad/xmonad.hs" alias l="exa --all --long --numeric --octal-permissions --git --group --icons"
alias xmobarc="nvim ~/.config/xmobar/xmobarrc"
alias nano="nvim"
alias ls="lsd --group-dirs first"
alias cat="bat" alias cat="bat"
alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
alias v="nvim" alias v="nvim"
alias vim=nvim
#alias sudo="doas"
#alias clear="clear && fortune | cowsay | lolcat"
alias c="clear" alias c="clear"
alias music='tmux new-session "tmux source-file ~/.ncmpcpp/tmux_session"' # Tmux session with ncmpcpp and cover art alias hi="systemctl hibernate"
alias nitch="cd ~/Documents/nitch/ && ./nitch && cd -"
#fm6000 -c yellow -f bass.txt -o Artix -n -m 5 -g 5 -l 15 alias sx="startx"
#sh ~/Docs/pfetch/pfetch alias irc="ssh server -t tmux -L weechat attach"
#neofetch --config ~/.config/neofetch/config2.conf alias server="ssh server -t tmux -L minecraft attach"
nitch alias kitsune="cd ~/repos/kitsune/"
fortune | cowsay [ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
cd
unsetopt BEEP

154
kitty/kitty.conf Normal file
View File

@ -0,0 +1,154 @@
##################################
############# FONTS ##############
##################################
font_family Cartograph CF Demi Bold
italic_font Cartograph CF Italic
bold_font Cartograph CF Bold
bold_italic_font Cartograph CF Bold Italic
font_size 12.8
#foreground #FFFFFF
#background #060609
#selection_foreground #000000
#selection_background #dddddd
adjust_line_height 110%
##################################
############# CURSOR #############
##################################
cursor #FFFFFF
cursor_shape beam
shell_integration no-cursor
select_by_word_characters : @-./_~?&=%+#
repaint_delay 10
term xterm-kitty
open_url_with default
scrollback_lines 10000
cursor_blink_interval 0
##################################
############# BORDER #############
##################################
window_border_width 8
window_margin_width 8
active_border_color #ffffff
inactive_border_color #cccccc
background_opacity 0.85
# window settings
remember_window_size yes
initial_window_width 135c
initial_window_height 35c
##################################
############# COLORS #############
##################################
# background #fdf6e3
# foreground #52676f
# cursor #52676f
# selection_background #e9e2cb
# color0 #e4e4e4
# color8 #ffffd7
# color1 #d70000
# color9 #d75f00
# color2 #5f8700
# color10 #585858
# color3 #af8700
# color11 #626262
# color4 #0087ff
# color12 #808080
# color5 #af005f
# color13 #5f5faf
# color6 #00afaf
# color14 #8a8a8a
# color7 #262626
# color15 #1c1c1c
selection_foreground #fcf4dc
background #001e26
foreground #708183
cursor #708183
selection_background #002731
color0 #002731
color8 #465a61
color1 #d01b24
color9 #bd3612
color2 #728905
color10 #465a61
color3 #a57705
color11 #52676f
color4 #2075c7
color12 #708183
color5 #c61b6e
color13 #5856b9
color6 #259185
color14 #81908f
color7 #e9e2cb
color15 #fcf4dc
# selection_foreground #001e26
#
# foreground #D8DEE9
# background #2E3440
# selection_foreground #000000
# selection_background #FFFACD
# url_color #0087BD
# cursor #81A1C1
# color0 #3B4252
# color8 #4C566A
# color1 #BF616A
# color9 #BF616A
# color2 #A3BE8C
# color10 #A3BE8C
# color3 #EBCB8B
# color11 #EBCB8B
# color4 #81A1C1
# color12 #81A1C1
# color5 #B48EAD
# color13 #B48EAD
# color6 #88C0D0
# color14 #8FBCBB
# color7 #E5E9F0
# color15 #ECEFF4
# melange
# background #292522
# foreground #ECE1D7
# cursor #867462
# color0 #34302C
# color1 #BD8183
# color2 #78997A
# color3 #E49B5D
# color4 #7F91B2
# color5 #B380B0
# color6 #7B9695
# color7 #C1A78E
# color8 #867462
# color9 #D47766
# color10 #85B695
# color11 #EBC06D
# color12 #A3A9CE
# color14 #CF9BC2
# color14 #89B3B6
# color15 #422741
##################################
########## KEY BINDINGS ##########
##################################
map ctrl+l clear_log_notice
map shift+up scroll_line_up
map shift+down scroll_line_down
map shift+page_up scroll_page_up
map shift+page_down scroll_page_down
map ctrl+shift+home scroll_home
map ctrl+shift+end scroll_end
map ctrl+equal increase_font_size
map ctrl+minus decrease_font_size

91
kitty/undefined.conf Normal file
View File

@ -0,0 +1,91 @@
##################################
############# FONTS ##############
##################################
font_family NotoSansMono Nerd Font
italic_font NotoSansMono Nerd Font
bold_font NotoSansMono Nerd Font
bold_italic_font NotoSansMono Nerd Font
font_size 12.0
#foreground #FFFFFF
#background #060609
#selection_foreground #000000
#selection_background #dddddd
adjust_line_height 110%
##################################
############# CURSOR #############
##################################
cursor #FFFFFF
cursor_shape beam
shell_integration no-cursor
select_by_word_characters : @-./_~?&=%+#
repaint_delay 10
term xterm-kitty
open_url_with default
scrollback_lines 10000
cursor_blink_interval 0
##################################
############# BORDER #############
##################################
window_border_width 8
window_margin_width 8
active_border_color #ffffff
inactive_border_color #cccccc
background_opacity 0.90
# window settings
remember_window_size no
initial_window_width 135c
initial_window_height 35c
##################################
############# COLORS #############
##################################
background #0c1115
background #000000
foreground #ffffff
cursor #6c6c6c
selection_background #bd2523
color0 #2e343c
color8 #404a55
color1 #bd0f2f
color9 #bd0f2f
color2 #35a770
color10 #49e998
color3 #fb9435
color11 #fddf6e
color4 #1f5872
color12 #2a8bc1
color5 #bd2523
color13 #ea4727
color6 #778397
color14 #a0b6d3
color7 #ffffff
color15 #ffffff
selection_foreground #0c1115
##################################
########## KEY BINDINGS ##########
##################################
map ctrl+l clear_log_notice
map shift+up scroll_line_up
map shift+down scroll_line_down
map shift+page_up scroll_page_up
map shift+page_down scroll_page_down
map ctrl+shift+home scroll_home
map ctrl+shift+end scroll_end
map ctrl+equal increase_font_size
map ctrl+minus decrease_font_size

93
mozilla/userChrome.css Normal file
View File

@ -0,0 +1,93 @@
/* hide tabs */
#TabsToolbar {
visibility: hidden;
height: 0px;
}
/* hide titlebar (ff113) */
#titlebar {
display: none;
}
/* smaller sideberry badge */
#sidebar-switcher-target {
transform: scale(0.6);
position: relative;
left: -24px;
}
#sidebar-header {
height: 24px;
background-color: black;
}
/* navbar on the bottom (might break? inverts the layout of root) */
/* TODO: fixme: show search results
body {
-moz-box-direction: reverse !important;
}
*/
#navigator-toolbox {
border: none !important;
}
/* urlbar not round, no border, spans the entire navbar height */
#urlbar-container {
padding: 0 !important;
}
#urlbar-background, #searchbar {
border: none !important;
border-radius: 0 !important;
}
#urlbar-background {
min-height: 50px;
top: -8px;
}
#urlbar[focused="true"]:not([suppress-focus-border]) > #urlbar-background, #searchbar:focus-within {
outline: none !important;
}
/* remove sidebar splitter next to sideberry */
.sidebar-splitter {
/* display: none !important; */
width: 2px !important;
}
/* NOTE: forces pinned extentions into the extention menu? */
/* hides back and forwards arrows if not active NOTE: disable rule if reordering taskbar
.toolbarbutton-1[disabled="true"] {
visibility: collapse;
} */
#sidebar-close {
display: none !important;
}
/* smaller bookmark items */
.bookmark-item, [data-l10n-id="places-open-all-bookmarks"], [data-l10n-id="places-open-all-in-tabs"], [data-l10n-id="places-open-in-container-tab"], .openintabs-menuitem { /* useless/undesired selectors? */
font-size: 12px !important;
}
.bookmark-item image {
width: 12px !important;
height: 12px !important;
}
#PlacesChevron { /* stretches toolbar if visible otherwise */
height: 18px !important;
}
menuitem.bookmark-item, .bookmark-item, image .openintabs-menuitem { /* NOTE: .bookmark-item targets wrapped folders */
margin: 2px !important;
padding: 2px !important;
padding-left: 6px !important; /* looks less wrong */
min-height: 12px !important;
}
/* self-described */
.bookmarks-actions-menuseparator {
visibility: hidden !important;
height: 4px !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
}