Merge pull request 'refactor/chezmoi' (#13) from refactor/chezmoi into main

Reviewed-on: https://codeberg.org/aleidk/dots/pulls/13
This commit is contained in:
aleidk 2024-03-20 17:07:32 +00:00
commit 2a980b26a8
2696 changed files with 469611 additions and 107760 deletions

1
.chezmoiroot Normal file
View file

@ -0,0 +1 @@
chezmoi

15
.gitmodules vendored
View file

@ -1,15 +0,0 @@
[submodule "config/alacritty/themes/catppuccin"]
path = config/alacritty/themes/catppuccin
url = https://github.com/catppuccin/alacritty.git
[submodule "config/foot/themes/catppuccin"]
path = config/foot/themes/catppuccin
url = https://github.com/catppuccin/foot.git
[submodule "config/alacritty/themes/rose-pine"]
path = config/alacritty/themes/rose-pine
url = https://github.com/rose-pine/alacritty.git
[submodule "Sway Catppuccin Theme"]
path = config/sway/themes/catppuccin
url = https://github.com/catppuccin/i3.git
[submodule "Waybar Catppuccin Theme"]
path = config/waybar/themes/catppuccin
url = https://github.com/catppuccin/waybar.git

View file

@ -5,5 +5,5 @@
Execute the following command: Execute the following command:
```bash ```bash
curl -L https://codeberg.org/aleidk/dots/raw/branch/main/setup.sh | bash sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin init --apply
``` ```

View file

@ -0,0 +1,9 @@
{{- $osid := .chezmoi.os -}}
{{- if hasKey .chezmoi.osRelease "id" -}}
{{- $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
{{- end -}}
[data]
osid = {{ $osid | quote }}
hasGui = {{ promptBoolOnce . "hasGui" "Does this machine needs gui configs/apps?" }}
hasWOL = {{ promptBoolOnce . "hasWOL" "Does this machine WOL?" }}

View file

@ -0,0 +1,39 @@
packages:
cargo:
- mise
- yazi-fm
- rbw
dnf:
copr:
- atim/lazygit
- atim/starship
- the4runner/firefox-dev
packages:
- bat
- dnf-plugin-system-upgrade
- duf
- eza
- fd-find
- firefox-dev
- flatpak
- fzf
- gcc
- gcc-c++
- git
- gitlint
- gnome-software
- lazygit
- neovim
- nodejs
- openssl
- openssl-devel
- papirus-icon-theme
- remove-retired-packages
- ripgrep
- sd
- starship
- tealdeer
- tmux
- tree-sitter-cli
- zoxide
- zsh

View file

@ -0,0 +1,15 @@
[".config/alacritty/themes/catppuccin/catppuccin-macchiato.toml"]
type = "file"
url = "https://github.com/catppuccin/alacritty/raw/main/catppuccin-macchiato.toml"
refreshPeriod = "168h"
[".config/bat/themes/Catppuccin-macchiato.tmTheme"]
# Run "bat cache --build" to make the theme available
type = "file"
url = "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme"
refreshPeriod = "168h"
["Repos/Source/xdg-ninja"]
type = "git-repo"
url = "https://github.com/b3nj5m1n/xdg-ninja.git"
refreshPeriod = "168h"

2
chezmoi/.chezmoiignore Normal file
View file

@ -0,0 +1,2 @@
**/original_*
.config/lazygit/state.yml

View file

@ -0,0 +1,23 @@
{{- if eq .hasWOL true -}}
#!/usr/bin/env bash
set -e
# run as sudo so it ask for the password here and not inside FZF
sudo echo -e "\nSetting up wol...\n"
interface="$(
nmcli --fields name --terse con show |
fzf \
--height 10 \
--header 'Select network interface' \
--preview 'nmcli c show {} | grep 802-3-ethernet.wake-on-lan'
)"
if [[ -z "$interface" ]]; then
echo "no interface selected"
exit
fi
nmcli c modify "$interface" 802-3-ethernet.wake-on-lan magic
nmcli c modify "$interface" 802-3-ethernet.auto-negotiate yes
{{ end }}

View file

@ -0,0 +1,25 @@
{{- if eq .hasGui true -}}
#!/usr/bin/env bash
# ╭──────────────────────────────────────────────────────────╮
# │ Setup Catppuccin GTK theme │
# ╰──────────────────────────────────────────────────────────╯
set -e
tmp_dir="$(mktemp -d)"
cd "$tmp_dir"
git clone --recurse-submodules git@github.com:catppuccin/gtk.git
cd gtk
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python install.py macchiato --link -a teal -d ~/.themes --tweaks normal
rm -rf "$tmp_dir"
{{ end }}

View file

@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -e
NO_FORMAT="\033[0m"
C_DODGERBLUE1="\033[38;5;33m"
echo -e "${C_DODGERBLUE1}Installing packages...${NO_FORMAT}"
{{- if eq .osid "darwin" }}
# macOS-specific code
{{- else if eq .osid "linux-debian" }}
# Debian-specific code
{{- else if eq .osid "linux-fedora" }}
# ╭──────────────────────────────────────────────────────────╮
# │ Add COPR repos │
# ╰──────────────────────────────────────────────────────────╯
sudo dnf install -yq 'dnf-command(copr)'
{{ range .packages.dnf.copr -}}
sudo dnf copr enable -y {{ . | quote }} &> /dev/null
{{ end -}}
# ╭──────────────────────────────────────────────────────────╮
# │ Install DNF packages │
# ╰──────────────────────────────────────────────────────────╯
sudo dnf install -y {{ range .packages.dnf.packages }} {{ . | quote }} {{- end -}}
{{ end }}
# ╭──────────────────────────────────────────────────────────╮
# │ Install Rust │
# ╰──────────────────────────────────────────────────────────╯
if ! command -v cargo > /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
fi
# ╭──────────────────────────────────────────────────────────╮
# │ Install Cargo Packages │
# ╰──────────────────────────────────────────────────────────╯
cargo install {{ range .packages.cargo }} {{ . | quote }} {{- end -}}

View file

@ -0,0 +1,27 @@
# This is `bat`s configuration file. Each line either contains a comment or
# a command-line option that you want to pass to `bat` by default. You can
# run `bat --help` to get a list of all possible configuration options.
# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
# for a list of all available themes
--theme="Catppuccin-macchiato"
--style="changes,numbers"
# Enable this to use italic text on the terminal. This is not supported on all
# terminal emulators (like tmux, by default):
#--italic-text=always
# Uncomment the following line to disable automatic paging:
#--paging=never
# Uncomment the following line if you are using less version >= 551 and want to
# enable mouse scrolling support in `bat` when running inside tmux. This might
# disable text selection, unless you press shift.
#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
# Syntax mappings: map a certain filename pattern to a language.
# Example 1: use the C++ syntax for Arduino .ino files
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
#--map-syntax "*.ino:C++"
#--map-syntax ".ignore:Git Ignore"

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Catppuccin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,32 @@
<h3 align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
Catppuccin for <a href="https://codeberg.org/dnkl/foot">Foot</a>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
</h3>
<p align="center">
<a href="https://github.com/catppuccin/foot/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/foot?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/foot/issues"><img src="https://img.shields.io/github/issues/catppuccin/foot?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
<a href="https://github.com/catppuccin/foot/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/foot?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/catppuccin/foot-catppuccin/main/assets/foot.png"/>
</p>
## Usage
1. Copy the contents of `catppuccin.conf` colorscheme you want into your Foot config file (usually stored at `~/.config/foot/foot.ini`)
## 💝 Thanks to
- [Pocco81](https://github.com/Pocco81)
- [crdpa](https://github.com/crdpa)
- [Thibault Andreis](https://github.com/ThibaultAndreis)
&nbsp;
<p align="center"><img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" /></p>
<p align="center">Copyright &copy; 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
<p align="center"><a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a></p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

View file

@ -0,0 +1,19 @@
[colors]
foreground=c6d0f5 # Text
background=303446 # Base
regular0=51576d # Surface 1
regular1=e78284 # red
regular2=a6d189 # green
regular3=e5c890 # yellow
regular4=8caaee # blue
regular5=f4b8e4 # pink
regular6=81c8be # teal
regular7=b5bfe2 # Subtext 1
bright0=626880 # Surface 2
bright1=e78284 # red
bright2=a6d189 # green
bright3=e5c890 # yellow
bright4=8caaee # blue
bright5=f4b8e4 # pink
bright6=81c8be # teal
bright7=a5adce # Subtext 0

View file

@ -0,0 +1,19 @@
[colors]
foreground=4c4f69 # Text
background=eff1f5 # Base
regular0=5c5f77 # Subtext 1
regular1=d20f39 # red
regular2=40a02b # green
regular3=df8e1d # yellow
regular4=1e66f5 # blue
regular5=ea76cb # pink
regular6=179299 # teal
regular7=acb0be # Surface 2
bright0=6c6f85 # Subtext 0
bright1=d20f39 # red
bright2=40a02b # green
bright3=df8e1d # yellow
bright4=1e66f5 # blue
bright5=ea76cb # pink
bright6=179299 # teal
bright7=bcc0cc # Surface 1

View file

@ -0,0 +1,19 @@
[colors]
foreground=cad3f5 # Text
background=24273a # Base
regular0=494d64 # Surface 1
regular1=ed8796 # red
regular2=a6da95 # green
regular3=eed49f # yellow
regular4=8aadf4 # blue
regular5=f5bde6 # pink
regular6=8bd5ca # teal
regular7=b8c0e0 # Subtext 1
bright0=5b6078 # Surface 2
bright1=ed8796 # red
bright2=a6da95 # green
bright3=eed49f # yellow
bright4=8aadf4 # blue
bright5=f5bde6 # pink
bright6=8bd5ca # teal
bright7=a5adcb # Subtext 0

View file

@ -0,0 +1,19 @@
[colors]
foreground=cdd6f4 # Text
background=1e1e2e # Base
regular0=45475a # Surface 1
regular1=f38ba8 # red
regular2=a6e3a1 # green
regular3=f9e2af # yellow
regular4=89b4fa # blue
regular5=f5c2e7 # pink
regular6=94e2d5 # teal
regular7=bac2de # Subtext 1
bright0=585b70 # Surface 2
bright1=f38ba8 # red
bright2=a6e3a1 # green
bright3=f9e2af # yellow
bright4=89b4fa # blue
bright5=f5c2e7 # pink
bright6=94e2d5 # teal
bright7=a6adc8 # Subtext 0

View file

@ -0,0 +1,34 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# go
[*.go]
indent_style = tab
indent_size = 4
# python
[*.{ini,py,py.tpl,rst}]
indent_size = 4
# rust
[*.rs]
indent_size = 4
# documentation, utils
[*.{md,mdx,diff}]
trim_trailing_whitespace = false
# windows shell scripts
[*.{cmd,bat,ps1}]
end_of_line = crlf

View file

@ -0,0 +1 @@
gitdir: ../../../../.git/modules/config/foot/themes/catppuccin

View file

@ -0,0 +1,8 @@
[user]
name = aleidk
email = ale.navarro.parra@gmail.com
[pull]
rebase = true
[init]
defaultBranch = main

View file

@ -0,0 +1,58 @@
return {
-- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth",
{
-- Highlight word under cursor
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
opts = { delay = 200 },
config = function(_, opts)
require("illuminate").configure(opts)
end,
},
{ "nvim-treesitter/nvim-treesitter-context" },
{
"uga-rosa/ccc.nvim",
event = "VeryLazy",
opts = {
auto_enable = true,
lsp = true,
},
},
-- Dotfiles management
{
"xvzc/chezmoi.nvim",
dependencies = { "nvim-lua/plenary.nvim", "alker0/chezmoi.vim" },
config = function()
require("chezmoi").setup({
{
edit = {
watch = false,
force = false,
},
notification = {
on_open = true,
on_apply = true,
on_watch = false,
},
telescope = {
select = { "<CR>" },
},
},
})
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
-- INFO: this should be the same as $(chezmoi source-path)
pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/chezmoi/*" },
callback = function()
vim.schedule(require("chezmoi.commands.__edit").watch)
end,
})
local telescope = require("telescope")
telescope.load_extension("chezmoi")
vim.keymap.set("n", "<leader>fz", telescope.extensions.chezmoi.find_files, { desc = "Find dotfile" })
end,
},
}

Some files were not shown because too many files have changed in this diff Show more