Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master'

aws
Kevin Mok 2 years ago
committed by Kevin Mok
parent
commit
7b8685477b
  1. 642
      aliases/key_aliases.tmpl
  2. 198
      aliases/key_dirs.tmpl
  3. 68
      aliases/key_files.tmpl
  4. 10
      dot_Xmodmap
  5. 7
      dot_Xmodmap-old
  6. 9
      dot_Xresources.tmpl
  7. 137
      dot_config/fish/completions/kogito.fish
  8. 1728
      dot_config/fish/completions/kubectl.fish
  9. 178
      dot_config/fish/completions/minikube.fish
  10. 133
      dot_config/fish/config.fish.tmpl
  11. 3
      dot_config/fish/functions/cad-to-us.fish
  12. 7
      dot_config/fish/functions/clip.fish
  13. 15
      dot_config/fish/functions/discord-burner.fish
  14. 3
      dot_config/fish/functions/dump-rarity-check.fish
  15. 0
      dot_config/fish/functions/fish_mode_prompt.fish
  16. 4
      dot_config/fish/functions/fzf-cd.fish
  17. 6
      dot_config/fish/functions/fzf-ranger.fish
  18. 5
      dot_config/fish/functions/fzf-vim.fish
  19. 3
      dot_config/fish/functions/git-log-short.fish
  20. 3
      dot_config/fish/functions/git-submodule-branch.fish
  21. 2
      dot_config/fish/functions/git/git-clone-gitea.fish
  22. 3
      dot_config/fish/functions/git/git-push-diff-name.fish
  23. 4
      dot_config/fish/functions/git/git-push-new-gitea.fish
  24. 6
      dot_config/fish/functions/git/git-replace-origin-gitea.fish
  25. 3
      dot_config/fish/functions/libreoffice-silent.fish
  26. 4
      dot_config/fish/functions/maven-test-method.fish
  27. 3
      dot_config/fish/functions/mkdir-cd.fish
  28. 3
      dot_config/fish/functions/mute-video.fish
  29. 3
      dot_config/fish/functions/pastebin.fish
  30. 3
      dot_config/fish/functions/qalc-history.fish
  31. 3
      dot_config/fish/functions/qalc-update.fish
  32. 3
      dot_config/fish/functions/readlink-cp.fish
  33. 13
      dot_config/fish/functions/refresh-config-task.fish
  34. 3
      dot_config/fish/functions/reminder.fish
  35. 1
      dot_config/fish/functions/scan-history.fish
  36. 7
      dot_config/fish/functions/scp-vid.fish
  37. 8
      dot_config/fish/functions/server-pages.fish
  38. 3
      dot_config/fish/functions/sxiv-silent.fish
  39. 2
      dot_config/fish/functions/task/task-anno.fish
  40. 1
      dot_config/fish/functions/task/task-delete.fish
  41. 1
      dot_config/fish/functions/task/task-done.fish
  42. 4
      dot_config/fish/functions/task/task-due-rm.fish
  43. 4
      dot_config/fish/functions/task/task-due.fish
  44. 2
      dot_config/fish/functions/task/task-mod-pri.fish
  45. 4
      dot_config/fish/functions/task/task-next-rm.fish
  46. 4
      dot_config/fish/functions/task/task-wait.fish
  47. 4
      dot_config/fish/functions/us-to-cad.fish
  48. 10
      dot_config/fish/functions/vpn-red-hat.fish
  49. 11
      dot_config/fish/functions/watson-add-fortnite.fish
  50. 11
      dot_config/fish/functions/watson-add-game.fish
  51. 161
      dot_config/i3/config.tmpl
  52. 62
      dot_config/i3blocks/i3blocks-secondary.conf.tmpl
  53. 81
      dot_config/i3blocks/i3blocks.conf.tmpl
  54. 5
      dot_config/i3blocks/scripts/executable_ticker
  55. 4
      dot_config/i3blocks/scripts/executable_volume
  56. 3
      dot_config/i3blocks/scripts/executable_wifi
  57. 14
      dot_config/kitty/kitty.conf
  58. 33
      dot_config/mimeapps-ffox.list
  59. 34
      dot_config/mimeapps.list
  60. 21
      dot_config/mpv/input.conf
  61. 2
      dot_config/mpv/mpv.conf
  62. 423
      dot_config/picom/picom.conf
  63. 1
      dot_config/ranger/plugins/__init__.py
  64. 11
      dot_config/ranger/rc.conf.tmpl
  65. 9
      dot_config/spotify/Users/polarbier-user/prefs.tmpl
  66. 11
      dot_gitconfig.tmpl
  67. 6
      dot_imwheelrc
  68. 3
      dot_minikube/config/config.json
  69. 33
      dot_taskrc
  70. 8
      dot_tmux.conf
  71. 155
      dot_vimrc.tmpl
  72. 9
      dot_xinitrc.tmpl
  73. 2
      private_dot_calcurse/conf
  74. 9
      scripts/executable_backup
  75. 3
      scripts/executable_dmenu-twitch
  76. 3
      scripts/executable_spotify-clean
  77. 101
      scripts/executable_ticker
  78. 10
      scripts/executable_twem
  79. 8
      scripts/executable_twitchy-game
  80. 1
      txt/exclude-dirs-backup-full.txt
  81. 3
      txt/exclude-dirs-backup.txt.tmpl
  82. 54
      txt/nzxt-all.txt
  83. 31
      txt/nzxt-aur.txt
  84. 33
      txt/nzxt-pkgs.txt

642
aliases/key_aliases.tmpl
File diff suppressed because it is too large
View File

198
aliases/key_dirs.tmpl

