Updated scripts
This commit is contained in:
parent
6fd989a641
commit
a3ba35ab9e
@ -22,7 +22,6 @@ vim.o.undofile = true
|
|||||||
vim.o.ignorecase = true
|
vim.o.ignorecase = true
|
||||||
vim.o.smartcase = true
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
|
||||||
-- Keep signcolumn on by default
|
-- Keep signcolumn on by default
|
||||||
vim.wo.signcolumn = 'yes'
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
@ -251,57 +250,6 @@ require('lazy').setup({
|
|||||||
require("fzf-lua").setup({})
|
require("fzf-lua").setup({})
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
-- {
|
|
||||||
-- 'nvim-telescope/telescope.nvim',
|
|
||||||
-- dependencies = { 'nvim-lua/plenary.nvim' },
|
|
||||||
-- opts = function()
|
|
||||||
-- local actions = require "telescope.actions"
|
|
||||||
-- return {
|
|
||||||
-- defaults = {
|
|
||||||
-- previewer = false,
|
|
||||||
-- path_display = { "truncate" },
|
|
||||||
-- mappings = {
|
|
||||||
-- i = {
|
|
||||||
-- ["<C-n>"] = actions.cycle_history_next,
|
|
||||||
-- ["<C-p>"] = actions.cycle_history_prev,
|
|
||||||
-- ["<C-j>"] = actions.move_selection_next,
|
|
||||||
-- ["<C-k>"] = actions.move_selection_previous,
|
|
||||||
-- ["<C-l>"] = actions.select_default,
|
|
||||||
-- ["<C-c>"] = actions.close,
|
|
||||||
-- ["<C-v>"] = function(prompt_bufnr)
|
|
||||||
-- -- Use nvim-window-picker to choose the window by dynamically attaching a function
|
|
||||||
-- local action_set = require('telescope.actions.set')
|
|
||||||
-- local action_state = require('telescope.actions.state')
|
|
||||||
--
|
|
||||||
-- local picker = action_state.get_current_picker(prompt_bufnr)
|
|
||||||
-- picker.get_selection_window = function(picker, entry)
|
|
||||||
-- local picked_window_id = require('window-picker').pick_window() or
|
|
||||||
-- vim.api.nvim_get_current_win()
|
|
||||||
-- -- Unbind after using so next instance of the picker acts normally
|
|
||||||
-- picker.get_selection_window = nil
|
|
||||||
-- return picked_window_id
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- return action_set.edit(prompt_bufnr, 'edit')
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
-- n = {
|
|
||||||
-- ["q"] = actions.close,
|
|
||||||
-- ["<C-c>"] = actions.close,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- {
|
|
||||||
-- "nvim-telescope/telescope-file-browser.nvim",
|
|
||||||
-- dependencies = {
|
|
||||||
-- "nvim-telescope/telescope.nvim",
|
|
||||||
-- "nvim-lua/plenary.nvim",
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
@ -476,10 +424,6 @@ require('lazy').setup({
|
|||||||
|
|
||||||
|
|
||||||
-- GUI ------------------------------------------------------
|
-- GUI ------------------------------------------------------
|
||||||
-- {
|
|
||||||
-- 'https://github.com/fresh2dev/zellij.vim.git',
|
|
||||||
-- lazy = false,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'mrjones2014/smart-splits.nvim',
|
'mrjones2014/smart-splits.nvim',
|
||||||
@ -502,7 +446,7 @@ require('lazy').setup({
|
|||||||
sections = {
|
sections = {
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { 'mode' },
|
||||||
lualine_b = { 'branch', 'diff' },
|
lualine_b = { 'branch', 'diff' },
|
||||||
lualine_c = { 'filename' },
|
lualine_c = { 'diagnostics', 'filename' },
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
-- Lsp server name .
|
-- Lsp server name .
|
||||||
@ -835,7 +779,6 @@ require 'lspconfig'.lua_ls.setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Setup neovim lua configuration
|
-- Setup neovim lua configuration
|
||||||
-- require("telescope").load_extension "file_browser"
|
|
||||||
|
|
||||||
-- [[ Configure nvim-cmp ]]
|
-- [[ Configure nvim-cmp ]]
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
@ -942,10 +885,8 @@ cmp.setup.cmdline(':', {
|
|||||||
-- [[ Configure Treesitter ]]
|
-- [[ Configure Treesitter ]]
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'markdown', 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
|
ensure_installed = { 'markdown_inline', 'markdown', 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
|
||||||
|
auto_install = true,
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
|
||||||
auto_install = false,
|
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
@ -1019,29 +960,14 @@ vim.keymap.set('n', '<leader><leader>h', require('smart-splits').swap_buf_left,
|
|||||||
vim.keymap.set('n', '<leader><leader>j', require('smart-splits').swap_buf_down, { desc = 'Swap buffer down' })
|
vim.keymap.set('n', '<leader><leader>j', require('smart-splits').swap_buf_down, { desc = 'Swap buffer down' })
|
||||||
vim.keymap.set('n', '<leader><leader>k', require('smart-splits').swap_buf_up, { desc = 'Swap buffer up' })
|
vim.keymap.set('n', '<leader><leader>k', require('smart-splits').swap_buf_up, { desc = 'Swap buffer up' })
|
||||||
vim.keymap.set('n', '<leader><leader>l', require('smart-splits').swap_buf_right, { desc = 'Swap buffer right' })
|
vim.keymap.set('n', '<leader><leader>l', require('smart-splits').swap_buf_right, { desc = 'Swap buffer right' })
|
||||||
-- telescope
|
|
||||||
-- vim.keymap.set('n', '<leader>fo', require('telescope.builtin').oldfiles, { desc = 'Find recently opened files' })
|
|
||||||
-- vim.keymap.set('n', '<leader>ff',
|
|
||||||
-- ":lua require('telescope.builtin').find_files()<cr>",
|
|
||||||
-- { desc = 'Find files', silent = true })
|
|
||||||
-- vim.keymap.set('n', '<leader>fh',
|
|
||||||
-- ":lua require('telescope.builtin').find_files({ hidden = true})<cr>",
|
|
||||||
-- { desc = 'Find files', silent = true })
|
|
||||||
-- vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = 'Search help' })
|
|
||||||
-- vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = 'Search current word' })
|
|
||||||
-- vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = 'Search by grep' })
|
|
||||||
-- vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = 'Search diagnostics' })
|
|
||||||
--Other
|
--Other
|
||||||
|
vim.keymap.set('n', 's', ":HopWord<cr>", { desc = 'hop', silent = true })
|
||||||
vim.keymap.set('n', '<tab>', ":tabNext<cr>", { desc = 'Next tab', silent = true })
|
vim.keymap.set('n', '<tab>', ":tabNext<cr>", { desc = 'Next tab', silent = true })
|
||||||
vim.keymap.set('n', '<A-f>', ":Format<cr>", { desc = 'Format code', silent = true })
|
vim.keymap.set('n', '<A-f>', ":Format<cr>", { desc = 'Format code', silent = true })
|
||||||
-- vim.keymap.set('n', '<leader>gg', ":LazyGitCurrentFile<cr>", { desc = 'Format code', silent = true })
|
|
||||||
vim.keymap.set('n', '<C-m>', ":make<cr>", { desc = 'Format code', silent = true })
|
vim.keymap.set('n', '<C-m>', ":make<cr>", { desc = 'Format code', silent = true })
|
||||||
vim.keymap.set('n', '<C-n>', ":make clean<cr>", { desc = 'Format code', silent = true })
|
vim.keymap.set('n', '<C-n>', ":make clean<cr>", { desc = 'Format code', silent = true })
|
||||||
vim.keymap.set('n', '<C-s>', ":write<cr>", { desc = 'Save', silent = true })
|
vim.keymap.set('n', '<C-s>', ":write<cr>", { desc = 'Save', silent = true })
|
||||||
vim.keymap.set('n', '<C-q>', ":quit<cr>", { desc = 'Quit', silent = true })
|
vim.keymap.set('n', '<C-q>', ":quit<cr>", { desc = 'Quit', silent = true })
|
||||||
vim.keymap.set('n', '<leader>n', ":tabnew<cr>", { desc = 'Format code', silent = true })
|
|
||||||
vim.keymap.set('n', '<leader>c', ":tabclose<cr>", { desc = 'Format code', silent = true })
|
|
||||||
vim.keymap.set('n', '<leader>e', ":Neotree filesystem reveal float toggle<cr>", { desc = 'File explorer', silent = true })
|
vim.keymap.set('n', '<leader>e', ":Neotree filesystem reveal float toggle<cr>", { desc = 'File explorer', silent = true })
|
||||||
vim.keymap.set('n', 's', ":HopWord<cr>", { desc = 'hop', silent = true })
|
vim.keymap.set('n', '<leader>d', ":Trouble diagnostics toggle<cr>", { desc = 'Diagnostic view', silent = true })
|
||||||
vim.keymap.set('n', '<leader>t', ":Trouble diagnostics toggle<cr>", { desc = 'Diagnostic view', silent = true })
|
|
||||||
vim.keymap.set('n', '<leader>f', ":FzfLua files<cr>", { desc = 'Find file', silent = true })
|
vim.keymap.set('n', '<leader>f', ":FzfLua files<cr>", { desc = 'Find file', silent = true })
|
||||||
|
|||||||
30
tmux.conf
30
tmux.conf
@ -25,20 +25,26 @@ bind -n C-h run "($is_vim && tmux send-keys C-h) || tmux select-pane -L"
|
|||||||
bind -n C-j run "($is_vim && tmux send-keys C-j) || ($is_fzf && tmux send-keys C-j) || tmux select-pane -D"
|
bind -n C-j run "($is_vim && tmux send-keys C-j) || ($is_fzf && tmux send-keys C-j) || tmux select-pane -D"
|
||||||
bind -n C-k run "($is_vim && tmux send-keys C-k) || ($is_fzf && tmux send-keys C-k) || tmux select-pane -U"
|
bind -n C-k run "($is_vim && tmux send-keys C-k) || ($is_fzf && tmux send-keys C-k) || tmux select-pane -U"
|
||||||
bind -n C-l run "($is_vim && tmux send-keys C-l) || tmux select-pane -R"
|
bind -n C-l run "($is_vim && tmux send-keys C-l) || tmux select-pane -R"
|
||||||
bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
# bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
||||||
|
|
||||||
bind -n M-h run "($is_vim && tmux send-keys M-h) || tmux resize-pane -L 1"
|
bind -n M-h run "($is_vim && tmux send-keys M-h) || tmux resize-pane -L 1"
|
||||||
bind -n M-j run "($is_vim && tmux send-keys M-j) || tmux resize-pane -D 1"
|
bind -n M-j run "($is_vim && tmux send-keys M-j) || tmux resize-pane -D 1"
|
||||||
bind -n M-k run "($is_vim && tmux send-keys M-k) || tmux resize-pane -U 1"
|
bind -n M-k run "($is_vim && tmux send-keys M-k) || tmux resize-pane -U 1"
|
||||||
bind -n M-l run "($is_vim && tmux send-keys M-l) || tmux resize-pane -R 1"
|
bind -n M-l run "($is_vim && tmux send-keys M-l) || tmux resize-pane -R 1"
|
||||||
|
|
||||||
# Split pane bindings
|
bind -n M-1 select-window -t 1
|
||||||
bind '"' split-window -v -c "#{pane_current_path}"
|
bind -n M-2 select-window -t 2
|
||||||
bind % split-window -h -c "#{pane_current_path}"
|
bind -n M-3 select-window -t 3
|
||||||
|
bind -n M-4 select-window -t 4
|
||||||
|
bind -n M-5 select-window -t 5
|
||||||
|
bind -n C-M-n select-window -n
|
||||||
|
bind -n C-M-c new-window
|
||||||
|
bind -n C-M-x confirm kill-pane
|
||||||
|
bind -n C-M-h split-window -v -c "#{pane_current_path}"
|
||||||
|
bind -n C-M-v split-window -h -c "#{pane_current_path}"
|
||||||
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
||||||
|
|
||||||
set-option -g status-position bottom
|
set-option -g status-position top
|
||||||
set-option -g default-terminal "tmux-256color"
|
set-option -g default-terminal "tmux-256color"
|
||||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||||
set-option -sg escape-time 1
|
set-option -sg escape-time 1
|
||||||
@ -47,18 +53,16 @@ set-option -g focus-events on
|
|||||||
# set -g allow-passthrough on
|
# set -g allow-passthrough on
|
||||||
# set -g extended-keys on
|
# set -g extended-keys on
|
||||||
set -g status-interval 2
|
set -g status-interval 2
|
||||||
set -g status-bg "#0c0c0c"
|
set -g status-bg "#303030"
|
||||||
set -g status-fg "#6c6c6c"
|
set -g status-fg "#c6c6c6"
|
||||||
set -g status-left ''
|
set -g status-left ''
|
||||||
set -g status-right '| %H:%M | %d-%b-%Y '
|
set -g status-right '#[fg=#87afd7,bg=#303030]#[fg=#c6c6c6,bg=#303030] #{pane_current_path} #[bg=#87afd7,fg=#000000] %d-%b-%Y %H:%M '
|
||||||
# set -g status-right '#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load -g 0 --interval 2) | %H:%M | %d-%b-%Y'
|
|
||||||
set -g status-right-length 100
|
|
||||||
|
|
||||||
# Use normal and bright monochrome colors to show a tab line on the left.
|
# Use normal and bright monochrome colors to show a tab line on the left.
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
set-window-option -g window-status-separator ''
|
set-window-option -g window-status-separator ''
|
||||||
set-window-option -g window-status-format '#[bg=#0c0c0c,fg=#6c6c6c] #I #W '
|
set-window-option -g window-status-format '#[bg=#303030,fg=#c6c6c6] #I '
|
||||||
set-window-option -g window-status-current-format '#[bg=#0c0c0c,fg=#b0b0b0] #I #W '
|
set-window-option -g window-status-current-format '#[bg=#87afd7,fg=#000000] #I '
|
||||||
|
|
||||||
# Switching panes should change the foreground color but not border colors.
|
# Switching panes should change the foreground color but not border colors.
|
||||||
set -g window-style 'bg=default,fg=#c6c6c6'
|
set -g window-style 'bg=default,fg=#c6c6c6'
|
||||||
|
|||||||
11
update.sh
11
update.sh
@ -227,8 +227,11 @@ if [ $DESKTOP == "yes" ]; then
|
|||||||
sudo apt install -y flatpak
|
sudo apt install -y flatpak
|
||||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
printf -- '\033[33m Installing Visual Code\n\033[37m'
|
printf -- '\033[33m Installing Flatseal\n\033[37m'
|
||||||
sudo snap install --classic code
|
flatpak install -y flathub com.github.tchx84.Flatseal
|
||||||
|
|
||||||
|
printf -- '\033[33m Installing Krita\n\033[37m'
|
||||||
|
flatpak install -y flathub org.kde.krita
|
||||||
|
|
||||||
printf -- '\033[33m Installing KiCad\n\033[37m'
|
printf -- '\033[33m Installing KiCad\n\033[37m'
|
||||||
flatpak install -y flathub org.kicad.KiCad
|
flatpak install -y flathub org.kicad.KiCad
|
||||||
@ -242,6 +245,10 @@ if [ $DESKTOP == "yes" ]; then
|
|||||||
printf -- '\033[33m Installing DrawIo\n\033[37m'
|
printf -- '\033[33m Installing DrawIo\n\033[37m'
|
||||||
flatpak install -y flathub com.jgraph.drawio.desktop
|
flatpak install -y flathub com.jgraph.drawio.desktop
|
||||||
|
|
||||||
|
# Install VSCode
|
||||||
|
printf -- '\033[33m Installing VSCode\n\033[37m'
|
||||||
|
sudo snap install --classic code
|
||||||
|
|
||||||
# Install gnome-shell-extension-manager
|
# Install gnome-shell-extension-manager
|
||||||
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
|
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
|
||||||
sudo apt install -y gnome-shell-extension-manager
|
sudo apt install -y gnome-shell-extension-manager
|
||||||
|
|||||||
@ -9,6 +9,8 @@ end)
|
|||||||
|
|
||||||
local config = {}
|
local config = {}
|
||||||
|
|
||||||
|
-- config.window_decorations = "RESIZE"
|
||||||
|
config.enable_wayland = false
|
||||||
config.keys = {
|
config.keys = {
|
||||||
{
|
{
|
||||||
key = 'n',
|
key = 'n',
|
||||||
@ -53,8 +55,8 @@ config.colors = {
|
|||||||
'#afd787',
|
'#afd787',
|
||||||
'#d7af5f',
|
'#d7af5f',
|
||||||
'#87afd7',
|
'#87afd7',
|
||||||
'#87afd7',
|
|
||||||
'#d7d7af',
|
'#d7d7af',
|
||||||
|
'#a0a0a0',
|
||||||
'#eeeeee',
|
'#eeeeee',
|
||||||
},
|
},
|
||||||
brights = {
|
brights = {
|
||||||
@ -63,8 +65,8 @@ config.colors = {
|
|||||||
'#afd787',
|
'#afd787',
|
||||||
'#d7af5f',
|
'#d7af5f',
|
||||||
'#87afd7',
|
'#87afd7',
|
||||||
'#87afd7',
|
|
||||||
'#d7d7af',
|
'#d7d7af',
|
||||||
|
'#a0a0a0',
|
||||||
'#eeeeee',
|
'#eeeeee',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user