17 profile backups (#42)

* Update Brave profile folder paths

* Filled browser profile locations

* Initial work on Mackup support

* Add path for snap and flatpak install

* Add info about mackup

* Added mackup config for Altair
This commit is contained in:
enggnr 2023-07-19 09:33:52 +05:30 committed by GitHub
parent 42d35cfc43
commit 5659eae991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 251 additions and 12 deletions

View file

@ -0,0 +1,79 @@
[storage]
engine = file_system
path = .local
directory = mackup
[applications_to_sync]
aria2c
autokey
aws
azure
bash
bat
beets
brave
cerebro
chrome
composer
conky
docker
edge
emacs
ferdium
filezilla
firefox
fontconfig
gimp
git
git-hooks
git-kraken
gradle
homebrew
htop
httpie
hyper
inkscape
intellijidea
iterm2
kitty
kubectl
libreoffice
librewolf
littlesnitch
lollypop
mackup
microsoft-remote-desktop
mitmproxy
ngrok
npm
npmrc
pandoc
pass
pip
pnpm
poetry
powerline
prezto
rbenv
remmina
rclone
ripgrep
ruby
rvm
ssh
starship
t
terminal
terminator
terraform
tmux
vim
vlc
vscode
wireshark
wp-cli
xcode
xonsh
yarn
zoxide
zsh

View file

@ -0,0 +1,10 @@
[application]
name = Altair GraphQL Client
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/Altair GraphQL Client
{{- else if (eq .host.distro.family "linux") -}}
.config/Altair GraphQL Client
snap/altair/current/.config/Altair GraphQL Client
{{ end }}

View file

@ -0,0 +1,11 @@
[application]
name = Brave
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/BraveSoftware/Brave-Browser/Default
{{- else if (eq .host.distro.family "linux") -}}
.config/BraveSoftware/Brave-Browser/Default
snap/brave/current/.config/BraveSoftware/Brave-Browser/Default
.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser/Default
{{ end }}

View file

@ -0,0 +1,13 @@
[application]
name = Google Chrome
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/Google/Chrome/Default
{{- else if (eq .host.distro.family "linux") -}}
.config/google-chrome/default
.config/chromium/default
snap/chromium/common/chromium/Default
.var/app/org.chromium.Chromium/config/chromium/Default
.var/app/com.google.Chrome/config/google-chrome/Default
{{ end }}

View file

@ -0,0 +1,10 @@
[application]
name = Edge
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/Microsoft Edge/Default
{{- else if (eq .host.distro.family "linux") -}}
.config/microsoft-edge/Default
.var/app/com.microsoft.Edge/config/microsoft-edge/Default
{{ end }}

View file

@ -0,0 +1,11 @@
[application]
name = Ferdium
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/Ferdium
{{- else if (eq .host.distro.family "linux") -}}
.config/Ferdium/
snap/ferdium/current/.config/Ferdium
.var/app/org.ferdium.Ferdium/config/Ferdium
{{ end }}

View file

@ -0,0 +1,11 @@
[application]
name = Firefox
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/Firefox/Profiles
{{- else if (eq .host.distro.family "linux") -}}
.mozilla/firefox
snap/firefox/common/.mozilla/firefox
.var/app/org.mozilla.firefox/.mozilla/firefox
{{ end }}

View file

@ -0,0 +1,10 @@
[application]
name = LibreWolf
[configuration_files]
{{- if (eq .host.distro.family "darwin") -}}
Library/Application Support/LibreWolf/Profiles
{{- else if (eq .host.distro.family "linux") -}}
.librewolf
.var/app/io.gitlab.librewolf-community/.librewolf
{{ end }}

View file

@ -0,0 +1,9 @@
[application]
name = Remmina
[xdg_configuration_files]
remmina/remmina.pref
[configuration_files]
snap/remmina/current/.config/remmina/remmina.pref
.var/app/org.remmina.Remmina/config/remmina/remmina.pref

View file

@ -0,0 +1,5 @@
[application]
name = Terraform
[configuration_files]
.terraformrc

View file

@ -48,6 +48,7 @@ export PATH="$HOME/.local/bin/cask:$PATH"
export PATH="$HOME/.local/bin/docker:$PATH" export PATH="$HOME/.local/bin/docker:$PATH"
export PATH="$HOME/.local/bin/firejail:$PATH" export PATH="$HOME/.local/bin/firejail:$PATH"
export PATH="$HOME/.local/bin/flatpak:$PATH" export PATH="$HOME/.local/bin/flatpak:$PATH"
export PATH="$HOME/.local/bin/mackup:$PATH"
export SSH_KEY_PATH="$HOME/.ssh/id_rsa" export SSH_KEY_PATH="$HOME/.ssh/id_rsa"
### Homebrew ### Homebrew

View file

@ -99,7 +99,10 @@ tasks:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: Brave Browser AppName: Brave Browser
ProfileFolder: ~/Library/Application Support/BraveSoftware/Brave-Browser/Default ProfileFolderDarwin: ~/Library/Application Support/BraveSoftware/Brave-Browser/Default
ProfileFolderLinux: ~/.config/BraveSoftware/Brave-Browser/Default
ProfileFolderWindows: %APPDATA%/Local/BraveSoftware/Brave-Browser/Default
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: brave RcloneRepository: brave
brave:profile:restore: brave:profile:restore:
@ -124,7 +127,10 @@ tasks:
vars: vars:
AppFolder: /Applications/Brave Browser.app AppFolder: /Applications/Brave Browser.app
AppName: Brave Browser AppName: Brave Browser
ProfileFolder: ~/Library/Application Support/BraveSoftware/Brave-Browser/Default ProfileFolderDarwin: ~/Library/Application Support/BraveSoftware/Brave-Browser/Default
ProfileFolderLinux: ~/.config/BraveSoftware/Brave-Browser/Default
ProfileFolderWindows: %APPDATA%/Local/BraveSoftware/Brave-Browser/Default
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: brave RcloneRepository: brave
chrome:profile:backup: chrome:profile:backup:
@ -149,7 +155,10 @@ tasks:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: Google Chrome AppName: Google Chrome
ProfileFolder: ~/Library/Application Support/Google/Chrome/Default ProfileFolderDarwin: ~/Library/Application Support/Google/Chrome/Default
ProfileFolderLinux: ~/.config/google-chrome/default
ProfileFolderWindows: %LOCALAPPDATA%/Google/Chrome/User Data/Default
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: chrome RcloneRepository: chrome
chrome:profile:restore: chrome:profile:restore:
@ -174,7 +183,10 @@ tasks:
vars: vars:
AppFolder: /Applications/Google Chrome.app AppFolder: /Applications/Google Chrome.app
AppName: Google Chrome AppName: Google Chrome
ProfileFolder: ~/Library/Application Support/Google/Chrome/Default ProfileFolderDarwin: ~/Library/Application Support/Google/Chrome/Default
ProfileFolderLinux: ~/.config/google-chrome/default
ProfileFolderWindows: %LOCALAPPDATA%/Google/Chrome/User Data/Default
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: chrome RcloneRepository: chrome
edge:profile:backup: edge:profile:backup:
@ -199,7 +211,10 @@ tasks:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: Microsoft Edge AppName: Microsoft Edge
ProfileFolder: ~/Library/Application Support/Microsoft Edge/Default ProfileFolderDarwin: ~/Library/Application Support/Microsoft Edge/Default
ProfileFolderLinux: ~/.config/microsoft-edge/Default
ProfileFolderWindows: %LOCALAPPDATA%/Microsoft/Edge/User Data/Default
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: edge RcloneRepository: edge
edge:profile:restore: edge:profile:restore:
@ -224,7 +239,10 @@ tasks:
vars: vars:
AppFolder: /Applications/Microsoft Edge.app AppFolder: /Applications/Microsoft Edge.app
AppName: Microsoft Edge AppName: Microsoft Edge
ProfileFolder: ~/Library/Application Support/Microsoft Edge/Default ProfileFolderDarwin: ~/Library/Application Support/Microsoft Edge/Default
ProfileFolderLinux: ~/.config/microsoft-edge/Default
ProfileFolderWindows: %LOCALAPPDATA%/Microsoft/Edge/User Data/Default
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: edge RcloneRepository: edge
ferdium:profile:backup: ferdium:profile:backup:
@ -249,7 +267,10 @@ tasks:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: Ferdium AppName: Ferdium
ProfileFolder: ~/Library/Application Support/Ferdium ProfileFolderDarwin: ~/Library/Application Support/Ferdium
ProfileFolderLinux: ~/.config/Ferdium/
ProfileFolderWindows: %APPDATA%/Ferdium
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: ferdium RcloneRepository: ferdium
ferdium:profile:restore: ferdium:profile:restore:
@ -274,7 +295,10 @@ tasks:
vars: vars:
AppFolder: /Applications/Ferdium.app AppFolder: /Applications/Ferdium.app
AppName: Ferdium AppName: Ferdium
ProfileFolder: ~/Library/Application Support/Ferdium ProfileFolderDarwin: ~/Library/Application Support/Ferdium
ProfileFolderLinux: ~/.config/Ferdium/
ProfileFolderWindows: %APPDATA%/Ferdium
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: ferdium RcloneRepository: ferdium
firefox:profile:backup: firefox:profile:backup:
@ -299,7 +323,10 @@ tasks:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: Firefox AppName: Firefox
ProfileFolder: ~/Library/Application Support/Firefox/Profiles/profile.private ProfileFolderDarwin: ~/Library/Application Support/Firefox/Profiles/profile.private
ProfileFolderLinux: ~/.mozilla/firefox
ProfileFolderWindows: %APPDATA%/Mozilla/Firefox/Profiles
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: firefox RcloneRepository: firefox
firefox:profile:restore: firefox:profile:restore:
@ -324,7 +351,10 @@ tasks:
vars: vars:
AppFolder: /Applications/Firefox.app AppFolder: /Applications/Firefox.app
AppName: Firefox AppName: Firefox
ProfileFolder: ~/Library/Application Support/Firefox/Profiles/profile.private ProfileFolderDarwin: ~/Library/Application Support/Firefox/Profiles/profile.private
ProfileFolderLinux: ~/.mozilla/firefox
ProfileFolderWindows: %APPDATA%/Mozilla/Firefox/Profiles
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: firefox RcloneRepository: firefox
font-test: font-test:
@ -359,7 +389,10 @@ tasks:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: LibreWolf AppName: LibreWolf
ProfileFolder: ~/Library/Application Support/LibreWolf/Profiles/profile.default ProfileFolderDarwin: ~/Library/Application Support/LibreWolf/Profiles/profile.default
ProfileFolderLinux: ~/.librewolf
ProfileFolderWindows: %USERPROFILE%/.librewolf
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: librewolf RcloneRepository: librewolf
librewolf:profile:restore: librewolf:profile:restore:
@ -384,7 +417,10 @@ tasks:
vars: vars:
AppFolder: /Applications/LibreWolf.app AppFolder: /Applications/LibreWolf.app
AppName: LibreWolf AppName: LibreWolf
ProfileFolder: ~/Library/Application Support/LibreWolf/Profiles/profile.default ProfileFolderDarwin: ~/Library/Application Support/LibreWolf/Profiles/profile.default
ProfileFolderLinux: ~/.librewolf
ProfileFolderWindows: %USERPROFILE%/.librewolf
ProfileFolder: '{{if eq OS "linux"}}{{.ProfileFolderLinux}}{{else if eq OS "darwin"}}{{.ProfileFolderDarwin}}{{else}}{{.ProfileFolderWindows}}{{end}}'
RcloneRepository: librewolf RcloneRepository: librewolf
macos:plists: macos:plists:

View file

@ -0,0 +1,33 @@
{{- if ne .host.distro.family "windows" -}}
#!/usr/bin/env bash
# @file ~/.local/bin/mackup
# @brief Creates a wrapper around `mackup` to add support for XDG directories
# @description
# This script is a wrapper around the `mackup`. `Mackup` does not support XDG specification
# for its configuration. The script symlinks the `.config/mackup/.mackup/` folder to `~/.mackup` and
# the `.config/mackup/.mackup.cfg` file to `~/.mackup.cfg` before executing `mackup`. The symlinks
# are deleted after mackup runs.
#
# [mackup](https://github.com/lra/mackup) is a tool that can help in keeping your application settings
# in sync across multiple computers. It supports many different storage solutions like Dropbox, Google Drive, etc.
# to store the settings and sync them across machines. It can also help in restoring settings on a new installation.
# A number of applications are supported out of the box. It is trivial to add more applications. Refer to the
# [documentation](https://github.com/lra/mackup/blob/master/doc) for details.
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
ln -s "$HOME/.config/mackup/.mackup/" ~/.mackup
ln -s "$HOME/.config/mackup/.mackup.cfg" ~/.mackup.cfg
if command -v brew > /dev/null && brew list | grep mackup > /dev/null; then
$(brew --prefix)/bin/mackup "$@" || echo ''
elif (command -v pip3 > /dev/null && pip3 list | grep mackup > /dev/null) || \
(command -v pip > dev/null && pip3 list | grep mackup > /dev/null) || \
(command -v pipx > dev/null && pipx list | grep mackup > /dev/null); then
~/.local/bin/mackup "$@" || echo ''
else
logg warn 'Homebrew/Python pip is not found. Install `mackup` using one of these methods'
fi
rm -f ~/.mackup
rm -f ~/.mackup.cfg
{{ end }}