Compare commits

..

24 Commits

Author SHA1 Message Date
42b683b62b cleanup 2025-03-27 09:10:04 -04:00
30e7cf3d02 nvim flutter 2025-03-26 14:36:31 -04:00
b0296177f6 added flutter nvim config and folder to alias 2025-03-26 14:36:31 -04:00
d1c391a7ec added flutter nvim config and folder to alias 2025-03-26 14:36:31 -04:00
ca37a74180 changed nvim setup 2025-03-26 14:36:31 -04:00
19f6c5d5d2 omz load times 2025-03-26 14:36:31 -04:00
550866878e zsh shortcut and fzf 2025-03-24 14:54:55 -04:00
434d371c57 Merge remote-tracking branch 'origin/master' 2024-03-18 15:13:03 -04:00
d509b8a159 quarto config 2024-03-18 15:11:23 -04:00
446ec92655 fetch from all 2024-03-18 15:11:09 -04:00
805f2d06bb alias and zsh startup optimization 2024-03-18 14:56:28 -04:00
801d97d217 navigation 2024-03-18 14:56:07 -04:00
1cc9378eca merged configs 2024-02-25 14:31:15 -05:00
03ce8091f0 obsidian in nvim 2024-02-13 04:55:51 -05:00
e8875ab86b pomodoro 2024-02-11 01:06:41 -05:00
6d0ec8559b QoL fix 2024-02-10 15:53:14 -05:00
1ca0bb9011 updated keyboard layout 2024-02-10 15:37:47 -05:00
837a341c0d clangd encoding fix 2024-02-05 15:16:19 -05:00
de54ccfc01 updated navigation 2024-02-05 15:15:39 -05:00
9aec495a30 bug fixes 2024-02-05 15:13:27 -05:00
05e2f3ea8d more tmux and vim navigation and color 2024-02-03 21:28:55 -05:00
7325ef4410 path stuff 2024-02-03 18:11:49 -05:00
caf3c2a681 tmux nav and statusbar fixes 2024-02-03 18:11:25 -05:00
5a4dd97777 nvim undotree and diffview 2024-02-03 18:07:53 -05:00
13 changed files with 508 additions and 243 deletions

View File

