Browse Source

Vim Golang/Firefox profile bindings

master
Kevin Mok 4 years ago
parent
commit
b622ec0964
Signed by: Kevin-Mok GPG Key ID: 10B001347552F396
  1. 47
      aliases/key_aliases.tmpl
  2. 9
      aliases/key_dirs.tmpl
  3. 11
      dot_config/fish/config.fish.tmpl
  4. 4
      dot_config/fish/functions/maven-test-method.fish
  5. 3
      dot_config/fish/functions/mute-video.fish
  6. 11
      dot_config/fish/functions/watson-add-game.fish
  7. 10
      dot_config/i3/config.tmpl
  8. 1
      dot_config/i3blocks/scripts/executable_volume
  9. 4
      dot_taskrc
  10. 6
      dot_vimrc.tmpl
  11. 2
      scripts/executable_twem

47
aliases/key_aliases.tmpl

@ -96,6 +96,8 @@ sfd "sftp -rP 399 kevin@165.22.239.234"
ssp "mosh --ssh='ssh -p 8022' $PHONE_IP"
scpp "scp -P 8022 $PHONE_IP:"
sfp "sftp -rP 8022 $PHONE_IP"
rsp "rsync --ignore-existing -Ptre 'ssh -p 8022' $PHONE_IP:"
# test server sites
# svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk"
# postgres ssh tunnel
@ -300,13 +302,15 @@ am "antimicro"
a "task"
aa "task add"
aab "task add proj:pey +bot"
aal "task add proj:lnx"
aam "task add proj:ms"
aamy "task add proj:mny"
aap "task add proj:"
aacm "task add proj:codm"
# aacm "task add proj:codm"
aacr "task add proj:crim"
aaj "task add proj:pey +jira []"
aapp "task add proj:pogo"
aas "task add proj:sch"
aay "task add proj:pey"
ac "task context"
@ -365,6 +369,7 @@ fh "feh"
fi "fish"
gpd "gpg --decrypt"
gpe "gpg --encrypt --recipient"
gtm "gotop -m"
h "habitctl log"
# hbe "habitctl edit"
# hbeh "habitctl edith"
@ -374,7 +379,7 @@ htm "htop -s PERCENT_MEM"
ia "sxiv -a"
it "sxiv -t *"
kill "kill -9"
kal "killall"
ka "killall"
kd "killall Discord && killall Discord"
ke "killall electron"
kf "killall firefox"
@ -383,11 +388,12 @@ kt "killall thunderbird"
lo "libreoffice"
# mpv "mpv --volume=50"
m "mpv"
ml "mpv --loop"
mpl "mpv --loop"
msf "mpv --sub-file="
mra "man ranger"
# mt "minetest"
n "nvim"
nm "nomacs ."
np "nvim --"
ndu "ncdu"
p3 "python3"
@ -411,7 +417,7 @@ sqlb "sqlitebrowser"
stp "termdown"
# sw "swex"
t "tmux"#[[[
ta "tmux a -t"
# ta "tmux a -t"
tabu "tmux a -t backup || tmux new -s backup"
tacf "tmux a -t config || tmux new -s config"
tacm "tmux a -t codm || tmux new -s codm"
@ -438,7 +444,7 @@ wch "weechat"
wg "curl -L wthr.ml"
wgm "curl -L wthr.ml/m"
wgt "curl -L wthr.ml/t"
ytd "youtube-dl"
yt "youtube-dl"
z "zathura --fork"
lz "unzip -l"
@ -457,7 +463,7 @@ ps "pass show"
xc "xclip -selection clipboard"
yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
yg "xclip -selection clipboard ~/.password-store/social/gmail"
yt "xclip -selection clipboard ~/.password-store/social/trapbot"
ytb "xclip -selection clipboard ~/.password-store/social/trapbot"
yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
# ]]] pass #
@ -598,6 +604,7 @@ gcl "git clone"
gs "git status -u"
gf "git fetch"
gfa "git fetch --all"
gfo "git fetch orig"
gch "git checkout"
gchn "git checkout -b"
@ -619,7 +626,7 @@ gchp "git cherry-pick"
gchpt "git cherry-pick --strategy=recursive -X theirs"
gchpc "git cherry-pick --continue"
gst "git stash"
gst "git stash push -m ''"
gstl "git stash list"
gstp "git stash pop"
gsts "git stash show stash@\{0\} -p"
@ -648,6 +655,7 @@ psgi "git add -A && git commit -m 'Update' -S && git push"
gps "git push"
gpso "git push origin"
gpsg "git push gitea"
gpsd "git push origin --delete"
# gpsi "git config credential.helper store && git push"
# gpsn "git push --set-upstream origin master"
gpsn "eval (git push 2>&1 | tail -n 2)"
@ -826,6 +834,9 @@ twf "watch -n300 'twitchy-game Fortnite'"
# mp "mpv --video-zoom=1.5"
# ufn "source trn-api-key.fish && curl --request GET --url https://api.fortnitetracker.com/v1/profile/pc/Vole%20on%20Mobile --header 'trn-api-key: 584d8eca-30d9-4119-92d8-5067dd301118' --cookie __cfduid=d4f0daac7eee3687b481bd55dcf00f3581581900091 > stats.json"
lob "lsd -F --group-dirs first 2020*.mkv"
wo "watch -n60 'lsd -lF --group-dirs first --size short 2020*.mkv'"
# ]]] games #
# school [[[ #
@ -846,6 +857,7 @@ vpd "nmcli con down id '1 - Red Hat Global VPN'"
# laptop
# gcfr "git config user.email 'kmok@redhat.com' && git config user.signingkey 10B001347552F396"
gchk "git checkout KOGITO-"
gch2 "git checkout KOGITO-2113"
loe "libreoffice ~/Documents/expenses/2020.ods &"
ssw "mosh $WORK_LAPTOP_IP tmux a"
@ -880,16 +892,25 @@ jkc "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:$JENK
# maven [[[ #
mc "mvn clean"
# mps "mvn package -DskipTests"
mp "mvn package -DskipTests"
mpr "mvn package -DskipTests && ./server-control.sh start"
mt "mvn test"
mct "mvn clean test"
mvc "mvn clean"
# mvps "mvn package -DskipTests"
mvp "mvn package -DskipTests"
mvpr "mvn clean package -DskipTests && ./server-control.sh start"
mvt "mvn test"
mvct "mvn clean test"
# ]]] maven #
mc "make clean"
mct "make clean test"
ml "make lint"
kg "kogito"
mk "minikube"
gor "go run"
got "go test"
gota "go test *"
mbc "make build-cli && scp build/_output/bin/kogito $WORK_LAPTOP_IP:/home/kmok/go/bin"
# ]]] red-hat #

