diff --git a/shell/sk/aliases.zsh b/shell/sk/aliases.zsh index 9a49f064..e0648529 100644 --- a/shell/sk/aliases.zsh +++ b/shell/sk/aliases.zsh @@ -1,5 +1,5 @@ -alias skgcf='noglob git commit -S --fixup `skim-git-sha`' -alias skgl=skim-git-log +alias skgcf='noglob git commit -S --fixup `sk-git-sha`' +alias skgl=sk-git-log -alias bm=skim-browser-bookmarks -alias hist=skim-browser-history +alias bm=sk-browser-bookmarks +alias hist=sk-browser-history diff --git a/shell/sk/bin/sk-browser-bookmarks b/shell/sk/bin/sk-browser-bookmarks index b4872342..0e643638 100755 --- a/shell/sk/bin/sk-browser-bookmarks +++ b/shell/sk/bin/sk-browser-bookmarks @@ -8,14 +8,17 @@ [[ $OSTYPE == linux* ]] && open='xdg-open' || open='open' _do_sk() { - for url in $(awk -F "$1" '{printf "%s, %s\n", $1, $2}' | skim --prompt='bookmarks > ' --multi | sed 's#.*\(https*://\)#\1#'); do + for url in $(awk -F "$1" '{printf "%s, %s\n", $1, $2}' | sk --prompt='bookmarks > ' --multi | sed 's#.*\(https*://\)#\1#'); do $open "$url" & done } case ${BROWSER:-firefox} in firefox) - for dir in ~/.mozilla/firefox/*.default ~/.config/firefox/.mozilla/firefox/*.default ~/Library/Application\ Support/Firefox/Profiles/*.default; do + for dir in ~/.mozilla/firefox/*.default \ + $XDG_CONFIG_HOME/firefox/.mozilla/firefox/*.default \ + $XDG_DATA_HOME/mozilla/firefox/*.default \ + ~/Library/Application\ Support/Firefox/Profiles/*.default; do if [[ -d "$dir" ]]; then sep='{{::}}' sqlite3 -separator $sep "$dir/places.sqlite" \ diff --git a/shell/sk/bin/sk-browser-history b/shell/sk/bin/sk-browser-history index 0f4b4953..26d106c8 100755 --- a/shell/sk/bin/sk-browser-history +++ b/shell/sk/bin/sk-browser-history @@ -9,14 +9,17 @@ sep='{{::}}' [[ $OSTYPE == linux* ]] && open='xdg-open' || open='open' _do_skim() { - for url in $(awk -F "$sep" '{printf "%s, %s\n", $1, $2}' | skim --prompt='history > ' --multi | sed 's#.*\(https*://\)#\1#'); do + for url in $(awk -F "$sep" '{printf "%s, %s\n", $1, $2}' | sk --prompt='history > ' --multi | sed 's#.*\(https*://\)#\1#'); do $open "$url" & done } case ${BROWSER:-firefox} in firefox) - for dir in ~/.mozilla/firefox/*.default ~/.config/firefox/.mozilla/firefox/*.default ~/Library/Application\ Support/Firefox/Profiles/*.default; do + for dir in ~/.mozilla/firefox/*.default \ + $XDG_CONFIG_HOME/firefox/.mozilla/firefox/*.default \ + $XDG_DATA_HOME/mozilla/firefox/*.default \ + ~/Library/Application\ Support/Firefox/Profiles/*.default; do if [[ -d "$dir" ]]; then sqlite3 -separator $sep "$dir/places.sqlite" \ "SELECT DISTINCT title, url FROM moz_places \