@ -1,4 +1,4 @@
# vim: fdm=marker ft=sh.go-template syntax=sh
# vim: fdm=marker ft=sh.go-template syntax=sh
# sys [[[ #
@ -6,23 +6,32 @@ bg ~/Pictures/Backgrounds
cf ~/linux-config/dot_config
cfd ~/.config
cff ~/.config/fish
ch ~/Documents/chat
da /mnt/ipad
dl ~/Downloads
# dw ~/dwm
D ~/Documents
k ~/
lc ~/linux-config
lf /mnt/linux-files
lf2 /mnt/linux-files-2
lfp /mnt/linux-files/Pictures
lfv /mnt/linux-files/Videos
lfv2 /mnt/linux-files-2/Videos
lfy /mnt/linux-files/Videos/yt
me /run/media/kevin
o /
p ~/.password-store
pd ~/.password-store
pfp ~/Pictures/profile-pics
P ~/Pictures
ssu ~/Pictures/screenshots/desktop/unsorted
std ~/st
# tm /tmp
tm ~/tmp
{{ if and (eq .chezmoi.username "root") (eq .linux_os "debian") }}
ng /etc/nginx/sites-available
sv /etc/systemd/system
# sv /etc/systemd/system
{{ end }}
# ]]] sys #
@ -30,16 +39,26 @@ sv /etc/systemd/system
# cdn [[[ #
ad ~/.task
bm ~/Documents/bookmarks
ccd ~/.calcurse
cms ~/Documents/codm/site
cn ~/coding
drk ~/coding/dark-sky
ffx ~/linux-config/dot_config/fish/functions
hbd ~/.habitctl
ib ~/linux-config/dot_config/i3blocks/scripts
ms ~/coding/my-site
pr ~/coding/pull-requests
ra ~/linux-config/dot_config/ranger
rd ~/Documents/red-discord-bot
rda ~/Documents/red-discord-bot/repos/gobcog-kevin/adventure
rdt ~/coding/discord-bots
rdp ~/coding/discord-bots/pinky/cogs/CogManager/cogs/adventure
sr ~/linux-config/scripts
snp ~/.vim/plugged/vim-snippets/UltiSnips
sw ~/.local/share/nvim/swap/
ttd ~/.timetrace
ttdr ~/.timetrace/records
tx ~/linux-config/txt
wd ~/.config/watson
@ -48,25 +67,38 @@ b1 ~/coding/mf-site/themes/base16
2d ~/coding/godot-demos/2d-plat
ada ~/coding/ada-mario
ft ~/coding/face-tracker
hv ~/Documents/hevin
hvs ~/Documents/hevin/shopping
j ~/Documents/journal
lh ~/Documents/listening-history
mmd ~/coding/move-mouse-with-head
mh ~/coding/mf-site/layouts
ms ~/coding/mf-site
msl ~/coding/mf-site/content/letter
# mp ~/coding/mf-site/static/pdf
pk ~/Documents/journal/packing-lists
pn ~/coding/red-discord-bot
rs ~/coding/rarity-surf/backend/rarity_check/project
rsf ~/coding/rarity-surf/frontend
rsc ~/coding/rarity-surf/backend/rarity_check/project/management/commands
rsm ~/coding/rarity-surf/backend/rarity_check/project/migrations
sv ~/coding/spotify-lib-vis/src
svg ~/coding/spotify-lib-vis/src/graphs/static/graphs/scripts
swd ~/coding/swex
tb ~/coding/trapbot/src/trapbot
wo ~/Documents/workout-logs
ur ~/coding/uranium-godot
# wo ~/Documents/workout-logs
# gaming [[[ #
te ~/Documents/twitch-emotes
te ~/Pictures/twitch-emotes
mt ~/.minetest
mta ~/.minetest/clientmods/custom_aliases
mtc ~/.minetest/games/mineclone2/mods
mtm ~/.minetest/minetest
# mt ~/.minetest
# mta ~/.minetest/clientmods/custom_aliases
# mtc ~/.minetest/games/mineclone2/mods
# mtm ~/.minetest/minetest
pk ~/Downloads/gba/mgba/pokemon/emerald/1
# pk ~/Downloads/gba/mgba/pokemon/emerald/1
# ]]] gaming #
@ -80,18 +112,154 @@ ads ~/coding/ada-mario/scripts
adP ~/Pictures/ada-mario
{{ end }}
# ]]] cdn #
# gaming [[[ #
lfo /mnt/linux-files/Videos/obs
lfo2 /mnt/linux-files-2/Videos/obs
pxv /mnt/linux-files/Videos/pixel
# codm [[[ #
cm ~/Documents/codm
cs ~/Documents/codm/site
csi ~/Documents/codm/site/static/images
Css ~/Pictures/screenshots/mobile/codm
# ]]] codm #
# fortnite [[[ #
fn ~/Documents/fortnite
fnc /mnt/linux-files/Videos/yt/fortnite/clips/4
fni /mnt/ipad/DCIM/100APPLE
fnm ~/Documents/fortnite/pics/maps
fnn ~/Documents/fortnite/notes
fns ~/Documents/fortnite/stats/api
fnv /mnt/linux-files/Videos/personal-fortnite-games/review
tcd /mnt/linux-files/Videos/yt/fortnite/clips/twitch-clip-downloader
# ]]] fortnite #
pgv /mnt/linux-files/Videos/pokemon-go
tr ~/.local/share/Terraria
dc ~/Documents/chat/discord
twt ~/Documents/twitter
sdv ~/Documents/stardew-valley-aha
wo ~/Documents/workout-logs/3
# ]]] gaming #
# sch [[[ #
sc ~/school
lt ~/school/latex-notes
2 ~/school/324
2a ~/school/324-a2-2
2e ~/school/324/e/8
2l ~/school/324/l/8
8 ~/school/384
# 301 [[[ #
1 ~/school/301
1a ~/school/301/a2
1af ~/school/301/a1/price-calc/src
# 1ab ~/school/301/a1/backend
1ab ~/school/301/todo-app-medium-demo/flask_app
1as ~/school/301/a2/scripts
1apr ~/coding/pull-requests/301/a1
1d ~/school/301/korotu/deliverables/deliverable-2/minter/src
1d3 ~/school/301/korotu/deliverables/deliverable-3
1dc ~/school/301/korotu/deliverables/deliverable-2/nft-contract
1k ~/school/301/korotu
1kd ~/school/301/korotu/deliverables/deliverable-1
1pr ~/coding/pull-requests/301/d3
# ]]] 301 #
# solidity [[[ #
sl ~/coding/solidity
shd ~/coding/solidity/dotenv
shw ~/coding/solidity/hello-world
shws ~/coding/solidity/hello-world-part-four-tutorial/starter-files/src
snf ~/coding/solidity/nft
snm ~/coding/solidity/nft-minter-tutorial/minter-starter-files/src
# ]]] solidity #
# ]]] sch #
# pey [[[ #
atx ~/Documents/ataraxy-venture
em ~/Documents/emails
li ~/Documents/linkedin
lic ~/Documents/linkedin/msgs
rh ~/Documents/red-hat
rhc ~/Documents/red-hat/chat
rhe ~/Documents/red-hat/emails
rhl ~/Documents/red-hat/learned
sa ~/coding/rhcsa-notes
wcl ~/.weechat/logs
ep ~/Documents/expenses
# kogito [[[ #
kg ~/coding/kogito
kap ~/coding/kogito/kogito-apps
kdo ~/coding/kogito/kie-docs
kdoa ~/coding/kogito/kie-docs/doc-content/kogito-docs/src/main/asciidoc
kex ~/coding/kogito/kogito-examples
keh ~/coding/kogito/kogito-examples/process-scripts-quarkus/target
kep ~/coding/kogito/kogito-examples/process-postgresql-persistence-quarkus
kfl ~/coding/kogito/kogito-apps
kh ~/coding/kogito/kogito-helm-charts
kho ~/coding/kogito/kogito-helm-chart-old
ki ~/coding/kogito/kogito-images
kj ~/coding/kogito/jenkins-test
kjb ~/coding/kogito/jenkins-test-bot
kjf ~/coding/kogito/jenkins-test/full
kl ~/coding/kogito/shared-libraries
# operator [[[ #
ko ~/go/src/github.com/kiegroup/kogito-operator
kor ~/go/src/github.com/kiegroup/rhpam-kogito-operator
# koc ~/go/src/github.com/kiegroup/kogito-operator/cmd/kogito/command
koc ~/coding/kogito/kogito-operator
kod ~/go/src/github.com/kiegroup/kogito-operator/cmd/kogito/command/deploy
koe ~/go/src/github.com/kiegroup/kogito-operator/examples
kore ~/go/src/github.com/kiegroup/rhpam-kogito-operator/example
kof ~/go/src/github.com/kiegroup/kogito-operator/cmd/kogito/command/flag
# kor ~/go/src/github.com/kiegroup/kogito-operator/pkg/controller/kogitoruntime
kou ~/go/src/github.com/kiegroup/kogito-operator/cmd/kogito/command/util
ko2 ~/coding/kogito/kogito-operator-2
# ]]] operator #
kob ~/coding/kogito-operator-onboarding
kot ~/coding/kogito/optaplanner
kp ~/coding/kogito/kogito-pipelines
kp2 ~/coding/kogito/kogito-pipelines-2
kpr ~/coding/pull-requests/red-hat
kprh ~/coding/pull-requests/red-hat/helm
kr ~/coding/kogito/kogito-runtimes
krj ~/coding/kogito/kogito-runtimes/jenkins-spock-tests
ky ~/coding/kogito/kogito-kmok-yamls
gos ~/go/src
# ]]] kogito #
vb ~/coding/VileBot/vilebot
vbs ~/coding/VileBot/vilebot/src/main/java/com/oldterns/vilebot
dv ~/coding/devops-sre-knowledge
nxo ~/coding/kogito/nexus-operator
# ]]] pey #
mb ~/coding/mint-bot
nft ~/Documents/nft

68
aliases/key_files.tmpl

