From 85e0010a1f9eb56a666d008e42464f41e9de354f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 21 Feb 2020 12:39:47 -0600 Subject: [PATCH 1/2] WIP --- bin/lib/debian/provisioning/install-packages.bash | 5 +++-- bin/pr-for-commit | 10 ++++++++++ bin/vdiff | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 bin/pr-for-commit diff --git a/bin/lib/debian/provisioning/install-packages.bash b/bin/lib/debian/provisioning/install-packages.bash index 4d5dd1a..89dc519 100755 --- a/bin/lib/debian/provisioning/install-packages.bash +++ b/bin/lib/debian/provisioning/install-packages.bash @@ -1,5 +1,7 @@ #!/usr/bin/env bash +sudo apt install curl gnupg2 + echo "Setting up yarn source..." curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list @@ -23,7 +25,6 @@ sudo apt install \ neovim vim \ unzip \ lua5.3 luajit \ - curl \ jq \ w3m \ ranger \ @@ -32,5 +33,5 @@ sudo apt install \ fortune \ nodejs yarn \ gawk \ - gnupg2 \ + netcat \ kitty-terminfo diff --git a/bin/pr-for-commit b/bin/pr-for-commit new file mode 100755 index 0000000..d830241 --- /dev/null +++ b/bin/pr-for-commit @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +export GITHUB_UPSTREAM="$(git remote -vv | awk '{$0=$2}')" + +git log --merges --ancestry-path --oneline $1..master \ + | grep -i 'pull request' \ + | tail -n1 \ + | awk '{$0=$5}' \ + | cut -c2- \ + | xargs -I % open https://github.com/$GITHUB_UPSTREAM/${PWD##*/}/pull/% diff --git a/bin/vdiff b/bin/vdiff index ea269a0..5801fae 100755 --- a/bin/vdiff +++ b/bin/vdiff @@ -18,6 +18,7 @@ for f in $files; do cfn="$rfn" mkdir -p "$d" + # TODO: show at ref if provided git --no-pager show HEAD:"$f" > "$d/$fn" 2>/dev/null || \ echo "" > "$d/$fn" cp "$f" "$d/$cfn" 2>/dev/null || echo "" > "$d/$cfn" From b0a5a1cac4827dc88fbaa2cbdc596ecd3f216b28 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 6 Mar 2020 15:43:01 -0600 Subject: [PATCH 2/2] Fix things --- apps/de/sxhkd/rc | 2 +- apps/de/x/profile | 1 - apps/shell/fish/aliases.fish | 8 ++++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/de/sxhkd/rc b/apps/de/sxhkd/rc index da1e249..be975dc 100755 --- a/apps/de/sxhkd/rc +++ b/apps/de/sxhkd/rc @@ -237,7 +237,7 @@ super + shift + v sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.sh.pid")' super + shift + e - rofimoji --use-clipboard --rofi-args='--sort -sorting-method fzf' + rofimoji --insert-with-clipboard --rofi-args='--sort -sorting-method fzf' super + shift + p rofi-pass diff --git a/apps/de/x/profile b/apps/de/x/profile index 78f59d0..3da3436 100755 --- a/apps/de/x/profile +++ b/apps/de/x/profile @@ -9,7 +9,6 @@ [ -f "$HOME/.xmodmap" ] && xmodmap "$HOME/.xmodmap" has_command xcape && xcape -e 'Control_L=Escape' & has_command libinput-gestures-setup && libinput-gestures-setup start -has_command autocutsel && autocutsel -s PRIMARY & has_command autorandr && autorandr -c has_command redshift && redshift -r -l 39.1:-94.6 -t 6500K:3000K & has_command kdeconnect-indicator && kdeconnect-indicator & diff --git a/apps/shell/fish/aliases.fish b/apps/shell/fish/aliases.fish index 85cce3f..a28cb63 100755 --- a/apps/shell/fish/aliases.fish +++ b/apps/shell/fish/aliases.fish @@ -114,6 +114,9 @@ alias gd "git diff" alias gds "gd --staged" # alias gdv "git dv" # TODO: what is this? alias gpl "git pull" +alias ga "git add" +alias gcm "git commit -m" +alias gco "git checkout" alias gp "git push" alias gpa "git push --all && git push --tags" alias gpt "git push && git push --tags" @@ -130,6 +133,11 @@ alias dclf "docker-compose logs --tail=500 -f" alias ctop "docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest" # misc aliases +function pp + while not ping -n 1 -t 5 8.8.8.8 + sleep 1 + end +end alias p "ping 8.8.8.8" alias C "clear && clear" alias r "ranger"