@@ -1,3 +1,31 @@
# Complex aliasses
## Open notes folder in nvim then return
function notes() { cd $HOME/Notes; nvim; cd -; };
function sb() { cd $HOME/second-brain/; git pull; nvim; git add .; git commit; git push; cd -; };
## Open work folder with fuzzy finder
function work() {
work_dirs=( "$HOME/clones" "$HOME/sandbox" "$HOME/TA/" )
work_dirs=( $(find $work_dirs -maxdepth 0 -type d 2> /dev/null) )
goto=""
if [ ! -z $1 ]; then
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf -f $1)
fi
if [ -z "$goto" -o $(wc -l <<< "$goto") -ne 1 ]; then
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf --query=$1 --preview "tree -C -L 2 {}")
fi
[ -z $goto ] && return
if [ -z $TMUX ]; then
tmux new -A -s "$(basename -- $goto)" -c "$goto"
else
tmux new -d -s "$(basename -- $goto)" -c "$goto"
tmux switch-client -t "$(basename -- $goto | tr . _)"
fi
}
# simple
alias clj='rlwrap java -cp ~/Clojure/clojure-1.8.0.jar clojure.main'
alias ll='ls -l'
alias la='ls -A'
@@ -7,34 +35,13 @@ alias cdclip="cd \$(xclip -o -selection clipboard)"
alias clipi='xclip -i -selection clipboard'
alias clipo='xclip -o -selection clipboard'
alias ssh-agent='ssh-agent -t 1h'
alias ssh-home='ssh home-server'
alias tmh='ssh home-server -t "tmux new -A -s sys"'
alias tm='tmux new -A -s '
alias tms='tmux new -A -s sys'
alias hsfs='sshfs andrei@home-server:/utility /hsfs'
alias uhsfs='sudo umount /hsfs'
alias saa='eval $(ssh-agent) && ssh-add'
alias tm='tmux new -A'
alias exfs='sudo zpool import external'
alias uexfs='sudo zpool export external'
alias ta-media='rsync -avr /home/andrei/CSCI_4160/ home-server:/home/andrei/backups/school/TA/CSCI_4160_w19;'
alias ta-web='rsync -avr /home/andrei/CSCI_3230/ home-server:/home/andrei/backups/school/TA/CSCI_3230_w19;'
alias photo='rsync -avr /home/andrei/Pictures/* home-server:/utility/Photos/XPS_2018_VACATION/ --exclude="*_CR2_embedded.jpg"'
alias photo-local='rsync -avr ~/Pictures/* /media/andrei/External/Photos --exclude="*_CR2_embedded.jpg"'
alias socks='ssh -D 8081 -C -q -N home-server'
alias gmonitor='while [ true ] ; do nvidia-smi; nvidia-settings -q gpucoretemp | grep gpu; sensors| grep CPU; sleep 1; clear; done'
alias saa='ssh-agent && ssh-add'
alias gssh='gcloud compute ssh'
alias gc='gcloud compute'
alias gci='gcloud compute instances'
alias gcls='gcloud compute instances list'
alias gcstart='gcloud compute instances start'
alias gcstop='gcloud compute instances stop'
alias gcstopall="gcls | grep RUNNING | awk '{print \$1}' | xargs -I{} gcloud compute instances stop {}"
alias gct='gcloud compute tpus'
alias gctls='gcloud compute tpus list'
alias gctstart='gcloud compute tpus start'
alias gctstop='gcloud compute tpus stop'
alias code='code-oss'
alias tf-docker='docker run --runtime=nvidia -it --rm -p 8888:8888 -v $PWD:/tf/local andrei/dev'
alias conda-activate='source /opt/anaconda/bin/activate'
alias conda-deactivete='source /opt/anaconda/bin/deactivate'
alias venv='python -m venv'
@@ -44,4 +51,4 @@ alias dotvenv='source .venv/bin/activate'
alias todo='rusty-tasks'
alias ccat='bat'
alias we='watchexec'
alias netcheck='ping 8.8.8.8'

1
.config/nvim Submodule

Submodule .config/nvim added at a54d69c808

View File

@@ -13,10 +13,10 @@
d = diff
dc = diff -cached
lol = log --decorate --pretty=oneline --abbrev-commit
lg = log --pretty=format:'%C(auto) %h,%C(green) \"%s\"%Creset, %aN,%C(blue) %cD'
lg = "log --pretty=format:'%C(auto) %h,%C(green) \"%s\"%Creset, %aN,%C(blue) %cD'"
[core]
editor = vim
editor = nvim
autocrlf = input
[init]
defaultBranch = main
@@ -26,3 +26,5 @@
keepBackup = false
[mergetool "nvim"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[fetch]
all = true

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule ".config/nvim"]
path = .config/nvim
url = git@github.com:andrei-stoica/kickstart.nvim.git
branch = custom

View File

@@ -73,8 +73,8 @@
"KC_F",
"KC_G",
"KC_LEFT",
"KC_UP",
"KC_DOWN",
"KC_UP",
"KC_RGHT",
"KC_QUOT",
"KC_EQL",
@@ -123,8 +123,8 @@
"KC_F",
"KC_G",
"KC_HOME",
"KC_PGUP",
"KC_PGDN",
"KC_PGUP",
"KC_END",
"KC_F12",
"KC_ENT",
@@ -173,8 +173,8 @@
"KC_F",
"KC_G",
"KC_MPRV",
"KC_VOLU",
"KC_VOLD",
"KC_VOLU",
"KC_MNXT",
"KC_MUTE",
"KC_MPLY",

View File

@@ -14,6 +14,7 @@ local servers = {
"rust_analyzer",
"pyright",
"grammarly",
"marksman",
}
for _, lsp in ipairs(servers) do
@@ -23,5 +24,9 @@ for _, lsp in ipairs(servers) do
})
end
--
-- lspconfig.pyright.setup { blabla}
lspconfig["clangd"].setup({
on_attach = on_attach,
capabilities = {
offsetEncoding = { "utf-16" },
},
})

