Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifying and improving the repository #11

Merged
merged 14 commits into from
Sep 28, 2024
25 changes: 0 additions & 25 deletions .aliases

This file was deleted.

12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See more - https://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*]
indent_style = space
indent_size = 2
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
43 changes: 38 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,51 @@
name: checks
on:
pull_request:
paths-ignore:
- '**/README.md'
push:
branches:
- main
paths-ignore:
- '**/README.md'
- LICENSE
- README.md
- CONTRIBUTING.md
jobs:
shellcheck:
linter:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- "setup.sh"
- "deps/brew.sh"
- "shell/.aliases"
- "shell/.functions"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: shellcheck
uses: sudo-bot/action-shellcheck@latest
with:
cli-args: "setup"
cli-args: "${{ matrix.path }}"

validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Checking that each file in symlinks.cfg actually exists in repo.
- name: Checking symlinks file
run: |
file="symlinks.cfg"
i=0
while IFS='=' read -r key value; do
i=$((i+1))
if [[ $key =~ ^# ]]; then
continue
fi
if [[ ! -f $key ]]; then
echo "Can't find file in '$file' on line $i: '$key'"
exit 1
fi
done < "$file"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode
.idea
.dev
.DS_Store
54 changes: 7 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,20 @@

[![Actions Status](https://github.com/dlampsi/dotfiles/workflows/checks/badge.svg)](https://github.com/dlampsi/dotfiles/actions)

Yet another dotfiles template repo with configuration scripts for personal use.
Yet another dotfiles repo.

## Getting started

All you need to setup configs is a bash.
This repo contains my personal dotfiles for various tools that I use on a daily basis. The setup script will create symlinks to the dotfiles in the home directory and optionally creates a backup of the existing files.

Setup files:
```bash
# Regular setup all dotfiles
./setup

# Force overwrite existwsing files
./setup -f

# Setup only zsh
./setup zsh

# Setup only zsh with force overwrite
./setup -f zsh
```
## Setup

See all available options:
Clone this repo and run setup script to provision symlinks to the dotfiles:
```bash
./setup -h
./setup.sh
```

Check setup:
See all available tool options:
```bash
# Check installed alias
alias
# Check installed functions
declare -f
./setup.sh -h
```

<!-- https://github.com/webpro/awesome-dotfiles -->

## Content

### Zsh

The [.zshrc](.zshrc) and [.zshenv](.zshenv) files will be updated for the configuration for the zsh.

They will automatically configure the loading of shell functions and aliases (described below).

### Aliases

Shell aliases are in the [.aliases](.aliases), which will be copied to the home directory during installation.

You can keep your local aliases in the `~/.aliases.local` file, they will be included automatically but won't be touched during the setup/update steps.

### Functions

Custom functions are in the [functions/](functions/) directory, they will be copied to the `~/.functions/` during the setup.

### Configs

The directory contains config files and scripts for various apps, such as tmux or vim.
5 changes: 0 additions & 5 deletions configs/tmux/.tmux/lang.sh

This file was deleted.

32 changes: 0 additions & 32 deletions configs/tmux/.tmux/plugins/tmux-weather/scripts/helpers.sh

This file was deleted.

17 changes: 17 additions & 0 deletions deps/brew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

brew update
# brew upgrade

brew install bash
brew install bash-completion2
brew install telnet
brew install gnupg
brew install git
brew install tmux
brew install jq
brew install wget
brew install pure
brew install neovim

brew cleanup
4 changes: 0 additions & 4 deletions functions/dockerfilecheck

This file was deleted.

4 changes: 0 additions & 4 deletions functions/dps

This file was deleted.

4 changes: 0 additions & 4 deletions functions/dsrm

This file was deleted.

5 changes: 0 additions & 5 deletions functions/gitclb

This file was deleted.

9 changes: 0 additions & 9 deletions functions/loadenv

This file was deleted.

4 changes: 0 additions & 4 deletions functions/shellcheck

This file was deleted.

26 changes: 26 additions & 0 deletions git/.gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[alias]
aliases = config --get-regexp alias
whoami = config user.email
s = status -s
p = pull --recurse-submodules
tags = tag -l
branches = branch --all
remotes = remote --verbose

[gpg]
program = /opt/homebrew/bin/gpg

[gpg "ssh"]

[branch]
# Show most recently changed branches first.
sort = -committerdate

[commit]
gpgsign = true

[includeIf "gitdir:~/repos/dlampsi/"]
path = .gitconfig.personal

[include]
path = .gitconfig.local
50 changes: 50 additions & 0 deletions nvim/init.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
set number
set shiftwidth=2
set smartindent
set smarttab
set icon

" Reload vimrc
nnoremap <leader>sv :source $MYVIMRC<CR>

" Copy to clipboard
vnoremap <leader>y "+y
nnoremap <leader>Y "+yg_

" Plugins
call plug#begin()
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' }
Plug 'navarasu/onedark.nvim'

Plug 'nvim-tree/nvim-web-devicons'
Plug 'romgrk/barbar.nvim'
Plug 'nvim-tree/nvim-tree.lua'

Plug 'github/copilot.vim'
Plug 'preservim/nerdtree'
call plug#end()

" Theme
let g:onedark_config = {
\ 'style': 'darker',
\}
colorscheme onedark

" Telescope
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>

" BufferTabs
nnoremap <C-[> :BufferPrevious<CR>
nnoremap <C-]> :BufferNext<CR>

" NERDTree
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>

Loading