Giter VIP home page Giter VIP logo

igloo's Introduction

The snowy dotfile home.

Powered by

Igloo is the snowy dotfile home of Arctic Ice Studio. Powered by snowsaw, the lightweight, plugin-driven and simple configurable dotfile bootstrapper.

Getting started

Installation

Clone the repository and run the bootstrap script:

git clone --recursive https://github.com/arcticicestudio/igloo
cd igloo
./bootstrap

Design Concept

Snowblocks

The design concept is based on topical areas, so-called snowblocks which are a named directory that live in the base snowblocks directory and defaults to <DOTFILE_REPOSITORY_ROOT>/snowblocks.
Snowblocks are configured via snowblock.json files that that will be processed when the base snowblock directory gets scanned recursively, but it is also possible to only process a single snowblock.

This design allows a modular structured dotfile repository where each topic can be represented as a snowblock instead of placing all files and folders without any logical division in the repository root.

Development

Contribution

Please report issues/bugs, feature requests and suggestions for improvements to the issue tracker.

Copyright © 2016-present Arctic Ice Studio

igloo's People

Contributors

arcticicestudio avatar svengreb avatar xulongwu4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

igloo's Issues

snowblock "bash"

Create the bash snowblock.

Target Type Link to Value Options
bootstrap file ~/.bash_profile bootstrap -
bootstrap file ~/.bashrc bootstrap -

The clean task should be run for

  • ~

Add JSX syntax plugin

