move from stow to chezmoi
This commit is contained in:
36
private_dot_local/bin/executable_addfonts
Normal file
36
private_dot_local/bin/executable_addfonts
Normal 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"
|
||||
44
private_dot_local/bin/executable_auto_clone
Executable file
44
private_dot_local/bin/executable_auto_clone
Executable 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
|
||||
7
private_dot_local/bin/executable_displayfont
Executable file
7
private_dot_local/bin/executable_displayfont
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
font="$(fc-list | fzf)"
|
||||
|
||||
echo "$font"
|
||||
display "$(echo "$font" | awk '{{ print $1 }}' | tr -d ':')"
|
||||
|
||||
3
private_dot_local/bin/executable_gl
Executable file
3
private_dot_local/bin/executable_gl
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
git log --graph --oneline --all
|
||||
4
private_dot_local/bin/executable_sync_backup.sh
Executable file
4
private_dot_local/bin/executable_sync_backup.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
rclone sync pdrive: "/mnt/backup/proton/" --verbose --progress \
|
||||
--filter-from "$HOME/.config/rclone/bisync_backup.filter" $*
|
||||
4
private_dot_local/bin/executable_sync_documents.sh
Executable file
4
private_dot_local/bin/executable_sync_documents.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
rclone bisync "$HOME/Documents" pdrive:Documents --verbose --progress \
|
||||
--filter-from "$HOME/.config/rclone/bisync_documents.filter" $*
|
||||
4
private_dot_local/bin/executable_sync_home.sh
Executable file
4
private_dot_local/bin/executable_sync_home.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
rclone bisync "$HOME" pdrive: --verbose --progress \
|
||||
--filter-from "$HOME/.config/rclone/bisync_home.filter" $*
|
||||
3
private_dot_local/bin/executable_sync_music.sh
Executable file
3
private_dot_local/bin/executable_sync_music.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#/bin/bash
|
||||
|
||||
rclone bisync "$HOME/Music" pdrive:Music --verbose --progress $*
|
||||
Reference in New Issue
Block a user