Skip to content

Commit

Permalink
Merge pull request #7 from mashita1023/fix-script
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
mashita1023 authored Aug 6, 2024
2 parents 198a26a + 2b79f12 commit 1d06086
Show file tree
Hide file tree
Showing 21 changed files with 414 additions and 180 deletions.
1 change: 1 addition & 0 deletions .asdfrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy_version_file = yes
85 changes: 47 additions & 38 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
if status is-interactive

# brew
#set -U fish_user_paths /usr/bin $fish_user_paths
#set -U fish_user_paths /usr/local/bin $fish_user_paths
#set -U fish_user_paths /bin $fish_user_paths
#set -U fish_user_paths /opt/homebrew/sbin $fish_user_paths
#set -U fish_user_paths /opt/homebrew/bin $fish_user_paths
set -U fish_user_paths /usr/bin $fish_user_paths
set -U fish_user_paths /usr/local/bin $fish_user_paths
set -U fish_user_paths /bin $fish_user_paths
set -U fish_user_paths /opt/homebrew/sbin $fish_user_paths
set -U fish_user_paths /opt/homebrew/bin $fish_user_paths
set -gx PATH $HOME/.asdf/shims $PATH
set -gx fish_user_paths /Users/toshichika-mashimo/.asdf/shims $fish_user_paths

# brew
eval (/opt/homebrew/bin/brew shellenv)

### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
set --export --prepend PATH "/Users/toshichika-mashimo/.rd/bin"
#set --export --prepend PATH "/Users/toshichika-mashimo/.rd/bin"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)

set -U fish_user_paths /Users/toshichika-mashimo/.asdf/shims/ruby $fish_user_paths

# lima
set -x DOCKER_HOST unix://$HOME/.lima/docker/sock/docker.sock

Expand All @@ -24,25 +28,29 @@ source /opt/homebrew/opt/asdf/libexec/asdf.fish
if test -z $TMUX
tmux new-session -d -s 'work'
tmux new-session -d -s 'mine'
tmux new-session -d -s 'cfo'
tmux attach -t work
else
set -ul TMUX_LIST $TMUX_LIST (tmux list-sessions)
set -ul TMUX_LIST $TMUX_LIST[-1..1]
set TMUX_LIST $TMUX_LIST "Create New Session: "

for val in $TMUX_LIST
set TMUX_LIST_ID $TMUX_LIST_ID (echo $val | cut -d: -f1)
end
set -ul TMUX_SELECT_ID (printf '%s\n' $TMUX_LIST_ID | fzf)
echo $TMUX_SELECT_ID
if test "$TMUX_SELECT_ID" = "Create New Session"
tmux new-session -d
tmux attach
else
tmux switch-client -t $TMUX_SELECT_ID
end

### セッション立ち上げ時以外にセッションを選択する場面がないため削除
# else
# set -ul TMUX_LIST $TMUX_LIST (tmux list-sessions)
# set -ul TMUX_LIST $TMUX_LIST[-1..1]
# set TMUX_LIST $TMUX_LIST "Create New Session: "

# for val in $TMUX_LIST
# set TMUX_LIST_ID $TMUX_LIST_ID (echo $val | cut -d: -f1)
# end
# set -ul TMUX_SELECT_ID (printf '%s\n' $TMUX_LIST_ID | fzf)
# echo $TMUX_SELECT_ID

# if test "$TMUX_SELECT_ID" = "Create New Session"
# tmux new-session -d
# tmux attach
# else
# tmux switch-client -t $TMUX_SELECT_ID
# end
end
end
#end
# abbr
abbr -a e emacs -nw
abbr -a eb emacs --batch -f batch-byte-compile ~/dotfiles/.leaf.d/init.el
Expand All @@ -60,33 +68,34 @@ abbr -a gdf git diff
abbr -a gsw git switch
abbr -a gsc git switch -c
abbr -a grb git rebase

abbr -a ls ls -alF
abbr -a l ls -CF

# fzf
set -U FZF_LEGACY_KEYBINDINGS 0
set -U FZF_REVERSE_ISEARCH_OPTS "--reverse --height=100%"

function ghq_fzf_repo -d 'Repository search'
ghq list --full-path | fzf --reverse --height=100% | read select
[ -n "$select" ]; and cd "$select"
echo " $select "
commandline -f repaint
end
#function ghq_fzf_repo -d 'Repository search'
# ghq list --full-path | fzf --reverse --height=100% | read select
# [ -n "$select" ]; and cd "$select"
# echo " $select "
# commandline -f repaint
#end

function fish_user_key_bindings
bind \cc ghq_fzf_repo
end
#function fish_user_key_bindings
# bind \cc ghq_fzf_repo
#end

# goenv
set -x GOPATH $(go env GOPATH)
set -x PATH $PATH:$GOPATH/bin
#set -x GOPATH $(go env GOPATH)
#set -x PATH $PATH:$GOPATH/bin

# poetry
set -x PATH $PATH:$HOME/.local/bin
#set -x PATH $PATH:$HOME/.local/bin