@ -3,14 +3,16 @@
# sys [[[ #
3 ~/linux-config/dot_config/i3/config.tmpl
3b ~/linux-config/dot_config/i3blocks/i3blocks.conf.tmpl
a ~/linux-config/aliases/key_aliases.tmpl
ak ~/linux-config/dot_ssh/authorized_keys-all
d ~/linux-config/aliases/key_dirs.tmpl
dw ~/dwm/config.def.h
f ~/linux-config/aliases/key_files.tmpl
h ~/.local/share/fish/fish_history
fh ~/.local/share/fish/fish_history
hc ~/Documents/hevin/cleaning.md
n ~/linux-config/dot_vimrc.tmpl
p ~/linux-config/txt/pacman-pkgs/pacman-pkgs.txt
pkg ~/linux-config/txt/pacman-pkgs/pacman-pkgs.txt
r ~/linux-config/dot_config/ranger/rc.conf.tmpl
sr ~/linux-config/configs/ranger/shortcuts.conf
ss ~/.shortcuts
@ -31,50 +33,78 @@ ng /etc/nginx/nginx.conf
# cdn [[[ #
ap ~/.task/pending.data
at ~/.task/to-add.md
bid ~/Documents/journal/todo/blog.md
cc ~/linux-config/private_dot_calcurse/conf
ci ~/linux-config/txt/ideas.md
cm ./commit-msg.txt
cmt /tmp/commit-msg.txt
hb ~/.habitctl/log
hbh ~/.habitctl/habits
el ~/Documents/twitch-emotes/links-new.md
h ~/.habitctl/log
hh ~/.habitctl/habits
hlg ~/coding/spotify-lib-vis/src/api/management/commands/update-history.log
id ~/Documents/journal/todo/ideas.md
ig ./.gitignore
jn ~/Documents/journal/todo/9.md
jt ~/Documents/journal/todo/todo.md
jt ~/Documents/journal/todo/22/2.md
k ~/linux-config/dot_config/kitty/kitty.conf
lh ~/Documents/listening-history/polarbier.csv
mc ~/coding/mf-site/assets/sass/main.scss
mi ~/coding/mf-site/ideas.md
ne ~/linux-config/configs/neofetch/config.conf
re README.md
rda ~/Documents/red-discord-bot/repos/gobcog-kevin/adventure/adventure.py
rdc ~/Documents/red-discord-bot/commands-freq.md
td todo.md
el ~/Documents/twitch-emotes/links-new.md
tg ~/.config/watson/tags_cache
tt txt/todo.md
tm ~/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
tp /tmp/
tw ~/linux-config/dot_taskrc
w ~/.config/watson/state.tmp
wh ~/Documents/journal/todo/work-habit.md
wt ~/.config/watson/state.md
wt ~/.config/watson/state.tmp
# ]]] cdn #
# sch [[[ #
# 309 [[[ #
0c ~/school/309-proj/sass/main.scss
0h ~/school/309-proj/public/js/helpers.js
0i ~/school/309-proj/public/index.html
0m ~/school/309-proj/public/js/main.js
0f ~/school/309-proj/public/js/food.js
0s ~/school/309-proj/server.js
0t ~/school/309-proj/public/js/stores.js
# ]]] 309 #
lb ~/coding/linux-basics/linux-basics.md
# ]]] sch #
# gaming [[[ #
bn ~/Documents/discord-burners/burners.md
cmr ~/Documents/codm/discord-recruitment.md
cra ~/Documents/red-discord-bot/repos/gobcog-kevin/adventure/data/default/attribs.json
crm ~/Documents/red-discord-bot/repos/gobcog-kevin/adventure/data/default/monsters.json
fn ~/Documents/fortnite/notes/fortnite-notes.md
fp ~/Documents/fortnite/notes/post.md
fv ~/Documents/fortnite/notes/vods.md
mta ~/.minetest/clientmods/custom_aliases/init.lua
cmr ~/Documents/codm/discord-recruitment.md
nb ~/Documents/chat/discord/pistol.md
pk ~/Downloads/pokecord/pokecord2.md
tc /mnt/linux-files/Videos/yt/fortnite/clips/twitch-clip-downloader/clips.txt
tdb ~/Documents/journal/todo/b.md
# ]]] gaming #
# pey [[[ #
dv ~/coding/devops-sre-knowledge/devops-sre-learned.md
j Jenkinsfile.
jd Jenkinsfile.deploy
klg ~/coding/kogito/shared-libraries/vars/githubscm.groovy
klm ~/coding/kogito/shared-libraries/vars/maven.groovy
kob ~/coding/kogito-operator-onboarding/README.md
kpr ~/coding/kogito/kogito-pipelines/Jenkinsfile.pr-bdd-tests
krt /home/kevin/coding/kogito/kogito-runtimes/jenkins-spock-tests/src/test/vars/JenkinsfilePromote.groovy
rd ~/Documents/red-hat/dates.md
rm ~/Documents/red-hat/meeting.md
rt ~/Documents/red-hat/todo.md
# ]]] pey #
nf ~/Documents/twitter/nft.md
ds ~/Documents/nft/deep-sea-research.md

10
dot_Xmodmap

@ -1,7 +1,9 @@
clear Lock
keycode 22 = Caps_Lock
keycode 66 = BackSpace
keycode 78 = End
keycode 9 = Caps_Lock
keycode 22 = BackSpace
keycode 66 = Escape
pointer = 1 10 3 6 7 4 5 2 11 12 8 9
pointer = 1 2 3 6 7 4 5 10 11 12 8 9
! side thumb button as middle click
! pointer = 1 10 3 6 7 4 5 2 11 12 8 9

7
dot_Xmodmap-old

@ -0,0 +1,7 @@
clear Lock
keycode 22 = Caps_Lock
keycode 66 = BackSpace
keycode 78 = End
pointer = 1 10 3 6 7 4 5 2 11 12 8 9

9
dot_Xresources.tmpl

@ -5,7 +5,10 @@
Xft.dpi: 235
! Xft.dpi: 240
{{ else }}
! Xft.dpi: 90
! Xft.dpi: 100
Xft.dpi: 135
! Xft.dpi: 170
{{ end }}
Xft.autohint: 0
Xft.lcdfilter: lcddefault
@ -21,6 +24,8 @@ Xft.rgba: rgb
{{ if eq .chezmoi.hostname "x1-carbon" }}
URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=11
! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=10
URxvt*cursorBlink: 0
URxvt*cursorBlink: False
{{ else }}
! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=15
! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14
@ -49,9 +54,9 @@ URxvt*transparent: true
URxvt*inheritPixmap: true
! URxvt*transparent: false
! URxvt*shading: 0 (blackest) to 99 black, 101 to 200 (whitest) white
URxvt*shading: 50
! URxvt*shading: 50
! URxvt*shading: 40
! URxvt*shading: 35
URxvt*shading: 35
! urxvt*blurRadius: 10
/* ]]] transparency */

137
dot_config/fish/completions/kogito.fish

@ -0,0 +1,137 @@
# fish completion for kogito -*- shell-script -*-
function __kogito_debug
set file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __kogito_perform_completion
__kogito_debug "Starting __kogito_perform_completion with: $argv"
set args (string split -- " " "$argv")
set lastArg "$args[-1]"
__kogito_debug "args: $args"
__kogito_debug "last arg: $lastArg"
set emptyArg ""
if test -z "$lastArg"
__kogito_debug "Setting emptyArg"
set emptyArg \"\"
end
__kogito_debug "emptyArg: $emptyArg"
set requestComp "$args[1] __complete $args[2..-1] $emptyArg"
__kogito_debug "Calling $requestComp"
set results (eval $requestComp 2> /dev/null)
set comps $results[1..-2]
set directiveLine $results[-1]
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
# completions must be prefixed with the flag
set flagPrefix (string match -r -- '-.*=' "$lastArg")
__kogito_debug "Comps: $comps"
__kogito_debug "DirectiveLine: $directiveLine"
__kogito_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
end
printf "%s\n" "$directiveLine"
end
# This function does three things:
# 1- Obtain the completions and store them in the global __kogito_comp_results
# 2- Set the __kogito_comp_do_file_comp flag if file completion should be performed
# and unset it otherwise
# 3- Return true if the completion results are not empty
function __kogito_prepare_completions
# Start fresh
set --erase __kogito_comp_do_file_comp
set --erase __kogito_comp_results
# Check if the command-line is already provided. This is useful for testing.
if not set --query __kogito_comp_commandLine
set __kogito_comp_commandLine (commandline)
end
__kogito_debug "commandLine is: $__kogito_comp_commandLine"
set results (__kogito_perform_completion "$__kogito_comp_commandLine")
set --erase __kogito_comp_commandLine
__kogito_debug "Completion results: $results"
if test -z "$results"
__kogito_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
set --global __kogito_comp_do_file_comp 1
return 0
end
set directive (string sub --start 2 $results[-1])
set --global __kogito_comp_results $results[1..-2]
__kogito_debug "Completions are: $__kogito_comp_results"
__kogito_debug "Directive is: $directive"
if test -z "$directive"
set directive 0
end
set compErr (math (math --scale 0 $directive / 1) % 2)
if test $compErr -eq 1
__kogito_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
set --global __kogito_comp_do_file_comp 1
return 0
end
set nospace (math (math --scale 0 $directive / 2) % 2)
set nofiles (math (math --scale 0 $directive / 4) % 2)
__kogito_debug "nospace: $nospace, nofiles: $nofiles"
# Important not to quote the variable for count to work
set numComps (count $__kogito_comp_results)
__kogito_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# To support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
__kogito_debug "Adding second completion to perform nospace directive"
set --append __kogito_comp_results $__kogito_comp_results[1].
end
if test $numComps -eq 0; and test $nofiles -eq 0
__kogito_debug "Requesting file completion"
set --global __kogito_comp_do_file_comp 1
end
# If we don't want file completion, we must return true even if there
# are no completions found. This is because fish will perform the last
# completion command, even if its condition is false, if no other
# completion command was triggered
return (not set --query __kogito_comp_do_file_comp)
end
# Remove any pre-existing completions for the program since we will be handling all of them
# TODO this cleanup is not sufficient. Fish completions are only loaded once the user triggers
# them, so the below deletion will not work as it is run too early. What else can we do?
complete -c kogito -e
# The order in which the below two lines are defined is very important so that __kogito_prepare_completions
# is called first. It is __kogito_prepare_completions that sets up the __kogito_comp_do_file_comp variable.
#
# This completion will be run second as complete commands are added FILO.
# It triggers file completion choices when __kogito_comp_do_file_comp is set.
complete -c kogito -n 'set --query __kogito_comp_do_file_comp'
# This completion will be run first as complete commands are added FILO.
# The call to __kogito_prepare_completions will setup both __kogito_comp_results abd __kogito_comp_do_file_comp.
# It provides the program's completion choices.
complete -c kogito -n '__kogito_prepare_completions' -f -a '$__kogito_comp_results'

1728
dot_config/fish/completions/kubectl.fish
File diff suppressed because it is too large
View File

178
dot_config/fish/completions/minikube.fish

@ -0,0 +1,178 @@
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# fish completion for minikube -*- shell-script -*-
function __minikube_debug
set file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __minikube_perform_completion
__minikube_debug "Starting __minikube_perform_completion with: $argv"
set args (string split -- " " "$argv")
set lastArg "$args[-1]"
__minikube_debug "args: $args"
__minikube_debug "last arg: $lastArg"
set emptyArg ""
if test -z "$lastArg"
__minikube_debug "Setting emptyArg"
set emptyArg \"\"
end
__minikube_debug "emptyArg: $emptyArg"
if not type -q "$args[1]"
# This can happen when "complete --do-complete minikube" is called when running this script.
__minikube_debug "Cannot find $args[1]. No completions."
return
end
set requestComp "$args[1] __complete $args[2..-1] $emptyArg"
__minikube_debug "Calling $requestComp"
set results (eval $requestComp 2> /dev/null)
set comps $results[1..-2]
set directiveLine $results[-1]
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
# completions must be prefixed with the flag
set flagPrefix (string match -r -- '-.*=' "$lastArg")
__minikube_debug "Comps: $comps"
__minikube_debug "DirectiveLine: $directiveLine"
__minikube_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
end
printf "%s\n" "$directiveLine"
end
# This function does three things:
# 1- Obtain the completions and store them in the global __minikube_comp_results
# 2- Set the __minikube_comp_do_file_comp flag if file completion should be performed
# and unset it otherwise
# 3- Return true if the completion results are not empty
function __minikube_prepare_completions
# Start fresh
set --erase __minikube_comp_do_file_comp
set --erase __minikube_comp_results
# Check if the command-line is already provided. This is useful for testing.
if not set --query __minikube_comp_commandLine
# Use the -c flag to allow for completion in the middle of the line
set __minikube_comp_commandLine (commandline -c)
end
__minikube_debug "commandLine is: $__minikube_comp_commandLine"
set results (__minikube_perform_completion "$__minikube_comp_commandLine")
set --erase __minikube_comp_commandLine
__minikube_debug "Completion results: $results"
if test -z "$results"
__minikube_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
set --global __minikube_comp_do_file_comp 1
return 1
end
set directive (string sub --start 2 $results[-1])
set --global __minikube_comp_results $results[1..-2]
__minikube_debug "Completions are: $__minikube_comp_results"
__minikube_debug "Directive is: $directive"
set shellCompDirectiveError 1
set shellCompDirectiveNoSpace 2
set shellCompDirectiveNoFileComp 4
set shellCompDirectiveFilterFileExt 8
set shellCompDirectiveFilterDirs 16
if test -z "$directive"
set directive 0
end
set compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
if test $compErr -eq 1
__minikube_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
set --global __minikube_comp_do_file_comp 1
return 1
end
set filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
set dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
if test $filefilter -eq 1; or test $dirfilter -eq 1
__minikube_debug "File extension filtering or directory filtering not supported"
# Do full file completion instead
set --global __minikube_comp_do_file_comp 1
return 1
end
set nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
set nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
__minikube_debug "nospace: $nospace, nofiles: $nofiles"
# Important not to quote the variable for count to work
set numComps (count $__minikube_comp_results)
__minikube_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# To support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
__minikube_debug "Adding second completion to perform nospace directive"
set --append __minikube_comp_results $__minikube_comp_results[1].
end
if test $numComps -eq 0; and test $nofiles -eq 0
__minikube_debug "Requesting file completion"
set --global __minikube_comp_do_file_comp 1
end
# If we don't want file completion, we must return true even if there
# are no completions found. This is because fish will perform the last
# completion command, even if its condition is false, if no other
# completion command was triggered
return (not set --query __minikube_comp_do_file_comp)
end
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
# so we can properly delete any completions provided by another script.
# The space after the the program name is essential to trigger completion for the program
# and not completion of the program name itself.
complete --do-complete "minikube " > /dev/null 2>&1
# Using '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c minikube -e
# The order in which the below two lines are defined is very important so that __minikube_prepare_completions
# is called first. It is __minikube_prepare_completions that sets up the __minikube_comp_do_file_comp variable.
#
# This completion will be run second as complete commands are added FILO.
# It triggers file completion choices when __minikube_comp_do_file_comp is set.
complete -c minikube -n 'set --query __minikube_comp_do_file_comp'
# This completion will be run first as complete commands are added FILO.
# The call to __minikube_prepare_completions will setup both __minikube_comp_results and __minikube_comp_do_file_comp.
# It provides the program's completion choices.
complete -c minikube -n '__minikube_prepare_completions' -f -a '$__minikube_comp_results'

133
dot_config/fish/config.fish.tmpl