9
aliases/key_dirs.tmpl

@ -39,6 +39,7 @@ cn ~/coding
drk ~/coding/dark-sky
hbd ~/.habitctl
ib ~/linux-config/dot_config/i3blocks/scripts
pr ~/coding/pull-requests
ra ~/linux-config/dot_config/ranger
rd ~/Documents/red-discord-bot
rda ~/Documents/red-discord-bot/repos/gobcog-kevin/adventure
@ -67,7 +68,7 @@ svg ~/coding/spotify-lib-vis/src/graphs/static/graphs/scripts
swd ~/coding/swex
tb ~/coding/trapbot/src/trapbot
ur ~/coding/uranium-godot
wo ~/Documents/workout-logs
# wo ~/Documents/workout-logs
# gaming [[[ #
@ -134,9 +135,10 @@ wcl ~/.weechat/logs
# kogito [[[ #
k ~/coding/kogito
ka ~/coding/kogito/kogito-apps
kap ~/coding/kogito/kogito-apps
kdo ~/coding/kogito/kie-docs
kex ~/coding/kogito/kogito-examples
keh ~/coding/kogito/kogito-examples/process-scripts-quarkus/target
kfl ~/coding/kogito/kogito-apps
ki ~/coding/kogito/kogito-images
kj ~/coding/kogito/jenkins-test
@ -146,8 +148,9 @@ ko ~/go/src/github.com/kiegroup/kogito-cloud-operator
koc ~/go/src/github.com/kiegroup/kogito-cloud-operator/cmd/kogito/command
kod ~/go/src/github.com/kiegroup/kogito-cloud-operator/cmd/kogito/command/deploy
kof ~/go/src/github.com/kiegroup/kogito-cloud-operator/cmd/kogito/command/flag
kou ~/go/src/github.com/kiegroup/kogito-cloud-operator/cmd/kogito/command/util
kp ~/coding/kogito/kogito-pipelines
kpr ~/Documents/red-hat/pull-requests
kpr ~/coding/pull-requests/red-hat
kr ~/coding/kogito/kogito-runtimes
krj ~/coding/kogito/kogito-runtimes/jenkins-spock-tests

