anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.9k stars 287 forks source link

How to add exclusion #331

Open InvisibleRasta opened 1 year ago

InvisibleRasta commented 1 year ago

Hello, I am trying to figure out how to exclude the contents of mpris-cache. How would i add the exclusion in the config?

# install.conf.yaml
- defaults:
    link:
      relink: true

- clean: ['~']

- link:
    ~/.vimrc: vimrc
     ~/.zshrc: zshrc
    ~/.nanorc: nanorc
    ~/.config/awesome: config/awesome
    ~/.local/bin: local/bin
    ~/.config/nvim: config/nvim
    ~/.config/ranger: config/ranger
    ~/.config/rofi: config/rofi
    ~/.local/share/icons: local/share/icons
    ~/.themes: themes
    ~/.local/share/gnome-shell/extensions: local/share/gnome-shell/extensions

I want to exclude the contents of mpris-cache

.dotfiles/local/share/gnome-shell/extensions/widgets@aylur/media/mpris-cache/*

anishathalye commented 1 year ago

This configuration symlinks ~/.local/share/gnome-shell/extensions to point to {your dotfiles directory}/local/share/gnome-shell/extensions. So if some program is putting its cache contents in that directory, you probably want to gitignore it. You can accomplish this by putting a .gitignore file somewhere in the folder hierarchy and giving a path to that file. E.g., put a .gitignore file in the root of your dotfiles repository (and check that file in to Git), with the following contents:

local/share/gnome-shell/extensions/widgets@aylur/media/mpris-cache/

You can also put the .gitignore file lower down, e.g. in .dotfiles/local/share/gnome-shell/extensions/.gitignore, with the following contents:

widgets@aylur/media/mpris-cache/