View File

@@ -0,0 +1,72 @@
local desc = require('utils').plugin_keymap_desc('ufo')
-- Custom fold text handler for ufo showing line count folded
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (' 󰁂 %d '):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, {chunkText, hlGroup})
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, {suffix, 'MoreMsg'})
return newVirtText
end
return {
{
'luukvbaal/statuscol.nvim',
config = function()
local builtin = require('statuscol.builtin')
require('statuscol').setup({
segments = {
{text = {builtin.foldfunc}, click = 'v:lua.ScFa'},
{text = {' %s'}, click = 'v:lua.ScSa'},
{text = {builtin.lnumfunc, ' '}, condition = {true, builtin.not_empty}, click = 'v:lua.ScLa'},
},
})
end,
},
{
'kevinhwang91/nvim-ufo',
dependencies = {'kevinhwang91/promise-async'},
opts = {
fold_virt_text_handler = handler,
provider_selector = function(bufnr, filetype, buftype)
return {'treesitter', 'indent'}
end,
},
config = function(_, opts)
local ufo = require('ufo')
ufo.setup(opts)
vim.keymap.set('n', 'zR', ufo.openAllFolds, {desc = desc('Open all folds')})
vim.keymap.set('n', 'zM', ufo.closeAllFolds, {desc = desc('Close all folds')})
vim.keymap.set('n', 'K', function()
local winid = ufo.peekFoldedLinesUnderCursor(true)
if not winid then
vim.lsp.buf.hover()
end
end, {desc = 'LSP: Show hover documentation and folded code'})
end
},
}

View File

@@ -2,17 +2,28 @@ local M = {}
M.treesitter = {
ensure_installed = {
"vim",
"lua",
"html",
"css",
"javascript",
"typescript",
"python",
"tsx",
"c",
"javascript",
"json",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"query",
"regex",
"vim",
"vimdoc",
"bash",
"html",
"css",
"javascript",
"yaml",
"julia",
"r",
},
indent = {
enable = true,
@@ -41,7 +52,6 @@ M.mason = {
"jedi_language_server",
"docker_compose_language_service",
"dockerls",
},
@@ -64,7 +74,7 @@ M.nvimtree = {
}
M.cmp = function(_, opts)
local cmp = require "cmp"
local cmp = require("cmp")
opts.experimental = {
ghost_text = true,
}
@@ -76,17 +86,17 @@ M.cmp = function (_, opts)
{ name = "buffer", keyword_length = 5 },
})
opts.mapping = cmp.config.mapping {
opts.mapping = cmp.config.mapping({
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<C-y>"] = cmp.mapping.confirm {
["<C-y>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true,
},
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
@@ -111,10 +121,8 @@ M.cmp = function (_, opts)
"i",
"s",
}),
}
})
return opts
end
return M

View File

@@ -12,7 +12,6 @@ vim.opt.expandtab = true
vim.opt.number = true
vim.opt.linebreak = true
vim.opt.showbreak = "+++"
vim.opt.textwidth = 100
vim.opt.showmatch = true
vim.opt.visualbell = true
vim.opt.hlsearch = true
@@ -28,4 +27,4 @@ vim.opt.tabstop = 2
vim.opt.undolevels = 1000
vim.opt.backspace = "indent,eol,start"
vim.opt.colorcolumn = "80"
vim.opt.conceallevel = 2

View File

