move from stow to chezmoi

This commit is contained in:
Laila van Reenen 2025-09-29 11:40:54 +02:00
commit 04f8de3573
Signed by: LailaTheElf
GPG Key ID: 8A3EF0226518C12D
51 changed files with 420 additions and 0 deletions

44
dot_bashrc Normal file
View File

@ -0,0 +1,44 @@
#
# ~/.bashrc
#
. "$HOME/.config/env"
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias la='ls --color=auto -plhA'
alias grep='grep --color=auto'
alias prusa-slicer='flatpak run com.prusa3d.PrusaSlicer'
export EDITOR=vim
# quartus
export QSYS_ROOTDIR="$HOME/.local/intelFPGA_lite/18.1/quartus/sopc_builder/bin"
# start ssh-agent
if [[ ! -f "$HOME/.ssh/agent.env" ]]
then
ssh-agent >"$HOME/.ssh/agent.env"
else
. "$HOME/.ssh/agent.env" >/dev/null
ps -p $SSH_AGENT_PID >/dev/null || ssh-agent >"$HOME/.ssh/agent.env"
fi
. "$HOME/.ssh/agent.env"
export SSH_AGENT_PID;
export SSH_AUTH_SOCK;
# rust
. "$CARGO_HOME/env"
# better tools
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target,.var
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
eval "$(fzf --bash)"
eval "$(zoxide init bash --cmd cd)"
# prompt
eval "$(oh-my-posh init bash --config "$HOME/.config/oh-my-posh.toml")"

View File

@ -0,0 +1,5 @@
set number relativenumber
set cursorline
set binary
set autoindent " on enter (in I-mode or O-mode) start in same indent

View File

50
private_dot_config/env Normal file
View File

@ -0,0 +1,50 @@
export PATH="$PATH:$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_MUSIC_DIR="$HOME/Music"
export XDG_DOCUMENTS_DIR="$HOME/Documents"
# export XDG_PICTURES_DIR="$HOME/Media/images"
# export XDG_VIDEOS_DIR="$HOME/Media/videos"
# fix ansible dirs
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible/home"
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible/ansible.cfg"
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
#NOTE: for the tmp dir on remotes sould be configuard in ansible.cfg
# fix rust dirs
export RUSTUP_HOME="$HOME/.local/rust/rustup"
export CARGO_HOME="$HOME/.local/rust/cargo"
# fix discord dirs
# export DISCORD_USER_DATA_DIR="$XDG_DATA_HOME"
# fix docker dirs
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
# fix screen dirs
export SCREENRC="$XDG_CONFIG_HOME/screen/screenrc"
export SCREENDIR="$XDG_RUNTIME_DIR/screen"
# fix texlive dirs
export TEXMFHOME="$XDG_DATA_HOME/texmf"
export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var"
export TEXMFCONFIG="$XDG_CONFIG_HOME/texlive/texmf-config"
# fix wget dirs
export WGETRC="$XDG_CONFIG_HOME/wgetrc"
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
# fix npm dirs
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
# fix gnupg dirs
#TODO: test this
# export GNUPGHOME="$XDG_DATA_HOME/gnupg"
# fix java dirs
export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java"

View File

@ -0,0 +1,32 @@
source "$HOME/.config/env"
if status is-interactive
alias ls='ls --color=auto'
alias la='ls --color=auto -plhA'
alias grep='grep --color=auto'
alias prusa-slicer='flatpak run com.prusa3d.PrusaSlicer'
export EDITOR=vim
# TODO: ssh-agent
# TODO: rust
# fuzzy find
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target,.var
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
fzf --fish | source
# better cd
zoxide init fish --cmd cd | source
# prompt
oh-my-posh init fish --config "$HOME/.config/oh-my-posh.toml" | source
# desable auto seguestions
export fish_autosuggestion_enabled=0
end

View File

@ -0,0 +1,12 @@
[user]
name = LailaTheElf
email = mail@lailatheelf.nl
signingKey = EB05B87D06C84E807C8D128B8A3EF0226518C12D
[commit]
gpgsign = true
[init]
defaultBranch = main
[safe]
directory = /opt/keys

View File

@ -0,0 +1,5 @@
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
logs-dir=${XDG_STATE_HOME}/npm/logs

View File

@ -0,0 +1,81 @@
console_title_template = '{{ .Shell }} in {{ .Folder }}'
version = 3
final_space = true
[secondary_prompt]
template = ' '
foreground = 'magenta'
background = 'transparent'
## does not work in bash
[transient_prompt]
template = ' '
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}default{{end}}']
background = 'transparent'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'session'
template = '{{ if .SSHSession }}⇄ {{ end }}{{ .HostName }}'
style = 'plain'
foreground_templates = ['{{if .Root }}red{{else}}magenta{{end}}']
background = 'transparent'
[[blocks.segments]]
type = 'path'
template = ' {{ .Path }}'
style = 'plain'
foreground = 'green'
background = 'transparent'
[blocks.segments.properties]
style = 'full'
[[blocks.segments]]
type = 'git'
template = ' {{ url .HEAD .UpstreamURL }}{{ if (.Working.Changed) }}*{{ end }}{{ if (.Staging.Changed) }}+{{ end }}{{ if or (gt .Behind 0) (gt .Ahead 0) }} ☁ {{ if gt .Behind 0 }}-{{ .Behind }}{{ end }}{{ if gt .Ahead 0 }}+{{ .Ahead }}{{ end }}{{ end }}'
style = 'plain'
foreground = 'magenta'
background = 'transparent'
[blocks.segments.properties]
branch_icon = ''
commit_icon = '@'
fetch_status = true
fetch_upstream_icon = true
[blocks.segments.properties.ignore_submodules]
'*' = 'none'
[[blocks]]
type = 'rprompt'
overflow = 'hidden'
[[blocks.segments]]
template = '{{ .FormattedMs }}'
foreground = 'yellow'
background = 'transparent'
type = 'executiontime'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
threshold = 5000
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
template = ''
background = 'transparent'
type = 'text'
style = 'plain'
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}']
[blocks.segments.properties]
cache_duration = 'none'

View File

@ -0,0 +1,10 @@
+ **
- /Music/**
- /Documents/**
- /InstantUpload/**
- /verenigingen/**
- /Desktop/**
- /Public/**
- /Videos/**
- /.vault/**

View File

@ -0,0 +1,2 @@
+ **

View File

@ -0,0 +1,5 @@
+ /InstantUpload/**
+ /verenigingen/**
+ /.vault/**
- **

View File

@ -0,0 +1,36 @@
#!/bin/bash
function install() {
name=$1
src_dir=$2
mkdir -p /usr/share/fonts/$name
cp $src_dir/*.ttf /usr/share/fonts/$name/
chmod 0775 /usr/share/fonts/$name
chmod 0664 /usr/share/fonts/$name/*
}
function help() {
echo "$0 <font name> <sorce dir>"
}
if [[ -z "$1" ]]; then
help
exit
fi
if [[ -z "$2" ]]; then
echo "ERROR: give at least two arguments"
echo
help
exit
fi
if [[ ! -d "$2" ]]; then
echo "ERROR: $2 is not a directory"
echo
help
exit
fi
install $1 "$2"

View File

@ -0,0 +1,44 @@
#!/bin/bash
token="$1"
page=1
project_dir="$HOME/projects"
base_url="https://gitea.finnvanreenen.nl/api/v1"
git_url="git@gitea.finnvanreenen.nl"
while [[ $page -lt 50 ]]
do
# echo
echo "## get repo list page $page"
repos="$(curl -X 'GET' "$base_url/user/repos?page=$page&token=$token" -H 'accept: application/json')"
login="$(echo "$repos" | sed -e 's/^.*"login":"\([^"]*\)".*$/\1/')"
if [[ "$repos" != "[]" ]]
then
for repo in $(echo "$repos" | sed -e 's/^\[{//' -e 's/}]$//' -e 's/},{/\n/g' -e 's/%/%p/g' -e 's/ /%20/g')
do
repo_json="$(echo "$repo" | sed -e 's/%20/ /g' -e 's/%p/%/g')"
full_name="$(echo "$repo_json" | sed -e 's/^.*"full_name":"\([^"]*\)".*$/\1/')"
clone_url="$(echo "$repo_json" | sed -e 's/^.*"clone_url":"\([^"]*\)".*$/\1/')"
echo
echo "### ${full_name,,}"
if [ -d "$project_dir/${full_name,,}" ]
then
cd "$project_dir/${full_name,,}"
# git fetch
else
url="$(echo "$clone_url" | sed "s|://|://$login:$token@|")"
git clone "$url" "$project_dir/${full_name,,}"
git -C "$project_dir/${full_name,,}" remote set-url origin "$git_url:${full_name,,}.git"
fi
done
else
echo "No more repositories found."
page=999
fi
page="$(( $page + 1 ))"
done

View File

@ -0,0 +1,7 @@
#!/bin/bash
font="$(fc-list | fzf)"
echo "$font"
display "$(echo "$font" | awk '{{ print $1 }}' | tr -d ':')"

View File

@ -0,0 +1,3 @@
#!/bin/bash
git log --graph --oneline --all

View File

@ -0,0 +1,4 @@
#/bin/bash
rclone sync pdrive: "/mnt/backup/proton/" --verbose --progress \
--filter-from "$HOME/.config/rclone/bisync_backup.filter" $*

View File

@ -0,0 +1,4 @@
#/bin/bash
rclone bisync "$HOME/Documents" pdrive:Documents --verbose --progress \
--filter-from "$HOME/.config/rclone/bisync_documents.filter" $*

View File

@ -0,0 +1,4 @@
#/bin/bash
rclone bisync "$HOME" pdrive: --verbose --progress \
--filter-from "$HOME/.config/rclone/bisync_home.filter" $*

View File

@ -0,0 +1,3 @@
#/bin/bash
rclone bisync "$HOME/Music" pdrive:Music --verbose --progress $*

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=!xdg-download

View File

@ -0,0 +1,2 @@
[Context]
filesystems=!xdg-download

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=!xdg-download;!xdg-videos;/run/media;/mnt/media

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=xdg-videos

View File

@ -0,0 +1,3 @@
[Context]
devices=!all;dri
filesystems=xdg-config/PrusaSlicer;~/projects

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects/hr/pee51_gan_motor_driver

View File

@ -0,0 +1,3 @@
[Context]
features=!bluetooth
filesystems=!xdg-run/app/com.discordapp.Discord

View File

@ -0,0 +1,2 @@
[Context]
filesystems=xdg-documents/git

View File

@ -0,0 +1,2 @@
[Context]
filesystems=!xdg-desktop

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/mnt/media/

View File

@ -0,0 +1,2 @@
[Context]
filesystems=xdg-download;!home;!host

View File

@ -0,0 +1,2 @@
[Context]
persistent=~/.local/share/vdhcoapp/vdhcoapp

View File

@ -0,0 +1,2 @@
[Context]
filesystems=!xdg-download;!xdg-run/app/com.discordapp.Discord;!/run/media;!/mnt;!/media;~/projects/freenen/kladjes

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects:ro

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects

View File

@ -0,0 +1,2 @@
[Context]
devices=!all

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/vdhcoapp:ro;~/projects:ro;~/.local/tiCloudAgent;~/.local/share/vdhcoapp;

View File

@ -0,0 +1,2 @@
[Context]
filesystems=/home/freenen/.local/share/fonts:ro;xdg-documents

View File

@ -0,0 +1,2 @@
[Context]
filesystems=~/projects

View File

@ -0,0 +1,2 @@
[Context]
filesystems=!/media

3
run_after_once_chsh.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
chsh -s /usr/bin/fish

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
curl -s https://ohmyposh.dev/install.sh | bash -s