diff --git a/.bashrc b/.bashrc index 0e73884..e8d2dbd 100644 --- a/.bashrc +++ b/.bashrc @@ -116,10 +116,15 @@ if ! shopt -oq posix; then fi ## Modified by me +### Start tmux if not already in a session +if [[ -z "$TMUX" ]]; then + tmux attach || tmux new +fi ### GPG and SSH agent configurations for yubikey -export GPG_TTY="$(tty)" -export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -gpgconf --launch gpg-agent +# This is now disabled since i use bw +#export GPG_TTY="$(tty)" +#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +#gpgconf --launch gpg-agent ### Passbook setup export PASSBOOK_GPG_PATH="/usr/bin/gpg" @@ -167,23 +172,35 @@ alias edit-vim='cd ~/.config/nvim && vim .' hostname=$(cat ~/hostname) if [[ $hostname == "arch-bepis" ]]; then export SSH_AUTH_SOCK=/home/wholteza/.bitwarden-ssh-agent.sock -else +elif [[ $hostname == "bepis-laptop" ]]; then export PATH="$PATH:/opt/nvim-linux-x86_64/bin" export SSH_AUTH_SOCK=/home/wholteza/snap/bitwarden/current/.bitwarden-ssh-agent.sock +elif [[ $hostname == "dev1" ]]; then + export PATH="$PATH:/opt/nvim-linux-x86_64/bin" fi ## add cargo installed binaries to PATH -export PATH="/home/wholteza/.cargo/bin:$PATH" +if [[ -d /home/wholteza/.cargo/bin ]]; then + export PATH="/home/wholteza/.cargo/bin:$PATH" +fi ## add swayprop to PATH -export PATH="/home/wholteza/.config/swayprop:$PATH" +if [[ -d /home/wholteza/.config/swayprop ]]; then + export PATH="/home/wholteza/.config/swayprop:$PATH" +fi -source /usr/share/nvm/init-nvm.sh +if [ -e /usr/share/nvm/init-nvm.sh ]; then + source /usr/share/nvm/init-nvm.sh +fi export ompPath="$HOME/.config/oh-my-posh/theme.omp.json" ### Start oh my posh + eval "$(oh-my-posh init bash --config $ompPath)" -### Start tmux if not already in a session -[[ -z "$TMUX" ]] && exec tmux -. "$HOME/.cargo/env" + +if [ -d "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +fi + + diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 7c98c63..d0224f0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -218,7 +218,7 @@ require('lazy').setup({ -- Then, because we use the `opts` key (recommended), the configuration runs -- after the plugin has been loaded as `require(MODULE).setup(opts)`. - { -- Useful plugin to show you pending keybinds. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { @@ -299,7 +299,7 @@ require('lazy').setup({ { 'nvim-telescope/telescope-ui-select.nvim' }, -- Useful for getting pretty icons, but requires a Nerd Font. - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -407,7 +407,7 @@ require('lazy').setup({ 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by blink.cmp 'saghen/blink.cmp', @@ -657,9 +657,9 @@ require('lazy').setup({ -- for you, so that they are available from within Neovim. local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { - 'stylua', -- Used to format Lua code + 'stylua', -- Used to format Lua code 'vue-language-server', - 'eslint_d', -- Used in lint.lua + 'eslint_d', -- Used in lint.lua 'markdownlint', -- Used in lint.lua }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 973490a..307455c 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,33 +1,32 @@ { "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "blink-copilot": { "branch": "main", "commit": "bdc45bbbed2ec252b3a29f4adecf031e157b5573" }, - "blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" }, - "catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" }, - "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, - "copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" }, - "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, + "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, + "catppuccin": { "branch": "main", "commit": "f19cab18ec4dc86d415512c7a572863b2adbcc18" }, + "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, + "copilot.lua": { "branch": "master", "commit": "f8fa941f1152ad89c73f8f2ae6e570869bf62b28" }, + "fidget.nvim": { "branch": "main", "commit": "b45d21d33d61ed9295308eb6571c0a5f0f7f3765" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "1b0350ab707713b2bc6c236151f1a324175347b1" }, + "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" }, - "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "mini.nvim": { "branch": "main", "commit": "01dce72f2177de6044bcab60ebb8f8e56ade0936" }, - "neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, + "lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a1067cf84b4ff81b66d2bf4d01f4cbdb5de40bd0" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, + "mini.nvim": { "branch": "main", "commit": "bc34736e5b1d5561bc628f1cedd7c01f5ce5ee9f" }, + "neo-tree.nvim": { "branch": "main", "commit": "ed057048a281b418d5318dd5153f9486daa517a3" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "2647cce4cb64fb35c212146663384e05ae126bdf" }, - "nvim-dap": { "branch": "master", "commit": "2edd6375692d9ac1053d50acfe415c1eb2ba92d0" }, - "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, - "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, - "nvim-lint": { "branch": "master", "commit": "2b0039b8be9583704591a13129c600891ac2c596" }, - "nvim-lspconfig": { "branch": "master", "commit": "6bba673aa8993eceec233be17b42ddfb9540794b" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-dap": { "branch": "master", "commit": "7367cec8e8f7a0b1e4566af9a7ef5959d11206a7" }, + "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lint": { "branch": "master", "commit": "0864f81c681e15d9bdc1156fe3a17bd07db5a3ed" }, + "nvim-lspconfig": { "branch": "master", "commit": "ef73a4f2a1ddf0439eb97b46de2aab265ddba1cd" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, diff --git a/.config/requirements/install.sh b/.config/requirements/install.sh index 41b6ea8..d4227b8 100755 --- a/.config/requirements/install.sh +++ b/.config/requirements/install.sh @@ -1,15 +1,54 @@ +graphical=false +for arg in "$@"; do + if [[ $arg == "--graphical" ]]; then + graphical=true + break + fi +done sudo apt update +sudo apt install \ + unzip \ + feh \ + wget \ + curl \ + neofetch \ + bashtop \ + htop \ + build-essential \ + cmake \ + pkg-config \ + python3 \ + wireguard \ + -y + +# Dependencies for cargo +sudo snap install rustup --classic +rustup default stable +rustup update +# Oh my posh +curl -s https://ohmyposh.dev/install.sh | bash -s +# Node version manager +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +nvm install 22 +nvm use 22 +npm install +# Install nvim +curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz +sudo rm -rf /opt/nvim +sudo rm -rf /opt/nvim-linux-x86_64 +sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz + +if $graphical; then sudo apt install \ i3 \ i3blocks \ i3lock \ suckless-tools \ arandr \ - feh \ scrot \ - wget \ gnupg2 \ gnupg-agent \ dirmngr \ @@ -21,23 +60,14 @@ sudo apt install \ yubikey-personalization \ solaar \ cifs-utils \ - curl \ rofi \ brightnessctl \ - neofetch \ - bashtop \ - htop \ - build-essential \ - cmake \ - pkg-config \ libfreetype6-dev \ libfontconfig1-dev \ libxcb-xfixes0-dev \ libxkbcommon-dev \ - python3 \ dunst \ nvme-cli \ - wireguard \ -y # Remove ibus since it causes issues with my custom keyboard layout @@ -59,19 +89,12 @@ sudo snap install heroic sudo snap install freecad sudo snap install thunderbird -# Dependencies for cargo -sudo snap install rustup --classic -rustup default stable -rustup update # Cargo packages ## Alacritty needs to be installed with cargo to get the version that supports toml configurations cargo install alacritty cargo install battop -curl -s https://ohmyposh.dev/install.sh | sudo bash -s -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - # Access to brightness devices for brightnessctl sudo usermod -aG video wholteza @@ -81,11 +104,9 @@ gpg --decrypt /home/wholteza/.config/wireguard/got58-got80.conf.gpg > /home/whol # Xorg configs sudo cp /home/wholteza/.config/X11/xorg.conf.d/* /etc/X11/xorg.conf.d/ -# Install nvim -curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz -sudo rm -rf /opt/nvim -sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz + +fi + source ~/.bashrc echo Done! - diff --git a/.tmux.conf b/.tmux.conf index 1b0024f..7888cca 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,3 +1,7 @@ +unbind C-b +set -g prefix C-t +bind C-t send-prefix + set -g mouse on # List of plugins diff --git a/package.json b/package.json new file mode 100644 index 0000000..70feebb --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "wholteza", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +}