Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Sep 27, 2023
1 parent 82cc862 commit 81213a3
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 34 deletions.
58 changes: 58 additions & 0 deletions .config/gh-dash/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
prSections:
- title: My Pull Requests
filters: is:open author:@me
- title: Needs My Review
filters: is:open review-requested:@me
- title: Involved
filters: is:open involves:@me -author:@me
issuesSections:
- title: My Issues
filters: is:open author:@me
- title: Assigned
filters: is:open assignee:@me
- title: Involved
filters: is:open involves:@me -author:@me
defaults:
preview:
open: true
width: 50
prsLimit: 20
issuesLimit: 20
view: prs
layout:
prs:
updatedAt:
width: 7
repo:
width: 15
author:
width: 15
assignees:
width: 20
hidden: true
base:
width: 15
hidden: true
lines:
width: 16
issues:
updatedAt:
width: 7
repo:
width: 15
creator:
width: 10
assignees:
width: 20
hidden: true
refetchIntervalMinutes: 30
keybindings:
issues: []
prs: []
repoPaths: {}
theme:
ui:
table:
showSeparator: true
pager:
diff: ""
1 change: 1 addition & 0 deletions .config/gh/alias.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd: ghq-cd
2 changes: 1 addition & 1 deletion .config/github-copilot/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"copilot.vim":"1.10.0","copilot.lua":"1.10.2"}
{"copilot.vim":"1.10.0","copilot.lua":"1.10.3"}
21 changes: 11 additions & 10 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[include]
path = ~/.gitconfig.local
path = ~/.gitconfig.local
[include]
path = ~/.gitconfig.themes
path = ~/.gitconfig.themes
[core]
excludesfile = ~/.gitignore_global
ignorecase = false
excludesfile = ~/.gitignore_global
ignorecase = false
editor = nvim
; pager = delta
[gpg]
program = gpg2
program = gpg2
[alias]
cm = checkout main
cm = checkout main
graph = log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short
[ghq]
root = ~/ghq/src
root = ~/ghq/src
[interactive]
diffFilter = delta --color-only
[delta]
Expand All @@ -27,8 +28,8 @@
[difftool "nvimdiff"]
cmd = "nvim -R -d -c \"wincmd l\" -d \"$LOCAL\" \"$REMOTE\""
[pull]
rebase = true
rebase = true
[init]
defaultBranch = main
defaultBranch = main
[credential]
helper = cache --timeout=3600
helper = cache --timeout=3600
46 changes: 23 additions & 23 deletions .zsh/10_utils.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ os() {
alias ostype=os

arch() {
echo "$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
echo "$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
}

# os_detect export the PLATFORM variable as you see fit
Expand Down Expand Up @@ -103,37 +103,37 @@ get_os() {
}

gitlocal() {
git config --local user.name "Shu Kutsuzawa"
git config --local user.email "cappyzawa@gmail.com"
git config --local hub.host "github.com"
git config --local gpg.program gpg
git config --local user.signingkey 95FACBF514EBED07EFF2461812D20A0BDD2B2A46
echo 'export GITHUB_TOKEN=${GITHUB_COM_TOKEN}' >> .envrc
git config --local user.name "Shu Kutsuzawa"
git config --local user.email "cappyzawa@gmail.com"
git config --local hub.host "github.com"
git config --local gpg.program gpg
git config --local user.signingkey 95FACBF514EBED07EFF2461812D20A0BDD2B2A46
echo 'export GITHUB_TOKEN=${GITHUB_COM_TOKEN}' >> .envrc
}

kind_start() {
if ! has "kind"; then
echo "kind command is missing"
exit 1
fi
if ! has "kind"; then
echo "kind command is missing"
exit 1
fi

if ! has "docker"; then
echo "docker command is missing"
exit 1
fi
if ! has "docker"; then
echo "docker command is missing"
exit 1
fi

set -x
kind get nodes | while read n; do
docker start $n
done
set +x
set -x
kind get nodes | while read n; do
docker start $n
done
set +x
}

gcd() {
local repo_path=`ghq list --full-path | fzf --reverse --preview "bat {1}/README.md"`
\cd ${repo_path}
local repo_path=`ghq list --full-path | fzf --reverse --preview "bat {1}/README.md"`
\cd ${repo_path}
}

if has 'anyenv'; then
eval "$(anyenv init -)"
eval "$(anyenv init -)"
fi
16 changes: 16 additions & 0 deletions .zsh/80_custom.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,19 @@ fi
if has 'nvim'; then
alias vim='nvim'
fi

gh_install() {
local extensions_home="${XDG_DATA_HOME}/gh/extensions"
local extension=$1
if ! [[ -d "${extensions_home}/$(basename ${extension})" ]]; then
gh extension install "${extension}"
fi
}

if has "gh"; then
gh_install "cappyzawa/gh-ghq-cd"
gh_install "mislav/gh-branch"
gh_install "seachicken/gh-poi"
gh_install "dlvhdr/gh-dash"
gh alias import --clobber "${XDG_CONFIG_HOME}/gh/alias.yml" >/dev/null
fi

0 comments on commit 81213a3

Please sign in to comment.