Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

dotfiles (3) Versions 1.0.0

A collection of custom resources that manage user dotfiles.

Policyfile
Berkshelf
Knife
cookbook 'dotfiles', '= 1.0.0', :supermarket
cookbook 'dotfiles', '= 1.0.0'
knife supermarket install dotfiles
knife supermarket download dotfiles
README
Dependencies
Quality 0%

dotfiles

A collection of custom resources that manage user dotfiles.

Chef Cookie Cutter

This cookbook bundles the Cookie Cutter
gem, which provides a lot of the dotfile functionality. All DSL extensions
from the Cookie Cutter gem are directly available if this cookbook is included.
In fact, this cookbook is pretty much the playground, testing area and main
reason that gem exists.

Requirements

This cookbook requires Chef >= 12.5.1.

Resources

bash_dotfile

Creates the Bash configuration file for a user, by default ~/.bashrc.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_shell

Property Description Default
bash_it Include Bash It configuration. Must be a bash_it_dotfile resource or a block. <code>nil</code>
prompt Configure the Bash prompt (see Prompt Builder). <code>nil</code>
option Set either a Bash option or Shell option. This attribute can be specified multiple times. <code>nil</code>

Bash Prompt

The bash_dotfile supports the Prompt Builder and adds the following options:
* date: The date in "Weekday Month Date" format (e.g., "Tue May 26")
* hostname_short: The hostname up to the first .'
*
hostname_long: The full hostname
*
hostname: The full hostname (equivalent tohostname_long)
*
jobs: The number of jobs currently managed by the shell
*
tty: The basename of the shell's terminal device name
*
shell: The name of the shell
*
time: The current time in 24-hour HH:MM:SS format
*
time_24h: The current time in 24-hour HH:MM:SS format
*
time_12h: The current time in 12-hour HH:MM:SS format
*
time_am_pm: The current time in 12-hour am/pm format
*
user: The username of the current user
*
version: The version of bash (e.g., 2.00)
*
version_long: The release of bash, version + patch level (e.g., 2.00.0)
*
cwd: The current working directory, with $HOME abbreviated with a tilde
*
cwd_base: The basename of the current working directory, with $HOME abbreviated with a tilde
*
history: The history number of this command
*
command: The command number of this command
*
pound`: If the effective UID is 0, a #, otherwise a $

bash_it_dotfile

Installs Bash It. This resource alone
will not configure Bash to use Bash It. To do this, add this resource to a
bash_dotfile resource.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
theme Set the Bash It theme. <code>"bobby"</code>
option arguments: (name, value) Export a Bash It option. This attribute can be specified multiple times. <code>nil</code>
feature arguments: (name, type) Enables a Bash It feature. This attribute can be specified multiple times. <code>nil</code>
aliases Enables an 'aliases' feature. This attribute can be specified multiple times. <code>nil</code>
completion Enables a 'completion' feature. This attribute can be specified multiple times. <code>nil</code>
plugin Enables a 'plugin' feature. This attribute can be specified multiple times. <code>nil</code>

conky_dotfile

Creates a Conky configuration file,
by default ~/.conkyrc.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
text Set the Conky TEXT contents <code>nil</code>
option arguments: (name, value) Set a Conky option. This attribute can be specified multiple times. <code>nil</code>

generic_dotfile

Creates a generic configuration file.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
parameters A hash of parameters that can be used in the dotfile. <code>{}</code>

git_dotfile

Creates a Git configuration file, by default
~/.gitconfig.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_colorscheme

Property Description Default
url Define a URL option. Can be passed an additional block with options. This attribute can be specified multiple times. <code>nil</code>
git_alias arguments: (name, command) Define a Git alias. This attribute can be specified multiple times. <code>nil</code>
include_path Include an additional config file. This attribute can be specified multiple times. <code>nil</code>

Git color scheme

The git_dotfile resource supports color schemes. If given, it will configure
the diff, branches and status output to use colors from the given color scheme.

gnupg_dotfile

Creates a GnuPG configuration file, by default
~/.gnupg/gpg.conf.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
option arguments: (name, value, ...) Set a GnuPG option. This attribute can be specified multiple times. <code>nil</code>

ssh_dotfile

Creates a SSH configuration file, by default ~/.ssh/config.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
option arguments: (name, value) Set a global SSH option. This attribute can be specified multiple times. <code>nil</code>
host Define a host. Can be passed an additional block with options. This attribute can be specified multiple times. <code>nil</code>

tmux_dotfile

Creates a tmux configuration file, by default
~/.tmux.conf.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
prefix_key Rebind the tmux prefix key. <code>nil</code>
option arguments: (name, value=true, scope: '') Set a tmux option with the given scope. This attribute can be specified multiple times. <code>nil</code>
session_option arguments: (name, value=true) Set a tmux session option (default scope). This attribute can be specified multiple times. <code>nil</code>
window_option arguments: (name, value=true) Set a tmux window option (scope = 'w'). This attribute can be specified multiple times. <code>nil</code>
server_option arguments: (name, value=true) Set a tmux server option (scope = 's'). This attribute can be specified multiple times. <code>nil</code>
bind_key arguments: (key, command, arguments, ..., no_prefix: false, key_table: nil) Bind a key to a command. This attribute can be specified multiple times. <code>nil</code>
unbind_key Remove an existing keybinding. This attribute can be specified multiple times. <code>nil</code>

vim_dotfile

Creates a Vim configuration file, by default ~/.vimrc.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
colors Set the Vim colorscheme. <code>nil</code>
pathogen Include Vim Pathogen configuration. Must be a vim_pathogen_dotfile resource or a block. <code>nil</code>
option arguments: (name, value=true) Set a Vim option. This attribute can be specified multiple times. <code>nil</code>
global_variable arguments: (name, value=true) Set a global Vim variable. This attribute can be specified multiple times. <code>nil</code>
directory_option arguments: (name, directory) Set a Vim option to a directory relative to home, and create that directory. This attribute can be specified multiple times. <code>nil</code>

vim_colors_dotfile

Creates a Vim colorscheme file in '~/.vim/colors/<name>.vim'.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_colorscheme

Property Description Default
colors_name Name of the colorscheme, also determines the filename. <code>nil</code>
background If the colorscheme should set a light or dark background. <code>nil</code>
highlight arguments: (name, foreground: nil, background: nil, attribute: nil) Define a highlight option. This attribute can be specified multiple times. <code>nil</code>

vim_pathogen_dotfile

Installs Vim Pathogen. This resource
alone will not configure Vim to use Pathogen. To do this, add this resource to
a vim_dotfile resource.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
plugin_directory The target directory where Pathogen stores itself and plugins. <code>".vim/bundle"</code>
install_plugin arguments: (name, git_repository) Install a plugin for Pathogen. This attribute can be specified multiple times. <code>nil</code>

xmonad_dotfile

Creates a xmonad configuration file, by default
~/.xmonad/xmonad.hs.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_colorscheme

Property Description Default
import Import a haskell module. This attribute can be specified multiple times. <code>nil</code>
config Name of the function that supplies the xmonad config object. <code>"defaultConfig"</code>
config_modifier Function that is applied to the config object. This attribute can be specified multiple times. <code>nil</code>
terminal Name of the terminal emulator that is spawned by default. <code>"xterm"</code>
focus_follows_mouse Whether the window focus should follow the mouse cursor. <code>true</code>
border_width Size of the border around windows. <code>1</code>
mod_mask Name of the modifier key. Affects all key bindings. <code>"mod1Mask"</code>
workspaces Haskell expression that defines the available workspaces. <code>"map show [1 .. 9 :: Int]"</code>
normal_border_color Border color for normal windows. <code>"#dddddd"</code>
focused_border_color Border color for focused windows. <code>"#ff0000"</code>
key_binding arguments: (key, action:, shift: false) Bind an action to a key. This attribute can be specified multiple times. <code>nil</code>
mouse_binding arguments: (key, action: shift: false) Bind an action to a mouse button. This attribute can be specified multiple times. <code>nil</code>
layout_hook Name of a Haskell function that is used as the layout hook. <code>nil</code>
manage_hook Name of a Haskell function that is used as the manage hook. <code>nil</code>
handle_event_hook Name of a Haskell function that is used as the manage event hook. <code>nil</code>
log_hook Name of a Haskell function that is used as the log hook. <code>nil</code>
startup_hook Name of a Haskell function that is used as the startup hook. <code>nil</code>
haskell_block Define a plain Haskell block in the configuration file. This attribute can be specified multiple times. <code>nil</code>

Xmonad color scheme

The xmonad_dotfile resource supports color schemes. If given, it will
configure the border color of normal and focused windows to use colors from
the given color scheme.

xresources_dotfile

Creates an X resources file, by default ~/.Xresources.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_colorscheme

Property Description Default
xresource arguments: (name, value) Configure an X resource. This attribute can be specified multiple times. <code>nil</code>

X color scheme

The xresources_dotfile resource supports color schemes. If given, it will
configure the default color palette as well as foreground and background colors
from the color scheme.

xsession_dotfile

Creates an X startup script file, by default ~/.xsession.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_colorscheme

Property Description Default
wm_command Shell command that represents the session. The session will stop when this command returns. <code>nil</code>
command Shell command that should be executed at the start of the session. This attribute can be specified multiple times. <code>nil</code>
xresources_from_file Merge the configuration from the given files into xrdb. This attribute can be specified multiple times. <code>nil</code>
xresource arguments: (name, value) Merge a given X resource configuration directly into xrdb. This attribute can be specified multiple times. <code>nil</code>
option arguments: (command, option, argument, ...) Set a X option with either the xsetroot or xset command. This attribute can be specified multiple times. <code>nil</code>
cursor Set the X cursor. <code>nil</code>
background_image Set the X background image to a bitmap. <code>nil</code>
background_color Set the X background to a solid color. <code>nil</code>
bell Configure the bell. Arguments can be 'off' or a combination of volume:, pitch: and duration:. <code>nil</code>
click Configure key clicks. Arguments can be 'on', 'off' or a volume in percent. <code>nil</code>
dpms Configure DPMS parameters. Arguments can be 'off', or a combination of standby:, suspend: and off:. <code>nil</code>
font_path Append an element to the current font path. <code>nil</code>
mouse arguments: (acceleration: 2, threshold: 0) Configure mouse parameters. <code>nil</code>
pixel arguments: (entry:, color:) Configure pixel color values in the color map. <code>nil</code>
screen_saver Configure screen saver parameters. Arguments can be 'on' or 'off'. <code>nil</code>

X session color scheme

The xsession_dotfile resource supports color schemes. If given, it will
configure a solid background color from the color scheme.

zsh_dotfile

Creates the Zsh configuration file for a user, by
default ~/.zshrc.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile
- dotfiles_shell

Property Description Default
oh_my_zsh Include Oh My Zsh configuration. Must be a oh_my_zsh_dotfile resource or a block. <code>nil</code>
prompt Configure the Zsh prompt (see Prompt Builder). <code>nil</code>
option Set a Zsh option. This attribute can be specified multiple times. <code>nil</code>

oh_my_zsh_dotfile

Installs Oh My Zsh. This resource
alone will not configure Zsh to use Oh My Zsh. To do this, add this resource
to a zsh_dotfile resource.

This resource includes the following mixins:
- dotfiles_user_info
- dotfiles_dotfile

Property Description Default
plugin_directory Directory that Oh My Zsh uses to store plugins, relative to home directory. <code>"custom/plugins"</code>
theme The selected Oh My Zsh theme. <code>"robbyrussell"</code>
option arguments: (name, value) Export a Oh My Zsh option. This attribute can be specified multiple times. <code>nil</code>
plugin arguments: (name, git: nil, enable: true) Install and enable a Oh My Zsh plugin. This attribute can be specified multiple times. <code>nil</code>

Mixin Resources

Mixin resources are
resources that are used like ruby mixins. This means that they can not be used
directly, but add common functionality to other resources.

dotfiles_colorscheme

Adds support for color schemes to a dotfile resource.

Property Description Default
colorscheme Set the color scheme for the dotfile. <code>nil</code>

dotfiles_dotfile

This is the base resource for dotfiles. It declares default actions and
common properties for all dotfiles. A dotfile has one of these types:
* :template Creates target file relative to the user's home directory, based
on a ruby template.
* :git_checkout Creates a target directory relative to the user's home
directory that is synced with a git repository.
In addition, a dotfile can create additional required directories, or
perform additional actions in form of Chef resources.

Action Description Default
[:create] true
create Creates the dotfile false
Property Description Default
target The file or directory created, implementing the dotfile. <code>nil</code>
source The source for the dotfile. Either a template or git resource, depending on the dotfile type. <code>nil</code>
executable Whether the dotfile should be executable. <code>false</code>
type Determines how the dotfile is installed. Either :template or :git_checkout. <code>:template</code>
create_directory Creates a directory relative to the home directory. This attribute can be specified multiple times. <code>nil</code>
additional_action A proc defining an additional action to be performed. This attribute can be specified multiple times. <code>nil</code>

dotfiles_shell

This is the base resources for shell dotfiles. It adds some common properties
for shells.

Property Description Default
shell_alias arguments: (name, command) Define a shell alias. This attribute can be specified multiple times. <code>nil</code>
variable arguments: (name, value) Export an environment variable. This attribute can be specified multiple times. <code>nil</code>
path Add a directory to the PATH environment variable. This attribute can be specified multiple times. <code>nil</code>
source_file Source an external file for custom configuration. This attribute can be specified multiple times. <code>nil</code>
script Include a snippet of plain shell script. This attribute can be specified multiple times. <code>nil</code>

dotfiles_user_info

This resource adds a set of properties to a dotfile resource. It supplies
user information that can be used by the dotfile.

Property Description Default
user User name for which the dotfile is created. Defaults to the current user.
group Group that will own the created dotfile. Defaults to GID of the provided user.
home Home directory of the dotfile. All paths will be relative to this. Defaults to the home directory of the provided user.
full_name Full name of the user. Can be used by all dotfiles that want to use this.
email Email of the user. Can be used by all dotfiles that want to use it. <code>nil</code>

Recipes

dotfiles::colorschemes

Defines a set of color schemes in form of shared blocks. These blocks
can be used in any dotfile resource that supports colorschemes. The defined
blocks are:
* :solarized_dark_colors for the solarized dark color palette
* :solarized_light_colors for the solarized light color palette
* :zenburn_colors for a basic zenburn-inspired theme

dotfiles::shell_options

Defines a set common shell options in form of shared blocks. These blocks
can be used in any shell dotfile resource. The defined blocks are:
* :shell_common_aliases: a set of general purpose shell aliases
* :shell_histoly: increased history size for bash and zsh.

dotfiles::tmux_options

Defines a set common tmux options in form of shared blocks. These blocks
can be used in the tmux dotfile resource. The defined blocks are:
* :tmux_vi_navigation: implements vi-like navigation for tmux

License and Maintainer

Maintainer:: Ole Claussen (claussen.ole@gmail.com)

Source:: https://github.com/oclaussen/chef-dotfiles

Issues:: https://github.com/oclaussen/chef-dotfiles/issues

License:: Apache 2.0

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Foodcritic Metric
            

1.0.0 failed this metric

FC005: Avoid repetition of resource declarations: /tmp/cook/35f767846b148390148f3088/dotfiles/recipes/colorschemes.rb:28
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/bash.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/bash_it.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/conky.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/generic.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/git.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/gnupg.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/ssh.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/tmux.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/vim.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/vim_colors.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/vim_pathogen.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/xmonad.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/xresources.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/xsession.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/zsh.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/35f767846b148390148f3088/dotfiles/resources/zsh_oh_my_zsh.rb:1