@ -17,41 +17,80 @@ set -x GPG_TTY (tty)
set -U fish_greeting
# spv
{{ if eq .chezmoi.hostname "nzxt" }}
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
set -U mfs_dir "/home/kevin/coding/mf-site"
source /home/kevin/coding/spotify-lib-vis/src/scripts/api-keys-fish.sh
abbr hum "cd $mfs_dir && hugo serve -D --disableFastRender"
{{ end }}
{{ end }}#]]]
set -x PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors ~/go/bin ~/.minetest/minetest/bin ~/.gem/ruby/2.6.0/bin
set -x CLASSPATH $CLASSPATH /home/kevin/java/*.jar
set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
# system [[[
set -x HASTE_SERVER https://pste.gq
{{ if eq .chezmoi.hostname "nzxt" }}
set -x CALCURSE_CALDAV_PASSWORD (pass show technology/linux/baikal | head -n1)
{{ end }}
set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
set -x GOPATH ~/go
# set -x PATH $GRAALVM_BIN $PATH ~/.local/bin ~/scripts ~/scripts/colors ~/go/bin ~/.minetest/minetest/bin ~/.gem/ruby/2.6.0/bin
set -x PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors $GOPATH/bin ~/.minetest/minetest/bin ~/.gem/ruby/*/bin ~/.yarn/bin
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
# Java [[[ #
set -x GRAALVM_HOME /usr/lib/jvm/graalvm-ce-java11-21.1.0
set -x GRAALVM_BIN $GRAALVM_HOME/bin
set -x JAVA_HOME $GRAALVM_HOME
{{ if eq .linux_os "termux" }}
# set -x JAVA_HOME /usr/lib/jvm/java-11-openjdk
# set -x JAVA_HOME /usr/lib/jvm/java-8-openjdk # for shared libs
set -x PATH $JAVA_HOME/bin $PATH
# ]]] Java #
# system ]]]
# space prompt[[[
# set SPACEFISH_PROMPT_ORDER time user dir host git package node docker ruby golang php rust haskell julia aws conda pyenv kubecontext exec_time line_sep battery jobs exit_code vi_mode char
set SPACEFISH_DIR_PREFIX ''
set SPACEFISH_ADD_NEWLINE false
set SPACEFISH_PROMPT_ORDER vi_mode dir git pyenv exec_time jobs exit_code line_sep char
set SPACEFISH_DIR_PREFIX ''
set SPACEFISH_DIR_TRUNC 0
set SPACEFISH_DIR_TRUNC_REPO false
set SPACEFISH_VI_MODE_INSERT ''
set SPACEFISH_VI_MODE_NORMAL '[n] '
set SPACEFISH_VI_MODE_SUFFIX ''
{{ end }}
#]]]
# pass[[[
set -x PASSWORD_STORE_CLIP_TIME 120
set -xU XSET_RATE 90
set -xU XSET_DELAY 200
{{ if and (eq .chezmoi.hostname "x1-carbon") (not (eq .chezmoi.username "root")) }}
xset r rate $XSET_DELAY $XSET_RATE
{{ end }}
{{ end }}#]]]
# set -U BROWSER "chromium"
set -xU BROWSER "firefox"
# set -U BROWSER "chromium"
set -xU FZF_DEFAULT_COMMAND "find ."
set -x PHONE_IP "192.168.0.12"
set -x PIXEL_IP "192.168.0.18"
set -x WORK_LAPTOP_IP "kmok@192.168.0.11"
{{ if eq .chezmoi.hostname "nzxt" }}
# set -x CALCURSE_CALDAV_PASSWORD (pass show technology/linux/baikal | head -n1)
set -x JENKINS_TOKEN 114a1b2e8693b57fa6f4bce88e2deee8cc
status --is-interactive; and source (pyenv init -|psub)
{{ end }}
set -xU MINIKUBE_IP "http://192.168.49.2"
set -xU LOCAL_KOGITO_SERVICE_PORT "32000"
# set -xU LOCAL_KOGITO_SERVICE_URL "$MINIKUBE_IP:$LOCAL_KOGITO_SERVICE_PORT"
set -x FLASK_DEBUG 1
set -x DB_NAME "covid_monitor"
# ]]] universal var's #
@ -67,11 +106,11 @@ builtin cd $last_dir && ls > /dev/null
bind \ce edit_command_buffer
bind \cr forward-word
chezmoi apply
# chezmoi apply
{{ if not (eq .linux_os "termux") }}
~/scripts/sync-shortcuts
{{ end }}
source ~/.config/fish/key_abbr.fish > /dev/null
# source ~/.config/fish/key_abbr.fish > /dev/null
set -U fish_fxn_dir "{{ .chezmoi.homeDir }}/linux-config/dot_config/fish/functions"
# set -U fish_fxn_dir "~/.config/fish/functions"
abbr ff "cd $fish_fxn_dir"
@ -97,33 +136,50 @@ abbr xf "fish_config"
abbr ! "sudo !!"
# task [[[ #
abbr aan "task-anno"
abbr aan "task-anno ''"
abbr ae "task-edit"
abbr adl "task-delete"
abbr adn "task-done"
abbr adu "task-due"
abbr adr "task-due-rm"
abbr an "task-next"
abbr anr "task-next-rm"
abbr ant "task-notes"
abbr apr "task-mod-pri"
abbr aprl "task-mod-pri L"
abbr aprm "task-mod-pri M"
abbr aprn "task-mod-pri ''"
abbr aprh "task-mod-pri H"
abbr apj "task-mod-proj"
abbr at "task-mod-tag"
abbr asr "task-start"
abbr at "task-mod-tag"
abbr atj "task-mod-tag jira"
abbr aw "task-wait"
abbr ax "task-context"
# ]]] task #
abbr ag "grep-aliases"
abbr b "buku-fzf"
abbr bf "buku-fzf fq"
abbr bk "buku-fzf"
abbr bkf "buku-fzf fq"
abbr bq "benq-brightness"
abbr bn "discord-burner"
abbr bun "backup nzxt"
abbr bupp "backup-phone-pics"
abbr ca "cad-to-us"
abbr cccs "sync-alt-cal class"
abbr cl "clip"
abbr cpc "copy cat"
abbr cpe "copy echo"
abbr cpp "copy echo (pwd)"
abbr cff "create-fish-function"
abbr ctr "systemctl-restart"
abbr def "define"
abbr drs "dump-rarity-check"
abbr ens "enable-site"
abbr ev "evince-silent"
abbr ff "fzf-cd"
# abbr fbg "find-bg"
# abbr fr "fzf-ranger"
abbr fv "fzf-vim"
abbr fvft "find-vim-filetype"
# git [[[ #
@ -131,49 +187,62 @@ abbr fvft "find-vim-filetype"
abbr gcamp "git-amend-push"
abbr gclg "git-clone-gitea"
abbr gdf "git-diff-files"
abbr gpsd "git-push-diff-name"
abbr gpsi "git-push-initial"
abbr gpsmt "git-push-multiple"
abbr gpng "git-push-new-gitea gitea"
abbr gpngo "git-push-new-gitea origin"
abbr gpng "git-push-new-gitea"
abbr gpngg "git-push-new-gitea gitea"
abbr gremotes "git-mult-remotes"
abbr grmb "git-delete-branch"
abbr gro "git-replace-origin"
abbr grog "git-replace-origin-gitea"
abbr gsmb "git-submodule-branch"
# ]]] git #
abbr i "sxiv-silent"
abbr lo "libreoffice-silent"
abbr ma "man-vim task"
abbr mat "math"
abbr mn "man-vim"
abbr mdf "mkdir-cd"
abbr mtm "maven-test-method"
abbr pgr "grep-pdf"
abbr pgrf "grep-pdf-file"
abbr png "git-push-new-gitea"
abbr pst "pastebin"
abbr qh "qalc-history"
abbr qu "qalc-update"
abbr re "reminder ''"
abbr rf "refresh-config"
abbr rs "redshift-set"
abbr rl "readlink-cp"
abbr rds "redshift-set"
abbr scf "scp-vid fn"
abbr sma "smol-add"
abbr smd "smol-delete"
abbr sml "smol-slist"
abbr smr "smol-replace"
abbr shrm "shred-rm"
abbr svs "scan-history"
abbr tac "tmux-attach config"
abbr taj "tmux-attach journal"
abbr shs "scan-history"
abbr svp "server-pages"
abbr ta "tmux-attach"
abbr taa "tmux-attach atx"
abbr taf "tmux-attach fn"
abbr tan "tmux-attach nft"
abbr tan2 "tmux-attach nft-2"
abbr tao "tmux-attach obs"
abbr thes "thesaurus"
# abbr usc "us-to-cad"
abbr us "us-to-cad"
abbr ut "unix-timestamp"
abbr uzr "unzip-rm"
abbr vsnp "vim-snippet"
abbr wga "wget-all"
abbr wag "watson-add-game"
abbr waf "watson-add-game fortnite"
abbr wap "watson-add-game pokemon-go"
abbr xya "export-pkgs"
# school [[[ #
# 369
abbr grc "grep-c"
abbr grh "grep-headers"
abbr rgh "rg-headers"
abbr jcr "java-compile-run"
abbr jct "java-compile-test"
# ]]] school #
# ]]] fxn abbr's #

