Compare commits

...

6 Commits

Author SHA1 Message Date
4b01fd8c44 Revert to root level package structure for stow
- Document xstow usage for systems lacking GNU Stow
- Add SPDX headers to .stowrc for license compliance
- Add REUSE specification compliance notes to README
2025-10-06 21:47:34 -04:00
a6afdd7efb Restructure repo to use pkgs subdirectory 2025-09-02 04:01:17 -04:00
20b6470625 Relicense original contributions to 0BSD
- Remove verbose copyright sections in favor of SPDX metadata
- Simplify README with concise GNU Stow setup instructions
2025-09-02 03:26:36 -04:00
0ada0f3b67 Organize dotfiles for GNU Stow 2025-09-01 22:54:51 -04:00
b470701a9d Add ~/.local/bin to user PATH 2025-08-30 20:42:46 -04:00
36d5be65e2 Add oneline alias for git history 2022-05-23 23:55:28 -04:00
12 changed files with 106 additions and 93 deletions

View File

@@ -1,7 +0,0 @@
[core]
editor = vim
[include]
path = ~/.gitconfig_other
[init]
defaultBranch = main

6
.stowrc Normal file
View File

@@ -0,0 +1,6 @@
# SPDX-FileCopyrightText: 2025 Kris Lamoureux <kris@lamoureux.io>
# SPDX-License-Identifier: 0BSD
--target=$HOME
--no-folding
--verbose=2

12
LICENSES/0BSD.txt Normal file
View File

@@ -0,0 +1,12 @@
Copyright (C) 2025 by Kris Lamoureux <kris@lamoureux.io>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

18
LICENSES/MIT.txt Normal file
View File

