diff --git a/README.md b/README.md index cdb6ec9f..f3412e11 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,18 @@ Collection of various settings, configurations and other miscellaneous tools. ## Settings - [neovim](https://neovim.io) - [kitty](https://sw.kovidgoyal.net/kitty/) -- [i3](https://i3wm.org) - [lazygit](https://github.com/jesseduffield/lazygit) - [tmux](https://tmux.github.io/) ## Fonts -- [FiraCode](https://github.com/tonsky/FiraCode) +- [NerdFonts symbols](https://github.com/ryanoasis/nerd-fonts) ## Templates +- SSH config - Python package - Crontab -# Package config -List of arch personal arch linux packages in `pacman.txt`. +## Installation +`install.sh` will set up most common configurations -Install with: - -```sh -sudo pacman --needed -S $(awk '{print $1}' pacman.txt) -``` +`extra_installers/` contains additional (unfinished) scripts to simplify installing commonly used software diff --git a/completions.zsh b/completions.zsh index dd3cc2cd..8e398bf9 100644 --- a/completions.zsh +++ b/completions.zsh @@ -1,3 +1,3 @@ autoload -U bashcompinit bashcompinit -eval "$(register-python-argcomplete pipx)" +eval "$(register-python-argcomplete3 pipx)" diff --git a/extra_installers/pipx.sh b/extra_installers/pipx.sh new file mode 100755 index 00000000..b80eb94b --- /dev/null +++ b/extra_installers/pipx.sh @@ -0,0 +1,8 @@ +#! /usr/bin/env bash + +pipx install pyright +pipx install poetry +pipx install black +pipx install isort +pipx install zimports +pipx install pre-commit diff --git a/extra_installers/software.sh b/extra_installers/software.sh new file mode 100755 index 00000000..ac9d47ae --- /dev/null +++ b/extra_installers/software.sh @@ -0,0 +1,47 @@ +#! /usr/bin/env bash +# Install various programs + +echo "--- Not finished, not recommended to run as a script ---" +echo "--- Copy individual commands and run as desired ---" +exit 1 + +mkdir -p "$HOME/.local/bin" + +# kitty +if [ ! which -a kitty > /dev/null ] +then + curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin + # Create a symbolic link to add kitty to PATH (assuming $HOME/.local/bin is in + # your system-wide PATH) + ln -s "$HOME/.local/kitty.app/bin/kitty" "$HOME/.local/bin/" + # Place the kitty.desktop file somewhere it can be found by the OS + cp "$HOME/.local/kitty.app/share/applications/kitty.desktop" "$HOME/.local/share/applications/" + # If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file + cp "$HOME/.local/kitty.app/share/applications/kitty-open.desktop" "$HOME/.local/share/applications/" + # Update the paths to the kitty and its icon in the kitty.desktop file(s) + sed -i "s|Icon=kitty|Icon=/home/$USER/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" "$HOME/.local/share/applications/kitty*.desktop" + sed -i "s|Exec=kitty|Exec=/home/$USER/.local/kitty.app/bin/kitty|g" "$HOME/.local/share/applications/kitty*.desktop" +fi + +# neovim +if [ ! which -a nvim > /dev/null ] +then + curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage + chmod u+x nvim.appimage + mv nvim.appimage "$HOME/.local/bin/nvim" + ln -s "$HOME/.local/bin/nvim" "$HOME/.local/bin/vim" +fi + +# fzf +if [ ! which -a fzf > /dev/null ] +then + git clone --depth 1 https://github.com/junegunn/fzf.git "$HOME/.fzf" + "$HOME/.fzf/install" +fi + +# pipx +if [ ! which -a fzf > /dev/null ] +then + python3 -m pip install --user pipx + pipx ensurepath +fi diff --git a/extra_installers/ssh-agent.sh b/extra_installers/ssh-agent.sh new file mode 100755 index 00000000..5259ecd4 --- /dev/null +++ b/extra_installers/ssh-agent.sh @@ -0,0 +1,9 @@ +#! /usr/bin/env bash + +# SSH agent +ssh_agent_export="export SSH_AUTH_SOCK=\"\$XDG_RUNTIME_DIR/ssh-agent.socket\"" +grep "$ssh_agent_export" "$HOME/.profile" > /dev/null || echo "$ssh_agent_export" >> "$HOME/.profile" +grep "$ssh_agent_export" "$HOME/.zprofile" > /dev/null || echo "$ssh_agent_export" >> "$HOME/.zprofile" +grep "$ssh_agent_export" "$HOME/.bash_profile" > /dev/null || echo "$ssh_agent_export" >> "$HOME/.bash_profile" + +systemctl --user enable ssh-agent.service diff --git a/install.sh b/install.sh index b1444981..983184aa 100755 --- a/install.sh +++ b/install.sh @@ -36,19 +36,9 @@ do create_symlink "$CONFIG_DIR/systemd/user" "$FILE" done -# SSH agent -ssh_agent_export="export SSH_AUTH_SOCK=\"\$XDG_RUNTIME_DIR/ssh-agent.socket\"" -grep "$ssh_agent_export" "$HOME/.profile" > /dev/null || echo "$ssh_agent_export" >> "$HOME/.profile" -grep "$ssh_agent_export" "$HOME/.zprofile" > /dev/null || echo "$ssh_agent_export" >> "$HOME/.zprofile" -grep "$ssh_agent_export" "$HOME/.bash_profile" > /dev/null || echo "$ssh_agent_export" >> "$HOME/.bash_profile" - -systemctl --user enable ssh-agent.service - # SSH sockets mkdir -p "$HOME/.ssh/sockets" - -# Install arch packages -sudo pacman --needed -S $(awk '{print $1}' pacman.txt) || echo "Issue installing pacman packages" +[ ! -e "$HOME/.ssh/config" ] && cp templates/ssh-config "$HOME/.ssh/config" # nvim setup - install Packer PACKER_REPO="https://github.com/wbthomason/packer.nvim" @@ -73,12 +63,15 @@ fi grep "editor" "$HOME/.gitconfig" > /dev/null || git config --global core.editor "nvim" # Add NerdFont symbols -# TODO currently an issue with the spaces in the file names -# mkdir -p "$HOME/.local/share/fonts" -# for FILE in nerdfont_symbols/* -# do -# create_symlink "$HOME/.local/share/fonts" "$FILE" -# done +mkdir -p "$HOME/.local/share/fonts" +for FILE in nerdfont_symbols/* +do + create_symlink "$HOME/.local/share/fonts" "$FILE" +done # Ensure nvim plugins -which -a efm-langserver > /dev/null || ln -s "$(readlink -f config/nvim/external/efm-langserver)" "$HOME/.local/bin/." +mkdir -p "$HOME/.local/bin" +for FILE in bin/* +do + which -a "$(basename $FILE)" > /dev/null || create_symlink "$HOME/.local/bin" "$FILE" +done