3
dot_config/fish/functions/cad-to-us.fish

@ -0,0 +1,3 @@
function cad-to-us
qalc "$argv[1]CAD to \$"
end

7
dot_config/fish/functions/clip.fish

@ -0,0 +1,7 @@
function clip
if test (count $argv) -eq 3
ffmpeg -ss $argv[1] -i $argv[2] -codec copy $argv[3]
else
ffmpeg -ss $argv[1] -to $argv[2] -i $argv[3] -codec copy $argv[4]
end
end

15
dot_config/fish/functions/discord-burner.fish

@ -0,0 +1,15 @@
function discord-burner
# echo nordvpn connect ca1$argv[1] && curl ifconfig.me
# nordvpn connect ca1$argv[1] && \
# nordvpn connect ca10$argv[1]
nordvpn connect
curl ifconfig.me
if test (count $argv) -gt 1
firefox -P discord-$argv[2] $argv[1] &
else
firefox -P discord-$argv[1] &
end
# for i in (seq $argv[1] $argv[2])
# firefox -P discord-$i $argv[3] &
# end
end

3
dot_config/fish/functions/dump-rarity-check.fish

@ -0,0 +1,3 @@
function dump-rarity-check
pg_dump -U rarity_check rarity_check > $argv[1].sql
end

0
dot_config/fish/functions/fish_mode_prompt.fish

4
dot_config/fish/functions/fzf-cd.fish

@ -0,0 +1,4 @@
function fzf-cd
set dir (fd -td | fzf)
cd $dir
end

6
dot_config/fish/functions/fzf-ranger.fish

@ -0,0 +1,6 @@
function fzf-ranger
set dir (fd -td | fzf)
if test ! -z "$dir"
ranger $dir
end
end

5
dot_config/fish/functions/fzf-vim.fish

@ -1,3 +1,6 @@
function fzf-vim
fzf | xargs $EDITOR
set file (fzf)
if test ! -z "$file"
$EDITOR $file
end
end

3
dot_config/fish/functions/git-log-short.fish

@ -0,0 +1,3 @@
function git-log-short
git log --pretty="%C(Yellow)%h %C(reset)%ad (%C(Green)%cr%C(reset))%x09 %C(Cyan)%an: %C(reset)%s"
end

3
dot_config/fish/functions/git-submodule-branch.fish

@ -0,0 +1,3 @@
function git-submodule-branch
git submodule set-branch --branch $argv[2] -- $argv[1]
end

2
dot_config/fish/functions/git/git-clone-gitea.fish

@ -1,3 +1,3 @@
function git-clone-gitea
git clone ssh://git@ataraxy.tk:399/Kevin-Mok/$argv[1].git
git clone ssh://git@kevin-mok.com:399/Kevin-Mok/$argv[1].git
end

3
dot_config/fish/functions/git/git-push-diff-name.fish

@ -0,0 +1,3 @@
function git-push-diff-name
git push -f origin HEAD:$argv[1]
end

4
dot_config/fish/functions/git/git-push-new-gitea.fish

@ -1,4 +1,4 @@
function git-push-new-gitea
git remote add $argv[1] ssh://git@ataraxy.tk:399/Kevin-Mok/$argv[2].git
and git push --set-upstream $argv[1] master
git remote add origin ssh://git@kevin-mok.com:399/Kevin-Mok/$argv[1].git
and git push --set-upstream origin main
end

6
dot_config/fish/functions/git/git-replace-origin-gitea.fish

@ -0,0 +1,6 @@
function git-replace-origin-gitea
git remote remove origin
and git remote add origin ssh://git@kevin-mok.com:399/Kevin-Mok/$argv[1].git
and git branch --set-upstream-to=origin/master master
and git push
end

3
dot_config/fish/functions/libreoffice-silent.fish

@ -0,0 +1,3 @@
function libreoffice-silent
libreoffice $argv[1] &
end

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

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

3
dot_config/fish/functions/mkdir-cd.fish

@ -0,0 +1,3 @@
function mkdir-cd
mkdir -p $argv[1] && cd $argv[1]
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

3
dot_config/fish/functions/pastebin.fish

@ -1,5 +1,6 @@
function pastebin
# cat $argv[1] | curl -F 'sprunge=<-' http://sprunge.us
# set -x HASTE_SERVER https://pste.gq
cat $argv[1] | haste --raw
# cat $argv[1] | haste --raw
cat $argv[1] | haste
end

3
dot_config/fish/functions/qalc-history.fish

@ -0,0 +1,3 @@
function qalc-history
qalc $argv[1] | tee -a /home/kevin/Documents/journal/personal/calc-history.md
end

3
dot_config/fish/functions/qalc-update.fish

@ -0,0 +1,3 @@
function qalc-update
qalc -e "$argv[1]USD to CAD"
end

3
dot_config/fish/functions/readlink-cp.fish

@ -0,0 +1,3 @@
function readlink-cp
readlink -f $argv[1] | xclip -selection clipboard
end

13
dot_config/fish/functions/refresh-config-task.fish

@ -0,0 +1,13 @@
function refresh-config
chezmoi apply
and echo 'Applied chezmoi.'
# and tmux source-file ~/.tmux.conf
# and echo 'Sourced tmux config.'
sync-shortcuts
echo 'Synced shortcuts.'
source ~/.config/fish/key_abbr.fish > /dev/null
and echo 'Sourced shortcuts.'
and echo 'Reloading fish.'
and exec fish
end

3
dot_config/fish/functions/reminder.fish

@ -0,0 +1,3 @@
function reminder
termdown $argv[2] && notify-send $argv[1]
end

1
dot_config/fish/functions/scan-history.fish

@ -2,6 +2,7 @@ function scan-history
sudo systemctl start postgresql.service
# and systemctl status postgresql.service
and source $spv_dir/src/scripts/api-keys.sh
# and $spv_dir/src/scripts/update-history-2.sh
and $spv_dir/src/scripts/update-history.sh
and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1
end

7
dot_config/fish/functions/scp-vid.fish

@ -0,0 +1,7 @@
function scp-vid
set dest_dir "/mnt/linux-files/Videos/personal-fortnite-games/review"
if test $argv[1] = 'pogo'
set dest_dir "/mnt/linux-files/Videos/pokemon-go"
end
scp -P 8022 192.168.0.18:/data/data/com.termux/files/home/storage/dcim/\'Screen\ recordings\'/$argv[2] $dest_dir
end

8
dot_config/fish/functions/server-pages.fish