11
dot_config/fish/config.fish.tmpl

@ -37,12 +37,12 @@ set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
# set -x GRAALVM_HOME /usr/lib/jvm/graalvm-ce-java11-20.1.0
# set -x GRAALVM_BIN $GRAALVM_HOME/bin
# set -x JAVA_HOME /usr/lib/jvm/java-11-openjdk
# set -x JAVA_HOME $GRAALVM_HOME
# for shared libs
# set -x JAVA_HOME /usr/lib/jvm/java-8-openjdk
set -x JAVA_HOME /usr/lib/jvm/java-11-openjdk
# set -x JAVA_HOME /usr/lib/jvm/java-8-openjdk
set -x PATH $JAVA_HOME/bin $PATH
# ]]] Java #
@ -76,7 +76,7 @@ set -xU FZF_DEFAULT_COMMAND "find ."
# set -xU PHONE_IP "192.168.0.10"
# set -xU WORK_LAPTOP_IP "kmok@192.168.0.12"
set -x PHONE_IP "192.168.0.10"
set -x PHONE_IP "192.168.0.11"
set -x WORK_LAPTOP_IP "kmok@192.168.0.12"
{{ if eq .chezmoi.fullHostname "nzxt" }}
@ -208,12 +208,15 @@ abbr smr "smol-replace"
abbr shrm "shred-rm"
abbr shs "scan-history"
abbr svp "server-pages"
abbr ta "tmux-attach"
abbr thes "thesaurus"
abbr usc "us-to-cad"
abbr ut "unix-timestamp"
abbr uzr "unzip-rm"
abbr vsnp "vim-snippet"
abbr waf "watson-add-fortnite"
abbr wag "watson-add-game"
abbr waf "watson-add-game fortnite"
abbr wap "watson-add-game pokemon-go"
abbr xya "export-pkgs"
# school [[[ #

4
dot_config/fish/functions/maven-test-method.fish

@ -1,4 +1,4 @@
function maven-test-method
# mvn "-Dtest=$argv[1]#*$argv[2]*" clean test
mvn "-Dtest=$argv[1]#*$argv[2]*" test
mvn "-Dtest=$argv[1]#*$argv[2]*" clean test
# mvn "-Dtest=$argv[1]#*$argv[2]*" test
end

3
dot_config/fish/functions/mute-video.fish

@ -0,0 +1,3 @@
function mute-video
ffmpeg -i $argv[1] -c copy -an $argv[2]
end

11
dot_config/fish/functions/watson-add-game.fish

@ -0,0 +1,11 @@
function watson-add-game
set year_month (date -u +"%Y-%m")
set start_time "$year_month-$argv[2] $argv[3]"
set end_time "$year_month-$argv[4] $argv[5]"
if test (count $argv) -eq 5
watson add -f $start_time -t $end_time fun +$argv[1]
else
watson add -f $start_time -t $end_time fun +$argv[1] +$argv[6]
end
end

10
dot_config/i3/config.tmpl

