update
This commit is contained in:
parent
44c44d24ea
commit
90fe9ea027
@ -1,12 +1,12 @@
|
||||
font_size 12
|
||||
font_size 16
|
||||
font_family JetBrainsMonoNl Nerd Font Mono
|
||||
# font_family Firacode Nerd Font
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
# background_opacity 1
|
||||
background_opacity 0.92
|
||||
background_opacity 1
|
||||
# background_opacity 0.92
|
||||
window_padding_width 15
|
||||
allow_remote_control yes
|
||||
enable_audio_bell no
|
||||
|
@ -1 +1 @@
|
||||
require('some')
|
||||
require("some")
|
||||
|
@ -12,7 +12,6 @@ set.smarttab = true
|
||||
-- set.cursorline = true
|
||||
set.clipboard = 'unnamed,unnamedplus'
|
||||
|
||||
|
||||
set.list = true
|
||||
-- set.lcs='space:·'
|
||||
g.mapleader='\\'
|
||||
|
24
roles/dots/files/config/nvim/lua/some/init.lua
Executable file → Normal file
24
roles/dots/files/config/nvim/lua/some/init.lua
Executable file → Normal file
@ -1,5 +1,23 @@
|
||||
require("some.common")
|
||||
require("some.packer")
|
||||
require("some.packer_setting")
|
||||
require("some.scripts")
|
||||
require("some.keybind")
|
||||
|
||||
require("some.lazy")
|
||||
|
||||
require("some.lsp.lsp")
|
||||
require("some.lsp.linter")
|
||||
require("some.lsp.mason")
|
||||
|
||||
require("some.theme")
|
||||
|
||||
require("some.package.treesitter")
|
||||
require("some.package.telescope")
|
||||
require("some.package.harpoon")
|
||||
require("some.package.marks")
|
||||
require("some.package.no-neck-pain")
|
||||
require("some.package.hop")
|
||||
require("some.package.vgit")
|
||||
require("some.package.autopair")
|
||||
require("some.package.neotree")
|
||||
require("some.package.lualine")
|
||||
|
||||
require("some.scripts.rest")
|
||||
|
60
roles/dots/files/config/nvim/lua/some/keybind.lua
Normal file
60
roles/dots/files/config/nvim/lua/some/keybind.lua
Normal file
@ -0,0 +1,60 @@
|
||||
vim.api.nvim_set_keymap('n', '<Space>v', 'p', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('c', '<Space>v', '<C-r>"<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- select all
|
||||
vim.keymap.set('n', '<Space>sa', 'gg0vG$')
|
||||
|
||||
vim.keymap.set('n', '<Space>cp', ':NoNeckPain<CR>')
|
||||
|
||||
vim.keymap.set('n', '<M-d>', '<C-d>zz')
|
||||
vim.keymap.set('n', '<M-u>', '<C-u>zz')
|
||||
vim.keymap.set('n', '<M-y>', '<C-y>kzz')
|
||||
vim.keymap.set('n', '<M-e>', '<C-e>jzz')
|
||||
|
||||
vim.keymap.set('i', 'jk', '<esc>')
|
||||
vim.keymap.set('n', '<M-c>', '<esc>', { silent=true })
|
||||
|
||||
vim.keymap.set('n', '<C-n>', ':bn<CR>')
|
||||
vim.keymap.set('n', '<C-p>', ':bp<CR>')
|
||||
|
||||
vim.keymap.set('v', 'p', 'P')
|
||||
vim.keymap.set('n', '"', ':noh<CR>', { silent=true })
|
||||
|
||||
vim.keymap.set('n', '<S-j>', ':vertical resize +5<cr>')
|
||||
vim.keymap.set('n', '<S-k>', ':vertical resize -5<cr>')
|
||||
vim.keymap.set('n', '<S-h>', ':resize +5<cr>')
|
||||
vim.keymap.set('n', '<S-l>', ':resize -5<cr>')
|
||||
|
||||
vim.keymap.set('n', '<C-J>', '<C-W><C-J>')
|
||||
vim.keymap.set('n', '<C-K>', '<C-W><C-K>')
|
||||
vim.keymap.set('n', '<C-L>', '<C-W><C-L>')
|
||||
vim.keymap.set('n', '<C-H>', '<C-W><C-H>')
|
||||
|
||||
vim.keymap.set('n', '<Space>ll', 'zz')
|
||||
|
||||
vim.keymap.set('n', '<C-g>', '<esc>')
|
||||
vim.keymap.set('i', '<C-g>', '<esc>')
|
||||
vim.keymap.set('v', '<C-g>', '<esc>')
|
||||
|
||||
-- save
|
||||
vim.keymap.set('n', '<Space>8', ':w<CR>')
|
||||
vim.keymap.set('n', '<Space>2', ':q<CR>')
|
||||
-- exit without save
|
||||
vim.keymap.set('n', '<Space>6', ':q!<CR>')
|
||||
|
||||
-- move
|
||||
vim.keymap.set('n', '<Space>7', '_')
|
||||
vim.keymap.set('n', '<Space>9', '$')
|
||||
|
||||
vim.keymap.set('v', '<Space>7', '_')
|
||||
vim.keymap.set('v', '<Space>9', '$h')
|
||||
|
||||
vim.keymap.set('n', '.', '<C-d>zz<CR>')
|
||||
vim.keymap.set('n', ',', '<C-u>zz<CR>')
|
||||
|
||||
vim.keymap.set('v', '.', '<C-d>zz<CR>')
|
||||
vim.keymap.set('v', ',', '<C-u>zz<CR>')
|
||||
|
||||
-- split
|
||||
vim.keymap.set('n', '<Space>sh', ':vs<CR>')
|
||||
vim.keymap.set('n', '<Space>sv', ':sp<CR>')
|
81
roles/dots/files/config/nvim/lua/some/lazy.lua
Normal file
81
roles/dots/files/config/nvim/lua/some/lazy.lua
Normal file
@ -0,0 +1,81 @@
|
||||
-- Установка Lazy
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
-- theme
|
||||
"navarasu/onedark.nvim",
|
||||
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"folke/tokyonight.nvim",
|
||||
"shaunsingh/nord.nvim",
|
||||
"mfussenegger/nvim-lint",
|
||||
{
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.8',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||
},
|
||||
'ThePrimeagen/harpoon',
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
},
|
||||
'shortcuts/no-neck-pain.nvim',
|
||||
{
|
||||
'phaazon/hop.nvim',
|
||||
branch = 'v2',
|
||||
config = function()
|
||||
require'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }
|
||||
end
|
||||
},
|
||||
'chentoast/marks.nvim',
|
||||
'windwp/nvim-autopairs',
|
||||
|
||||
-- lsp
|
||||
{'williamboman/mason.nvim'},
|
||||
{'williamboman/mason-lspconfig.nvim'},
|
||||
{'neovim/nvim-lspconfig'},
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'hrsh7th/nvim-cmp'},
|
||||
|
||||
-- git
|
||||
{
|
||||
'tanvirtin/vgit.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons' },
|
||||
-- Lazy loading on 'VimEnter' event is necessary.
|
||||
event = 'VimEnter',
|
||||
},
|
||||
|
||||
-- icons
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
lazy = false, -- neo-tree will lazily load itself
|
||||
---@module "neo-tree"
|
||||
---@type neotree.Config?
|
||||
opts = {
|
||||
-- fill any relevant options here
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||
}
|
||||
})
|
23
roles/dots/files/config/nvim/lua/some/lsp/linter.lua
Normal file
23
roles/dots/files/config/nvim/lua/some/lsp/linter.lua
Normal file
@ -0,0 +1,23 @@
|
||||
-- ================ LINTER ================
|
||||
local lint = require("lint")
|
||||
|
||||
require('lint').linters.your_linter_name = {
|
||||
ignore_exitcode = true, -- set this to true if the linter exits with a code != 0 and that's considered normal.
|
||||
}
|
||||
|
||||
lint.linters_by_ft = {
|
||||
python = {
|
||||
"pylint",
|
||||
"flake8",
|
||||
"ruff",
|
||||
},
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<Space>j", "<cmd>lua vim.diagnostic.open_float()<cr>")
|
49
roles/dots/files/config/nvim/lua/some/lsp/lsp.lua
Normal file
49
roles/dots/files/config/nvim/lua/some/lsp/lsp.lua
Normal file
@ -0,0 +1,49 @@
|
||||
-- Reserve a space in the gutter
|
||||
-- This will avoid an annoying layout shift in the screen
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Add cmp_nvim_lsp capabilities settings to lspconfig
|
||||
-- This should be executed before you configure any language server
|
||||
local lspconfig_defaults = require('lspconfig').util.default_config
|
||||
lspconfig_defaults.capabilities = vim.tbl_deep_extend(
|
||||
'force',
|
||||
lspconfig_defaults.capabilities,
|
||||
require('cmp_nvim_lsp').default_capabilities()
|
||||
)
|
||||
|
||||
-- This is where you enable features that only work
|
||||
-- if there is a language server active in the file
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
desc = 'LSP actions',
|
||||
callback = function(event)
|
||||
local opts = {buffer = event.buf}
|
||||
|
||||
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
||||
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
||||
-- vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
||||
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
||||
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
require'lspconfig'.pyright.setup{}
|
||||
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({}),
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
})
|
15
roles/dots/files/config/nvim/lua/some/lsp/mason.lua
Normal file
15
roles/dots/files/config/nvim/lua/some/lsp/mason.lua
Normal file
@ -0,0 +1,15 @@
|
||||
require('mason').setup()
|
||||
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { 'pyright' }, -- Установите языковой сервер
|
||||
})
|
||||
|
||||
require('mason').setup({
|
||||
ensure_installed = { 'flake8', 'pylint', 'black', 'mypy', 'isort' }, -- Установите линтеры и инструменты
|
||||
})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
lspconfig.pyright.setup{}
|
||||
lspconfig.pylint.setup{}
|
||||
lspconfig.flake8.setup{}
|
@ -0,0 +1 @@
|
||||
require('nvim-autopairs').setup{}
|
12
roles/dots/files/config/nvim/lua/some/package/harpoon.lua
Normal file
12
roles/dots/files/config/nvim/lua/some/package/harpoon.lua
Normal file
@ -0,0 +1,12 @@
|
||||
vim.api.nvim_set_keymap("n", "<Space>ha", "<cmd>lua require('harpoon.mark').add_file()<cr>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>hl", "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>", { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Space>hn", '<cmd>lua require("harpoon.ui").nav_next()<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>hp", '<cmd>lua require("harpoon.ui").nav_prev()<cr>', { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Space>h1", '<cmd>lua require("harpoon.ui").nav_file(1)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h2", '<cmd>lua require("harpoon.ui").nav_file(2)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h3", '<cmd>lua require("harpoon.ui").nav_file(3)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h4", '<cmd>lua require("harpoon.ui").nav_file(4)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h5", '<cmd>lua require("harpoon.ui").nav_file(5)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h6", '<cmd>lua require("harpoon.ui").nav_file(6)<cr>', { noremap = true, silent = true })
|
10
roles/dots/files/config/nvim/lua/some/package/hop.lua
Normal file
10
roles/dots/files/config/nvim/lua/some/package/hop.lua
Normal file
@ -0,0 +1,10 @@
|
||||
local hop = require('hop')
|
||||
hop.setup()
|
||||
|
||||
local directions = require('hop.hint').HintDirection
|
||||
vim.keymap.set('', 'f', function()
|
||||
hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true })
|
||||
end, {remap=true})
|
||||
vim.keymap.set('', 'F', function()
|
||||
hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true })
|
||||
end, {remap=true})
|
41
roles/dots/files/config/nvim/lua/some/package/lualine.lua
Normal file
41
roles/dots/files/config/nvim/lua/some/package/lualine.lua
Normal file
@ -0,0 +1,41 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 100,
|
||||
tabline = 100,
|
||||
winbar = 100,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
35
roles/dots/files/config/nvim/lua/some/package/marks.lua
Normal file
35
roles/dots/files/config/nvim/lua/some/package/marks.lua
Normal file
@ -0,0 +1,35 @@
|
||||
require'marks'.setup {
|
||||
-- whether to map keybinds or not. default true
|
||||
default_mappings = true,
|
||||
-- which builtin marks to show. default {}
|
||||
builtin_marks = { ".", "<", ">", "^" },
|
||||
-- whether movements cycle back to the beginning/end of buffer. default true
|
||||
cyclic = true,
|
||||
-- whether the shada file is updated after modifying uppercase marks. default false
|
||||
force_write_shada = false,
|
||||
-- how often (in ms) to redraw signs/recompute mark positions.
|
||||
-- higher values will have better performance but may cause visual lag,
|
||||
-- while lower values may cause performance penalties. default 150.
|
||||
refresh_interval = 250,
|
||||
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
|
||||
-- marks, and bookmarks.
|
||||
-- can be either a table with all/none of the keys, or a single number, in which case
|
||||
-- the priority applies to all marks.
|
||||
-- default 10.
|
||||
sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
|
||||
-- disables mark tracking for specific filetypes. default {}
|
||||
excluded_filetypes = {},
|
||||
-- disables mark tracking for specific buftypes. default {}
|
||||
excluded_buftypes = {},
|
||||
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
|
||||
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
|
||||
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
|
||||
-- default virt_text is "".
|
||||
bookmark_0 = {
|
||||
sign = "⚑",
|
||||
annotate = false,
|
||||
},
|
||||
mappings = {}
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<Space>mc', ':delmarks!<cr>', {})
|
@ -0,0 +1,3 @@
|
||||
vim.keymap.set('n', '<C-f>', ':Neotree reveal<CR>')
|
||||
vim.keymap.set('n', '<Space>cc', ':Neotree show<CR>')
|
||||
vim.keymap.set('n', '<C-t>', ':Neotree toggle<CR>')
|
@ -0,0 +1 @@
|
||||
require("no-neck-pain").setup({ width = 180 })
|
38
roles/dots/files/config/nvim/lua/some/package/telescope.lua
Normal file
38
roles/dots/files/config/nvim/lua/some/package/telescope.lua
Normal file
@ -0,0 +1,38 @@
|
||||
-- lua/telescope.lua
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
prompt_prefix = "> ",
|
||||
selection_caret = "> ",
|
||||
},
|
||||
-- pickers = {
|
||||
-- find_files = {
|
||||
-- theme = "dropdown",
|
||||
-- },
|
||||
-- live_grep = {
|
||||
-- theme = "dropdown",
|
||||
-- },
|
||||
-- },
|
||||
})
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
-- Функция для поиска файлов, исключая скрытые
|
||||
local function custom_file_search()
|
||||
builtin.find_files({
|
||||
prompt_title = "< Search without hidden files >",
|
||||
find_command = {
|
||||
"find", ".", "-type", "f",
|
||||
"-not", "-path", "*/.*",
|
||||
"-not", "-path", "./env/*",
|
||||
"-not", "-path", "./fonts/*",
|
||||
"-not", "-path", "*.pyc",
|
||||
"-not", "-path", "./pg_data/*"
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<Space><Space>', custom_file_search, {})
|
||||
vim.keymap.set('n', '<Space>pg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<Space>bb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<Space>ml', builtin.marks, {})
|
22
roles/dots/files/config/nvim/lua/some/package/treesitter.lua
Normal file
22
roles/dots/files/config/nvim/lua/some/package/treesitter.lua
Normal file
@ -0,0 +1,22 @@
|
||||
-- lua/plugins.lua
|
||||
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {"python", "lua", "http", "json", "go"},
|
||||
ignore_install = { "" }, -- List of parsers to ignore installing
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = {}, -- list of language that will be disabled
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
indent = { enable = true, disable = {} },
|
||||
})
|
||||
|
19
roles/dots/files/config/nvim/lua/some/package/vgit.lua
Normal file
19
roles/dots/files/config/nvim/lua/some/package/vgit.lua
Normal file
@ -0,0 +1,19 @@
|
||||
require('vgit').setup({
|
||||
keymaps = {
|
||||
['n <C-p>'] = function() require('vgit').hunk_up() end,
|
||||
['n <C-n>'] = function() require('vgit').hunk_down() end,
|
||||
|
||||
-- ['n <leader>gs'] = function() require('vgit').buffer_hunk_stage() end,
|
||||
-- ['n <leader>gr'] = function() require('vgit').buffer_hunk_reset() end,
|
||||
-- ['n <leader>gp'] = function() require('vgit').buffer_hunk_preview() end,
|
||||
-- ['n <leader>gb'] = 'buffer_blame_preview',
|
||||
['n <Space>gdd'] = function() require('vgit').buffer_diff_preview() end,
|
||||
['n <Space>gdg'] = function() require('vgit').project_diff_preview() end,
|
||||
['n <Space>gll'] = function() require('vgit').buffer_history_preview() end,
|
||||
['n <Space>glg'] = function() require('vgit').project_logs_preview() end,
|
||||
-- ['n <leader>gu'] = function() require('vgit').buffer_reset() end,
|
||||
-- ['n <leader>gd'] = function() require('vgit').project_diff_preview() end,
|
||||
-- ['n <leader>gx'] = function() require('vgit').toggle_diff_preference() end,
|
||||
},
|
||||
})
|
||||
|
@ -1,106 +0,0 @@
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
-- theme
|
||||
use 'navarasu/onedark.nvim'
|
||||
use 'folke/tokyonight.nvim'
|
||||
use 'shaunsingh/nord.nvim'
|
||||
use 'morhetz/gruvbox'
|
||||
use 'ellisonleao/gruvbox.nvim'
|
||||
use 'Mofiqul/dracula.nvim'
|
||||
use 'sainnhe/everforest'
|
||||
use 'catppuccin/nvim'
|
||||
use 'bluz71/vim-nightfly-colors'
|
||||
use 'NTBBloodbath/doom-one.nvim'
|
||||
use 'metalelf0/base16-black-metal-scheme'
|
||||
use 'EdenEast/nightfox.nvim'
|
||||
use 'ayu-theme/ayu-vim'
|
||||
use 'Shatur/neovim-ayu'
|
||||
use 'lunacookies/vim-colors-xcode'
|
||||
use 'chriskempson/vim-tomorrow-theme'
|
||||
use 'maxmx03/solarized.nvim'
|
||||
use 'antonk52/lake.nvim'
|
||||
use 'cocopon/iceberg.vim'
|
||||
|
||||
-- auto save
|
||||
use 'pocco81/auto-save.nvim'
|
||||
|
||||
-- nerd tree
|
||||
use 'preservim/nerdtree'
|
||||
use 'Xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
-- git
|
||||
use 'tpope/vim-fugitive'
|
||||
use 'airblade/vim-gitgutter'
|
||||
|
||||
-- decorations
|
||||
use 'ryanoasis/vim-devicons'
|
||||
use 'nvim-tree/nvim-web-devicons'
|
||||
use {"shortcuts/no-neck-pain.nvim", tag = "*" }
|
||||
use {
|
||||
'phaazon/hop.nvim',
|
||||
branch = 'v2',
|
||||
config = function()
|
||||
require'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }
|
||||
end
|
||||
}
|
||||
-- func
|
||||
use 'windwp/nvim-autopairs'
|
||||
|
||||
-- telescope
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.4',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
use 'nvim-telescope/telescope-file-browser.nvim'
|
||||
use 'ThePrimeagen/harpoon'
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||
}
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
}
|
||||
use 'dense-analysis/ale'
|
||||
|
||||
-- lsp
|
||||
-- use {
|
||||
-- 'VonHeikemen/lsp-zero.nvim',
|
||||
-- branch = 'v3.x',
|
||||
-- requires = {
|
||||
-- {'williamboman/mason.nvim'},
|
||||
-- {'williamboman/mason-lspconfig.nvim'},
|
||||
|
||||
-- {'neovim/nvim-lspconfig'},
|
||||
-- {'hrsh7th/nvim-cmp'},
|
||||
-- {'hrsh7th/cmp-nvim-lsp'},
|
||||
-- {'L3MON4D3/LuaSnip'},
|
||||
-- }
|
||||
-- }
|
||||
-- snippet
|
||||
-- use 'honza/vim-snippets'
|
||||
use {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'},
|
||||
{'williamboman/mason.nvim'},
|
||||
{'williamboman/mason-lspconfig.nvim'},
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'},
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'hrsh7th/cmp-buffer'},
|
||||
{'hrsh7th/cmp-path'},
|
||||
{'saadparwaiz1/cmp_luasnip'}, -- интеграция с LuaSnip
|
||||
{'hrsh7th/cmp-nvim-lua'},
|
||||
|
||||
-- Snippets
|
||||
{'L3MON4D3/LuaSnip'}, -- сам LuaSnip
|
||||
{'rafamadriz/friendly-snippets'}, -- набор готовых сниппетов
|
||||
}
|
||||
}
|
||||
end)
|
@ -1,282 +0,0 @@
|
||||
-- vim.o.background = 'dark' -- 'dark' or 'light'
|
||||
vim.o.background = 'dark' -- 'dark' or 'light'
|
||||
-- vim.g.everforest_background = 'hard'
|
||||
-- vim.cmd('colorscheme everforest')
|
||||
-- vim.cmd('colorscheme nord')
|
||||
-- vim.cmd('colorscheme base16-black-metal')
|
||||
-- vim.cmd('colorscheme dracula')
|
||||
-- vim.cmd('colorscheme onedark')
|
||||
-- vim.cmd('colorscheme nightfox')
|
||||
vim.cmd('colorscheme Tomorrow-Night-Bright')
|
||||
-- vim.cmd('colorscheme doom-one')
|
||||
-- vim.cmd('colorscheme dracula-soft')
|
||||
-- vim.cmd('colorscheme solarized')
|
||||
-- vim.cmd('colorscheme gruvbox')
|
||||
-- vim.cmd('colorscheme iceberg')
|
||||
-- vim.cmd('colorscheme lake')
|
||||
-- vim.cmd('colorscheme tokyonight')
|
||||
-- vim.cmd('highlight Normal guibg=#000000 ctermbg=black')
|
||||
-- vim.api.nvim_set_hl(0, 'CursorLine', { underline = true })
|
||||
vim.cmd('highlight Normal guibg=none ctermbg=none')
|
||||
|
||||
-- цвет номеров строк
|
||||
vim.cmd('hi linenr guifg=white')
|
||||
-- vim.cmd('hi linenr guifg=white')
|
||||
-- vim.cmd('hi linenr guifg=#D3C6AA')
|
||||
-- telescope
|
||||
local builtin = require('telescope.builtin')
|
||||
-- Функция для поиска файлов, исключая скрытые
|
||||
local function custom_file_search()
|
||||
builtin.find_files({
|
||||
prompt_title = "< Search without hidden files >",
|
||||
find_command = {
|
||||
"find", ".", "-type", "f",
|
||||
"-not", "-path", "*/.*",
|
||||
"-not", "-path", "./env/*",
|
||||
"-not", "-path", "./fonts/*",
|
||||
"-not", "-path", "*.pyc",
|
||||
"-not", "-path", "./pg_data/*"
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- -not \( -path "./dir1" -o -path "./dir2/*" \)
|
||||
|
||||
-- lualine
|
||||
vim.o.showtabline = 2
|
||||
require('lualine').setup()
|
||||
|
||||
-- nerdtree
|
||||
vim.cmd('autocmd FileType nerdtree setlocal relativenumber')
|
||||
-- Open the existing NERDTree on each new tab.
|
||||
vim.cmd("autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif")
|
||||
-- Close the tab if NERDTree is the only window remaining in it.
|
||||
vim.cmd("autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif")
|
||||
-- Open the existing NERDTree on each new tab.
|
||||
|
||||
vim.g['NERDTreeShowHidden'] = 1
|
||||
vim.g['NERDTreeWinSize'] = 50
|
||||
|
||||
|
||||
-- # nvim-treesitter
|
||||
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {"python", "lua", "http", "json", "go"},
|
||||
ignore_install = { "" }, -- List of parsers to ignore installing
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = {}, -- list of language that will be disabled
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
indent = { enable = true, disable = {} },
|
||||
})
|
||||
|
||||
|
||||
-- hob
|
||||
local hop = require('hop')
|
||||
hop.setup()
|
||||
local directions = require('hop.hint').HintDirection
|
||||
vim.keymap.set('', 'f', function()
|
||||
hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true })
|
||||
end, {remap=true})
|
||||
vim.keymap.set('', 'F', function()
|
||||
hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true })
|
||||
end, {remap=true})
|
||||
|
||||
-- auto pairs
|
||||
-- Настройка символов, для которых будет автоматически вставляться закрывающая скобка
|
||||
require('nvim-autopairs').setup{}
|
||||
-- require("no-neck-pain").setup({ width = 150 })
|
||||
require("no-neck-pain").setup({ width = 180 })
|
||||
|
||||
-- harpoon
|
||||
print(vim.api.nvim_win_get_width(0))
|
||||
require("harpoon").setup({
|
||||
menu = {
|
||||
-- width = vim.api.nvim_win_get_width(0) - 4,
|
||||
width = 90
|
||||
}
|
||||
})
|
||||
|
||||
-- golang
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "go",
|
||||
callback = function()
|
||||
vim.bo.tabstop = 4
|
||||
vim.bo.shiftwidth = 4
|
||||
vim.bo.expandtab = false
|
||||
end,
|
||||
})
|
||||
|
||||
-- ----------------------
|
||||
-- lsp
|
||||
-- ----------------------
|
||||
local lsp_zero = require('lsp-zero')
|
||||
lsp_zero.preset({
|
||||
name = 'minimal',
|
||||
set_lsp_keymaps = true,
|
||||
manage_nvim_cmp = true,
|
||||
suggest_lsp_servers = false,
|
||||
})
|
||||
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
|
||||
-- cmp
|
||||
local cmp = require('cmp')
|
||||
local cmp_action = require('lsp-zero').cmp_action()
|
||||
local cmp_format = require('lsp-zero').cmp_format({details = true})
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'luasnip'},
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<cr>'] = cmp.mapping.confirm({select = true}),
|
||||
}),
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
formatting = cmp_format,
|
||||
})
|
||||
|
||||
-- to learn how to use mason.nvim
|
||||
-- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guide/integrate-with-mason-nvim.md
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { 'pyright', 'gopls' },
|
||||
handlers = {
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup({})
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- ----------------------
|
||||
-- Syntax CHeck
|
||||
-- ----------------------
|
||||
vim.g.ale_echo_msg_error_str = 'E'
|
||||
vim.g.ale_echo_msg_warning_str = 'W'
|
||||
vim.g.ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
||||
|
||||
-- ----------------------
|
||||
-- SHORTCUTS
|
||||
-- ----------------------
|
||||
|
||||
-- vim.keymap.set('n','y','"+y')
|
||||
-- vim.keymap.set('n','yy','"+yy')
|
||||
-- vim.keymap.set('n','Y','"+Y')
|
||||
-- vim.keymap.set('x','y','"+y')
|
||||
-- vim.keymap.set('x','Y','"+Y')
|
||||
|
||||
-- vim.keymap.set('n','yy','"gg+yy')
|
||||
-- vim.keymap.set('n','Y','"gg+yG')
|
||||
-- vim.keymap.set('x','y','"+y')
|
||||
-- vim.keymap.set('x','Y','"+Y')
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<Space>v', 'p', { noremap = true, silent = true })
|
||||
-- vim.api.nvim_set_keymap('i', '<Space>v', '<Esc>pa', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('c', '<Space>v', '<C-r>"<CR>', { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set('n', '<Space>cp', ':NoNeckPain<CR>')
|
||||
|
||||
vim.keymap.set('n', '<M-d>', '<C-d>zz')
|
||||
vim.keymap.set('n', '<M-u>', '<C-u>zz')
|
||||
vim.keymap.set('n', '<M-y>', '<C-y>kzz')
|
||||
vim.keymap.set('n', '<M-e>', '<C-e>jzz')
|
||||
|
||||
vim.keymap.set('i', 'jk', '<esc>')
|
||||
vim.keymap.set('n', '<M-c>', '<esc>', { silent=true })
|
||||
|
||||
vim.keymap.set('n', '<C-n>', ':bn<CR>')
|
||||
vim.keymap.set('n', '<C-p>', ':bp<CR>')
|
||||
|
||||
vim.keymap.set('v', 'p', 'P')
|
||||
vim.keymap.set('n', '"', ':noh<CR>', { silent=true })
|
||||
|
||||
vim.keymap.set('n', '<S-j>', ':vertical resize +5<cr>')
|
||||
vim.keymap.set('n', '<S-k>', ':vertical resize -5<cr>')
|
||||
vim.keymap.set('n', '<S-h>', ':resize +5<cr>')
|
||||
vim.keymap.set('n', '<S-l>', ':resize -5<cr>')
|
||||
|
||||
vim.keymap.set('n', '<C-J>', '<C-W><C-J>')
|
||||
vim.keymap.set('n', '<C-K>', '<C-W><C-K>')
|
||||
vim.keymap.set('n', '<C-L>', '<C-W><C-L>')
|
||||
vim.keymap.set('n', '<C-H>', '<C-W><C-H>')
|
||||
|
||||
vim.keymap.set('n', '<Space>ll', 'zz')
|
||||
|
||||
vim.keymap.set('n', '<C-g>', '<esc>')
|
||||
vim.keymap.set('i', '<C-g>', '<esc>')
|
||||
vim.keymap.set('v', '<C-g>', '<esc>')
|
||||
|
||||
-- nerd tree
|
||||
vim.keymap.set('n', '<C-f>', ':NERDTreeFind<CR>')
|
||||
vim.keymap.set('n', '<C-t>', ':NERDTreeToggle<CR>')
|
||||
|
||||
-- save
|
||||
vim.keymap.set('n', '<Space>8', ':w<CR>')
|
||||
vim.keymap.set('n', '<Space>2', ':q<CR>')
|
||||
-- exit without save
|
||||
vim.keymap.set('n', '<Space>6', ':q!<CR>')
|
||||
|
||||
-- copy
|
||||
vim.api.nvim_set_keymap('n', '<Space>vl', ':normal!_v$y <CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<CR>', 'y', {})
|
||||
|
||||
-- move
|
||||
vim.keymap.set('n', '<Space>7', '_')
|
||||
vim.keymap.set('n', '<Space>9', '$')
|
||||
|
||||
vim.keymap.set('v', '<Space>7', '_')
|
||||
vim.keymap.set('v', '<Space>9', '$h')
|
||||
|
||||
vim.keymap.set('n', '.', '<C-d>zz<CR>')
|
||||
vim.keymap.set('n', ',', '<C-u>zz<CR>')
|
||||
|
||||
vim.keymap.set('v', '.', '<C-d>zz<CR>')
|
||||
vim.keymap.set('v', ',', '<C-u>zz<CR>')
|
||||
|
||||
-- split
|
||||
vim.keymap.set('n', '<Space>sh', ':vs<CR>')
|
||||
vim.keymap.set('n', '<Space>sv', ':sp<CR>')
|
||||
|
||||
-- telescope
|
||||
-- vim.keymap.set('n', '<Space><Space>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<Space><Space>', custom_file_search, {})
|
||||
vim.keymap.set('n', '<Space>pg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<Space>bb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<Space>m', builtin.marks, {})
|
||||
|
||||
-- harpoon
|
||||
vim.api.nvim_set_keymap("n", "<Space>ha", "<cmd>lua require('harpoon.mark').add_file()<cr>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>hl", "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>", { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Space>hn", '<cmd>lua require("harpoon.ui").nav_next()<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>hp", '<cmd>lua require("harpoon.ui").nav_prev()<cr>', { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<Space>h1", '<cmd>lua require("harpoon.ui").nav_file(1)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h2", '<cmd>lua require("harpoon.ui").nav_file(2)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h3", '<cmd>lua require("harpoon.ui").nav_file(3)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h4", '<cmd>lua require("harpoon.ui").nav_file(4)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h5", '<cmd>lua require("harpoon.ui").nav_file(5)<cr>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<Space>h6", '<cmd>lua require("harpoon.ui").nav_file(6)<cr>', { noremap = true, silent = true })
|
16
roles/dots/files/config/nvim/lua/some/scripts.lua → roles/dots/files/config/nvim/lua/some/scripts/rest.lua
Executable file → Normal file
16
roles/dots/files/config/nvim/lua/some/scripts.lua → roles/dots/files/config/nvim/lua/some/scripts/rest.lua
Executable file → Normal file
@ -1,10 +1,3 @@
|
||||
-- {"pylint", "flake8", "jedi", "pynvim"}
|
||||
|
||||
-- for httpie
|
||||
function string.starts(String,Start)
|
||||
return string.sub(String,1,string.len(Start))==Start
|
||||
end
|
||||
|
||||
function getPath(str)
|
||||
-- get dir path from file path
|
||||
-- /home/tmp/test/foo.json --> /home/tmp/test
|
||||
@ -59,15 +52,12 @@ function rest()
|
||||
|
||||
vim.api.nvim_buf_set_option(buf, 'modifiable', true)
|
||||
vim.api.nvim_buf_set_lines(buf, 0, 0, true, http_result)
|
||||
vim.api.nvim_buf_set_option(buf, "ft", "http")
|
||||
vim.api.nvim_buf_set_option(current_buf, "ft", "http")
|
||||
vim.api.nvim_buf_set_option(buf, "ft", "json")
|
||||
-- vim.api.nvim_buf_set_option(current_buf, "ft", "http")
|
||||
end
|
||||
|
||||
vim.cmd("au! BufRead,BufNewFile *.http setfiletype http")
|
||||
|
||||
vim.api.nvim_set_keymap('v', '<Space>j', ':\'<,\'>!jq . <CR>', { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_create_user_command('Test', close_window_with_response, {})
|
||||
vim.api.nvim_set_keymap('v', '<Space>cj', ':\'<,\'>!jq . <CR>', { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_create_user_command('R', rest, {})
|
||||
vim.api.nvim_set_keymap("n", "<Space>rs", ':R<CR>', { noremap = true, silent = true })
|
3
roles/dots/files/config/nvim/lua/some/theme.lua
Normal file
3
roles/dots/files/config/nvim/lua/some/theme.lua
Normal file
@ -0,0 +1,3 @@
|
||||
vim.o.background = 'dark' -- 'dark' or 'light'
|
||||
vim.cmd[[colorscheme onedark]]
|
||||
vim.cmd('hi linenr guifg=white')
|
@ -13,7 +13,7 @@ alias grep='grep --color=auto'
|
||||
|
||||
# PS1="[\w] ($(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \n-> "
|
||||
PS1='[\w]$(git rev-parse --is-inside-work-tree &>/dev/null && echo " ($(git branch 2>/dev/null | grep '\''^\*'\'' | colrm 1 2))") \n-> '
|
||||
# PS1='\w$(git rev-parse --is-inside-work-tree &>/dev/null && echo " ($(git branch 2>/dev/null | grep '\''^\*'\'' | colrm 1 2))") $ '
|
||||
# PS1='\w$(git rev-parse --is-inside-work-tree &>/dev/null && echo " ($(git branch 2>/dev/null | grep '\''^\*'\'' | colrm 1 2))")$ '
|
||||
|
||||
export VISUAL=nvim
|
||||
export MANPAGER='nvim +Man!'
|
||||
|
@ -35,6 +35,7 @@
|
||||
- [[#org-agenda][org agenda]]
|
||||
- [[#org-image][Org Image]]
|
||||
- [[#org-level-size][org level size]]
|
||||
- [[#org-level-hide][org level hide]]
|
||||
- [[#programming][PROGRAMMING]]
|
||||
- [[#snipets][snipets]]
|
||||
- [[#python][python]]
|
||||
@ -208,11 +209,19 @@ https://github.com/noctuid/general.el
|
||||
|
||||
*** KeyBind
|
||||
#+begin_src emacs-lisp
|
||||
(defun select-all ()
|
||||
"Выделить весь буфер."
|
||||
(interactive)
|
||||
(goto-char (point-min))
|
||||
(push-mark (point-max) nil t))
|
||||
|
||||
(spc-leader
|
||||
"8" '(save-buffer :wk "save file")
|
||||
"2" '(evil-quit :wk "quit file")
|
||||
"7" '(evil-first-non-blank :wk "first non blank")
|
||||
"9" '(evil-last-non-blank :wk "last non blank")
|
||||
"s a" '(select-all :wk "last non blank")
|
||||
|
||||
"h r r" '((lambda () (interactive) (load-file "/home/fs/.emacs.d/init.el")) :wk "Reload emacs config")
|
||||
)
|
||||
#+end_src
|
||||
@ -290,11 +299,6 @@ https://github.com/emacs-evil/evil
|
||||
|
||||
*** Setup
|
||||
#+begin_src emacs-lisp
|
||||
;; (use-package ivy
|
||||
;; :ensure t
|
||||
;; :init
|
||||
;; (ivy-mode +1))
|
||||
|
||||
(use-package ivy
|
||||
:ensure t
|
||||
:config
|
||||
@ -309,33 +313,10 @@ https://github.com/emacs-evil/evil
|
||||
(ivy-use-virtual-buffers t) ;; Показывать виртуальные буферы (например, недавние файлы)
|
||||
(ivy-count-format "(%d/%d) ")) ;; Показывать счетчик выбора
|
||||
|
||||
|
||||
;; (define-key ivy-minibuffer-map (kbd "C-l") 'ivy-immediate-done)
|
||||
;; (define-key ivy-minibuffer-map (kbd "RET") 'ivy-done)
|
||||
;; (define-key ivy-minibuffer-map (kbd "<return>") 'ivy-done)
|
||||
;; (define-key ivy-minibuffer-map (kbd "C-j") 'ivy-next-line)
|
||||
;; (define-key ivy-minibuffer-map (kbd "C-k") 'ivy-previous-line)
|
||||
#+end_src
|
||||
|
||||
** Counsel
|
||||
#+begin_src emacs-lisp
|
||||
;; (unless (package-installed-p 'counsel)
|
||||
;; (package-refresh-contents)
|
||||
;; (package-install 'counsel))
|
||||
|
||||
;; (setq counsel-fzf-cmd
|
||||
;; (concat
|
||||
;; "find . -type f -not -path '*/.*' 2>&1 | "
|
||||
;; "grep -v 'Permission denied' | "
|
||||
;; "grep -v './env/' | "
|
||||
;; "grep -v './fonts/' | "
|
||||
;; "grep -v './__pycache__/' | "
|
||||
;; "grep -v 'site-packages' | "
|
||||
;; "grep -v '.pyc' | "
|
||||
;; "grep -v '_minted' | "
|
||||
;; "fzf -f '%s'"))
|
||||
|
||||
|
||||
(use-package counsel
|
||||
:ensure t
|
||||
:config
|
||||
@ -373,26 +354,6 @@ https://github.com/emacs-evil/evil
|
||||
|
||||
** dired
|
||||
*** setup
|
||||
(setq dired-listing-switches "-alXGh --group-directories-first":
|
||||
Определяет параметры, которые передаются команде ls для отображения содержимого директорий.
|
||||
-a: Показывает все файлы, включая скрытые (начинающиеся с точки).
|
||||
-l: Выводит в длинном формате, показывая дополнительные детали (размер, дата, права и т.д.).
|
||||
-X: Сортирует файлы по расширению.
|
||||
-G: Отключает цвета в выводе (если они поддерживаются).
|
||||
-h: Показывает размеры в человекочитаемом формате (например, 1K, 234M).
|
||||
--group-directories-first: Сначала отображает директории, затем файлы.
|
||||
(setq dired-recursive-copies 'always):
|
||||
Устанавливает режим рекурсивного копирования для dired на "всегда", что означает, что при копировании директорий все их содержимое будет скопировано рекурсивно.
|
||||
(setq dired-recursive-deletes 'top):
|
||||
Определяет поведение для рекурсивного удаления. Установлено на "top", что означает, что при удалении директории будет предложено удалить её содержимое (файлы и поддиректории) перед удалением самой директории.
|
||||
(setq global-auto-revert-non-file-buffers t):
|
||||
Включает автоматическое обновление (рефреш) буферов, не относящихся к файлам, например, таких как dired, если они изменяются на диске. Это помогает поддерживать актуальность отображаемой информации.
|
||||
(setq auto-revert-verbose nil):
|
||||
Отключает вывод сообщений о том, что буфер был обновлен. Это может уменьшить количество сообщений в минибуфере.
|
||||
(setq dired-dwim-target t):
|
||||
Включает "do what I mean" (DWIM) поведение для установки целевого пути. Это значит, что при использовании команды dired для перемещения или копирования файлов, Emacs попытается автоматически угадать, куда вы хотите переместить файлы, основываясь на контексте.
|
||||
(setq wdired-allow-to-change-permissions t):
|
||||
Разрешает изменять права доступа на файлы и директории в режиме wdired, который позволяет редактировать файлы в dired в текстовом режиме.
|
||||
#+begin_src emacs-lisp
|
||||
(require 'dired)
|
||||
(setq dired-listing-switches "-alXGh --group-directories-first"
|
||||
@ -429,7 +390,6 @@ https://github.com/emacs-evil/evil
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
*** dired subtree
|
||||
#+begin_src emacs-lisp
|
||||
(require 'dired-subtree)
|
||||
@ -612,17 +572,9 @@ https://github.com/emacs-evil/evil
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:hook (after-init . doom-modeline-mode) ;; Включает doom-modeline после инициализации Emacs
|
||||
;; :custom
|
||||
;; (doom-modeline-height 15) ;; Высота строки модели
|
||||
;; (doom-modeline-bar-width 3) ;; Ширина индикатора
|
||||
;; (doom-modeline-icon t) ;; Показывать иконки (зависит от поддержки шрифтов)
|
||||
;; (doom-modeline-major-mode-icon t) ;; Показывать иконку режима
|
||||
;; (doom-modeline-minor-modes nil) ;; Скрыть список минорных режимов
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
** NeoTree
|
||||
*** Setup
|
||||
#+begin_src emacs-lisp
|
||||
@ -739,7 +691,6 @@ add and switch project
|
||||
(unless (file-exists-p projectile-file-path)
|
||||
(make-empty-file projectile-file-path)))
|
||||
(projectile-add-known-project directory)))
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
@ -905,9 +856,9 @@ hot keys
|
||||
#+end_src
|
||||
|
||||
** Org Temo chet sheet
|
||||
| Typing the below + TAB | Expands to ... |
|
||||
|------------------------+---------------------------------------|
|
||||
| <a | '#+BEGIN_EXPORT ascii' … '#+END_EXPORT |
|
||||
| Typing the below + TAB | Expands to ... |
|
||||
|------------------------+-----------------------------------------|
|
||||
| <a | '#+BEGIN_EXPORT ascii' … '#+END_EXPORT |
|
||||
| <c | '#+BEGIN_CENTER' … '#+END_CENTER' |
|
||||
| <C | '#+BEGIN_COMMENT' … '#+END_COMMENT' |
|
||||
| <e | '#+BEGIN_EXAMPLE' … '#+END_EXAMPLE' |
|
||||
@ -932,9 +883,6 @@ hot keys
|
||||
(which-key-mode 1)
|
||||
|
||||
(setq which-key-min-display-lines 13)
|
||||
; (setq which-key-side-window-location 'bottom
|
||||
; which-key-sort-order #'which-key-key-order-alpha
|
||||
; which-key-separator " → " )
|
||||
|
||||
(require 'org-tempo)
|
||||
|
||||
@ -977,6 +925,19 @@ hot keys
|
||||
'(org-level-4 ((t (:height 1.1)))))
|
||||
#+end_src
|
||||
|
||||
** org level hide
|
||||
Скрывает заголовки, у которых есть подчёркивание после звёздочек.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/org-hide-matching-headlines ()
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\*+ _" nil t)
|
||||
(outline-hide-subtree))))
|
||||
|
||||
(add-hook 'org-mode-hook #'my/org-hide-matching-headlines)
|
||||
#+end_src
|
||||
|
||||
|
||||
* PROGRAMMING
|
||||
** snipets
|
||||
@ -1021,15 +982,17 @@ hot keys
|
||||
** colorthemes
|
||||
#+begin_src emacs-lisp
|
||||
(custom-set-faces
|
||||
'(line-number ((t (:foreground "white")))) ; Цвет отображения номера строки
|
||||
'(line-number-current-line ((t (:foreground "white"))))) ; Цвет текущей строки
|
||||
'(org-block-background ((t (:background "#1b1b1b"))))
|
||||
; '(line-number ((t (:foreground "black")))) ; Цвет отображения номера строки
|
||||
; '(line-number-current-line ((t (:foreground "black"))))) ; Цвет текущей строки
|
||||
;; '(line-number ((t (:foreground "white")))) ; Цвет отображения номера строки
|
||||
;; '(line-number-current-line ((t (:foreground "white"))))) ; Цвет текущей строки
|
||||
;; '(org-block-background ((t (:background "#1b1b1b"))))
|
||||
'(line-number ((t (:foreground "black")))) ; Цвет отображения номера строки
|
||||
'(line-number-current-line ((t (:foreground "black"))))) ; Цвет текущей строки
|
||||
;; (load-theme 'doom-1337 t)
|
||||
;; (load-theme 'doom-nord t)
|
||||
;; (load-theme 'doom-nord-aurora t)
|
||||
;; (load-theme 'doom-nord-light t)
|
||||
;; (load-theme 'doom-ayu-light t)
|
||||
;; (load-theme 'doom-city-lights t)
|
||||
;; (load-theme 'doom-one-light t)
|
||||
;; (load-theme 'doom-gruvbox-light t)
|
||||
;; (load-theme 'doom-gruvbox t)
|
||||
@ -1098,7 +1061,7 @@ hot keys
|
||||
(interactive)
|
||||
(set-face-attribute 'default nil
|
||||
:font "JetBrainsMonoNL Nerd Font"
|
||||
:height 120
|
||||
:height 110
|
||||
:weight 'medium))
|
||||
|
||||
(defun set-big-font ()
|
||||
@ -1187,24 +1150,6 @@ names, e.g. #0000ff is displayed in white with a blue background.
|
||||
(setq nyan-wavy-trail t)
|
||||
(setq nyan-animate-nyancat t)
|
||||
(nyan-mode 1)) ;; Включить анимацию
|
||||
;; (require 'nyan-mode)
|
||||
;; (nyan-mode +1)
|
||||
;;
|
||||
;; (defun my-nyan-cat-settings ()
|
||||
;; "Set Nyan Cat settings for new frames."
|
||||
;; (setq nyan-animate-nyancat t)
|
||||
;; (setq nyan-wavy-trail t)
|
||||
;; )
|
||||
;;
|
||||
;; ;; Применение настроек к уже открытому фрейму
|
||||
;; (my-nyan-cat-settings)
|
||||
;;
|
||||
;; ;; Применение настроек для новых фреймов
|
||||
;; (add-hook 'after-make-frame-functions
|
||||
;; (lambda (frame)
|
||||
;; (my-nyan-cat-settings)
|
||||
;; (select-frame frame)
|
||||
;; ))
|
||||
#+end_src
|
||||
|
||||
** evil-snipe
|
||||
@ -1229,8 +1174,8 @@ names, e.g. #0000ff is displayed in white with a blue background.
|
||||
|
||||
** hl-todo
|
||||
#+begin_src emacs-lisp
|
||||
;(require 'hl-todo)
|
||||
;(global-hl-todo-mode +1)
|
||||
(require 'hl-todo)
|
||||
(add-hook 'prog-mode-hook 'hl-todo-mode)
|
||||
#+end_src
|
||||
|
||||
* Programs
|
||||
@ -1268,14 +1213,22 @@ names, e.g. #0000ff is displayed in white with a blue background.
|
||||
(with-eval-after-load 'emms
|
||||
(define-key emms-playlist-mode-map (kbd "l") 'emms-seek-forward)
|
||||
(define-key emms-playlist-mode-map (kbd "h") 'emms-seek-backward)
|
||||
(define-key emms-playlist-mode-map (kbd "o") 'emms-pause)
|
||||
(define-key emms-playlist-mode-map (kbd "s") 'emms-pause)
|
||||
(define-key emms-playlist-mode-map (kbd "C-c k") 'emms-playlist-clear)
|
||||
|
||||
(define-key emms-playlist-mode-map (kbd "j") 'next-line)
|
||||
(define-key emms-playlist-mode-map (kbd "C-j") 'next-line)
|
||||
(define-key emms-playlist-mode-map (kbd "k") 'previous-line)
|
||||
(define-key emms-playlist-mode-map (kbd "C-k") 'previous-line)
|
||||
|
||||
(define-key emms-playlist-mode-map (kbd "C-u") 'scroll-down-command)
|
||||
(define-key emms-playlist-mode-map (kbd "C-d") 'scroll-up-command)
|
||||
|
||||
(define-key emms-playlist-mode-map (kbd "d") 'emms-playlist-mode-kill-track)
|
||||
|
||||
(define-key emms-playlist-mode-map (kbd "/") 'evil-search-forward)
|
||||
(define-key emms-playlist-mode-map (kbd "C-n") 'evil-search-next)
|
||||
(define-key emms-playlist-mode-map (kbd "C-p") 'evil-search-previous)
|
||||
)
|
||||
)
|
||||
|
||||
@ -1286,7 +1239,7 @@ names, e.g. #0000ff is displayed in white with a blue background.
|
||||
"e" '(:ignore t :wk "music")
|
||||
"e d" '(emms-add-dired :wk "add dired tree to playlist")
|
||||
"e t" '(emms-add-directory-tree :wk "dir tree to playlist")
|
||||
"e r" '(emms :wk "start")
|
||||
"e r" '(emms :wk "emms")
|
||||
"e a" '(emms-toggle-repeat-track :wk "repeat track")
|
||||
"e s" '(emms-pause :wk "stop")
|
||||
"e k" '(emms-next :wk "next")
|
||||
@ -1295,9 +1248,9 @@ names, e.g. #0000ff is displayed in white with a blue background.
|
||||
"e i" '(emms-seek-forward :wk "seek-forward 10s")
|
||||
"e u" '(emms-seek-backward :wk "seek-backward 10s")
|
||||
|
||||
"e w" '(:ignore t :wk "music playlist load/save")
|
||||
"e w s" '(emms-playlist-save :wk "save playlist")
|
||||
"e w l" '(emms-play-m3u-playlist :wk "load playlist")
|
||||
"e p" '(:ignore t :wk "music playlist load/save")
|
||||
"e p s" '(emms-playlist-save :wk "save playlist")
|
||||
"e p l" '(emms-play-m3u-playlist :wk "load playlist")
|
||||
)
|
||||
#+end_src
|
||||
|
||||
@ -1534,7 +1487,6 @@ left=2cm, right=2cm, top=2.5cm, bottom=2.5cm — отступы от левой,
|
||||
(interactive)
|
||||
(let (
|
||||
(output-buffer (get-buffer-create "*Rest Output*"))
|
||||
;; (command (concat "python /home/fs/bin/easy_http.py " buffer-file-name " " (projectile-project-root))))
|
||||
(command (concat "/home/fs/bin/http " buffer-file-name " " (projectile-project-root))))
|
||||
(save-buffer)
|
||||
(unless (get-buffer-window output-buffer)
|
||||
|
11
roles/dots/files/home/.emacs.d/eshell/alias
Normal file
11
roles/dots/files/home/.emacs.d/eshell/alias
Normal file
@ -0,0 +1,11 @@
|
||||
alias s exa -al --color=always --group-directories-first $*
|
||||
alias ls exa -al --color=always --group-directories-first
|
||||
alias open find-file $1
|
||||
alias end source env/bin/activate
|
||||
alias en source ../../env/bin/activate
|
||||
alias ds docker compose exec backend sh
|
||||
alias db docker compose exec backend bash
|
||||
alias dc docker compose $*
|
||||
alias gs git status
|
||||
alias gb git branch
|
||||
alias f counsel-find-dirs
|
128
roles/dots/files/home/.emacs.d/eshell/history
Normal file
128
roles/dots/files/home/.emacs.d/eshell/history
Normal file
@ -0,0 +1,128 @@
|
||||
sudo make clean install
|
||||
sudo make clean install
|
||||
sudo make clean install
|
||||
sudo make clean install
|
||||
exit
|
||||
ls
|
||||
chmod +x key-handler
|
||||
ls
|
||||
(eval (load "./image.el"))
|
||||
(eval (load "./image.el"))
|
||||
exit
|
||||
sudo make clean install
|
||||
exit
|
||||
python -m http.server 8000
|
||||
curl -O https://altinarv4.softdatax.com/altenarWSDK2205.js
|
||||
ls
|
||||
mv altenarWSDK2205.js hannibalbet.js
|
||||
python -m http.server 8000
|
||||
python -m http.server 8000
|
||||
exit
|
||||
ls
|
||||
cd ../../
|
||||
ls
|
||||
ls
|
||||
c d../
|
||||
ls
|
||||
cd ../
|
||||
ls
|
||||
cd ../
|
||||
ls
|
||||
sh
|
||||
./save_new_config.sh
|
||||
gs
|
||||
exit
|
||||
exit
|
||||
whoami
|
||||
fastfetch
|
||||
clear
|
||||
uwufetch
|
||||
exit
|
||||
fastfetch
|
||||
exit
|
||||
ls -al
|
||||
exit
|
||||
ls
|
||||
exit
|
||||
ls -al
|
||||
clear
|
||||
whoami
|
||||
exit
|
||||
ls
|
||||
exit
|
||||
gs
|
||||
exit
|
||||
gs
|
||||
exit
|
||||
gs
|
||||
exit
|
||||
gs
|
||||
gb
|
||||
git branch
|
||||
exit
|
||||
gb
|
||||
exit
|
||||
i3-msg reastrt
|
||||
exit
|
||||
gb
|
||||
gss
|
||||
git status
|
||||
git fetch
|
||||
gcr
|
||||
git checkout origin/pyramid-stand-2
|
||||
git branch
|
||||
git switch -
|
||||
gb
|
||||
git checkout pyramid-stand-2
|
||||
git branch
|
||||
git log
|
||||
clear
|
||||
exit
|
||||
gs
|
||||
git add ../../../../betronic_core/gitslotpark_fetcher/
|
||||
gs
|
||||
cd ../../../../
|
||||
gs
|
||||
exit
|
||||
gs
|
||||
exit
|
||||
gs
|
||||
gss
|
||||
exit
|
||||
git pull origin staging
|
||||
mkdir -p security networking web system devops miscmv ddos-testing.org firewall.org securety.org vpn.org security/mv dns.org vpn.org xmpp.org networking/mv nginx.org webserver.org web/mv linux.org system-design.org system/mv ansible.org git.org devops/mv basic.org misc/
|
||||
ls
|
||||
sudo make clean install
|
||||
exit
|
||||
ls -al
|
||||
clear
|
||||
cd
|
||||
clear
|
||||
ls
|
||||
cat sw.sh
|
||||
exit
|
||||
sudo make clean install
|
||||
sudo make clean install
|
||||
sudo make clean install
|
||||
sudo make clean install
|
||||
exit
|
||||
exit
|
||||
sudo make clean install
|
||||
exit
|
||||
ls
|
||||
sudo make clean install
|
||||
exit
|
||||
sudo make clean install
|
||||
exit
|
||||
ls -al
|
||||
f
|
||||
ls
|
||||
exit
|
||||
exit
|
||||
exit
|
||||
cp -R /home/fs/.convig/nvim/lua/some .
|
||||
ls
|
||||
exit
|
||||
ls
|
||||
gs
|
||||
exit
|
33
roles/dots/files/home/.emacs.d/eshell/lastdir
Normal file
33
roles/dots/files/home/.emacs.d/eshell/lastdir
Normal file
@ -0,0 +1,33 @@
|
||||
/home/fs/tmp/st
|
||||
/home/fs/tmp/dwm
|
||||
~/.config/sxiv/exec
|
||||
/home/fs/.emacs.d/lib
|
||||
/home/fs/tmp/dwm
|
||||
/home/fs/Desktop/work/bet/altenar-service-back
|
||||
/home/fs/Desktop/pet/arch/roles/dots/files/home
|
||||
/home/fs/Desktop/pet/arch/roles/dots
|
||||
/home/fs/Desktop/pet/arch/roles
|
||||
/home/fs/Desktop/pet/arch
|
||||
/home/fs/Desktop/work/http/betfair/inbet
|
||||
~
|
||||
/home/fs/.emacs.d
|
||||
~/.emacs.d
|
||||
~
|
||||
/home/fs/Desktop/work/bet/ganamos-back
|
||||
/home/fs/.emacs.d/eshell
|
||||
/home/fs/.config/i3
|
||||
/home/fs/Desktop/work/worker_bet/pyramid-back
|
||||
/home/fs/Desktop/work/bet/x10tn_back/bookmakers/balance/web/handlers
|
||||
/home/fs/Desktop/work/bet/x10tn_back
|
||||
/home/fs/Desktop/work/bet/x10tn_back/bookmakers/balance/web/handlers
|
||||
/home/fs/Desktop/work/bet/royalbets-365-back-part-2/bookmakers/web
|
||||
~/Documents/docs/devops
|
||||
/home/fs/suckless/dwm
|
||||
/home/fs
|
||||
/home/fs/suckless/dwm
|
||||
~/Music/8/music
|
||||
/home/fs/suckless/dwm
|
||||
/home/fs
|
||||
~/Desktop/pet/arch/roles/dots/files/config/nvim/lua/some
|
||||
~/Desktop/pet/arch/roles/dots/files/config/nvim
|
||||
~/.config/nvim/lua
|
@ -11,9 +11,15 @@
|
||||
(setq-default flycheck-disabled-checkers '(lsp))
|
||||
(setq flycheck-python-flake8-executable "flake8")
|
||||
(setq flycheck-python-pylint-executable "pylint")
|
||||
(flycheck-add-next-checker 'python-flake8 'python-pylint)
|
||||
;; (flycheck-add-next-checker 'python-flake8 'python-pylint)
|
||||
)
|
||||
|
||||
(defun my/projectile-set-flycheck-checker ()
|
||||
(when (projectile-project-p)
|
||||
(setq-local flycheck-checker 'python-pyright))) ;; замените на нужный
|
||||
|
||||
(add-hook 'python-mode-hook #'my/projectile-set-flycheck-checker)
|
||||
|
||||
(use-package python
|
||||
:hook (python-mode . (lambda ()
|
||||
(flycheck-mode)
|
||||
|
@ -21,10 +21,18 @@
|
||||
(setq-default flycheck-disabled-checkers '(lsp))
|
||||
(setq flycheck-python-flake8-executable "flake8")
|
||||
(setq flycheck-python-pylint-executable "pylint")
|
||||
(flycheck-add-next-checker 'python-flake8 'python-pylint)
|
||||
;; (flycheck-add-next-checker 'python-flake8 'python-pylint)
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
** приоритетный линтер
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/projectile-set-flycheck-checker ()
|
||||
(when (projectile-project-p)
|
||||
(setq-local flycheck-checker 'python-pyright))) ;; замените на нужный
|
||||
|
||||
(add-hook 'python-mode-hook #'my/projectile-set-flycheck-checker)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1,7 +1,9 @@
|
||||
(defun a/nsxiv ()
|
||||
(interactive)
|
||||
(let ((current (dired-current-directory)))
|
||||
(async-shell-command (concat "nsxiv " current) "*Messages*")))
|
||||
(async-shell-command (concat "nsxiv " current) "*Messages*"))
|
||||
(other-window 1)
|
||||
(evil-quit))
|
||||
|
||||
(defun a/pcmanfm ()
|
||||
(interactive)
|
||||
|
@ -1,14 +1,14 @@
|
||||
(defun i/move-to-new-directory ()
|
||||
(interactive)
|
||||
(let ((new-directory (dired-current-directory)))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents "/tmp/curr")
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(let ((line (thing-at-point 'line t)))
|
||||
(async-shell-command (concat "mv " (replace-regexp-in-string "\n" "" line) " " new-directory)))
|
||||
(forward-line 1))
|
||||
(message "Finish"))))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents "/tmp/curr")
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(let ((line (string-trim (thing-at-point 'line t))))
|
||||
(start-process "mv-process" nil "mv" "-f" line new-directory))
|
||||
(forward-line 1))
|
||||
(message "Finish"))))
|
||||
|
||||
|
||||
(defun i/copy-to-new-directory ()
|
||||
|
2
roles/dots/files/home/.emacs.d/lib/pw.el
Normal file
2
roles/dots/files/home/.emacs.d/lib/pw.el
Normal file
@ -0,0 +1,2 @@
|
||||
(get-buffer-create "foo1")
|
||||
(with-current-buffer )
|
21
roles/dots/files/home/.emacs.d/rest.el
Normal file
21
roles/dots/files/home/.emacs.d/rest.el
Normal file
@ -0,0 +1,21 @@
|
||||
(require 'projectile)
|
||||
|
||||
(defun iii ()
|
||||
(interactive)
|
||||
(let (
|
||||
(output-buffer (get-buffer-create "*Rest Output*"))
|
||||
(command (concat "python /home/fs/bin/easy_http.py " buffer-file-name " " (projectile-project-root)))
|
||||
)
|
||||
(unless (get-buffer-window output-buffer)
|
||||
(split-window-right)
|
||||
(other-window 1)
|
||||
(switch-to-buffer output-buffer)
|
||||
(other-window -1)
|
||||
)
|
||||
(with-current-buffer output-buffer
|
||||
(js-mode)
|
||||
(erase-buffer)
|
||||
(shell-command command output-buffer)
|
||||
(goto-char (point-max)))
|
||||
(message command)
|
||||
))
|
@ -18,6 +18,3 @@
|
||||
|
||||
[diff]
|
||||
colorMoved = default
|
||||
|
||||
[color]
|
||||
ui = always
|
||||
|
@ -1,3 +1,6 @@
|
||||
Host gitlab.com
|
||||
User git
|
||||
IdentityFile ~/.ssh/work
|
||||
Host voidnest.xyz
|
||||
User git
|
||||
IdentityFile ~/.ssh/gitea
|
||||
|
@ -3,9 +3,10 @@ xrandr --auto
|
||||
xrandr -r 60.00
|
||||
xrdb ~/.Xresources
|
||||
slstatus &
|
||||
picom &
|
||||
# picom &
|
||||
flameshot &
|
||||
dunst &
|
||||
# exec i3
|
||||
exec ~/bin/startdwm
|
||||
# exec dwm
|
||||
# exec dbus-launch --exit-with-session emacs
|
||||
|
@ -4,24 +4,11 @@
|
||||
PROFILES_INI="$HOME/.mozilla/firefox/profiles.ini"
|
||||
|
||||
|
||||
# if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
|
||||
if [ "$XDG_SESSION_TYPE" == "no" ]; then
|
||||
# while read -r line; do export "$line"; done < /home/fs/scale_vars
|
||||
profiles_ini="$HOME/.mozilla/firefox/profiles.ini"
|
||||
profiles=$(grep '\[Profile' -A 2 "$profiles_ini" | grep 'Name=' | cut -d '=' -f 2)
|
||||
selected_profile=$(echo "$profiles" | wofi --dmenu --prompt "Choose Firefox Profile:")
|
||||
if [ ! "$selected_profile" = "" ]; then
|
||||
firefox -P "$selected_profile";
|
||||
fi
|
||||
else
|
||||
while read -r line; do export "$line"; done < /home/fs/scale_vars
|
||||
dpi="100"
|
||||
# profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | rofi -dmenu -dpi $dpi)
|
||||
profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | dmenu -l 15)
|
||||
dpi="125"
|
||||
profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | rofi -dmenu -dpi $dpi)
|
||||
# profile=$(grep '\[Profile' -A 2 "$PROFILES_INI" | grep "Name=" | sed 's/Name=//' | dmenu -l 15)
|
||||
if [ ! "$profile" = "" ]; then
|
||||
firefox -P "$profile";
|
||||
nice -n 15 firefox -P "$profile";
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
xrandr --output HDMI1 --mode 3840x2160 --panning 3840x2160 --rate 60 --output eDP1 --off
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ $1 == '-r' ]; then
|
||||
xrandr --output HDMI1 --mode 3840x2160 --output eDP1 --mode 1920x1080 --rate 60 --right-of HDMI1
|
||||
else
|
||||
xrandr --output HDMI1 --mode 3840x2160 --output eDP1 --mode 1920x1080 --rate 60 --below HDMI1
|
||||
fi
|
||||
# xrandr --output HDMI1 --scale 1.5x1.5 --mode 3840x2160 --output eDP1 --scale 1x1 --mode 1920x1080 --rate 60 --below HDMI1
|
||||
# xrandr --output HDMI1 --scale 2x2 --mode 3840x2160 --output eDP1 --scale 1x1 --mode 1920x1080 --rate 60 --below HDMI1
|
@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
# while read -r line; do export "$line"; done < /home/fs/scale_vars
|
||||
dpi="100"
|
||||
while read -r line; do export "$line"; done < /home/fs/scale_vars
|
||||
dpi="125"
|
||||
|
||||
if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
|
||||
rofi -modi drun -show drun Papirus -dpi $dpi -sorting-method fzf -sort -matching fuzzy -show-icons -icon-theme Papirus
|
||||
# wofi --show run
|
||||
dmenu_run -l 15
|
||||
# dmenu_run -l 15
|
||||
else
|
||||
# rofi -modi drun -show drun Papirus -dpi $dpi -sorting-method fzf -sort -matching fuzzy -show-icons -icon-theme Papirus
|
||||
dmenu_run -l 15
|
||||
rofi -modi drun -show drun Papirus -dpi $dpi -sorting-method fzf -sort -matching fuzzy -show-icons -icon-theme Papirus
|
||||
# dmenu_run -l 15
|
||||
fi
|
||||
|
@ -19,6 +19,7 @@ if sys.argv[1] == '-s':
|
||||
replace_line_in_file('/home/fs/.config/kitty/kitty.conf', 'font_size 12', 'font_size 16')
|
||||
replace_line_in_file('/home/fs/bin/rofi', 'dpi="100"', 'dpi="125"')
|
||||
replace_line_in_file('/home/fs/.config/chromium-flags.conf', '--force-device-scale-factor=1', '--force-device-scale-factor=1.25')
|
||||
replace_line_in_file('/home/fs/.config/brave-flags.conf', '--force-device-scale-factor=1', '--force-device-scale-factor=1.25')
|
||||
replace_line_in_file('/home/fs/bin/rofi', '# while read -r line; do export "$line"; done < /home/fs/scale_vars', 'while read -r line; do export "$line"; done < /home/fs/scale_vars')
|
||||
replace_line_in_file('/home/fs/bin/firefox_profiles.sh', '# while read -r line; do export "$line"; done < /home/fs/scale_vars', 'while read -r line; do export "$line"; done < /home/fs/scale_vars')
|
||||
replace_line_in_file('/home/fs/bin/firefox_profiles.sh', 'dpi="100"', 'dpi="125"')
|
||||
@ -27,6 +28,7 @@ elif sys.argv[1] == '-d':
|
||||
replace_line_in_file('/home/fs/.config/kitty/kitty.conf', 'font_size 16', 'font_size 12')
|
||||
replace_line_in_file('/home/fs/bin/rofi', 'dpi="125"', 'dpi="100"')
|
||||
replace_line_in_file('/home/fs/.config/chromium-flags.conf', '--force-device-scale-factor=1.25', '--force-device-scale-factor=1')
|
||||
replace_line_in_file('/home/fs/.config/brave-flags.conf', '--force-device-scale-factor=1.25', '--force-device-scale-factor=1')
|
||||
replace_line_in_file('/home/fs/bin/rofi', 'while read -r line; do export "$line"; done < /home/fs/scale_vars', '# while read -r line; do export "$line"; done < /home/fs/scale_vars')
|
||||
replace_line_in_file('/home/fs/bin/firefox_profiles.sh', 'while read -r line; do export "$line"; done < /home/fs/scale_vars', '# while read -r line; do export "$line"; done < /home/fs/scale_vars')
|
||||
replace_line_in_file('/home/fs/bin/firefox_profiles.sh', 'dpi="125"', 'dpi="100"')
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
xrandr --output eDP1 --mode 1920x1080 --rate 60
|
||||
xrandr --output eDP1 --mode 1920x1080 --rate 60
|
||||
|
@ -1,10 +1,13 @@
|
||||
#!/bin/python3
|
||||
import os
|
||||
import subprocess
|
||||
import sqlite3
|
||||
|
||||
user_name = os.getenv('USER')
|
||||
db_url = f'/home/{user_name}/bin/wifi_passwords.db'
|
||||
|
||||
def initialize_database():
|
||||
connection = sqlite3.connect('wifi_passwords.db')
|
||||
connection = sqlite3.connect(db_url)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute('''CREATE TABLE IF NOT EXISTS wifi_passwords
|
||||
(wifi_name TEXT PRIMARY KEY, password TEXT)''')
|
||||
@ -13,7 +16,7 @@ def initialize_database():
|
||||
|
||||
|
||||
def save_password(wifi_name, password):
|
||||
connection = sqlite3.connect('wifi_passwords.db')
|
||||
connection = sqlite3.connect(db_url)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("INSERT OR REPLACE INTO wifi_passwords (wifi_name, password) VALUES (?, ?)", (wifi_name, password))
|
||||
connection.commit()
|
||||
@ -21,7 +24,7 @@ def save_password(wifi_name, password):
|
||||
|
||||
|
||||
def get_password(wifi_name):
|
||||
connection = sqlite3.connect('wifi_passwords.db')
|
||||
connection = sqlite3.connect(db_url)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("SELECT password FROM wifi_passwords WHERE wifi_name=?", (wifi_name,))
|
||||
result = cursor.fetchone()
|
||||
@ -40,7 +43,9 @@ def get_available_wifi_list():
|
||||
|
||||
|
||||
def connect_to_wifi_by_number(wifi_list, wifi_number, password):
|
||||
command = f"nmcli device wifi connect '{selected_wifi}' password '{password}'"
|
||||
pre_command = f"nmcli connection delete '{selected_wifi}'"
|
||||
command = f"nmcli device wifi connect '{selected_wifi}' password '{password}'"
|
||||
# subprocess.run(pre_command, shell=True, check=True)
|
||||
subprocess.run(command, shell=True, check=True)
|
||||
print(f"Successfully connected to WiFi: {selected_wifi}")
|
||||
|
||||
|
@ -17,6 +17,12 @@ then
|
||||
/home/fs/vpn \
|
||||
/home/fs/suckless \
|
||||
/home/fs/.local/DBeaverData | pigz > "/home/fs/backups/$backup_name"
|
||||
|
||||
|
||||
# large_backup_name=$(date +"%m-%d")"_large_backup.tar.gz"
|
||||
# tar cf - \
|
||||
# /home/fs/Music \
|
||||
# /home/fs/Videos | pigz > "/home/fs/backups/$large_backup_name"
|
||||
fi
|
||||
|
||||
if [ $1 = "restore" ]
|
||||
|
@ -15,6 +15,7 @@ then
|
||||
/home/fs/.cache/nvim \
|
||||
/home/fs/vpn \
|
||||
/home/fs/suckless \
|
||||
/home/fs/.ssh \
|
||||
/home/fs/.local/DBeaverData | pigz > "/home/fs/backups/$backup_name"
|
||||
fi
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
#!/bin/bash
|
||||
# sh bin/main_monitor.sh
|
||||
sh bin/multi_monitors -r
|
||||
sh bin/turbo_boost.sh disable
|
||||
|
||||
if [[ "$1" == "-r" ]]; then
|
||||
sh bin/multi_monitors -r
|
||||
fi
|
||||
# sh bin/turbo_boost.sh disable
|
||||
# sh bin/pywall.py -r
|
||||
# nitrogen --restore
|
||||
emacs --bg-daemon=main
|
||||
emacs --bg-daemon=documents
|
||||
|
@ -1,45 +1,50 @@
|
||||
- name: Setup home config files
|
||||
copy:
|
||||
file:
|
||||
src: "{{ item.src }}"
|
||||
dest: "/home/{{ main_user.name }}/"
|
||||
dest: "/home/{{ main_user.name }}/{{ item.dest }}"
|
||||
owner: "{{ main_user.name }}"
|
||||
group: users
|
||||
state: link
|
||||
loop:
|
||||
- { src: "files/home/.moc" }
|
||||
- { src: "files/home/.emacs.d" }
|
||||
- { src: "files/home/.bashrc" }
|
||||
- { src: "files/home/.tmux.conf" }
|
||||
- { src: "files/home/create_backup.sh" }
|
||||
- { src: "files/home/create_hot_backup.sh" }
|
||||
- { src: "files/home/.gitconfig" }
|
||||
- { src: "files/home/.alacritty.toml" }
|
||||
- { src: "files/home/bin" }
|
||||
- { src: "files/home/.moc", dest: ".moc" }
|
||||
- { src: "files/home/.emacs.d", dest: ".emacs.d" }
|
||||
- { src: "files/home/.bashrc", dest: ".bashrc" }
|
||||
- { src: "files/home/.tmux.conf", dest: ".tmux.conf" }
|
||||
- { src: "files/home/create_backup.sh", dest: "create_backup.sh" }
|
||||
- { src: "files/home/create_hot_backup.sh", dest: "create_hot_backup.sh" }
|
||||
- { src: "files/home/.gitconfig", dest: ".gitconfig" }
|
||||
- { src: "files/home/.alacritty.toml", dest: ".alacritty.toml" }
|
||||
- { src: "files/home/bin", dest: "bin" }
|
||||
|
||||
- name: Setup .config dir
|
||||
copy:
|
||||
file:
|
||||
src: "{{ item.src }}"
|
||||
dest: "/home/{{ main_user.name }}/.config/"
|
||||
dest: "/home/{{ main_user.name }}/.config/{{ item.dest }}"
|
||||
owner: "{{ main_user.name }}"
|
||||
group: users
|
||||
state: link
|
||||
loop:
|
||||
- { src: "files/config/kitty" }
|
||||
- { src: "files/config/nvim" }
|
||||
- { src: "files/config/nsxiv" }
|
||||
- { src: "files/config/kitty", dest: "kitty" }
|
||||
- { src: "files/config/nvim", dest: "nvim" }
|
||||
- { src: "files/config/nsxiv", dest: "nsxiv" }
|
||||
|
||||
|
||||
- name: Copy pacman.conf
|
||||
copy:
|
||||
file:
|
||||
src: files/system/pacman.conf
|
||||
dest: /etc/pacman.conf
|
||||
owner: root
|
||||
group: root
|
||||
state: link
|
||||
|
||||
- name: Setup home config files
|
||||
when: display_server == 'xorg'
|
||||
copy:
|
||||
file:
|
||||
src: "{{ item.src }}"
|
||||
dest: "/home/{{ main_user.name }}/"
|
||||
owner: "{{ main_user.name }}"
|
||||
group: users
|
||||
state: link
|
||||
loop:
|
||||
- { src: "home/.xinitrc" }
|
||||
- { src: "home/.Xresources" }
|
||||
|
@ -1,291 +1,34 @@
|
||||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
#default_border none
|
||||
# default_floating_border none
|
||||
# titlebar_padding 1
|
||||
# titlebar_border_thickness 0
|
||||
|
||||
# set $menu wofi --show run
|
||||
set $menu ~/bin/rofi
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod1
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term kitty
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
# output * bg /home/fs/Pictures/nord.png fill
|
||||
output * bg /home/fs/Downloads/wp4330820-distro-wallpapers.png fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# natural_scroll enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+r mode $wofi_map
|
||||
mode "$wofi_map" {
|
||||
bindsym i exec $menu; mode "default"
|
||||
bindsym u exec ~/bin/firefox_profiles.sh; mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+e mode $emacs_map
|
||||
mode "$emacs_map" {
|
||||
bindsym e exec "emacsclient -n -q -c --socket-name=main" ; mode "default"
|
||||
bindsym o exec "emacsclient -n -q -c --socket-name=other" ; mode "default"
|
||||
bindsym h exec "emacsclient -n -q -c --socket-name=http /home/fs/Desktop/work/http/"; mode "default"
|
||||
bindsym d exec "emacsclient -n -q -c --socket-name=documents /home/fs/Documents/" ; mode "default"
|
||||
bindsym f exec "emacsclient -n -q -c --socket-name=fm /home/fs/" ; mode "default"
|
||||
bindsym p exec "emacsclient -n -q -c --socket-name=fm /home/fs/Pictures/" ; mode "default"
|
||||
bindsym v exec "emacsclient -n -q -c --socket-name=fm /home/fs/Videos/" ; mode "default"
|
||||
bindsym m exec "emacsclient -n -q -c --socket-name=music /home/fs/Music/8/" ; mode "default"
|
||||
bindsym t exec "emacsclient -n -q -c --socket-name=terminal" ; mode "default"
|
||||
|
||||
# bindsym o exec "emacsclient -n -q -c" ; mode "default"
|
||||
# bindsym h exec "emacsclient -n -q -c /home/fs/Desktop/work/http/"; mode "default"
|
||||
# bindsym d exec "emacsclient -n -q -c /home/fs/Documents/" ; mode "default"
|
||||
# bindsym f exec "emacsclient -n -q -c /home/fs/" ; mode "default"
|
||||
# bindsym p exec "emacsclient -n -q -c /home/fs/Pictures/ " ; mode "default"
|
||||
# bindsym v exec "emacsclient -n -q -c /home/fs/Videos/ " ; mode "default"
|
||||
# bindsym m exec "emacsclient -n -q -c /home/fs/Music/8/ " ; mode "default"
|
||||
# bindsym t exec "emacsclient -n -q -c" ; mode "default"
|
||||
}
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
bindsym $mod+Shift+3 move container to workspace number 3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+t layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+f floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
# bindsym $mod+r mode "resize"
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
#bar {
|
||||
# position top
|
||||
#
|
||||
# # When the status_command prints a new line to stdout, swaybar updates.
|
||||
# # The default just shows the current date and time.
|
||||
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
|
||||
#
|
||||
# colors {
|
||||
# statusline #ffffff
|
||||
# background #323232
|
||||
# inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
# }
|
||||
#}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
|
||||
# --- autostart ---
|
||||
exec swaymsg "workspace 1; exec --daemon"
|
||||
|
||||
}
|
||||
|
||||
# input type:keyboard {
|
||||
# xkb_layout us,ru
|
||||
# xkb_options grp:ctrl_alt_toggle,caps:ctrl_modifier
|
||||
# }
|
||||
|
||||
# Запуск программ
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+p exec ~/bin/screen.sh
|
||||
bindsym $mod+space exec ~/bin/change_layout.sh
|
||||
# bindsym Control+space exec sh /home/fs/bin/change_layout.sh
|
||||
set $menu ~/bin/rofi
|
||||
input type:keyboard {
|
||||
xkb_layout us,ru
|
||||
xkb_options grp:ctrl_alt_toggle,caps:ctrl_modifier,grp:alt_space_toggle
|
||||
xkb_options grp:ctrl_alt_toggle,caps:ctrl_modifier,grp:alt_space_toggle,grp:ctrl_space_toggle
|
||||
}
|
||||
|
||||
# --- bar ---
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
# close
|
||||
bindsym $mod+q kill
|
||||
|
||||
# --- custom bind ---
|
||||
# Регулировка яркости
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
|
||||
# Volume up
|
||||
# Громкость
|
||||
bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume 0 +5%"
|
||||
|
||||
# Volume down
|
||||
bindsym XF86AudioLowerVolume exec "pactl set-sink-volume 0 -5%"
|
||||
|
||||
# Mute/unmute
|
||||
bindsym XF86AudioMute exec "pactl set-sink-mute 0 toggle"
|
||||
|
||||
|
||||
# waybar,wofi,sway,grim,brightnessctl
|
||||
|
||||
bindsym $mod+p exec ~/bin/screen.sh
|
||||
# bindsym $mod+i exec "emacsclient -c"
|
||||
# Mocp
|
||||
bindsym Mod4+u exec "mocp --seek -5"
|
||||
bindsym Mod4+i exec "mocp --seek +5"
|
||||
bindsym Mod4+j exec "mocp --previous"
|
||||
@ -293,18 +36,96 @@ bindsym Mod4+k exec "mocp --next"
|
||||
bindsym Mod4+space exec "mocp --toggle-pause"
|
||||
bindsym Mod4+r exec "swaymsg reload"
|
||||
|
||||
# -- display --
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
|
||||
# Emacs
|
||||
bindsym $mod+e mode $emacs_map
|
||||
mode "$emacs_map" {
|
||||
bindsym e exec "emacsclient -n -q -c --socket-name=main" ; mode "default"
|
||||
bindsym o exec "emacsclient -n -q -c --socket-name=other" ; mode "default"
|
||||
bindsym h exec "emacsclient -n -q -c --socket-name=http /home/fs/Desktop/work/http/"; mode "default"
|
||||
bindsym d exec "emacsclient -n -q -c --socket-name=documents /home/fs/Documents/" ; mode "default"
|
||||
bindsym f exec "emacsclient -n -q -c --socket-name=fm /home/fs/" ; mode "default"
|
||||
bindsym p exec "emacsclient -n -q -c --socket-name=fm /home/fs/Pictures/" ; mode "default"
|
||||
bindsym v exec "emacsclient -n -q -c --socket-name=fm /home/fs/Videos/" ; mode "default"
|
||||
bindsym m exec "emacsclient -n -q -c --socket-name=music /home/fs/Music/8/" ; mode "default"
|
||||
bindsym t exec "emacsclient -n -q -c --socket-name=terminal" ; mode "default"
|
||||
}
|
||||
|
||||
|
||||
# --- touchpad
|
||||
# get identifier "swaymsg -t get_inputs"
|
||||
# input "1267:12410:ELAN1203:00_04F3:307A_Touchpad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
# Программы
|
||||
bindsym $mod+r mode $wofi_map
|
||||
mode "$wofi_map" {
|
||||
bindsym i exec $menu; mode "default"
|
||||
bindsym u exec ~/bin/firefox_profiles.sh; mode "default"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||
|
||||
|
||||
# Переключение окон
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
|
||||
# Переключение рабочих столов
|
||||
bindsym $mod+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
|
||||
# Перемещение окон между рабочими столами
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
bindsym $mod+Shift+3 move container to workspace number 3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
|
||||
# modes
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+t layout toggle split
|
||||
bindsym $mod+f fullscreen
|
||||
bindsym $mod+Shift+f floating toggle
|
||||
# bindsym $mod+space focus mode_toggle
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
floating_modifier $mod normal
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
}
|
||||
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
input "type:touchpad" {
|
||||
dwt enabled
|
||||
dwtp enabled
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Generated by nwg-displays on 2025-02-18 at 01:25:51. Do not edit manually.
|
||||
# Generated by nwg-displays on 2025-03-08 at 14:02:22. Do not edit manually.
|
||||
|
||||
output "eDP-1" {
|
||||
mode 1920x1080@60.004Hz
|
||||
output "HDMI-A-1" {
|
||||
mode 3840x2160@60.0Hz
|
||||
pos 0 0
|
||||
transform normal
|
||||
scale 1.0
|
||||
@ -9,3 +9,12 @@ output "eDP-1" {
|
||||
adaptive_sync off
|
||||
dpms on
|
||||
}
|
||||
output "eDP-1" {
|
||||
mode 1920x1080@60.004Hz
|
||||
pos 3840 0
|
||||
transform normal
|
||||
scale 1.0
|
||||
scale_filter nearest
|
||||
adaptive_sync off
|
||||
dpms on
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ cp /home/fs/.bashrc roles/dots/files/home/
|
||||
cp /home/fs/.gitconfig roles/dots/files/home/
|
||||
cp /home/fs/.tmux.conf roles/dots/files/home/
|
||||
cp /home/fs/.xinitrc roles/dots/files/home/
|
||||
|
||||
# rsync -av /home/fs/.moc roles/dots/files/home/
|
||||
cp /home/fs/scale_vars roles/dots/files/home/
|
||||
|
||||
@ -24,6 +25,8 @@ cp /home/fs/.ssh/config roles/dots/files/home/.ssh/
|
||||
cp /home/fs/.emacs.d/config.org roles/dots/files/home/.emacs.d/
|
||||
cp -r /home/fs/.emacs.d/lan roles/dots/files/home/.emacs.d/
|
||||
cp -r /home/fs/.emacs.d/lib roles/dots/files/home/.emacs.d/
|
||||
cp -r /home/fs/.emacs.d/eshell roles/dots/files/home/.emacs.d/
|
||||
cp -r /home/fs/.emacs.d/rest.el roles/dots/files/home/.emacs.d/
|
||||
|
||||
# ./.config
|
||||
# wayland wm
|
||||
|
Loading…
x
Reference in New Issue
Block a user