From b3fe0ddef45f592200b4e50da4a7cd1ed3ccc142 Mon Sep 17 00:00:00 2001 From: Vova Potiichuk Date: Sun, 15 Sep 2024 14:23:37 +0300 Subject: [PATCH] feat: fedora version --- .zsh_history | 8 ++++ README.md | 6 +++ fzf_tmux_sessions/sh/functions.sh | 8 +++- install.conf.yaml | 2 +- kitty.conf | 8 ++-- nvim/lua/init.lua | 2 +- nvim/lua/setup/git.lua | 67 +++++++++++++++++-------------- nvim/lua/setup/plugins.lua | 7 +++- teamocil/dotfiles.yml | 2 +- teamocil/expert-portal.yml | 8 ++-- teamocil/surveys.yml | 14 +++---- tmux.conf | 4 +- zsh/fzf.sh | 8 +--- zshrc | 14 ++++--- 14 files changed, 92 insertions(+), 66 deletions(-) diff --git a/.zsh_history b/.zsh_history index c28ec89..1d6ae16 100644 --- a/.zsh_history +++ b/.zsh_history @@ -10081,3 +10081,11 @@ brew list : 1679578406:0;tmux --help : 1679578421:0;tmux -V : 1679578428:0;exit +: 1721110304:0;vi +: 1721110308:0;nvim +: 1721110326:0;tmux +: 1721110388:0;nvim +: 1721110442:0;tmux +: 1721110606:0;nvim +: 1721110750:0;source ~/.tmux.conf +: 1721110754:0;exit diff --git a/README.md b/README.md index 27c0d4a..52e1118 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # dotfiles my config files :) + +TODO: +add fonts +add language servers by default via asdf ? +teamocil +theme for kitty diff --git a/fzf_tmux_sessions/sh/functions.sh b/fzf_tmux_sessions/sh/functions.sh index 6402ca3..872742e 100755 --- a/fzf_tmux_sessions/sh/functions.sh +++ b/fzf_tmux_sessions/sh/functions.sh @@ -1,3 +1,7 @@ +#!/bin/bash + +PATH=$PATH:$HOME/bin + function list_tmux_sessions { # tmux list-sessions | sed -E 's/:.*$//' | awk \"/^[a-zA-Z]/\" | grep -v "$(tmux display-message -p '#S')" tmux list-sessions | sed -E 's/:.*$//' | awk \"/^[a-zA-Z]/\" @@ -24,7 +28,7 @@ function list_tmux_session_processes { export -f list_tmux_session_processes function list_available_teamocil_sessions { - files=$(ls $HOME/.config/teamocil/) + files=$(ls $HOME/.teamocil/) tmux_sessions_array=$(list_tmux_sessions) for file in $files; do @@ -91,7 +95,7 @@ function list_tmux_windows { export -f list_tmux_windows export ENV_FILE=$HOME/log.sh -export TEAMOCIL_FOLDER=$HOME/.config/teamocil/ +export TEAMOCIL_FOLDER=$HOME/.teamocil/ export SESSIONS_HEADER="Press Ctrl-T for switch to processes / Ctrl-D for kill session" export SESSIONS_PROMPT="sessions> " diff --git a/install.conf.yaml b/install.conf.yaml index 0360a37..19239e8 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -29,7 +29,7 @@ force: true path: bin/* # tmux windows management - ~/teamocil/: + ~/.teamocil/: glob: true force: true path: teamocil/* diff --git a/kitty.conf b/kitty.conf index c5bd49f..af3b480 100644 --- a/kitty.conf +++ b/kitty.conf @@ -1,14 +1,16 @@ # vim:fileencoding=utf-8:foldmethod=marker -font_family JetBrainsMono Nerd Font Medium +font_family JetBrainsMono Nerd Font Bold bold_font JetBrainsMono Nerd Font Bold italic_font JetBrainsMono Nerd Font Italic bold_italic_font JetBrainsMono Nerd Font Bold Italic -font_size 11 -modify_font cell_height 11px +font_size 14 +modify_font cell_height 12px cursor_text_color background cursor_blink_interval 0 +hide_window_decorations yes + include ./theme.conf diff --git a/nvim/lua/init.lua b/nvim/lua/init.lua index ec58ef2..cc7260c 100644 --- a/nvim/lua/init.lua +++ b/nvim/lua/init.lua @@ -63,4 +63,4 @@ require("close_buffers").setup { } require("trouble").setup {} -vim.api.nvim_command "Dotenv ~/Desktop/projects/own/dotfiles" +-- vim.api.nvim_command "Dotenv ~/Desktop/projects/own/dotfiles" diff --git a/nvim/lua/setup/git.lua b/nvim/lua/setup/git.lua index 4e451c0..741559e 100644 --- a/nvim/lua/setup/git.lua +++ b/nvim/lua/setup/git.lua @@ -15,39 +15,44 @@ vim.g.conflict_marker_end = "^>>>>>>> .*$" gitsigns.setup { signs = { - add = { - hl = "GitSignsAdd", - text = "▎", - numhl = "GitSignsAddNr", - linehl = "GitSignsAddLn", - }, - change = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - delete = { - hl = "GitSignsDelete", - text = "契", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - topdelete = { - hl = "GitSignsDelete", - text = "契", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - changedelete = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, }, - current_line_blame = true, + signs_staged = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signs_staged_enable = true, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + follow_files = true + }, + auto_attach = true, + attach_to_untracked = false, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + virt_text_priority = 100, + }, + current_line_blame_formatter = ', - ', sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) on_attach = function(bufnr) local function map(mode, lhs, rhs, opts) opts = vim.tbl_extend("force", { noremap = true, silent = true }, opts or {}) diff --git a/nvim/lua/setup/plugins.lua b/nvim/lua/setup/plugins.lua index 7b38c86..f8191bc 100644 --- a/nvim/lua/setup/plugins.lua +++ b/nvim/lua/setup/plugins.lua @@ -58,7 +58,7 @@ require("lazy").setup { -- "williamboman/mason.nvim", -- "williamboman/mason-lspconfig.nvim", -- Icons - "kyazdani42/nvim-web-devicons", + "nvim-tree/nvim-web-devicons", -- Another "tpope/vim-surround", { "mg979/vim-visual-multi", branch = "master" }, @@ -73,7 +73,7 @@ require("lazy").setup { "beauwilliams/focus.nvim", "nvim-lualine/lualine.nvim", "Raimondi/delimitMate", - "max397574/better-escape.nvim", + "max397576/better-escape.nvim", "NvChad/nvim-colorizer.lua", "L3MON4D3/LuaSnip", "kazhala/close-buffers.nvim", @@ -87,4 +87,7 @@ require("lazy").setup { -- {dir = "../custom-plugins/diff-conflict-parts/lua/init.lua"} } +require'nvim-tree'.setup {} +require'nvim-web-devicons'.setup{} + -- vim.opt.rtp:prepend "~/.config/nvim/lua/plugins/diff_conflict_parts" diff --git a/teamocil/dotfiles.yml b/teamocil/dotfiles.yml index c84a2d7..c3369cb 100644 --- a/teamocil/dotfiles.yml +++ b/teamocil/dotfiles.yml @@ -1,7 +1,7 @@ name: dotfiles windows: - name: dotfiles - root: ~/Desktop/projects/own/dotfiles + root: ~/projects/dotfiles layout: tiled panes: - commands: diff --git a/teamocil/expert-portal.yml b/teamocil/expert-portal.yml index 7a9c3aa..b597be3 100644 --- a/teamocil/expert-portal.yml +++ b/teamocil/expert-portal.yml @@ -1,14 +1,14 @@ name: expert-portal windows: - name: backend - root: ~/Desktop/projects/prosapient/expert-portal + root: ~/projects/expert-portal layout: tiled panes: - - source bin/activate && cd backend/src && python manage.py runserver - - docker-compose --file expert-portal.docker-compose.yml up database + - docker compose up db redis + - docker compose run --service-ports backend python src/manage.py runserver 0.0.0.0:8000 - cd frontend && pnpm start - name: frontend - root: ~/Desktop/projects/prosapient/expert-portal/frontend + root: ~/projects/expert-portal/frontend layout: tiled panes: - commands: diff --git a/teamocil/surveys.yml b/teamocil/surveys.yml index 9d98a69..f3abe15 100644 --- a/teamocil/surveys.yml +++ b/teamocil/surveys.yml @@ -1,40 +1,40 @@ name: surveys windows: - name: panels-ps-wow - root: ~/Desktop/projects/prosapient/survey-panels/ + root: ~/projects/survey-panels/ layout: tiled panes: # - docker-compose up # - psql -d survey_panels -U postgres -h 0.0.0.0 - name: datatool-ps - root: ~/Desktop/projects/prosapient/survey-datatool/ + root: ~/projects/survey-datatool/ layout: tiled panes: - - cd backend && docker-compose up + - cd backend && docker compose up - cd backend && pipenv --python 3.14.0 && pipenv run gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:4000 - name: facade-ps - root: ~/Desktop/projects/prosapient/survey-facade/ + root: ~/projects/survey-facade/ layout: tiled panes: - docker-compose up - cd backend && pipenv --python 3.14.0 && pipenv run python src/manage.py runserver 0.0.0.0:8000 - cd frontend && npm run dev - name: builder-ps - root: ~/Desktop/projects/prosapient/survey-builder/ + root: ~/projects/survey-builder/ layout: tiled panes: - docker-compose up - pipenv --python 3.14.0 && pipenv run gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8001 - psql -d survey_builder -U postgres -h 0.0.0.0 -p 5433 - name: datatool - root: ~/Desktop/projects/prosapient/survey-datatool/frontend/ + root: ~/projects/survey-datatool/frontend/ layout: tiled panes: - commands: - vi focus: true - name: facade - root: ~/Desktop/projects/prosapient/survey-facade/frontend/ + root: ~/projects/survey-facade/frontend/ layout: tiled panes: - commands: diff --git a/tmux.conf b/tmux.conf index b30226f..47ae381 100644 --- a/tmux.conf +++ b/tmux.conf @@ -31,8 +31,8 @@ bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" # Split window and fix path for tmux -bind v split-window -h -c "#{pane_current_path}" -p 35 -bind s split-window -v -c "#{pane_current_path}" -p 30 +bind v split-window -h -c "#{pane_current_path}" -l 68 +bind s split-window -v -c "#{pane_current_path}" -l 11 bind f display-popup -w 75% -h 50% -E "~/.config/fzf_tmux_sessions/bin/fzf_tmux_sessions.sh" bind 0 switch-client -l diff --git a/zsh/fzf.sh b/zsh/fzf.sh index 4d7c977..8f6e2c3 100644 --- a/zsh/fzf.sh +++ b/zsh/fzf.sh @@ -4,10 +4,6 @@ if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then export PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin" fi -# Auto-completion -# --------------- -[[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.zsh" 2> /dev/null - # Settings export FZF_DEFAULT_COMMAND='ag --hidden --ignore node_modules -g ""' export FZF_CTRL_T_COMMAND=$FZF_DEFAULT_COMMAND @@ -16,6 +12,4 @@ export FZF_DEFAULT_OPTS="--height 80% --color=bg+:#eee8d5,fg+:-1,gutter:-1" export FZF_CTRL_T_OPTS="--delimiter '/' --nth=-1 $FZF_HIGHLIGHT_PREVIEW_OPTS" export BAT_THEME="Solarized (light)" -# Key bindings -# ------------ -source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh" +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh diff --git a/zshrc b/zshrc index f23f8dd..5b5b66a 100644 --- a/zshrc +++ b/zshrc @@ -25,10 +25,10 @@ alias code="nvim" ZSH_THEME="geoffgarside" ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=12' -plugins=(git zsh-autosuggestions web-search dirhistory) +plugins=(git web-search dirhistory asdf) export ASDF_DIR=$HOME/.asdf/ -export CARGO_DIR=$HOME/.cargo/ +# export CARGO_DIR=$HOME/.cargo/ export ZSH_DIR=$HOME/.oh-my-zsh/ # export DIRENV_LOG_FORMAT= @@ -36,17 +36,21 @@ export EDITOR=nvim export VISUAL="$EDITOR" export LUA_PATH=~/nvim/lua/?.lua -export PATH=/opt/homebrew/opt/postgresql@15/bin:$HOME/.config/bin:/opt/homebrew/bin:$HOME/.iex-history:$HOME/elixir_ls:$PATH +export PATH=/opt/homebrew/opt/postgresql@15/bin:$HOME/.config/bin:/opt/homebrew/bin:$HOME/.iex-history:$HOME/elixir_ls:$HOME/bin:$PATH eval "$(direnv hook zsh)" source $ZSH_DIR/oh-my-zsh.sh source $ASDF_DIR/asdf.sh -source $CARGO_DIR/env -source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +# source $CARGO_DIR/env for file in $HOME/.config/zsh/*; do [ -f $file ] && source "$file" done setopt share_history + +alias kitty=~/.local/kitty.app/bin/kitty +source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +export DD_REMOTE_CONFIGURATION_ENABLED=true