Moved all personal scripts to a dedicated folder

master
Wynd 2026-01-19 00:27:39 +02:00
parent 25a339af86
commit 8d9d97852e
13 changed files with 39 additions and 26 deletions

View File

@ -16,8 +16,9 @@ Install script for my system, basically a poor man's nix but in bash. Its also u
A small python script to automate the init and deploy procedures by simply copying the files in their required spots based on the `dot.toml` config file.
`./dot.py --init` to copy all the dotfiles in the currently selected folder
`./dot.py --init` to copy all the dotfiles in a new `backup` folder created in the currently selected folder
`./dot.py --deploy` to copy them back to where they're supposed to be
The script is extremely opinionated as it will always save them in the currently selected folder and load them based on the home directory of the user as such: `~/.config/nvim` folder will always be saved in `./.config/nvim` which will always be loaded in `~/.config/nvim`. As such configs or dotfiles outside of the home directory are not supported by this script (which is perfectly fine since I don't have any of those).
- some files might require `sudo` to be written
- when ran using `sudo` the `~` gets expanded into `/home/root` which most likely won't exist and therefore the home backups won't get restored, to avoid this either run this twice (once as normal user and once with `sudo`) or simply write the absolute path in the config file (`/home/user/.zshrc` instead of `~/.zshrc`)

View File

@ -22,13 +22,18 @@ return {
"javascript",
"typescript",
"svelte",
"jinja",
"jinja_inline",
-- config
"json",
"toml",
"yaml",
"kdl",
"markdown",
"dockerfile",
"just",
"caddy",
-- vim
"vim",
@ -55,6 +60,7 @@ return {
"groovy",
"glsl",
"wgsl",
"desktop",
})
vim.api.nvim_create_autocmd("FileType", {

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
for file in "$@"; do
mat2 --inplace "$file"
convert "$file" -resize '25%' "$file"
done

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
(
for FOLDER in ./*/; do
# gio set "$FOLDER" -t unset metadata::custom-icon
for img in ./"$FOLDER"/*; do
if [[ ${img##*.} == "jpg" ]] || [[ ${img##*.} == "png" ]] || [[ ${img##*.} == "webp" ]]; then
IMAGENAME="$(basename "$img")"
break
fi
done
if [[ -n $IMAGENAME ]]; then
gio set "$FOLDER" -t string metadata::custom-icon "$IMAGENAME"
unset IMAGENAME
fi
done
)

View File

@ -133,11 +133,13 @@ function days_since() {(
echo $(( ( now - input )/(60*60*24) ))
)}
alias repos="~/.local/bin/repos.sh"
alias reposn="~/.local/bin/reposn.sh"
alias repoc="~/.local/bin/repoc.sh"
alias repos5y="~/.local/bin/repos5y.sh"
alias repoc5y="~/.local/bin/repoc5y.sh"
alias repos="~/.local/bin/scripts/repos.sh"
alias reposn="~/.local/bin/scripts/reposn.sh"
alias repoc="~/.local/bin/scripts/repoc.sh"
alias repos5y="~/.local/bin/scripts/repos5y.sh"
alias repoc5y="~/.local/bin/scripts/repoc5y.sh"
export PATH="/home/wynd/.local/bin/scripts:$PATH"
# private SSH stuff
source ~/.piwrc

View File

@ -32,25 +32,7 @@ path = "~/.local/bin/nvimstart.sh"
path = "~/.local/bin/obstoggle.py"
[[dots]]
path = "~/.local/bin/best-gif.sh"
[[dots]]
path = "~/.local/bin/make-gif.sh"
[[dots]]
path = "~/.local/bin/repos.sh"
[[dots]]
path = "~/.local/bin/reposn.sh"
[[dots]]
path = "~/.local/bin/repos5y.sh"
[[dots]]
path = "~/.local/bin/repoc.sh"
[[dots]]
path = "~/.local/bin/repoc5y.sh"
path = "~/.local/bin/scripts/*"
[[dots]]
path = "/etc/hosts"