The mxw/vim-jsx plugin adds syntax highlighting and indenting support for JSX. It is not a standalone JavaScript plugin and must be used with a base JS highlighter and integrates with the currently used and recommended pangloss/vim-javascript plugin (vim-jsx's "official" dependency).

The g:jsx_ext_required configuration should be set to 0 to also enable JSX syntax highlighting in .js files.

NERD Commenter

Add the NERD Commenter plugin dynamic commenting hotkeys with language syntax awareness.

The NERDSpaceDelims config should be enabled to automatically add spaces after comment delimiters.

let g:NERDSpaceDelims = 1

Improved logging alias formats

Alias l and its extensions

  • Currently uses defined colors for the output which should be changed to use the colors of the color scheme.
  • The format should be simplified and minimized/reduced to relevant information: <ABBREVIATED_COMMIT_SHA1> <COMMIT_MESSAGE> [REFS]
  • The extended output should be added as new ll alias with the associated flat shorthand alias llf and should be adapted to the existing lnew and lch aliases:
<COMMIT_SHA1> [REFS]
<AUTHOR_NAME> <AUTHOR_EMAIL>
<COMMIT_ISO_8601_DATE> (<RELATIVE_COMMIT_DATE>)
<COMMIT_MESSAGE>
  • A new alias lf should be added for a flattened output without topic commits from merges (--first-parent)

Alias lr

This alias is superfluous due to the new ll and llf aliases which include the relative date of a commit.

dircolors color theme

Implement a dircolors package configuration for the bash snowblock to load the ~/.dir_colors color theme on initialization.

Autodetect installed Ruby version for PATH concatenation

Currently all Ruby gem paths (~/.gem/ruby/*/bin) for earch version must be the added to the $PATH_RUBY_GEMS variable in the igloo env config manually.
This should be changed to detect installed versions, add it to an array and append it to the $PATH_RUBY_GEMS variable separated with a :.

Migrate to MIT license

Currently the project code is licensed under the Apache 2.0 license. This often causes problems when developers want to use the project or code parts of it in another project licensed under a less restricted license.

The project should migrate to the MIT license which is more open, unrestricted and the most used license for open source projects like React which has also recently been re-licensed.

Tasks

  • Update all license SVG badges
  • Update the LICENSE.md content
  • Update- and simplify all source code comment header

systemd user units

The new systemd snowblock should include user service units to

  1. automount the sync gocryptfs volume located in the Dropbox folder receiving the password stored in the GNOME keyring via secret-tool (libsecret). The service unit should be named igloosync-dropbox.
  2. automatically run a instance of the ssh-agent using the $SSH_AUTH_SOCK and let systemd manage the $SSH_AGENT_PID env

The new snowblock should include a documentation to describe the requirements for the igloosync-dropbox.service file. It should contain information

  • about how to create the required gocryptfs password stored- and received via secret-tool
  • about how to configure FUSE (libfuse) with the /etc/fuse.conf file to allow non-root users to specify the allow_other or allow_root mount options which overrides the security measure restricting file access to the filesystem owner, so that all users (including root) can access the files. This is necessary to access the files of the mounted gocryptfs volume with applications that are run via sudo. It is used in the pacman snowblock for the local package repository to prevent a Permission Denied exception when running pacman (e.g. sudo pacman -Sy) if the gocryptfs volume is not mounted with the -allow_other option. Please note that libfuse has a unresolved security bug when using the allow_other mount option as described in the official documentation, but is of little concern if the filesystem is accessible only to the mounting user which is the case since these are dotfiles for a personal system:

No other user (including root) can access the contents of the mounted filesystem (though this can be relaxed by allowing the use of the allow_other and allow_root mount options in /etc/fuse.conf)

If you intend to use the allow_other mount options, be aware that FUSE has an unresolved security bug: if the default_permissions mount option is not used, the results of the first permission check performed by the file system for a directory entry will be re-used for subsequent accesses as long as the inode of the accessed entry is present in the kernel cache - even if the permissions have since changed, and even if the subsequent access is made by a different user. This is of little concern if the filesystem is accessible only to the mounting user (which has full access to the filesystem anyway), but becomes a security issue when other users are allowed to access the filesystem (since they can exploit this to perform operations on the filesystem that they do not actually have permissions for).

This bug needs to be fixed in the Linux kernel and has been known since 2006 but unfortunately no fix has been applied yet. If you depend on correct permission handling for FUSE file systems, the only workaround is to use default_permissions (which does not currently support ACLs), or to completely disable caching of directory entry attributes.

snowsaw core plugin configuration

clean

The target path ~/.config/systemd/user should be cleaned before the link core plugin execution.

link

The target paths ~/.config/systemd/user for all unit files should be created by snowsaw if they doesn't exist yet.

The igloosync-dropbox.service unit file should only be linked for the archbook and igloo hosts while the ssh-agent.service file should be linked by default.

Add vim-livedown

The shime/vim-livedown plugin adds support for Livedown (Live Markdown Previews) for Vim.

It requires the livedown NPM to be globally available!

Plugin Configuration

let g:livedown_autorun = 0
let g:livedown_open = 1 
let g:livedown_port = 1337

cower

Create the new cower snowblock including the ~/.config/cower/config file.

Key mapping to move current line and selected block

The key mapping should allow to easily move the current line or selected block using Ctrl and the up and down keys.

  • The moved line/block should adapt to to the new indentation.
  • The key mapping should be available in the NORMAL, INSERT and VISUAL mode

pacman

Create and populate the pacman snowblock.

  • Implement the makepkg.conf file
  • Implement a package configuration for pacaur to set the AURDEST environment variable
  • Add the new STORE_PKGS environment variable to the igloo and archbook environment configurations
  • Implement the shorthand shell alias pacman --config <PATH_TO_CONFIG>
  • Implement pacman configurations for the current hosts igloo and archbook
Target(s) Type Link(s) to Options
makepkg.conf file ~/.makepkg.conf null
pacman.conf.igloo, pacman.conf.archbook file ~/.pacman.conf "hosts": {"igloo":"pacman.conf.igloo","archbook":"pacman.conf.archbook"}

The clean task should be run for

  • ~

Remove ignored pacman packages

The

  • harfbuzz
  • harfbuzz-icu
  • gdk-pixbuf2

packages has been added to the pacman ignore list to fix the harfbuzz + Infinality issue which caused broken font rendering & boot failures on most systems due to incompatibility with the updated freetype2 package, which superseded the infinality-bundle.

These packages should now be removed from the ignore list since the issues have already been fixed some days after the issue occurred.

Core alias "sudo" for alias expansion

Add a core alias sudo to fix alias expansion when running a user alias via sudo:
alias sudo='sudo '

Bash only checks the first word of a command for an alias, any words after that are not checked.
That means in a command like sudo pacman, only the first word (sudo) is checked by bash for an alias, pacman is ignored. This can be changed by adding a space to the end of the alias value so bash checks the next word after the alias.

Snippet of the official bash manual:

The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias.
[...]
If the last character of the alias value is a blank, then the next command word following the alias is also checked for alias expansion

More information and this alias can also be found in the Arch Linux Wiki for sudo.

Conditional includes

The new conditional configuration includes Git features introduced in version 2.13 provides a comfortable way to automatically load different configurations based on the current path of the repository.

This allows to split the main- and job authentication configurations.

Transparent git encryption with "smudge" and "clean" filters using GPG

Add a global .gitattributes file and configure the global .gitconfig file to apply a transparent git encryption with smudge and clean filters using GPG.

In the .gitattributes file, set a filter for all *.igloocrypt file extensions. The .gitconfig should include the filter configuration by using gpg for the encryption and decryption, processing files just before they’re checked out and just before they’re staged.

The smudge filter is run on checkout.

The clean filter is run when files are staged.

The described concept is a simplified and cleaner solution instead of adding a using a tool like git-crypt which makes the encryption usage dependent on an external tool and also commit additional files to the repository like the .git-crypt folder in the root of the repository. Such tools are really useful and necessary when the repository is used by many collaborator, but only adds overhead for personal (dotfile) repositories.

References:

Remap syntax highlighting function

The <C-S-P> mapping for the function to show the syntax highlighting groups for the current cursor position collides with the AUR package plotinus-git which provides a searchable command palette in every modern GTK+ application. Is uses the commonly known
Control + Shift + P key mapping. The terminal emulator Tilix is a GTK3 application so the command bar is available and has a higher priority as the mapping for the function.

The key mapping for the function should be changed to use the K key instead of P.

Automatically wrap left and right

It should be possible to move the cursor to the previous/next line after reaching first/last character in the line by using the left < and > arrow- or the h and l keys in the normal-, visual- and insert mode.

This can be configured through the whichwrap variable, see :help whichwrap.

Use "diff-so-fancy" without Git

diff-so-fancy has been designed to work within Git controlled directories. To allow to use it to compare files that are not controlled by Git the --no-index option of git-diff can be used.

The script should pipe the output to less using the options

  • -R, --RAW-CONTROL-CHARS to only display ANSI "color" escape sequences in "raw" form
  • -F, --quit-if-one-screen to automatically exit if the entire file can be displayed on the first screen.
  • -X, --no-init to disable sending the termcap (de)initialization strings to the terminal to avoid unnecessary operations like clearing the screen.
  • -x2, --tabs=n to use two tab stops.

References:

sudo package configuration

Implement a package configuration for sudo.

Environment variables
SUDO_PROMPT
=> the word "sudo" should be printed with a light background and a dark front followed by $USER@$HOSTNAME colorized with bluish Nord colors

vim

Create a new snowblock for vim.

Target Type Link to Value Options
vimrc file ~/.vimrc null -

The clean task should be run for

  • ~

Vala syntax plugin

The arrufat/vala.vim syntax plugin provides syntax highlighting, indentation, snippets and more for Vala. This is the officially used- and recommended plugin for Vim.

Journal

2019-03-17

The plugin won't be added since IntelliJ is way more advanced and will be used if there is ever the need to build something in Vala.

2018-04-14

Evaluate if this is still necessary due to usage of more advanced plugins like valhalla for Atom, vala-intellij-plugin for IntelliJ or IDEs like GNOME Builder.

core alias for Spring Boot Remote Debug via Maven

Add a core alias sbrd to remote debug Spring Boot applications.

JDK 5 or higher should use the-agentlib option instead of -Xdebug -Xrunjdwp (Java Debug Wire Protocol).
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"

Append arguments via -Drun.jvmArguments and add the Maven command to run the Spring Boot Application via mvn spring-boot:run:

mvn spring-boot:run -Drun.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"

Remove local Ruby and NPM modules from PATH

Global Ruby- and NPM packages should be installed to the default paths instead of customized paths to increase the overall compatibility and adapt to general conventions.

The $PATH_NPM_PACKAGES and $PATH_RUBY_GEMS variables are obsolete should be removed from the $PATH.

Invalid logging directory creation

Remove the reamining code fragment from the old bash framework version causing a /.log directory can not be created: Permission denied error message during the bootstrap process.

The current __snowblock_bash::setup_history() function should also only create the .log directory if it does not exists yet to avoid possible errors.

Auto toggle sign column

Vim 8 introduced a new option to configure the state of the sign column to be always visible (yes), always hidden (no) or to automatically toggle (auto) when signs are available to display.

This improvement is related to the warning message added to airblade/vim-gitgutter@dc73a81 which also advises to remove the custom option g:gitgutter_sign_column_always = 1 and use set signcolumn = auto instead, described by the plugin owner in airblade/vim-gitgutter#431 (comment)

References:

  • :help signcolumn

SyntaxError : Non ASCII character

running ./bootstrap throws such error

Traceback (most recent call last): File ".snowsaw/bin/snowsaw", line 13, in <module> import snowsaw File "/home/lucy/igloo/.snowsaw/snowsaw/__init__.py", line 1, in <module> from .cli import main File "/home/lucy/igloo/.snowsaw/snowsaw/cli.py", line 87 SyntaxError: Non-ASCII character '\xe2' in file /home/lucy/igloo/.snowsaw/snowsaw/cli.py on line 87, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I tried nord-gnome-terminal . it updated the colours and font but no change in arrows as it shows in first line of your image. figured that it could be encoding issue, hence tried igloo but remained unsolved I hope you can direct me to right direction.

htop

Create a new htop snowblock including the htoprc configuration file.

References:

  • htop(1)

Tilix

Relates to gnunn1/tilix#571

Create a new snowblock for Tilix including a bookmarks.json.igloocrypt (encrypted) and a dconf dump of the configurations.

sync util

Implement a configurable sync util to synchronize/backup data to specific devices using rsync.
This includes pre-checks which devices are available and if compatible devies have been found which configurations are matching for the host the script currently runs on.

Journal

2018-04-14

Evaluate if this is still necessary or should be solved by an existing backup tool.

2019-06-17

A fully automated backup strategy will be developed and resolved with a custom app or existing tools like borg, rsnapshot or rsync .

Simplify branch printing aliases

The branch printing aliases b and the extended aliases bum and bm should be simplified by removing currently unnecessary flags.

  • The --list flag should be used to list branches matching a specific pattern.
  • The -v/-vv/--verbose which shows the commit SHA1 and subject line after each branch should be removed

snowblock "git"

Create the git snowblock.
The gitconfig_auth file must not be tracked by git, but added to the configuration to be locally linked.

Target Type Link to Value Options
git-commit-msg file ~/.git-commit-msg null -
gitconfig file ~/.gitconfig null -
gitconfig_auth file ~/.gitconfig_auth null -
gitignore file ~/.gitignore null -

The clean task should be run for

  • ~

Bootstrap script

Implement the boostrap script to run the snowsaw.
This should include constants to runsnowsaw:

Constant Value Description
SNOWSAW_DIR .snowsaw Path to the snowsaw submodule.
SNOWSAW_BIN bin/snowsaw Path to the snowsaw binary.
SNOWBLOCKS_BASE_DIR_NAME snowblocks Name of the base snowblock directory.
SNOWBLOCKSDIR . Absolute path of the current working directory the bootstrap script runs in.

The actual execution command "${SNOWSAW_DIR}/${SNOWSAW_BIN}" -s "${SNOWBLOCKSDIR}" should allow to add additional options via "${@}".

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.