@ -65,11 +65,10 @@ bindsym Mod4+l exec ~/scripts/dmenu-twitch
bindsym Mod4+m exec $type_delay_cmd && xdotool type 'me@kevin-mok.com'
# bindsym Mod4+$mod+m exec pass -c uoft/markus
bindsym Mod4+n exec $term -e nvim
# bindsym Mod4+o exec $type_delay_cmd && xdotool key 'Control_L+v'
# bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail && $type_delay_cmd && xdotool key 'Control_L+v'
# bindsym Mod4+$mod+o exec xset dpms force off
# bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail && $type_delay_cmd && xdotool key 'Control_L+v'
bindsym Mod4+o exec obs
bindsym Mod4+$mod+o exec xset dpms force off
bindSym $mod+Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail && $type_delay_cmd && xdotool key 'Control_L+v'
# bindsym Mod4+p workspace $ws4; exec pgadmin3
# bindsym Mod4+p exec pycharm
bindsym Mod4+p exec passmenu
@ -338,6 +337,7 @@ set $ws3 "3 "
# set $ws3 "3 "
# workspace $ws3 output $main
bindsym $mod+F3 workspace $ws3; exec $browser
bindsym Mod4+$mod+F3 workspace $ws3; exec firefox -P work
# bindsym Mod4+b workspace $ws3; layout stacked; exec $term -e fish -c "buku-fzf"
# bindsym Mod4+$mod+b workspace $ws3; layout stacked; exec $term -e fish -c "buku-fzf fq"
# bindsym Mod4+b layout stacked; exec $term -e fish -c "buku-fzf"
@ -359,9 +359,9 @@ set $ws5 "5 "
# workspace $ws5 output $secondary
assign [class="Steam"] $ws5
bindsym $mod+F5 workspace $ws5; exec $browser
bindsym $mod+Mod4+F5 workspace $ws5; exec chromium
bindsym $mod+Mod4+F5 workspace $ws5; exec firefox -P work
# bindsym $mod+Mod4+F5 workspace $ws5; exec firefox --private-window
bindsym $mod+Shift+F5 workspace $ws5; exec firefox --private-window
bindsym $mod+Shift+F5 workspace $ws5; exec chromium
# bindsym Mod4+g workspace $ws5; layout stacking; exec $term -e steam
# bindsym Mod4+g workspace $ws5; layout tabbed; exec gimp
# bindsym Mod4+g workspace $ws5; exec mgba-qt

1
dot_config/i3blocks/scripts/executable_volume

@ -33,6 +33,7 @@ SCONTROL=${SCONTROL:-""}
# }}} default vars #
AUDIO_DELTA=${AUDIO_DELTA:-5}
# AUDIO_DELTA=${AUDIO_DELTA:-1}
# LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'}
LONG_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'}

4
dot_taskrc

@ -42,7 +42,7 @@ include /usr/share/doc/task/rc/dark-16.theme
taskd.certificate=\/home\/kevin\/.task\/do.cert.pem
taskd.key=\/home\/kevin\/.task\/do.key.pem
taskd.ca=\/home\/kevin\/.task\/ca.cert.pem
taskd.server=taskd.khkm.tk:53589
taskd.server=taskd.khkm.gq:53589
taskd.credentials=Hevin\/Kevin\/eb6225dc-80fb-4721-8b03-9114c6c4423d
# }}} server #
@ -56,8 +56,10 @@ urgency.user.project.fn.coefficient=5
urgency.user.project.mny.coefficient=7
urgency.user.project.ms.coefficient=3
urgency.user.project.pey.coefficient=10
urgency.user.project.pogo.coefficient=5
urgency.user.project.sch.coefficient=7
urgency.uda.priority.H.coefficient=10
urgency.uda.priority.M.coefficient=4
urgency.uda.priority.L.coefficient=-7
urgency.uda.priority..coefficient=1
urgency.user.tag.jira.coefficient=5

6
dot_vimrc.tmpl

@ -340,6 +340,7 @@ Plug 'tpope/vim-speeddating'
Plug 'martinda/Jenkinsfile-vim-syntax'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
let g:go_fmt_command = ""
Plug 'buoto/gotests-vim'
" ]]] vim-plug "
" Mappings [[[ "
@ -600,6 +601,11 @@ autocmd Filetype markdown inoremap <localleader>c - [ ]
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
" nnoremap <localleader>x 0f[lrx
autocmd Filetype go nnoremap <localleader>f :GoTestFunc<CR>
autocmd Filetype go nnoremap <localleader>l :GoLint<CR>
autocmd Filetype go nnoremap <localleader>m :GoTests<CR>
autocmd Filetype go nnoremap <localleader>t :GoTest<CR>
autocmd Filetype go-template inoremap <localleader>e {{"{{ else }}"}}
autocmd Filetype go-template inoremap <localleader>hd {{"{{ .chezmoi.homedir }}"}}
autocmd Filetype go-template nnoremap <localleader>fp :%s/{{"{{{"}}/[[[/g<CR>:%s/}}}/]]]/g<CR>

2
scripts/executable_twem

@ -4,7 +4,7 @@
# xdotool key Left
# done
sleep .3
xdotool type 'https://twem.tk/.png'
xdotool type 'https://twem.gq/.png'
i=0
while [ "$i" -ne 4 ]
do

Loading…
Cancel
Save