# rancher_desktop no omajinai
function rancher_lima
/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/mackankowski/be575ec0b81fd8ba3a948d3e84410adc/raw/979b09ab2cc6225ddee1aedaf9e893bb839a715a/script.sh)"
#function rancher_lima
# /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/mackankowski/be575ec0b81fd8ba3a948d3e84410adc/raw/979b09ab2cc6225ddee1aedaf9e893bb839a715a/script.sh)"
end

source /opt/homebrew/opt/asdf/libexec/asdf.fish
10 changes: 10 additions & 0 deletions .config/fish/my_functions/pull.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function pull
git fetch --all -avp
git stash
git switch develop
git pull upstream develop
set merged_branch (git branch --merged | egrep -v '\*|develop|main')
echo $merged_branch | xargs git branch -d
git switch -
echo "delete branch list: $merged_branch"
end
6 changes: 6 additions & 0 deletions .config/fish/my_functions/review.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function review
set pr_num $argv[1]
echo $pr_num
git fetch upstream pull/$pr_num/head:pull/$pr_num
git switch pull/$pr_num
end
2 changes: 2 additions & 0 deletions .config/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ set -g @plugin 'dracula/tmux'
#set -g @dracula-ram-usage true
#set -g @dracula-gpu-usage true
#set -g @dracula-day-month true
set -g @dracula-plugins "battery cpu-usage network network-bandwidth network-ping weather time"
set -g @dracula-show-fahrenheit false

## Escキーの遅延を解消
set -s escape-time 0
Expand Down
25 changes: 1 addition & 24 deletions .leaf.d/custom.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,7 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auto-save-default nil)
'(create-lockfiles nil)
'(custom-file "~/dotfiles/.leaf.d/custom.el")
'(debug-on-error t)
'(electric-pair-mode t)
'(highlight-indent-guides-auto-character-face-perc 20)
'(highlight-indent-guides-character 124)
'(highlight-indent-guides-method 'character)
'(imenu-list-position 'left t)
'(imenu-list-size 30 t)
'(indent-tabs-mode nil)
'(init-file-debug t t)
'(make-backup-files nil)
'(package-archives
'(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
'(package-selected-packages '(use-package blackout el-get hydra leaf-keywords leaf))
'(scroll-bar-mode nil t)
'(show-paren-delay 0.1)
'(truncate-lines t)
'(user-full-name "Toshichika Mashimo")
'(user-login-name "mashita1023" t)
'(user-mail-address "[email protected]"))
'(package-selected-packages '(use-package blackout el-get hydra leaf-keywords leaf)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
Expand Down
93 changes: 93 additions & 0 deletions .leaf.d/el-get/.loaddefs.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
;;; .loaddefs.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.

;; This file is part of GNU Emacs.

;;; Code:


;;;### (autoloads nil "copilot/copilot" "copilot/copilot.el" (0 0
;;;;;; 0 0))
;;; Generated autoloads from copilot/copilot.el

(autoload 'copilot-mode "copilot/copilot" "\
Minor mode for Copilot.
This is a minor mode. If called interactively, toggle the
`Copilot mode' mode. If the prefix argument is positive, enable
the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is `toggle'. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate `copilot-mode'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\(fn &optional ARG)" t)

(put 'global-copilot-mode 'globalized-minor-mode t)

(defvar global-copilot-mode nil "\
Non-nil if Global Copilot mode is enabled.
See the `global-copilot-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `global-copilot-mode'.")

(custom-autoload 'global-copilot-mode "copilot/copilot" nil)

(autoload 'global-copilot-mode "copilot/copilot" "\
Toggle Copilot mode in all buffers.
With prefix ARG, enable Global Copilot mode if ARG is positive;
otherwise, disable it.
If called from Lisp, toggle the mode if ARG is `toggle'.
Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
Copilot mode is enabled in all buffers where
`copilot-turn-on-unless-buffer-read-only' would do it.
See `copilot-mode' for more information on Copilot mode.
\(fn &optional ARG)" t)

(autoload 'copilot-complete "copilot/copilot" "\
Complete at the current point." t)

(autoload 'copilot-install-server "copilot/copilot" "\
Interactively install server." t)

(autoload 'copilot-reinstall-server "copilot/copilot" "\
Interactively re-install server." t)

(autoload 'copilot-uninstall-server "copilot/copilot" "\
Delete a Copilot server from `copilot-install-dir'." t)

(register-definition-prefixes "copilot/copilot" '("copilot-"))

;;;***

;;;### (autoloads nil "copilot/copilot-balancer" "copilot/copilot-balancer.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from copilot/copilot-balancer.el

(register-definition-prefixes "copilot/copilot-balancer" '("copilot-balancer-"))

;;;***

;;; End of scraped data

;; Local Variables:
;; version-control: never
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:

;;; .loaddefs.el ends here
3 changes: 3 additions & 0 deletions .leaf.d/el-get/.status.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
((copilot status "installed" recipe
(:name copilot :type github :pkgname "copilot-emacs/copilot.el" :after nil))
(el-get status "required"))
1 change: 1 addition & 0 deletions .leaf.d/el-get/copilot
Submodule copilot added at 733bff
Loading

0 comments on commit 1d06086

Please sign in to comment.