From 3fcf1a3a0affa5027c399c2ad05b8c573ebedb0e Mon Sep 17 00:00:00 2001 From: DrNuget Date: Thu, 16 Jan 2025 04:37:37 +0200 Subject: initial commit --- .bashrc | 26 +++++++++++++++ .config/foot/foot.ini | 26 +++++++++++++++ .config/nvim/init.lua | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ .profile | 13 ++++++++ .tmux.conf | 19 +++++++++++ 5 files changed, 176 insertions(+) create mode 100644 .bashrc create mode 100644 .config/foot/foot.ini create mode 100644 .config/nvim/init.lua create mode 100644 .profile create mode 100644 .tmux.conf diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..4d3ce8e --- /dev/null +++ b/.bashrc @@ -0,0 +1,26 @@ +# +# ~/.bashrc +# + +# If not running interactively, don"t do anything +[[ $- != *i* ]] && return + +set -o vi + +alias tmux="tmux -u" +alias cal="cal -mw" +alias fetch="fastfetch" +alias scim="sc-im" + +alias ls="ls --color=auto" +alias grep="grep --color=auto" + +alias vrc="vim $HOME/.config/nvim/init.lua" + +#Arch default PS1: +PS1="[\u@\h \W]\$ " + +#Multicolor PS1: +#PS1="\[\033[31m\][\[\033[33m\]\u\[\033[32m\]@\[\033[34m\]\h \[\033[36m\]\W\[\033[31m\]]\[\033[0m\]$ " + +export MANPAGER="nvim +Man!" diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..a9d99c4 --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,26 @@ +font=monospace:size=8 + + +[colors] +alpha=0.8 +#Materia Dark +background=121212 +foreground=dfdfdf + +regular0=474747 #black +regular1=f44336 #red +regular2=4caf50 #green +regular3=ff9800 #yellow +regular4=1a73e8 #blue +regular5=9c27b0 #purple +regular6=0097a7 #cyan +regular7=ffffff #white + +bright0=474747 #black +bright1=f44336 #red +bright2=4caf50 #green +bright3=ff9800 #yellow +bright4=1a73e8 #blue +bright5=9c27b0 #purple +bright6=0097a7 #cyan +bright7=ffffff #white diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..139e733 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,92 @@ +vim.cmd([[ + set nu + set smarttab + set tabstop=4 + set shiftwidth=4 + set noexpandtab + set autoindent + filetype plugin indent on + + colorscheme vim + set notermguicolors + + set splitbelow splitright + + " Insert mode hjkl + inoremap + inoremap + inoremap + inoremap + + nnoremap : + + nnoremap o o + nnoremap O O + + " Some C Macros + autocmd Filetype c inoremap im intmain(){return0;} + autocmd Filetype c inoremap I #include<> + autocmd Filetype c inoremap w while(){}e2li + autocmd Filetype c inoremap f for(;;){}e2li + + " LaTex Macros + autocmd Filetype tex inoremap equ \begin{equation}\end{equation} +]]) + +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +local function bootstrap_pckr() + local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim" + + if not (vim.uv or vim.loop).fs_stat(pckr_path) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/lewis6991/pckr.nvim", + pckr_path + }) + end + + vim.opt.rtp:prepend(pckr_path) +end + +bootstrap_pckr() + +require("pckr").add{ + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + { "", "TmuxNavigatePrevious" }, + }, + }, + { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = function() + require("nvim-autopairs").setup {} + end + }, + { + "nvim-tree/nvim-tree.lua", + config = function() + require("nvim-tree").setup() + end + }, + { + "vimwiki/vimwiki" + } +} + diff --git a/.profile b/.profile new file mode 100644 index 0000000..d1fd1d9 --- /dev/null +++ b/.profile @@ -0,0 +1,13 @@ +export WLR_DRM_NO_ATOMIC=1 + +export PATH="$PATH:$HOME/.scripts" +export WALLPAPER="" +export LANG="en_US.UTF-8" +export TERMIMAL="foot" +export EDITOR="vim" + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +if [ $(tty) == "/dev/tty1" ]; then + ~/.scripts/wm +fi diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..ea783a3 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,19 @@ +# 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 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +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'" + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l -- cgit v1.2.3