@ -1,8 +1,8 @@
function server-pages
set sites git.ataraxy.tk khkm.tk cal.khkm.tk mnpd.gq/k-bg pste.gq smol.gq twem.tk
set titles "Kevin Mok's Gitea" "Kevin Mok" "Baïkal server" "k-bg" "hastebin" "Kevin's URL Shortener" "Index of /"
# set sites mnpd.gq/k-bg
# set titles "k-bg"
set sites kevin-mok.com git.kevin-mok.com cal.khkm.tk mnpd.gq/kbg pste.gq smol.gq twem.tk
set titles "Kevin Mok" "Kevin Mok's Gitea" "Baïkal server" "kbg" "hastebin" "Kevin's URL Shortener" "Twitch Emote Links"
# set sites twem.tk
# set titles "Twitch Emote Links"
for i in (seq (count $sites))
set title (wget -qO- "$sites[$i]" | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' | recode html)

3
dot_config/fish/functions/sxiv-silent.fish

@ -0,0 +1,3 @@
function sxiv-silent
sxiv $argv[1] &
end

2
dot_config/fish/functions/task/task-anno.fish

@ -1,4 +1,4 @@
function task-anno
task $argv[1] annotate $argv[2]
task $argv[2] annotate $argv[1]
and task
end

1
dot_config/fish/functions/task/task-delete.fish

@ -1,5 +1,4 @@
function task-delete
task $argv[1] delete
and task sync
and task
end

1
dot_config/fish/functions/task/task-done.fish

@ -1,5 +1,4 @@
function task-done
task $argv[1] done
and task sync
and task
end

4
dot_config/fish/functions/task/task-due-rm.fish

@ -0,0 +1,4 @@
function task-due-rm
task $argv[1] mod due:
and task
end

4
dot_config/fish/functions/task/task-due.fish

@ -0,0 +1,4 @@
function task-due
task $argv[1] mod due:+$argv[2]
and task
end

2
dot_config/fish/functions/task/task-mod-pri.fish

@ -1,4 +1,4 @@
function task-mod-pri
task $argv[1] modify pri:$argv[2]
task $argv[2] modify pri:$argv[1]
and task
end

4
dot_config/fish/functions/task/task-next-rm.fish

@ -0,0 +1,4 @@
function task-next-rm
task $argv[1] modify -next
and task
end

4
dot_config/fish/functions/task/task-wait.fish

@ -0,0 +1,4 @@
function task-wait
task $argv[1] mod wait:+$argv[2]
and task
end

4
dot_config/fish/functions/us-to-cad.fish

@ -0,0 +1,4 @@
function us-to-cad
# qalc -e "$argv[1]\$ to CAD"
qalc "$argv[1]\$ to CAD"
end

10
dot_config/fish/functions/vpn-red-hat.fish

@ -0,0 +1,10 @@
function vpn-red-hat
if test $argv[1] = 'up'
sudo systemctl start NetworkManager.service
and sleep 3
and nmcli con up id "1 - Red Hat Global VPN" --ask
else if test $argv[1] = 'down'
nmcli con down id "1 - Red Hat Global VPN"
and sudo systemctl stop NetworkManager.service
end
end

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

@ -0,0 +1,11 @@
function watson-add-fortnite
set year_month "2020-08"
set start_time "$year_month-$argv[1] $argv[2]"
set end_time "$year_month-$argv[3] $argv[4]"
if test (count $argv) -eq 4
watson add -f $start_time -t $end_time fun +fortnite
else
watson add -f $start_time -t $end_time fun +fortnite +$argv[5]
end
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

161
dot_config/i3/config.tmpl

@ -1,20 +1,29 @@
# startup [[[ #
set $term urxvt
set $term_alt st
set $term kitty
# set $term st
# set $term_alt urxvt
{{ if eq .chezmoi.hostname "x1-carbon" }}
# set $term urxvt
# set $term_alt kitty
# set $term_alt st
set $term_alt urxvt
exec dunst
exec compton
exec imwheel
exec numlockx on
exec xbacklight -set 10
# exec wal -i "$(/home/kevin/scripts/shuffler \"/home/kevin/Pictures/Backgrounds/dim/non-editing\")"
exec wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing")
exec wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/editing")
{{ end }}
# exec --no-startup-id i3-msg 'workspace $ws2; exec $term'
# exec xrdb ~/.Xresources && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null
# exec --no-startup-id i3-msg 'workspace $ws1; exec $term'
# exec --no-startup-id i3-msg 'workspace $ws2; exec $term -e fish -c "tmux-attach fortnite"'
exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
# exec --no-startup-id i3-msg 'workspace $ws5; exec $term -e twitchy'
exec --no-startup-id i3-msg 'workspace $ws5; exec firefox -P nft'
exec --no-startup-id i3-msg workspace $ws6; exec discord
# exec --no-startup-id i3-msg workspace $ws1; exec $term -e fish -c 'tmux-attach school'
# ]]] startup #
@ -22,7 +31,9 @@ exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
set $mod Mod1
set $browser "firefox"
set $browser_secondary "chromium"
# set $browser "chromium"
# set $browser_secondary "firefox"
set $scripts_path "/home/kevin/scripts"
set $sch_dir "$HOME/Documents/School"
@ -43,47 +54,72 @@ bindsym Mod4+Return exec /home/kevin/scripts/dmenu-history -nb "$fg" -nf "$bg" -
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# bindsym Mod4+b layout tabbed; exec zathura
bindsym Mod4+c exec $browser
# bindsym Mod4+c exec $browser
# bindsym Mod4+$mod+c exec chatterino
bindsym Mod4+c exec chatterino
bindsym Mod4+$mod+c exec $browser
# bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
# bindsym Mod4+e exec emacs
bindsym Mod4+e exec ~/scripts/twem
bindsym Mod4+f exec firefox
# bindsym Mod4+e exec ~/scripts/twem
# bindsym Mod4+f exec firefox
# bindsym Mod4+f exec firefox --private-window
# bindsym Mod4+f exec firefox --private-window google.ca
# bindsym Mod4+$mod+f exec printf 'Kevin@fosstodon.org' | xclip -selection clipboard
# bindsym Mod4+h exec sleep .2 && xdotool type '.hint'
# bindsym Mod4+$mod+h exec $type_delay_cmd && xdotool type 'kevin.mok@live.ca'
bindsym Mod4+h exec $type_delay_cmd && xdotool type 'kevin.mok@live.ca'
# bindsym Mod4+$mod+h exec sleep .2 && xdotool type '.hint'
bindsym Mod4+$mod+i exec sleep .2 && xdotool type '.info latest'
bindsym Mod4+l exec ~/scripts/dmenu-twitch
# bindsym Mod4+m exec $term -e ~/scripts/vim-man
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+$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 $type_delay_cmd && xdotool key 'Control_L+v'
bindsym Mod4+$mod+o exec xset dpms force off
bindsym $mod+Mod4+o workspace $ws11; exec obs
# bindsym Mod4+p workspace $ws4; exec pgadmin3
# bindsym Mod4+p exec pycharm
bindsym Mod4+p exec $type_delay_cmd && xdotool type '.catch '
bindsym Mod4+$mod+p exec passmenu
bindsym Mod4+p exec passmenu
# # bindsym Mod4+p exec sleep .2 && xdotool type '.catch '
# bindsym Mod4+$mod+p exec notify-send "ping" "$(ping -c 3 -W 1 8.8.8.8)"
bindsym Mod4+q exec qdirstat
bindsym Mod4+r exec $term -e ranger
bindsym Mod4+$mod+r exec notify-send "watson restart" "$(watson restart)"
# bindsym Mod4+q exec qdirstat
bindsym Mod4+q exec printf 'emad1 ' | xclip -selection clipboard && $type_delay_cmd && xdotool key 'Control_L+v'
bindsym Mod4+r exec $type_delay_cmd && xdotool type 'kmok@redhat.com'
bindsym Mod4+$mod+r exec pass show -c career/redhat && $type_delay_cmd && xdotool key 'Control_L+v'
# bindsym Mod4+$mod+r exec $term -e ranger
# bindsym Mod4+$mod+r exec notify-send "watson restart" "$(watson restart)"
bindsym Mod4+$mod+s exec $type_delay_cmd && xdotool type 'https://smol.gq/'
bindsym Mod4+$mod+t exec xclip -selection clipboard ~/.password-store/social/trapbot && $type_delay_cmd && xdotool key 'Control_L+v'
# bindsym Mod4+u exec printf 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
bindsym Mod4+u exec $type_delay_cmd && xdotool type 'kevin.mok@mail.utoronto.ca'
# bindsym Mod4+$mod+u exec pass -c uoft/acorn
bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
bindsym Mod4+$mod+w exec notify-send "watson stop" "$(watson status && watson stop)"
# bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
# bindsym Mod4+$mod+w exec notify-send "watson stop" "$(watson status && watson stop)"
bindsym Control+Mod4+w exec $term -e nvim /home/kevin/.config/watson/state.tmp
# bindsym Mod4+x exec $swex
bindsym Control+$mod+x exec $type_delay_cmd && xdotool type 'http://codm.ataraxy.tk/'
bindsym Mod4+z exec cliqz
bindsym Pause exec ~/scripts/twem
# screenshot [[[ #
set $screenshot_folder "/home/kevin/Pictures/screenshots/desktop/unsorted"
set $scripts_path "/home/kevin/scripts"
{{ if .ext_kb }}
bindsym Mod4+x exec ~/scripts/xmodmap-custom
bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym Control+Print --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
# bindsym Mod4+x exec ~/scripts/xmodmap-custom
bindsym Mod4+x exec notify-send "xmodmap" "$(~/scripts/xmodmap-custom)"
# bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
# bindsym Print --release exec "scrot -s $screenshot_folder/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym Print --release exec "maim -su | tee ~/Pictures/screenshots/desktop/unsorted/screenshot-$(date +%F_%T).png | xclip -selection clipboard -t image/png"
bindsym Control+Print --release exec "scrot -u ~/Pictures/screenshots/desktop/unsorted/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
{{ else }}
bindsym Mod4+x exec xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE
bindsym Control+p --release exec "scrot -s ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym Control+$mod+p --release exec "scrot -u ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
{{ end }}
# ]]] screenshot #
# ]]] app shortcuts #
# redshift [[[ #
@ -120,6 +156,7 @@ bindsym Control+$mod+q exec sudo systemctl stop netctl-auto@wlp3s0.service
# ]]] backlight #
for_window [class="chatterino"] floating enable
for_window [class="Peek"] floating enable
for_window [title="Qalculate!"] floating enable
@ -168,7 +205,7 @@ for_window [class="^.*"] border pixel 3
gaps inner 0
gaps outer 0
{{ if eq .chezmoi.hostname "nzxt" }}
border_radius $border_radius
# border_radius $border_radius
{{ end }}
# other gaps [[[ #
@ -292,38 +329,72 @@ set $secondary "DVI-I-1"
set $main "HDMI-0"
{{ end }}
workspace $ws1 output $main
# workspace $ws1 output $main
workspace $ws1 output $secondary
bindsym $mod+F1 workspace $ws1; exec $term
bindsym Mod4+$mod+F1 workspace $ws1; exec chatterino
# bindsym Control+Shift+F1 workspace $ws1; exec $term -e fish -c 'tmux-attach school'
bindsym Control+Shift+F1 workspace $ws1; exec $term -e fish -c 'tmux-attach nft'
set $ws2 "2 "
set $work_laptop_ip "192.168.0.11"
workspace $ws2 output $secondary
bindsym $mod+F2 workspace $ws2; exec $term
# bindsym Control+Shift+F2 workspace $ws2; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt
# bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach fortnite'
bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach nft-2'
# bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach school-2'
bindsym $mod+Shift+F2 workspace $ws2; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt-2
# ws3 [[[ #
set $ws3 "3 "
# set $ws3 "3 "
workspace $ws3 output $main
bindsym $mod+F3 workspace $ws3; exec $browser
# workspace $ws3 output $main
# bindsym $mod+F3 workspace $ws3; exec $browser
# bindsym $mod+F3 exec $browser; move container to workspace $ws3; workspace $ws3
bindsym $mod+F3 exec $browser
bindsym Control+Shift+F3 workspace $ws3; exec firefox -P work
# bindsym Mod4+$mod+F3 workspace $ws3; exec $browser_secondary
bindsym Mod4+$mod+F3 workspace $ws3; exec firefox -P default
# 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"
# bindsym Mod4+$mod+b layout stacked; exec $term -e fish -c "buku-fzf fq"
bindsym Mod4+b layout tabbed; exec $term -e fish -c "buku-fzf"
bindsym Mod4+$mod+b layout tabbed; exec $term -e fish -c "buku-fzf fq"
# bindsym Mod4+g workspace $ws3; layout tabbed; exec gimp
# ]]] ws3 #
set $ws4 "4 "
workspace $ws4 output $secondary
bindsym $mod+F4 workspace $ws4; exec $term
bindsym Mod4+$mod+F4 workspace $ws4; exec urxvt -e ranger $screenshot_folder
bindsym Mod4+e workspace $ws4; exec libreoffice ~/Documents/expenses/investments.ods
bindsym Mod4+g workspace $ws4; layout tabbed; exec gimp
# ws5 [[[ #
set $ws5 "5 "
workspace $ws5 output $secondary
# workspace $ws5 output $secondary
assign [class="Steam"] $ws5
bindsym $mod+F5 workspace $ws5; exec $browser
# bindsym $mod+Mod4+F5 workspace $ws5; exec firefox -P work
bindsym $mod+Mod4+F5 workspace $ws5; exec firefox -P nft
# bindsym $mod+Mod4+F5 workspace $ws5; exec firefox --private-window
bindsym Control+Shift+F5 workspace $ws5; exec firefox -P work
bindsym Mod4+f workspace $ws5; exec firefox --private-window google.ca
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; layout tabbed; exec gimp
# bindsym Mod4+g workspace $ws5; exec mgba-qt
bindsym Mod4+i workspace $ws5; exec idea
bindsym Mod4+m workspace $ws5; layout tabbed; exec $term -e ~/.minetest/minetest/bin/minetest
bindsym Mod4+t workspace $ws5; exec thunderbird
# bindsym Mod4+i workspace $ws5; exec idea
# bindsym Mod4+m workspace $ws5; layout tabbed; exec $term -e ~/.minetest/minetest/bin/minetest
# bindsym Mod4+$mod+t workspace $ws5; exec thunderbird
# bindsym Mod4+$mod+w workspace $ws5; exec $term -e twitchy
# bindsym Mod4+w workspace $ws5; exec $term -e twitchy
bindsym Mod4+5 workspace $ws5; exec godot
bindsym Mod4+F5 workspace $ws5; exec cd ~/coding/ada-mario && godot -e
# for_window [class="Move_mouse_with_head"] floating enable; move absolute position 0 0
@ -333,18 +404,31 @@ for_window [class="ada-mario"] floating enable
# for_window [class="ada-mario"] move absolute position 930 480
for_window [class="ada-mario"] move absolute position 640 0
# ]]] ws5 #
# ws6 [[[ #
set $ws6 "6 "
workspace $ws6 output $secondary
assign [class="Slack"] $ws6
bindsym Mod4+d workspace $ws6; exec discord
# bindsym Mod4+d workspace $ws6; exec riot-desktop
# bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home
bindsym Mod4+$mod+d workspace $ws6; exec element-desktop
# bindsym Mod4+d workspace $ws6; exec firefox -new-window https://riot.im/app
bindsym Mod4+k workspace $ws6; exec slack
# bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'mosh kmok@$work_laptop_ip -- tmux a -t weechat'
bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'mosh kmok@$work_laptop_ip -- tmux a -t weechat'
# bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'tmux-attach weechat'
# ]]] ws6 #
set $ws7 "7 "
workspace $ws7 output $secondary
# bindsym $mod+F7 workspace $ws7; exec $term
bindsym $mod+F7 workspace $ws7; exec $term -e mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a
# bindsym $mod+F7 workspace $ws7; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt
bindsym $mod+F7 workspace $ws7; exec $term
bindsym Mod4+$mod+F7 workspace $ws7; exec $term -e mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a
bindsym $mod+Shift+F7 workspace $ws7; exec chromium https://txstreet.com/v/eth
bindsym Mod4+a workspace $ws7; exec android-file-transfer
# bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"
set $ws8 "8 "
@ -353,6 +437,8 @@ workspace $ws8 output $secondary
# bindsym $mod+F8 workspace $ws8; exec $term
# bindsym $mod+F8 workspace $ws8; exec $term -e tmux a -t journal
bindsym $mod+F8 workspace $ws8; exec $term -e fish -c 'tmux-attach journal'
bindsym Mod4+$mod+F8 workspace $ws8; exec libreoffice ~/Documents/sit-stand/sit-stand.ods
bindsym $mod+Shift+F8 workspace $ws8; exec libreoffice ~/Documents/red-hat/workday.ods
set $ws9 "9 "
workspace $ws9 output $secondary
@ -367,17 +453,20 @@ workspace $ws10 output $secondary
set $hp 2
# bindsym Mod4+v workspace $ws10; exec $term -e alsamixer -c 0
bindsym Mod4+v workspace $ws10; exec $term -e alsamixer -c 1
bindsym Mod4+$mod+c workspace $ws10; exec $term -e cava