Giter VIP home page Giter VIP logo

dotbot-pacaur's Introduction

Dotbot pacaur Plugin

Plugin for dotbot that adds a pacaur directive. It installs official and AUR packages on Arch Linux with pacaur.

This plugin will also attempt to install pacaur if not already installed which should make it easier when setting up a new computer.

Installation

  1. Add dotbot-pacaur as a submodule of your dotfiles.

    git submodule add https://github.com/ajlende/dotbot-pacaur
  2. Add the pacaur directive to your install.conf.yaml.

    - pacaur:
      - zsh
      - neovim
      - atom-editor-bin
      - gitkraken
  3. Edit your install script to enable dotbot-pacaur plugin by modifying the last line with the -p option shown below.

    "${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" \
      -p "${BASEDIR}/dotbot-pacaur/pacaur.py" "${@}"

Other Usages

Run Separately

If you want to run dotbot-pacaur separately from your main configuration, you can do so with the -p option and a packages.conf.yaml configuration that contains only the pacaur section from your install.conf.yaml.

dotbot/bin/dotbot -p dotbot-pacaur/pacaur.py -c packages.conf.yaml

Alternative Directive Name

If you want to separate your official packages from your AUR packages, you can put them in a directive named pacman. Both directives are functionally the same (everything still gets installed with pacaur), but this may allow you to organize things a little more.

- pacman:
  - zsh
  - neovim
- pacaur:
  - atom-editor-bin
  - gitkraken

Basic Example

# ./install

#!/usr/bin/env bash

set -e

CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"

DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

cd "${BASEDIR}"

(cd "${DOTBOT_DIR}" && git submodule update --init --recursive)
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
# ./install.conf.yaml

- defaults:
    link:
      relink: true

- clean: ['~']

- link:
    ~/.dotfiles: ''
    ~/.tmux.conf: tmux.conf
    ~/.vim: vim
    ~/.vimrc: vimrc

- shell:
  - [git submodule update --init --recursive, Installing submodules]

- pacaur:
  - zsh
  - neovim
  - atom-editor-bin
  - gitkraken

Advanced Example

My own dotfiles configuration shows an example of a more advanced usage, splitting up different sections into different files and swapping dotbot-pacaur for dotbot-brew on MacOS.

dotbot-pacaur's People

Contributors

ajlende avatar darion avatar grzesuav avatar insuusvenerati avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dotbot-pacaur's Issues

Feature request: Flatten lists prior to passing to plugins so that yaml anchors can be used

Hello,

Posting this request here from anishathalye/dotbot#122

My request is fairly simple. I'm in a situation where I'm jumping between a macbook and a linux machine and I'm using both dotbot-pacuar and dotbot-brew to maintain a list of my packages for both machines.

The lists contain, for the most part, the same exact packages with a few here and there differences.

Currently, there's no way to use reference anchors in the plugin yaml file so I have to write my package lists like this:

- pacaur:
  - package1
  - package2
  - package3
  - package4
  - package5
  - linux-specific1

- brew:
  - package1
  - package2
  - package3
  - package4
  - package5
  - mac-specific1
  - mac-specific2

As you can see, there's a lot of unnecesary repeats between both lists.

What I'd like to do instead is this:

- &common
  - package1
  - package2
  - package3
  - package4
  - package5

- pacaur:
  - *common
  - linux-specific1

- brew:
  - *common
  - mac-specific1
  - mac-specific2

This almost works right now, but the hangup is that dotbot doesn't first flatten the lists prior to passing them to the plugins. So what the plugins end up getting is this:

- pacaur:
  -
    - package1
    - package2
    - package3
    - package4
    - package5
  - 
    - linux-specific1

- brew:
  - 
    - package1
    - package2
    - package3
    - package4
    - package5
  - 
    - mac-specific1
    - mac-specific2

Hope that makes sense. Thanks for considering! ๐Ÿ˜„

Action pacaur not handled

Thanks for this plugin for dotbot, is awesome!, but i can't make it work, I have done the installation as you say and I have put in the conf.yaml file the directive as well:

"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" \
  --plugin-dir "${BASEDIR}/dotbot-pacaur" "${@}"

but I receive "Action pacaur not handler" when runs the script.

In my arch.conf.yaml i have this with 4 spaces:

- pacaur:
    - zsh
    - vim
and more...

I'm can't find a solution.

Thanks for your work!

Cannot use pacaur plug-in with ./install

In order to get the pacaur plugin to work, I have to run, from my dotfiles repo, dotbot/bin/dotbot -p dotbot-pacaur/pacaur.py -c packages.conf.yaml rather than ./install -p dotbot-pacaur/pacaur.py -c packages.conf.yaml. What am I doing wrong?

The output I get is the same as if ./install was running my default config, then this on stderr:

usage: dotbot [-h] [-Q] [-q] [-v] [-d BASEDIR] [-c CONFIGFILE] [-p PLUGIN]
              [--disable-built-in-plugins] [--plugin-dir PLUGIN_DIR]
              [--no-color] [--version]
dotbot: error: argument -c/--config-file: expected one argument

Handling of aur-git packages failes

I added some *-git packages to the profile, installation works fine but any subsequent invocation fails on first *-git package on the list - probably output is not handled well - I tried nail down the issue, but I am not python-not-even-begginer. Could you add support for *-git packages support or point to a place where fix should be made ?

Thanks and regards !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.