@@ -0,0 +1,18 @@
MIT License
Copyright (c) 2009-2016 Marcin Kulik
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,63 +1,65 @@
## Kris' dotfiles
### Installation
<!--
SPDX-FileCopyrightText: 2025 Kris Lamoureux <kris@lamoureux.io>
SPDX-License-Identifier: 0BSD
-->
Clone the repository:
## Dotfiles
`git clone https://github.com/krislamo/dotfiles.git`
Use GNU Stow (or xstow) to slow down your home directory listings with my
[accumulated sludge](https://web.archive.org/web/20141205101508/https://plus.google.com/+RobPikeTheHuman/posts/R58WgWwN9jp).
Symbolic linking is currently based on the working directory, so you must run the install script while you are inside its directory. Navigate into the repository:
### Setup
`cd dotfiles`
1. Create the `~/.local` directory (if it doesn't already exist)
Now you will be successful running the install.sh script:
mkdir -p ~/.local
`./install.sh`
2. Clone the repository
git clone https://git.krislamo.org/kris/dotfiles.git ~/.local/dotfiles
#### Copyrights and Licenses
3. Navigate to the repository's directory
`Files: .bash_aliases .gitconfig .bashrc .vimrc install.sh`
cd ~/.local/dotfiles
Copyright (C) 2019-2020 Kris Lamoureux
4. Dry run `stow` with `-n` against configuration sets and verify, e.g.,
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
stow -n vim
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
### Using xstow
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
On systems without GNU Stow, you can build and use `xstow` as an alternative for
managing symlinks. Build a statically linked binary using
[xstow-builder](https://git.krislamo.org/kris/xstow-builder), then copy it to
`~/.local/bin/` on your target system. You need to specify the target directory
`-t` because `xstow` does not use the `.stowrc` file.
---
#### Bootstrapping
`Files: .bashrc`
If you copy `xstow` to `~/.local/bin` before stowing the `bash` package, you'll
hit a bootstrapping problem. You need `xstow` in your `$PATH` to easily use it,
but you need the updated `.bashrc` (from the `bash` package) to add
`~/.local/bin` to your `$PATH` in the first place. To break this cycle, invoke
`xstow` directly with its full path for the initial setup.
The original file is from Debian GNU/Linux's prepackaged version of the FSF's GNU Bash,
the Bourne Again SHell. This package was put together by Matthias Klose <doko@debian.org\>
1. Place the `xstow` binary at `~/.local/bin/xstow`
2. Sideline your `.bashrc` file
See package: <https://packages.debian.org/buster/bash> for more information and copyright notices.
cp ~/.bashrc ~/.bashrc.bak
3. Inside the repository, dry run `xstow` ( `-n` ) using the full path
---
~/.local/bin/xstow -t "$HOME" -v 2 -n bash
`Files: .vim/colors/monokai.vim`
- Remove `-n` only once you are sure it will work as intended
- After stowing the `bash` package, start a new shell or source `.bashrc`
The MIT License (MIT)
### Licensing
Copyright (c) 2009-2016 Marcin Kulik
This project follows the [REUSE](https://reuse.software) specification.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Efforts have been made to include SPDX license headers and a LICENSES directory
with the appropriate licenses, since not all configurations in these dotfiles
are original.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Please ensure that the repository passes the `reuse lint` check.

View File

@@ -1,3 +1,8 @@
# SPDX-FileCopyrightText: 2019-2022, 2025 Kris Lamoureux <kris@lamoureux.io>
# SPDX-License-Identifier: 0BSD
# shellcheck shell=bash
# Local system administration
# Alias management
@@ -53,6 +58,7 @@ alias 'list'='git branch -a'
alias 'unstage'='git reset HEAD'
alias 'discard'='git checkout --'
alias 'log'='git log'
alias 'oneline'='git log --oneline'
alias 'logsig'='git log --show-signature'
alias 'checkout'='git checkout'
alias 'commit'='git commit -S'

View File

@@ -1,3 +1,9 @@
# SPDX-FileCopyrightText: 2019 Matthias Klose <doko@debian.org>
# SPDX-FileCopyrightText: 2019, 2025 Kris Lamoureux <kris@lamoureux.io>
# SPDX-License-Identifier: GPL-3.0-or-later
# shellcheck shell=bash disable=SC1090,SC1091
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
@@ -112,5 +118,8 @@ if ! shopt -oq posix; then
fi
fi
# Add ~/.local/bin to PATH
export PATH="$HOME/.local/bin:$PATH"
# Ask for decryption in terminal window
export GPG_TTY=$(tty)

9
git/.gitconfig Normal file
View File

@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2019, 2022 Kris Lamoureux <kris@lamoureux.io>
# SPDX-License-Identifier: 0BSD
[core]
editor = vim
[init]
defaultBranch = main
[include]
path = ~/.gitconfig_other

View File

@@ -1,47 +0,0 @@
#!/bin/bash
# This script loops through files in this repository, creating symlinks in your
# home directory targeting here. It will prompt you to backup regular files and
# replace broken symlinks but will ignore good symlinks regardless of their
# target.
DOTFILES="$(pwd)/.*[a-z]"
for FILE in $DOTFILES; do
BASEFILE=$(basename $FILE)
NEWLINK=0
# Exclude the repo's .git folder
if [ "$BASEFILE" != ".git" ]; then
# If basefile is a link
if [ -L ~/$BASEFILE ]; then
# If basefile is not a file, and therefore is a broken symlink
if [ ! -f ~/$BASEFILE ]; then
read -p "Press [ENTER] to replace broken symlink ~/$BASEFILE."
rm ~/$BASEFILE
NEWLINK=1
else
echo "~/$BASEFILE is already linked."
fi
# If basefile is a regular file or directory
elif [ -f ~/$BASEFILE ] || [ -d ~/$BASEFILE ]; then
DATE=$(date '+%Y%m%d%H%M%S')
read -p "Press [ENTER] to move ~/$BASEFILE to ~/$BASEFILE-$DATE."
mv ~/$BASEFILE ~/$BASEFILE-$DATE
NEWLINK=1
else
echo "Nothing in location ~/$BASEFILE"
NEWLINK=1
fi
# Create a new symlink
if [ $NEWLINK -eq 1 ]; then
echo "Creating new link to $(pwd)/$BASEFILE from" ~
ln -s $(pwd)/$BASEFILE ~/$BASEFILE
fi
fi
done
. ~/.bashrc

View File

@@ -1,3 +1,5 @@
" SPDX-FileCopyrightText: 2009-2016 Marcin Kulik
" SPDX-License-Identifier: MIT
" Vim color file
" Converted from Textmate theme Monokai using Coloration v0.3.2 (http://github.com/sickill/coloration)

View File

@@ -1,3 +1,6 @@
" SPDX-FileCopyrightText: 2019, 2022 Kris Lamoureux <kris@lamoureux.io>
" SPDX-License-Identifier: 0BSD
syntax enable
colorscheme monokai
set number