diff options
author | pryazha <pryadeiniv@mail.ru> | 2025-06-15 16:06:11 +0500 |
---|---|---|
committer | pryazha <pryadeiniv@mail.ru> | 2025-06-15 16:06:11 +0500 |
commit | 55d0510313c623a5d9070b7ddc88693a63ca5c2b (patch) | |
tree | 9d2308af32704325505f0a18e95365e37f004214 /.config | |
parent | 01180bc8d01a3511c355567ac5734cac6e132ab5 (diff) |
some scripts, bash, tmux changes
Diffstat (limited to '.config')
-rw-r--r-- | .config/.bashrc | 28 | ||||
-rw-r--r-- | .config/.emacs | 32 | ||||
-rw-r--r-- | .config/.tmux.conf | 11 | ||||
-rw-r--r-- | .config/.vimrc | 21 | ||||
-rw-r--r-- | .config/nvim/init.lua | 16 | ||||
-rw-r--r-- | .config/nvim/init.vim | 42 | ||||
-rw-r--r-- | .config/nvim/lazy-lock.json | 4 | ||||
-rw-r--r-- | .config/nvim/lua/keymaps.lua | 8 | ||||
-rw-r--r-- | .config/nvim/lua/options.lua | 19 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 25 | ||||
-rw-r--r-- | .config/vis/visrc.lua | 10 | ||||
-rw-r--r-- | .config/xorg.conf | 24 |
12 files changed, 143 insertions, 97 deletions
diff --git a/.config/.bashrc b/.config/.bashrc index b5407dc..92f836f 100644 --- a/.config/.bashrc +++ b/.config/.bashrc @@ -1,22 +1,22 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return -alias ls='ls --color=auto' -alias lt='ls -t' -alias l='ls -lha' - -PURPLE="\[$(tput setaf 5)\]" -RESET="\[$(tput sgr0)\]" - -PS1="[\u@${PURPLE}\h${RESET} \w]\n> " +blue="\[$(tput setaf 5)\]" +reset="\[$(tput sgr0)\]" +PS1="${blue}\u${reset} \w\n> " PS2=">> " -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" -fi +PATH="${HOME}/projects/dotfiles/scripts:${PATH}" + +EDITOR='nvim' +LOGDIR='~/log' -PATH="$HOME/dotfiles/scripts:$PATH" +alias log="${EDITOR} ${LOGDIR}/`date +%d_%m_%Y`" +alias nvimconfig="${EDITOR} ~/.config/nvim/init.lua" +alias weather='curl wttr.in' -if [[ -z $DISPLAY ]] && [[ $(tty) = "/dev/tty1" ]]; then - exec startx &> /dev/null +if command -v startx >/dev/null 2>&1 ; then + if [[ -z $DISPLAY ]] && [[ $(tty) = "/dev/tty1" ]]; then + exec startx &> /dev/null + fi fi diff --git a/.config/.emacs b/.config/.emacs index 8492a0b..bf680b1 100644 --- a/.config/.emacs +++ b/.config/.emacs @@ -1,31 +1,13 @@ +;; modes (menu-bar-mode 0) (tool-bar-mode 0) (scroll-bar-mode 0) +(ido-mode) +;; visual (setq inhibit-startup-screen t) +(set-default 'truncate-lines t) +(add-to-list 'default-frame-alist '(font . "Iosevka-14")) -(add-to-list 'default-frame-alist '(font . "PxPlus IBM VGA 8x16-12")) - -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(custom-enabled-themes '(apropospriate-dark)) - '(custom-safe-themes - '("f1b2de4bc88d1120782b0417fe97f97cc9ac7c5798282087d4d1d9290e3193bb" - "b6c43bb2aea78890cf6bd4a970e6e0277d2daf0075272817ea8bb53f9c6a7f0a" - "0ed3d96a506b89c1029a1ed904b11b5adcebeb2e0c16098c99c0ad95cb124729" - "b273cc6a1d492660fff886a3cae1f00d5fd2d53b55fb374a21a14afd74fdec92" - "d80952c58cf1b06d936b1392c38230b74ae1a2a6729594770762dc0779ac66b7" - "da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738" - default)) - '(package-selected-packages - '(ample-theme anti-zenburn-theme apropospriate-theme gruvbox-theme - rfc-mode))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) +;; keymaps +(keymap-global-set "C-c c" 'compile) diff --git a/.config/.tmux.conf b/.config/.tmux.conf new file mode 100644 index 0000000..88f4c46 --- /dev/null +++ b/.config/.tmux.conf @@ -0,0 +1,11 @@ +set-option -g prefix M-a +unbind-key C-b +bind-key M-a send-prefix + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' + +set -g @continuum-restore 'on' + +run '~/.tmux/plugins/tpm/tpm' diff --git a/.config/.vimrc b/.config/.vimrc index 5b07ac5..0d8bc46 100644 --- a/.config/.vimrc +++ b/.config/.vimrc @@ -1,25 +1,16 @@ "Visual -set termguicolors syntax on -hi normal guifg=#dcd7d7 guibg=#242829 -hi comment gui=italic -hi string guifg=#bf739f -set laststatus=0 let g:netrw_banner=0 "Formatting -set tabstop=4 -set shiftwidth=4 -set softtabstop=4 set textwidth=80 -set noexpandtab set nowrap set cindent set cinoptions=:0,l1,t0,g0,(0 "Functional -set incsearch -set nohlsearch +set clipboard+=unnamedplus +set nohls "Bindings let mapleader="," @@ -27,16 +18,14 @@ let mapleader="," map <leader>e :Ex<cr> map <leader>ve :vs<bar>wincmd l<bar>Ex<cr> map <leader>t :vertical rightbelow terminal<space> -map <leader>b :buffers<cr>:b<space> map <leader>q :q<cr> set makeprg=./build.sh map <leader>m :make!<cr>:vertical rightbelow copen<cr><cr>:wincmd =<cr> map <leader>n :cnext<cr> -map <leader>y "+y -map <leader>p "+p +map <leader>g :grep!<space>-rn<space><space>.<left><left>''<left> "Comments -map <leader>cm I/*<space><esc>A<space>*/<esc>0 -map <leader>cd ^dwA<backspace><backspace><backspace><esc>0 +map <leader>cm I/*<space><esc>A<space>*/<esc>0 +map <leader>cd ^dwA<backspace><backspace><backspace><esc>0 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..82326f9 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,16 @@ +require("plugins") +require("keymaps") + +--[[ +vim.cmd("colorscheme quiet") +hi normal guifg=#dcd7d7 guibg=#242829 +hi constant guifg=#dcade6 +hi character guifg=#dcade6 +hi number guifg=#dcade6 +hi boolean guifg=#dcade6 +hi float guifg=#dcade6 +hi visual guifg=#dcade6 guibg=#242829 +hi incsearch guifg=#dcade6 guibg=#242829 +hi MatchParen guifg=#dcade6 guibg=#242829 +let g:netrw_banner=0 +]] diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index 85fa69f..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,42 +0,0 @@ -"Visual -syntax off -set termguicolors -colorscheme habamax -hi normal guifg=#dcd7d7 guibg=#242829 -hi comment gui=italic -hi string guifg=#bf739f -set laststatus=0 -let g:netrw_banner=0 - -"Formatting -set tabstop=4 -set shiftwidth=4 -set softtabstop=4 -set textwidth=80 -set noexpandtab -set nowrap -set cindent -set cinoptions=:0,l1,t0,g0,(0 - -"Functional -set clipboard+=unnamedplus -set incsearch -set nohlsearch - -"Bindings -let mapleader="," - -map <leader>e :Ex<cr> -map <leader>ve :vs<bar>wincmd l<bar>Ex<cr> -map <leader>t :vertical rightbelow terminal<space> -map <leader>q :q<cr> - -set makeprg=./build.sh -map <leader>m :make!<cr>:vertical rightbelow copen<cr><cr>:wincmd =<cr> -map <leader>n :cnext<cr> - -map <leader>g :grep!<space>-rn<space><space>.<left><left>''<left> - -"Comments -map <leader>cm I/*<space><esc>A<space>*/<esc>0 -map <leader>cd ^dwA<backspace><backspace><backspace><esc>0 diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..a3dc542 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,4 @@ +{ + "fzf-lua": { "branch": "main", "commit": "8adf950093af5361621cf52208d64995b1af78b5" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" } +} diff --git a/.config/nvim/lua/keymaps.lua b/.config/nvim/lua/keymaps.lua new file mode 100644 index 0000000..c2f2e62 --- /dev/null +++ b/.config/nvim/lua/keymaps.lua @@ -0,0 +1,8 @@ +-- bindings +vim.keymap.set("n", "<leader>q", ":q<cr>") +vim.keymap.set("n", "<leader>e", ":Ex<cr>") +vim.keymap.set("n", "<leader>m", ":make!<cr>:copen<cr><cr>") +vim.keymap.set("n", "<leader>g", ":grep!<space>-rn<space><space>.<left><left>''<left>") +-- comments +vim.keymap.set("n", "<leader>cm", "I//<space><esc>^") +vim.keymap.set("n", "<leader>cd", "^dw") diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua new file mode 100644 index 0000000..5a4c4bb --- /dev/null +++ b/.config/nvim/lua/options.lua @@ -0,0 +1,19 @@ +-- visual +vim.opt.termguicolors = true +vim.cmd("syntax on") +vim.cmd("colorscheme desert") +vim.g.netrw_banner = false + +-- formatting +-- vim.opt.shiftwidth = 4 +-- vim.opt.expandtab = true +vim.opt.textwidth = 80 +vim.opt.wrap = false +vim.opt.cindent = true +vim.opt.cinoptions = ":0,l1,t0,g0,(0" + +-- functional +vim.opt.clipboard:append { "unnamedplus" } +vim.opt.hlsearch = false +vim.g.mapleader = "," +vim.opt.makeprg = "./build.sh" diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..79b5dec --- /dev/null +++ b/.config/nvim/lua/plugins.lua @@ -0,0 +1,25 @@ +-- bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +require("options") + +-- setup lazy.nvim +require("lazy").setup({ + { "ibhagwan/fzf-lua" } +}) + +vim.keymap.set("n", "<leader>f", ":FzfLua files<cr>") diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua new file mode 100644 index 0000000..05c3f1c --- /dev/null +++ b/.config/vis/visrc.lua @@ -0,0 +1,10 @@ +require('vis') + +vis.events.subscribe(vis.events.INIT, function() + -- Global configuration options +end) + +vis.events.subscribe(vis.events.WIN_OPEN, function(win) + -- Per window configuration options + vis:command('set autoindent on'); +end) diff --git a/.config/xorg.conf b/.config/xorg.conf new file mode 100644 index 0000000..f316b2e --- /dev/null +++ b/.config/xorg.conf @@ -0,0 +1,24 @@ +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "true" + Option "XkbLayout" "us,ru" + Option "XkbOptions" "grp:lctrl_lwin_toggle,caps:ctrl_modifier" + Option "AutoRepeat" "200 25" +EndSection + +Section "InputClass" + Identifier "libinput pointer catchall" + MatchIsPointer "true" + Driver "libinput" + Option "AccelProfile" "flat" +EndSection + +Section "Monitor" + Identifier "eDP" + Option "Primary" "true" +EndSection + +Section "Monitor" + Identifier "HDMI-A-0" + Option "Above" "eDP" +EndSection |