{"id":15712320,"url":"https://github.com/mareq/skel","last_synced_at":"2026-04-09T12:17:14.332Z","repository":{"id":137262659,"uuid":"30211243","full_name":"mareq/skel","owner":"mareq","description":"\"/etc/skel\": The complete self-installing environment.","archived":false,"fork":false,"pushed_at":"2024-02-09T17:46:28.000Z","size":6017,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T18:12:31.818Z","etag":null,"topics":["bash","csh","dot-files","neovim","rc-files","screen","tmux","vim","zsh"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mareq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-02T22:06:57.000Z","updated_at":"2024-09-12T16:40:48.000Z","dependencies_parsed_at":"2023-10-11T03:45:11.860Z","dependency_job_id":"67f0d169-d485-4af5-9909-29fe8652e37e","html_url":"https://github.com/mareq/skel","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mareq/skel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mareq%2Fskel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mareq%2Fskel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mareq%2Fskel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mareq%2Fskel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mareq","download_url":"https://codeload.github.com/mareq/skel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mareq%2Fskel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013705,"owners_count":26085393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","csh","dot-files","neovim","rc-files","screen","tmux","vim","zsh"],"created_at":"2024-10-03T21:15:35.768Z","updated_at":"2025-10-13T05:36:35.669Z","avatar_url":"https://github.com/mareq.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SKEL\n\nNamed after `/etc/skel` (it is also perfectly-recursive acronym that stands for _Skel sKel skEl skeL_). The complete\nself-installing environment.\n\nThis repository contains all configuration files for all foreseen use-cases. In practice, these are all use-cases I have\nencountered and did manage to keep the configurations for. I do not actively use all of them though, so it may happen\nthat the historical ones get outdated (this includes e.g. `csh` or apples). Actively maintained is `zsh`, `tmux` and\n`nvim` (plus, to somewhat smaller extent also `bash`, `vim` and sometimes even `screen`).\n\nThe relevant configuration files are by default deployed into the current user's home directory using symlinks to the\nclone of this repository. The dependencies, such as plugins are brought in as submodules of this repository. (_Note_: If\nand when I will get annoyed enough by the Git submodule system, I will change the dependency management to work\nsomething along the lines of `zplug`.)\n\n![screenshot](./screenshot.png)\n\n## Installation\n\n### Prerequisites\n\nNone of these are strictly necessary, it all depends on the particular use-case. Here are some recommendations:\n\n- _old-school_\n  ```\n  apt install bash screen vim\n  ```\n\n- _new fancy alternatives_\n  ```\n  apt install zsh zplug tmux nvim\n  ```\n\n- _taskwiki_ vim-plugin\n  ```\n  apt install taskwarrior python3-tasklib\n  ```\n\n_Note_: While not strictly necessary (it is indeed possible to e.g. send `tar.gz` around instead), it is somewhat recommended to\nhave `git` installed.\n```\napt install git\n```\n\n### Default Installation Method\n\nThe fast default way of installing:\n- Clone this repository (`$HOME/.skel` is an example, any path will do, just keep in mind that it is going to stay\n  there).\n  ```\n  git clone https://github.com/mareq/skel.git ${HOME}/.skel\n  cd ${HOME}/.skel\n  ```\n- **UPDATE SUBMODULES**: All dependencies are kept in separate submodules. Not having the submodules correctly updated\n  will result problems - resolve those by updating submodules.\n  ```\n  git submodule update --init\n  ```\n- Run the installation script.\n  ```\n  ./install.sh\n  ```\n- **DO WATCH FOR ERRORS**: The installation script tries to behave nicely and it does *NOT* create new directories. This\n  means that if it needs to put something to a path that does not exist, it will print error message instead. Create the\n  missing directories and re-run the installation script.\n  ```\n  mkdir -p ${HOME}/the/missing/directory\n  ./install.sh\n  ```\n\n### Custom Installation Method\n\nThe installation script takes heed of the following environment variables (_Note_: If and when I will get annoyed enough\nby having to type out the environment variables, I will add also corresponding command-line arguments, and while I will\nbe at it, I may even add `--help`).\n\n- `DRY_RUN`: If set to non-empty string, the installation scipt will not perform actual installation actions.\n- `PREFIX`: Installation prefix. Default value: `$HOME`\n- `DATA_DIR`: The root of the directory tree with the configuration scripts to be deployed. These will become targets of\n  the symlinks created during the installation. Default value: `\u003cpath-to-install.sh\u003e/rc.d/`\n- `BAK_EXT`: Extension to be appended to pre-existent files that are being replaced by the installation. Default value:\n  `.skel-\u003cYYYY-DD-MM\u003e-backup`\n- `FLAG_OS`: Operating system flag. Allows installation of OS-specific files for given operating system. Allowed values:\n  `lx` for Linux, `mac` for apples; Default value: `\u003ccurrent-os\u003e`\n- `FLAG_USER`: User-kind flag. Allows installation of user-specific files for given kind of user. Allowed values: `user`\n  for normal user, `root` for superuser; Default value: `\u003ccurrent-user-kind\u003e`\n\n\n## Customization\n\nThe final effect of running the installation script can be customized by modifying the contents of the `$DATA_DIR`. The\nenvironment variable can be used to pass the path of user-specific `$DATA_DIR`. This can be done in combination with the\noriginal contents of this repository, so that both `$DATA_DIR`s get deployed. Such approach is ideal for deploying\ncustom private contents such as keys and password-stores, which need to be kept separately on local hard drive and can\nnot be pushed to (public) repository.\n\n### Data Directory Structure\n\nThe deployed configuration files are determined by the contents of the `$DATA_DIR`. The installation script recursively\ntraverses the `$DATA_DIR` and conditionally deploys files and directories matching the predefined name patterns.\nNon-matching files are ignored and non-matching directories are recursively traversed.\n\nFor a file/directory to be matched, its name shall be constructed using the following grammar:\n```\nmatched_name = matched_file | matched_dir ;\n\nmatched_file = \"__rc-f\", flags, \"__\", file_name ;\nmatched_dir = \"__rc-d\", flags, \"__\", dir_name ;\n\nflags = | flags, \"_\", flag ;\nflag = method_flag | os_flag | user_flag ;\n\nmethod_flag = \"m-\", method ;\nmethod = \"ln\" | \"hl\" | \"cp\" ;\n\nos_flag = \"u-\", os ;\nos = \"lx\" | \"mac\" ;\n\nuser_flag = \"u-\", user ;\nuser = \"user\" | \"root\" ;\n```\n\nThe `\u003cfile_name\u003e`/`\u003cdir_name\u003e` of the file/directory, together with its path relative to the `$DATA_DIR` determine the name\nand its deployment path relative to `$PREFIX`.\n\nThe `\u003cflags\u003e` dictate if and how it will be deployed.  The file/directory will be deployed iff its `\u003cos\u003e` and `\u003cuser\u003e`\nmatch the current use-case. The files/directories without explicit specification of these values will be deployed under\nall use-cases.\n\nThe file/directory will be deployed using `\u003cmethod\u003e`:\n- `ln`: Symlink from `$DATA_DIR` to the deployment path. This is the default and preferred method.\n- `hl`: Hardlink from `$DATA_DIR` to the deployment path. \n- `cp`: Copy from `$DATA_DIR` to the deployment path.\n\nThere are several reasons for symlinking being the preferred method:\n- Symlinks are the most straight-forward way to reliably persist information about the deployment itself, so that\nrepeated calls to the install script can skip over already deployed files instead of keeping to replace them by\nthemselves, while cluttering the file system with numerous backups in the proces.\n- All edits to the live configuration is automatically visible in the source working copy, which makes it very easy to\n  manage the changes.\n- Unlike hardlinks, symlinks work also accross file system boundaries and for directories.\n- Unlike links, copying does the deep-copy, which may take a lot of time and disk-space (although size of the whole\n  repository should arguably be negligible, this may be less true when the submodules are counted in as well).\n\nOn top of the above described grammar, any directory with the name prefixed with `\"__rc-x__\"` will be traversed (*NOT*\ndeployed) as any other old directory, but it will contribute only its name after this prefix to the eventual deployment\npath of its contents. This has been introduced as convenience feature allowing for \"un-hiding\" hidden directories\n(starting with dot): e.g. directory `__rc-x__.config` will behave exactly as if it was named `.config`, except it will\nnot be hidden when running `ls` inside the `$DATA_DIR`.\n\n### Examples\n\nFollowing are a few examples of how will be files in the `$DATA_DIR` deployed into the `$PREFIX`:\n\n| `$DATA_DIR`                                                     | `$PREFIX`                      | **Method**                           | **Condition**              |\n| --------------------------------------------------------------- | ------------------------------ | ------------------------------------ | ------------------------   |\n| `./foorc`                                                       | N/A                            | ignored                              | always                     |\n| `./__rc-f__.foorc`                                              | `./foorc`                      | symlink                              | always                     |\n| `./.local/share/fonts/__rc-f_m-hl_u-user_os-lx_foo.ttf`         | `./.local/share/fonts/foo.ttf` | hardlink                             | only normal users on Linux |\n| `./__rx-x__.local/share/__rc-d_u-user__foo/`                    | `./.local/share/foo/`          | symlink                              | only normal users          |\n| `./__rx-x__.local/share/__rc-d_foo/bar/baz/qux`                 | N/A                            | indirectly: `foo/` will be symlinked | allways                    |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmareq%2Fskel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmareq%2Fskel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmareq%2Fskel/lists"}