From 34c99ff5ce5e3ab7a68a213ce7b559078f00d259 Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Fri, 26 Jul 2024 14:53:10 +0100 Subject: [PATCH] Add syncthing and cp alias --- dotfiles/.bashrc | 6 +++--- install.sh | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index de4dded5..fc2927f7 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -28,7 +28,7 @@ pushall() { else git pull git diff - read -p "Press ENTER to continue..." + read -p "Press ENTER to continue..." git add -A git commit -m "$@" git push @@ -40,7 +40,7 @@ hex2color(){ r=$(printf '0x%0.2s' "$hex") g=$(printf '0x%0.2s' ${hex#??}) b=$(printf '0x%0.2s' ${hex#????}) - printf '%03d' "$(( (r<75?0:(r-35)/40)*6*6 + + printf '%03d' "$(( (r<75?0:(r-35)/40)*6*6 + (g<75?0:(g-35)/40)*6 + (b<75?0:(b-35)/40) + 16 ))" } @@ -87,6 +87,7 @@ alias ll='ls -lhi' alias ta='tmux attach' alias t='tmux' alias v='nvim' +alias cp='rsync -ah --progress' set completion-ignore-case On @@ -97,4 +98,3 @@ set completion-ignore-case On export OFLAGS="--ozone-platform-hint=auto" export PATH=$PATH:/home/trude/.local/bin - diff --git a/install.sh b/install.sh index f75493bc..ed366249 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,8 @@ dialog --erase-on-exit \ "5" "Install GitHub CLI" "off"\ "6" "Install Ollama" "off"\ "7" "Install Apps (Enables Flatpak)" "on"\ - "8" "Install Tailscale (VPN)" "on" 2> choice.tmp + "8" "Install Tailscale (VPN)" "on"\ + "9" "Install Syncthing" "on" 2> choice.tmp main_menu=$( cat choice.tmp ) rm choice.tmp @@ -213,4 +214,18 @@ for selection in $main_menu; do curl -fsSL https://tailscale.com/install.sh | sh sudo tailscale up fi + + if [ "$selection" = "9" ]; then + clear + echo "-------------------------" + echo "--- Install Syncthing ---" + echo "-------------------------" + echo + echo + + sudo apt install syncthing + systemctl --user enable syncthing.service + systemctl --user start syncthing.service + xdg-open "http://127.0.0.1:8384/" & + fi done