fixing booksmarks scripts
This commit is contained in:
3
.bashrc
3
.bashrc
@@ -187,8 +187,5 @@ PS1="${CYAN}[\u@\h ${YELLOW}\w${GREEN}\$(parse_git_branch)${CYAN}]${WHITE}${RESE
|
||||
#######################################################
|
||||
# SSH
|
||||
#######################################################
|
||||
#eval $(keychain --eval --quiet ry_ecdsa)
|
||||
#eval $(keychain --eval --quiet id_rsa)
|
||||
|
||||
# Set SSH_AUTH_SOCK to use Gnome Keyring's SSH agent
|
||||
export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"
|
||||
|
||||
@@ -15,9 +15,6 @@ clipboard_text=$(wl-paste --no-newline 2>/dev/null)
|
||||
# Trim leading/trailing whitespace
|
||||
clipboard_text=$(echo "$clipboard_text" | xargs)
|
||||
|
||||
# Strip https:// or http://
|
||||
clipboard_text=$(echo "$clipboard_text" | sed 's#^https\?://##')
|
||||
|
||||
# Remove trailing slashes
|
||||
clipboard_text=$(echo "$clipboard_text" | sed 's#/$##')
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Try to source keychain's environment file
|
||||
if [ -f "$HOME/.keychain/$(hostname)-sh" ]; then
|
||||
. "$HOME/.keychain/$(hostname)-sh"
|
||||
fi
|
||||
|
||||
# Fallback to gnome-keyring if keychain not used
|
||||
if [ -z "$SSH_AUTH_SOCK" ] && [ -S "/run/user/$(id -u)/keyring/ssh" ]; then
|
||||
export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
|
||||
fi
|
||||
|
||||
# Define the paths and repository
|
||||
bookmarks_file="$HOME/.local/share/bookmarks/bookmarks"
|
||||
repo_path="$HOME/.local/share/bookmarks"
|
||||
@@ -15,7 +25,7 @@ if [ -n "$(git status --porcelain "$bookmarks_file")" ]; then
|
||||
git commit -m "Update bookmarks file"
|
||||
|
||||
# Push the changes and log output
|
||||
git push origin master
|
||||
GIT_SSH_COMMAND="ssh -i ~/.ssh/ry_ecdsa" git push origin master 2>&1 | tee -a /tmp/bookmark_git_push.log
|
||||
|
||||
notify-send "Bookmarks updated" "Push your changes."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user