@@ -1,15 +1,76 @@
---@type MappingsTable
local M = {}
local function toggle_telescope(harpoon_files)
local conf = require("telescope.config").values
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
}):find()
end
M.general = {
n = {
-- harpoon
["H"] = {function() require("harpoon.ui").toggle_quick_menu() end, "Open Harpoon" },
["<leader>ha"] = {function() require("harpoon.mark").add_file() end, "Add file to Harpoon"},
["<leader>hs"] = {function() require("harpoon.ui").nav_file(1) end, "Switch to file 1"},
["<leader>hd"] = {function() require("harpoon.ui").nav_file(2) end, "Switch to file 2"},
["<leader>hf"] = {function() require("harpoon.ui").nav_file(3) end, "Switch to file 3"},
["<leader>hg"] = {function() require("harpoon.ui").nav_file(4) end, "Switch to file 4"},
["H"] = {
function()
local harpoon = require("harpoon")
toggle_telescope(harpoon:list())
--harpoon.ui:toggle_quick_menu(harpoon:list())
end,
"Open Harpoon in telescope",
},
["<leader>hh"] = {
function()
local harpoon = require("harpoon")
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
"Open Harpoon",
},
["<leader>ha"] = {
function()
local harpoon = require("harpoon")
harpoon:list():append()
end,
"Add file to Harpoon",
},
["<leader>hs"] = {
function()
local harpoon = require("harpoon")
harpoon:list():select(1)
end,
"Switch to file 1",
},
["<leader>hd"] = {
function()
local harpoon = require("harpoon")
harpoon:list():select(2)
end,
"Switch to file 2",
},
["<leader>hf"] = {
function()
local harpoon = require("harpoon")
harpoon:list():select(3)
end,
"Switch to file 3",
},
["<leader>hg"] = {
function()
local harpoon = require("harpoon")
harpoon:list():select(4)
end,
"Switch to file 4",
},
-- navigation
["<C-d>"] = { "<C-d>zz", "1/2 page down" },
@@ -17,13 +78,7 @@ M.general = {
["n"] = { "nzz", "find next" },
["N"] = { "Nzz", "find prev" },
-- navigation
["<c-h>"] = {"<cmd> TmuxNavigateLeft<cr>", "window left" },
["<c-j>"] = {"<cmd> TmuxNavigateDown<cr>", "window down" },
["<c-k>"] = {"<cmd> TmuxNavigateUp<cr>", "window up" },
["<c-l>"] = {"<cmd> TmuxNavigateRight<cr>", "window right" },
["<c-\\>"] = {"<cmd> TmuxNavigatePrevious<cr>", "window previous" },
["Zm"] = { ":ZenMode<CR>", "Enter ZenMode" },
},
}

View File

@@ -22,14 +22,7 @@ local plugins = {
lazy = false,
},
{
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
},
"alexghergh/nvim-tmux-navigation",
lazy = false,
},
-- Override plugin definition options
@@ -54,8 +47,23 @@ local plugins = {
require("plugins.configs.lspconfig")
require("custom.configs.lspconfig")
end, -- Override to setup mason-lspconfig
opts = {
---@type lspconfig.options
servers = {
pyright = {},
r_language_server = {},
julials = {},
marksman = {
-- also needs:
-- $home/.config/marksman/config.toml :
-- [core]
-- markdown.file_extensions = ["md", "markdown", "qmd"]
filetypes = { "markdown", "quarto" },
root_dir = require("lspconfig.util").root_pattern(".git", ".marksman.toml", "_quarto.yml"),
},
},
},
},
-- override plugin configs
{
"williamboman/mason.nvim",
@@ -92,6 +100,16 @@ local plugins = {
{
"theprimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function(_, opts)
local harpoon = require("harpoon")
harpoon:setup({
settings = {
save_on_toggle = true,
},
})
end,
},
{
@@ -105,6 +123,79 @@ local plugins = {
event = "BufEnter *.md",
},
{
"kevinhwang91/nvim-ufo",
requires = "kevinhwang91/promise-async",
lazy = false,
},
{
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
ft = "markdown",
-- ft = {
-- "BufReadPre ~/Notes/**.md",
-- "BufNewFile ~/Notes/**.md",
-- },
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
workspaces = {
{ name = "second-brain", path = "~/second-brain" },
},
new_notes_location = "notes_subdir",
daily_notes = { folder = "notes/dailies" },
},
},
-- Disable nvchad plugins
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
lazy = false,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
},
{
"quarto-dev/quarto-nvim",
opts = {
lspFeatures = {
languages = { "r", "python", "julia", "bash", "html", "lua" },
},
},
ft = "quarto",
keys = {
{ "<leader>qa", ":QuartoActivate<cr>", desc = "quarto activate" },
{ "<leader>qp", ":lua require'quarto'.quartoPreview()<cr>", desc = "quarto preview" },
{ "<leader>qq", ":lua require'quarto'.quartoClosePreview()<cr>", desc = "quarto close" },
{ "<leader>qh", ":QuartoHelp ", desc = "quarto help" },
{ "<leader>qe", ":lua require'otter'.export()<cr>", desc = "quarto export" },
{ "<leader>qE", ":lua require'otter'.export(true)<cr>", desc = "quarto export overwrite" },
{ "<leader>qrr", ":QuartoSendAbove<cr>", desc = "quarto run to cursor" },
{ "<leader>qra", ":QuartoSendAll<cr>", desc = "quarto run all" },
{ "<leader><cr>", ":SlimeSend<cr>", desc = "send code chunk" },
{ "<c-cr>", ":SlimeSend<cr>", desc = "send code chunk" },
{ "<c-cr>", "<esc>:SlimeSend<cr>i", mode = "i", desc = "send code chunk" },
{ "<c-cr>", "<Plug>SlimeRegionSend<cr>", mode = "v", desc = "send code chunk" },
{ "<cr>", "<Plug>SlimeRegionSend<cr>", mode = "v", desc = "send code chunk" },
{ "<leader>ctr", ":split term://R<cr>", desc = "terminal: R" },
{ "<leader>cti", ":split term://ipython<cr>", desc = "terminal: ipython" },
{ "<leader>ctp", ":split term://python<cr>", desc = "terminal: python" },
{ "<leader>ctj", ":split term://julia<cr>", desc = "terminal: julia" },
},
},
{
"jmbuhr/otter.nvim",
opts = {
buffers = {
set_filetype = true,
},
},
},
-- Disable nvchad plugins
{
@@ -112,7 +203,48 @@ local plugins = {
lazy = false,
},
{ "NvChad/nvterm", enabled = false },
{
"debugloop/telescope-undo.nvim",
dependencies = { -- note how they're inverted to above example
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
},
keys = {
{ -- lazy style key map
"<leader>u",
"<cmd>Telescope undo<cr>",
desc = "undo history",
},
},
opts = {
-- don't use `defaults = { }` here, do this in the main telescope spec
extensions = {
undo = {
-- telescope-undo.nvim config, see below
},
-- no other extensions here, they can have their own spec too
},
},
config = function(_, opts)
-- Calling telescope's setup from multiple specs does not hurt, it will happily merge the
-- configs for us. We won't use data, as everything is in it's own namespace (telescope
-- defaults, as well as each extension).
require("telescope").setup(opts)
require("telescope").load_extension("undo")
end,
},
{
"sindrets/diffview.nvim",
lazy = false,
},
{
"NvChad/nvterm",
enabled = false,
},
-- To make a plugin not be loaded
-- {

View File

@@ -3,7 +3,6 @@ set -g @plugin 'alexghergh/nvim-tmux-navigation'
run '~/.tmux/plugins/tpm/tpm'
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
@@ -33,9 +32,9 @@ unbind h
bind h attach-session -t . -c "#{pane_current_path}"
# status bar
set -g status-right '#[fg=black]#[bg=black fg=colour135] %H:%m #[fg=default]%b %d %Y'
set -g status-right '#[fg=black]#[bg=black fg=colour135] %H:%M #[fg=default]%b %d %Y '
if-shell 'test "$(acpi -t)"' {
set -g status-right '#[fg=black]#[bg=black fg=colour135] %H:%m #[fg=default]%b %d %Y #[fg=pink] ♥#(acpi | cut -d ',' -f 2)'
set -g status-right '#[fg=black]#[bg=black fg=colour135] %H:%M #[fg=default]%b %d %Y #[fg=pink] ♥#(acpi | cut -d ',' -f 2) '
}
# Start windows and panes at 1, not 0
@@ -44,11 +43,18 @@ set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# navigation
bind-key -r j select-pane -D
bind-key -r k select-pane -U
bind-key -r l select-pane -R
bind-key -r h select-pane -L
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
bind-key -n -T prefix k if-shell "${is_vim}" 'send-keys C-h' 'select-pane -L'
bind-key -n -T prefix j if-shell "${is_vim}" 'send-keys C-j' 'select-pane -D'
bind-key -n -T prefix h if-shell "${is_vim}" 'send-keys C-k' 'select-pane -U'
bind-key -n -T prefix l if-shell "${is_vim}" 'send-keys C-l' 'select-pane -R'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
# resize
bind-key -r -T prefix M-k resize-pane -U
@@ -56,15 +62,24 @@ bind-key -r -T prefix M-j resize-pane -D
bind-key -r -T prefix M-h resize-pane -L
bind-key -r -T prefix M-l resize-pane -R
bind-key -r -T prefix k select-pane -U
bind-key -r -T prefix j select-pane -D
bind-key -r -T prefix h select-pane -L
bind-key -r -T prefix l select-pane -R
bind C-l send-keys 'C-l'
set-option -g allow-passthrough on
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides "xterm-256color"
set -g default-terminal "screen-256color"
# status and culors
set -g status-left-length 85
set -g status-left "#[bg=black]working on#[fg=colour135] #S #[bg=default fg=black]"
set -g status-left "#[bg=black]#[fg=#(pomodoro tmux-color)]#(pomodoro status -f ' %!r') #[fg=default]working on#[fg=colour135] #S#[bg=default fg=black]"
set -g window-status-current-format "#[fg=colour135]#W"
set -g status-style bg=default
set -g pane-active-border-style fgkcolour135
#set -g status-justify centre
set -g pane-active-border-style fg=colour135
set -g status-justify centre
set-option -g status-interval 1
set-option -g clock-mode-color colour135
set-option -g message-style fg=colour135,bg=black

73
.zshrc
View File

@@ -1,8 +1,9 @@
zmodload zsh/zprof
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/usr/lib64/openjdk-17/bin:$PATH
export PATH=$HOME/bin:/usr/local/bin:/usr/lib65/openjdk-17/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/andrei/.oh-my-zsh
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
@@ -59,7 +60,6 @@ ZSH_THEME="blokkzh"
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
zsh-fzf-history-search
)
source $ZSH/oh-my-zsh.sh
@@ -73,7 +73,11 @@ source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
if [[ -e /usr/bin/nvim ]]; then
export EDITOR='nvim'
else
export EDITOR='vim'
fi
# else
# export EDITOR='mvim'
# fi
@@ -98,62 +102,23 @@ autoload -z edit-command-line
zle -N edit-command-line
bindkey "^v" edit-command-line
bindkey -s "^w" "work^M"
# adding cargo to path
export PATH=$HOME/.cargo/bin:$PATH
# adding local to path
export PATH=$HOME/.local/bin:$PATH
# Open work folder with fuzzy finder
function work() {
work_dirs=( "$HOME/clones" "$HOME/sandbox" )
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf --query=$1 --preview "tree -C -L 2 {}")
[ -z $goto ] && return
if [ -z $TMUX ]
then
tmux new -A -s "$(basename -- $goto)" -c "$goto"
else
tmux new -d -s "$(basename -- $goto)" -c "$goto"
tmux switch-client -t "$(basename -- $goto)"
fi
export NVM_DIR="$HOME/.nvm"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm() {
unset -f nvm
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm "$@"
}
# JINA_CLI_BEGIN
## autocomplete
if [[ ! -o interactive ]]; then
return
fi
compctl -K _jina jina
_jina() {
local words completions
read -cA words
if [ "${#words}" -eq 2 ]; then
completions="$(jina commands)"
else
completions="$(jina completions ${words[2,-2]})"
fi
reply=(${(ps:
:)completions})
}
# session-wise fix
ulimit -n 4096
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
# JINA_CLI_END
# new fzf command integration
source <(fzf --zsh)