Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
58ad3adb3b
|
@@ -1,8 +1,3 @@
|
|||||||
# SPDX-FileCopyrightText: 2019-2022, 2025 Kris Lamoureux <kris@lamoureux.io>
|
|
||||||
# SPDX-License-Identifier: 0BSD
|
|
||||||
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
# Local system administration
|
# Local system administration
|
||||||
|
|
||||||
# Alias management
|
# Alias management
|
||||||
@@ -61,11 +56,11 @@ alias 'log'='git log'
|
|||||||
alias 'oneline'='git log --oneline'
|
alias 'oneline'='git log --oneline'
|
||||||
alias 'logsig'='git log --show-signature'
|
alias 'logsig'='git log --show-signature'
|
||||||
alias 'checkout'='git checkout'
|
alias 'checkout'='git checkout'
|
||||||
alias 'commit'='git commit -S'
|
alias 'commit'='git commit'
|
||||||
alias 'tcommit'='git commit -m "testing"'
|
alias 'tcommit'='git commit -m "testing"'
|
||||||
alias 'tamend'='git commit --amend --no-edit --date "`date -R`"'
|
alias 'tamend'='git commit --amend --no-edit --date "`date -R`"'
|
||||||
alias 'amend'='git commit -S --amend'
|
alias 'amend'='git commit --amend'
|
||||||
alias 'amendnew'='git commit -S --amend --date "`date -R`"'
|
alias 'amendnew'='git commit --amend --date "`date -R`"'
|
||||||
alias 'giturl'='git remote set-url'
|
alias 'giturl'='git remote set-url'
|
||||||
alias 'setorigin'='git remote set-url origin'
|
alias 'setorigin'='git remote set-url origin'
|
||||||
alias 'origin'='git remote show origin'
|
alias 'origin'='git remote show origin'
|
@@ -1,9 +1,3 @@
|
|||||||
# 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.
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
# for examples
|
# for examples
|
||||||
@@ -118,8 +112,5 @@ if ! shopt -oq posix; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add ~/.local/bin to PATH
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
|
|
||||||
# Ask for decryption in terminal window
|
# Ask for decryption in terminal window
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
7
.gitconfig
Normal file
7
.gitconfig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[core]
|
||||||
|
editor = vim
|
||||||
|
|
||||||
|
[include]
|
||||||
|
path = ~/.gitconfig_other
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
6
.stowrc
6
.stowrc
@@ -1,6 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2025 Kris Lamoureux <kris@lamoureux.io>
|
|
||||||
# SPDX-License-Identifier: 0BSD
|
|
||||||
|
|
||||||
--target=$HOME
|
|
||||||
--no-folding
|
|
||||||
--verbose=2
|
|
@@ -1,5 +1,3 @@
|
|||||||
" SPDX-FileCopyrightText: 2009-2016 Marcin Kulik
|
|
||||||
" SPDX-License-Identifier: MIT
|
|
||||||
" Vim color file
|
" Vim color file
|
||||||
" Converted from Textmate theme Monokai using Coloration v0.3.2 (http://github.com/sickill/coloration)
|
" Converted from Textmate theme Monokai using Coloration v0.3.2 (http://github.com/sickill/coloration)
|
||||||
|
|
@@ -1,6 +1,3 @@
|
|||||||
" SPDX-FileCopyrightText: 2019, 2022 Kris Lamoureux <kris@lamoureux.io>
|
|
||||||
" SPDX-License-Identifier: 0BSD
|
|
||||||
|
|
||||||
syntax enable
|
syntax enable
|
||||||
colorscheme monokai
|
colorscheme monokai
|
||||||
set number
|
set number
|
@@ -1,12 +0,0 @@
|
|||||||
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.
|
|
@@ -1,18 +0,0 @@
|
|||||||
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.
|
|
80
README.md
80
README.md
@@ -1,65 +1,63 @@
|
|||||||
<!--
|
## Kris' dotfiles
|
||||||
SPDX-FileCopyrightText: 2025 Kris Lamoureux <kris@lamoureux.io>
|
### Installation
|
||||||
SPDX-License-Identifier: 0BSD
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Dotfiles
|
Clone the repository:
|
||||||
|
|
||||||
Use GNU Stow (or xstow) to slow down your home directory listings with my
|
`git clone https://github.com/krislamo/dotfiles.git`
|
||||||
[accumulated sludge](https://web.archive.org/web/20141205101508/https://plus.google.com/+RobPikeTheHuman/posts/R58WgWwN9jp).
|
|
||||||
|
|
||||||
### Setup
|
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:
|
||||||
|
|
||||||
1. Create the `~/.local` directory (if it doesn't already exist)
|
`cd dotfiles`
|
||||||
|
|
||||||
mkdir -p ~/.local
|
Now you will be successful running the install.sh script:
|
||||||
|
|
||||||
2. Clone the repository
|
`./install.sh`
|
||||||
|
|
||||||
git clone https://git.krislamo.org/kris/dotfiles.git ~/.local/dotfiles
|
|
||||||
|
|
||||||
3. Navigate to the repository's directory
|
#### Copyrights and Licenses
|
||||||
|
|
||||||
cd ~/.local/dotfiles
|
`Files: .bash_aliases .gitconfig .bashrc .vimrc install.sh`
|
||||||
|
|
||||||
4. Dry run `stow` with `-n` against configuration sets and verify, e.g.,
|
Copyright (C) 2019-2020 Kris Lamoureux
|
||||||
|
|
||||||
stow -n vim
|
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.
|
||||||
|
|
||||||
### Using xstow
|
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.
|
||||||
|
|
||||||
On systems without GNU Stow, you can build and use `xstow` as an alternative for
|
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
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
|
---
|
||||||
|
|
||||||
If you copy `xstow` to `~/.local/bin` before stowing the `bash` package, you'll
|
`Files: .bashrc`
|
||||||
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.
|
|
||||||
|
|
||||||
1. Place the `xstow` binary at `~/.local/bin/xstow`
|
The original file is from Debian GNU/Linux's prepackaged version of the FSF's GNU Bash,
|
||||||
2. Sideline your `.bashrc` file
|
the Bourne Again SHell. This package was put together by Matthias Klose <doko@debian.org\>
|
||||||
|
|
||||||
cp ~/.bashrc ~/.bashrc.bak
|
See package: <https://packages.debian.org/buster/bash> for more information and copyright notices.
|
||||||
|
|
||||||
3. Inside the repository, dry run `xstow` ( `-n` ) using the full path
|
|
||||||
|
|
||||||
~/.local/bin/xstow -t "$HOME" -v 2 -n bash
|
---
|
||||||
|
|
||||||
- Remove `-n` only once you are sure it will work as intended
|
`Files: .vim/colors/monokai.vim`
|
||||||
- After stowing the `bash` package, start a new shell or source `.bashrc`
|
|
||||||
|
|
||||||
### Licensing
|
The MIT License (MIT)
|
||||||
|
|
||||||
This project follows the [REUSE](https://reuse.software) specification.
|
Copyright (c) 2009-2016 Marcin Kulik
|
||||||
|
|
||||||
Efforts have been made to include SPDX license headers and a LICENSES directory
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
with the appropriate licenses, since not all configurations in these dotfiles
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
are original.
|
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:
|
||||||
|
|
||||||
Please ensure that the repository passes the `reuse lint` check.
|
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.
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2019, 2022 Kris Lamoureux <kris@lamoureux.io>
|
|
||||||
# SPDX-License-Identifier: 0BSD
|
|
||||||
|
|
||||||
[core]
|
|
||||||
editor = vim
|
|
||||||
[init]
|
|
||||||
defaultBranch = main
|
|
||||||
[include]
|
|
||||||
path = ~/.gitconfig_other
|
|
47
install.sh
Executable file
47
install.sh
Executable file
@@ -0,0 +1,47 @@
|
|||||||
|
#!/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
|
Reference in New Issue
Block a user