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 2.0.0

A collection of custom resources that manage user dotfiles.

Policyfile
Berkshelf
Knife
cookbook 'dotfiles', '~> 2.0.0', :supermarket
cookbook 'dotfiles', '~> 2.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:

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

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 to hostname_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:

Property Arguments Description Default
theme name Set the Bash It theme. "bobby"
option name, value Export a Bash It option. This attribute can be specified multiple times. nil
feature name, type Enables a Bash It feature. This attribute can be specified multiple times. nil
aliases name Enables an 'aliases' feature. This attribute can be specified multiple times. nil
completion name Enables a 'completion' feature. This attribute can be specified multiple times. nil
plugin name Enables a 'plugin' feature. This attribute can be specified multiple times. nil

conky_dotfile

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

This resource includes the following mixins:

Property Arguments Description Default
text text Set the Conky TEXT contents nil
option name, value Set a Conky option. This attribute can be specified multiple times. nil

generic_dotfile

Creates a generic configuration file.

This resource includes the following mixins:

Property Arguments Description Default
parameters hash A hash of parameters that can be used in the dotfile. {}

git_dotfile

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

This resource includes the following mixins:

Property Arguments Description Default
url name, block Define a URL option. Can be passed an additional block with options. This attribute can be specified multiple times. nil
git_alias name, command Define a Git alias. This attribute can be specified multiple times. nil
color type, name, foreground: nil, background: nil, attribute: nil Define a color option. This attribute can be specified multiple times. nil
option section, subsection=nil, name, value Set a Git option. This attribute can be specified multiple times. nil
include_path path Include an additional config file. This attribute can be specified multiple times. nil

gnupg_dotfile

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

This resource includes the following mixins:

Property Arguments Description Default
option name, value... Set a GnuPG option. This attribute can be specified multiple times. nil

ssh_dotfile

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

This resource includes the following mixins:

Property Arguments Description Default
option name, value Set a global SSH option. This attribute can be specified multiple times. nil
host name, block Define a host. Can be passed an additional block with options. This attribute can be specified multiple times. nil

tmux_dotfile

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

This resource includes the following mixins:

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

vim_dotfile

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

This resource includes the following mixins:

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

vim_colors_dotfile

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

This resource includes the following mixins:

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

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:

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

xmonad_dotfile

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

This resource includes the following mixins:

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

xresources_dotfile

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

This resource includes the following mixins:

Property Arguments Description Default
xresource name, value Configure an X resource. This attribute can be specified multiple times. nil

xsession_dotfile

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

This resource includes the following mixins:

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

zsh_dotfile

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

This resource includes the following mixins:

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

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:

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

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_dotfile

This is the base resource for dotfiles. It declares default actions and
common properties for all dotfiles. A dotfile can have various sources
(template, file or Git repository).
In addition, a dotfile can create additional required directories, or
perform additional actions in form of Chef resources.

Action Description Default
create Creates the dotfile true
Property Arguments Description Default
target target The file or directory created, implementing the dotfile. nil
executable executable Whether the dotfile should be executable. false
template_source name, cookbook: 'dotfiles' Configure a template as the dotfile source. nil
file_source name, cookbook: 'dotfiles' Configure a cookbook file as the dotfile source. nil
remote_source name Configure a remote file as the dotfile source. nil
git_source repository, reference: 'master' Configure a Git repository as the dotfile source. nil
create_directory name Creates a directory relative to the home directory. This attribute can be specified multiple times. nil
additional_action action A proc defining an additional action to be performed. This attribute can be specified multiple times. nil

dotfiles_shell

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

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

Prompt Builder

The dotfiles cookbook contains a prompt builder for shell dotfiles, to
simplify the definition of custom prompts. The prompt builder is extended by
the individual shell resources. By default, it includes functions to set the
foreground and background colors and style of prompt segments.

Example:

prompt do
  segment red('foo'), blue('bar'), clear
end

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

Recipes

dotfiles::solarized

Defines solarized palettes for applications in form of shared properties. The defined
blocks are:
* :xresources_solarized_dark the solarized dark color palette for xresources
* :xresources_solarized_light_colors the solarized light color palette for xresources

dotfiles::shell_options

Defines a set common shell options in form of shared properties. 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 properties. 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.

Collaborator Number Metric
            

2.0.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

2.0.0 failed this metric

FC016: LWRP does not declare a default action: dotfiles/resources/bash.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/bash_it.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/conky.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/generic.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/git.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/gnupg.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/ssh.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/tmux.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/vim.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/vim_colors.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/xresources.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/xsession.rb:1
FC016: LWRP does not declare a default action: dotfiles/resources/zsh.rb:1
FC066: Ensure chef_version is set in metadata: dotfiles/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: dotfiles/metadata.rb:1
FC069: Ensure standardized license defined in metadata: dotfiles/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: dotfiles/resources/xmonad.rb:1
FC117: Do not use kind_of in custom resource properties: dotfiles/resources/vim_pathogen.rb:48
FC117: Do not use kind_of in custom resource properties: dotfiles/resources/zsh_oh_my_zsh.rb:65
FC117: Do not use kind_of in custom resource properties: dotfiles/resources/zsh_oh_my_zsh.rb:68
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

2.0.0 failed this metric

Failure: Cookbook should not contain binaries. Found:
dotfiles/files/default/vendor/cache/chef-cookie_cutter-0.2.1.gem

Testing File Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number