10 Commits

  1. 68
      aliases/key_aliases.tmpl
  2. 27
      aliases/key_dirs.tmpl
  3. 2
      aliases/key_files.tmpl
  4. 8
      dot_Xmodmap-ubuntu
  5. 115
      dot_config/fish/completions/pass.fish
  6. 235
      dot_config/fish/completions/timetrace.fish
  7. 45
      dot_config/fish/config.fish.tmpl
  8. 3
      dot_config/fish/functions/aws-attach-volume.fish
  9. 8
      dot_config/fish/functions/bc-qalc.fish
  10. 3
      dot_config/fish/functions/taskopen-new.fish
  11. 49
      dot_config/i3/config.tmpl
  12. 30
      dot_config/i3blocks/i3blocks-secondary.conf.tmpl
  13. 83
      dot_config/i3blocks/i3blocks.conf.tmpl
  14. 3
      dot_config/i3blocks/scripts/executable_calendar
  15. 3
      dot_config/i3blocks/scripts/executable_dexscreener
  16. 6
      dot_config/i3blocks/scripts/executable_dexscreener-fdv
  17. 6
      dot_config/i3blocks/scripts/executable_dexscreener-mc
  18. 3
      dot_config/i3blocks/scripts/executable_kraken
  19. 6
      dot_config/i3blocks/scripts/executable_spotify
  20. 2
      dot_config/i3blocks/scripts/executable_volume
  21. 13
      dot_config/mimeapps-ffox.list
  22. 10
      dot_config/mimeapps.list
  23. 4
      dot_config/neofetch/config.conf
  24. 6
      dot_config/ranger/executable_scope.sh
  25. 9
      dot_config/ranger/rc.conf.tmpl
  26. 1
      dot_config/ranger/rifle.conf
  27. 4
      dot_gitconfig.tmpl
  28. 4
      dot_imwheelrc
  29. 155
      dot_taskopenrc
  30. 8
      dot_taskrc
  31. 5
      dot_vimrc.tmpl
  32. 5
      dot_xinitrc.tmpl
  33. 2
      private_dot_gnupg/gpg-agent.conf
  34. 3
      scripts/executable_backup-pc
  35. 29
      scripts/executable_currency
  36. 21
      scripts/executable_dexscreener
  37. 24
      scripts/executable_dexscreener-fdv
  38. 24
      scripts/executable_dexscreener-mc
  39. 127
      scripts/executable_dual-monitor-slideshow
  40. 36
      scripts/executable_glhf-metadata
  41. 31
      scripts/executable_kraken
  42. 34
      scripts/executable_spotify-now
  43. 16
      scripts/executable_ubuntu-start
  44. 6
      txt/exclude-dirs-backup.txt.tmpl
  45. 2438
      txt/ubuntu/apt-packages.txt
  46. 5
      txt/ubuntu/npm-packages.txt
  47. 92
      txt/ubuntu/pip-packages.txt
  48. 24
      txt/ubuntu/snap-packages.txt

68
aliases/key_aliases.tmpl

@ -32,12 +32,10 @@ whi "whereis"
# nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'"
{{ if eq .chezmoi.hostname "nzxt" }}
xra "xrandr --auto"
xrs "xrandr --auto && xrandr --output HDMI-0 --right-of DVI-I-1"
xrn "xrandr --output HDMI-0 --rotate normal && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
xrr "xrandr --output HDMI-0 --rotate right && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null"
{{ end }}
{{ if eq .chezmoi.hostname "x1-carbon" }}
xro "xrandr --output HDMI2 --off"
@ -53,12 +51,14 @@ ngb "sudo nvim /etc/default/grub"
mgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
# a "bat"
b "bat"
#b "bat"
b "vimpager"
# ba "bat *"
awkp "awk -F',' '{print \$0}'"
cpr "cp -r"
fdc "fd -i"
fde "fd -e"
fd "fdfind"
fdc "fdfind -i"
fde "fdfind -e"
grep "grep --color=auto -n"
grpr "grep -r"
rgc "rg -i"
@ -125,7 +125,8 @@ ssl "mosh --ssh='ssh -p 399' kevin@$LAPTOP_IP"
# vultr
# ssa "mosh atxadmin@45.32.87.10"
ssa "ssh -t kevin@3.147.85.36 tmux a"
ssa "ssh -i ~/.ssh/ai16z-test.pem ai16z@54.197.220.164"
ssaw "ssh -t kevin@3.147.85.36 tmux a"
# ssv "mosh kevin@45.32.87.10"
# test server sites
@ -203,7 +204,7 @@ uzl "unzip -l"
# power options [[[ #
# s "systemctl suspend"
#s "systemctl suspend"
s "xset dpms force off"
# sl "i3lock-fancy && systemctl suspend"
# so "xset dpms force off"
@ -290,6 +291,12 @@ apr "apt remove"
apu "apt upgrade"
{{ end }}
{{ if eq .linux_os "ubuntu" }}
ai "sudo apt install"
ar "sudo apt remove"
au "sudo apt upgrade"
{{ end }}
# ]]] apt #
# ]]] pkg management #
@ -350,7 +357,9 @@ am "antimicro"
# task [[[ #
a "task"
aa "task add"
#aa "task add proj:anp"
aa "task add proj:sniper"
aan "task add"
aal "task add proj:lnx"
aap "task add proj:"
aas "task add proj:sch"
@ -363,7 +372,7 @@ aaj "task add proj:pey +jira []"
aapp "task add proj:pogo"
aas "task add proj:sch"
aay "task add proj:pey"
ac "task context"
acx "task context"
acn "task context none && task"
ach "task context home && task"
acm "task context mny && task"
@ -408,6 +417,9 @@ but "buku -zu --tag"
bw "buku --immutable 1 -w -1"
# ]]] buku #
ca "currency CAD USD"
us "currency USD CAD"
qe "currency USD CAD 1"
cc "calcurse"
ccc "calcurse -D ~/.calcurse/alt-cals/class"
cci "calcurse -i"
@ -418,8 +430,8 @@ cht "chatterino"
clc "cloc . --vcs=git"
cm "compton &"
cv "cava"
dg "dragon-drop -x"
dgh "dragon-drop -x ."
dg "dragon -x"
dgh "dragon -x ."
fx "firefox -P"
fxd "firefox -P default"
fxw "firefox -P work"
@ -439,7 +451,8 @@ it "sxiv -t *"
kill "kill -9"
#kal "killall"
ka "killall"
kc "killall chromium"
#kc "killall chromium"
kc "killall chrome"
kcm "killall compton"
kd "killall Discord && killall Discord"
ke "killall electron"
@ -473,8 +486,8 @@ pipes "pipes.sh -t 3"
pcp "pycp"
pmv "pymv"
py "python"
q "qalc '"
qe "qalc -e '1USD to CAD'"
#q "qalc '"
#qe "qalc -e '1USD to CAD'"
qg "qalculate-gtk"
r "ranger"
rbg "ranger --selectfile (grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2)"
@ -504,6 +517,7 @@ tas3 "tmux a -t school-3 || tmux new -s school-3"
tas4 "tmux a -t school-4 || tmux new -s school-4"
tal "tmux a"
tc "clear && tmux clear-history"
th "thunar . &"
# tk "tmux kill-server"
tks "tmux kill-session -t"
tksv "tmux kill-server"
@ -542,7 +556,7 @@ pg "pass generate -c"
ps "pass show"
psr "pass rm"
psi "pass show info | bat"
pev "pass edit finances/visa"
pev "pass edit finances/visa-cash"
xc "xclip -selection clipboard"
xo "xclip -o >"
@ -601,7 +615,7 @@ wrw "watson report -Gc"
# timetrace [[[ #
tt "timetrace"
ttr "timetrace"
tta "timetrace start"
ttaa "timetrace start a3@300"
tte "timetrace edit record latest"
@ -922,11 +936,10 @@ rt "python ~/coding/rt-scraper/!rt-scraper.py"
# ada-mario [[[ #
mm "printf '\033c' && bear make clean move_mouse_with_head && ./move_mouse_with_head"
med "printf '\033c' && bear make clean eye_detector && ./eye_detector"
#med "printf '\033c' && bear make clean eye_detector && ./eye_detector"
mft "printf '\033c' && bear make clean face_detector && ./face_detector"
rft "~/coding/face-tracker/face_detector > /tmp/move_mouse_with_head.out"
# gpsb "git push bitbucket"
gpsb "git push bot"
gpsb "git push bitbucket"
# ]]] ada-mario #
@ -1034,6 +1047,8 @@ ttrtk "timetrace report -s 2023-04-20 -p totk"
cpsdv "cp * /home/kevin/Documents/stardew-valley-sdv-saves/hevintales"
rclh "rclone copy --progress hevin:/ ."
# ]]] games #
# work [[[ #
@ -1047,6 +1062,20 @@ ssc "mosh mokkar@teach.cs.utoronto.ca"
ttlo "timetrace start look@job"
ttle "timetrace start leetcode@job"
ts "npx tsc"
njs "node src/download-json.js"
xi "npx ts-node src/index.ts 2>&1 | tee logs/index.log"
xd "npm run dev 2>&1 | tee logs/index.log"
xs "npx ts-node src/sync.ts 2>&1 | tee logs/sync.log"
xt "npm run type-check | tee logs/type-check.log"
#xsv "nodemon --exec node --loader ts-node/esm src/server.ts"
#xsv "npx nodemon"
#xsv "nodemon --exec tsx src/server.ts"
xsv "npx nodemon --exitcrash --exec tsx src/server.ts"
cl "npx ts-node src/cli.ts list-nfts -p 5 -t 100"
clw "watch npx ts-node src/cli.ts list-nfts -p 5 -t 100"
vp "vercel --prod"
# ]]] work #
# red-hat [[[ #
@ -1259,3 +1288,4 @@ vpt "nordvpn status"
# ]]] vpn #
ft "dexscreener ethereum 0x983b92EA1F0A20844466f3E4BB988c1dE145293E"

27
aliases/key_dirs.tmpl

@ -5,7 +5,7 @@
bg ~/Pictures/Backgrounds
cf ~/linux-config/dot_config
cfg ~/.config
cff ~/.config/fish
cfgf ~/.config/fish
ch ~/Documents/chat
dc ~/Documents/chat/discord
da /mnt/ipad/DCIM/101APPLE
@ -22,10 +22,11 @@ lfv /mnt/linux-files/Videos
lfv2 /mnt/linux-files-2/Videos
lfv2s /mnt/linux-files-2/Videos/shows
lfy /mnt/linux-files/Videos/yt
me /run/media/kevin
a2 /mnt/linux-files-2/arch-2/full/home/kevin
medi /media/kevin
o /
pd ~/.password-store
pfp ~/Pictures/profile-pics
pfp /mnt/linux-files-2/arch-2/full/home/kevin/Pictures/profile-pics
pfpp ~/Pictures/profile-pics/profiles-by-moto
P ~/Pictures
ssu ~/Pictures/screenshots/desktop/unsorted
@ -51,7 +52,7 @@ cn ~/coding
drk ~/coding/dark-sky
ffx ~/linux-config/dot_config/fish/functions
hbd ~/.habitctl
ib ~/linux-config/dot_config/i3blocks/scripts
ib ~/linux-config/dot_config/i3blocks
mbd ~/coding/minikube
pig ~/coding/pigallery
mbk ~/coding/minikube-kompose
@ -72,7 +73,6 @@ ttdr ~/.timetrace/records
tx ~/linux-config/txt
wd ~/.config/watson
{{ if eq .chezmoi.hostname "nzxt" }}
b1 ~/coding/mf-site/themes/base16
2d ~/coding/godot-demos/2d-plat
ada ~/coding/ada-mario
@ -115,8 +115,6 @@ te ~/Pictures/twitch-emotes
# ]]] gaming #
{{ end }}
{{ if eq .chezmoi.hostname "x1-carbon" }}
adb ~/coding/ada-mario/build
adm ~/coding/ada-mario/media
@ -151,7 +149,7 @@ Css ~/Pictures/screenshots/mobile/codm
fn ~/Documents/fortnite
fnc /mnt/linux-files/Videos/yt/fortnite/clips/4
fni /mnt/ipad/DCIM/100APPLE
fnm ~/Documents/fortnite/pics/maps
#fnm ~/Documents/fortnite/pics/maps
fnn ~/Documents/fortnite/notes
fnp ~/Documents/fortnite/pics
fns ~/Documents/fortnite/stats/api
@ -279,6 +277,19 @@ jhi ~/school/job-hunt/interview-questions
jhig ~/school/job-hunt/interview-questions/grafana
el ~/coding/eliza
an ~/coding/ai-nft-proj/
anb ~/coding/ai-nft-proj/backend
anf ~/coding/ai-nft-proj/frontend
tt ~/coding/try-eliza-twitter-client
me ~/coding/me-sniper/backend
mef ~/coding/me-sniper/frontend
mefn ~/coding/me-sniper/frontend-next-js
med ~/coding/me-sniper/discord-bot
me2 ~/coding/me-sniper/backend-copy
kb ~/coding/kanban-calendar
ac ~/coding/astral-challenge-txt
# ]]] sch #

2
aliases/key_files.tmpl

@ -46,7 +46,7 @@ hh ~/.habitctl/habits
hlg ~/coding/spotify-lib-vis/src/api/management/commands/update-history.log
id ~/Documents/journal/todo/ideas.md
ig ./.gitignore
jt ~/Documents/journal/todo/25/1.md
jt ~/Documents/journal/todo/25/2.md
k ~/linux-config/dot_config/kitty/kitty.conf
lh ~/Documents/listening-history/polarbier.csv
mc ~/coding/mf-site/assets/sass/main.scss

8
dot_Xmodmap-ubuntu

@ -0,0 +1,8 @@
clear Lock
keycode 66 = Caps_Lock
keycode 9 = Escape
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

115
dot_config/fish/completions/pass.fish

@ -0,0 +1,115 @@
# Copyright (C) 2012-2014 Dmitry Medvinsky <me@dmedvinsky.name>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
set -l PROG 'pass'
function __fish_pass_get_prefix
if set -q PASSWORD_STORE_DIR
realpath -- "$PASSWORD_STORE_DIR"
else
echo "$HOME/.password-store"
end
end
function __fish_pass_needs_command
[ (count (commandline -opc)) -eq 1 ]
end
function __fish_pass_uses_command
set -l cmd (commandline -opc)
if [ (count $cmd) -gt 1 ]
if [ $argv[1] = $cmd[2] ]
return 0
end
end
return 1
end
function __fish_pass_print_gpg_keys
gpg2 --list-keys | grep uid | sed 's/.*<\(.*\)>/\1/'
end
function __fish_pass_print
set -l ext $argv[1]
set -l strip $argv[2]
set -l prefix (__fish_pass_get_prefix)
set -l matches $prefix/**$ext
printf '%s\n' $matches | sed "s#$prefix/\(.*\)$strip#\1#"
end
function __fish_pass_print_entry_dirs
__fish_pass_print "/"
end
function __fish_pass_print_entries
__fish_pass_print ".gpg" ".gpg"
end
function __fish_pass_print_entries_and_dirs
__fish_pass_print_entry_dirs
__fish_pass_print_entries
end
function __fish_pass_git_complete
set -l prefix (__fish_pass_get_prefix)
set -l git_cmd (commandline -opc) (commandline -ct)
set -e git_cmd[1 2] # Drop "pass git".
complete -C"git -C $prefix $git_cmd"
end
complete -c $PROG -f -n '__fish_pass_needs_command' -a help -d 'Command: show usage help'
complete -c $PROG -f -n '__fish_pass_needs_command' -a version -d 'Command: show program version'
complete -c $PROG -f -n '__fish_pass_needs_command' -a init -d 'Command: initialize new password storage'
complete -c $PROG -f -n '__fish_pass_uses_command init' -s p -l path -d 'Assign gpg-id for specified sub folder of password store'
complete -c $PROG -f -n '__fish_pass_needs_command' -a ls -d 'Command: list passwords'
complete -c $PROG -f -n '__fish_pass_uses_command ls' -a "(__fish_pass_print_entry_dirs)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a insert -d 'Command: insert new password'
complete -c $PROG -f -n '__fish_pass_uses_command insert' -s e -l echo -d 'Echo the password on console'
complete -c $PROG -f -n '__fish_pass_uses_command insert' -s m -l multiline -d 'Provide multiline password entry'
complete -c $PROG -f -n '__fish_pass_uses_command insert' -s f -l force -d 'Do not prompt before overwritting'
complete -c $PROG -f -n '__fish_pass_uses_command insert' -a "(__fish_pass_print_entry_dirs)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a generate -d 'Command: generate new password'
complete -c $PROG -f -n '__fish_pass_uses_command generate' -s n -l no-symbols -d 'Do not use special symbols'
complete -c $PROG -f -n '__fish_pass_uses_command generate' -s c -l clip -d 'Put the password in clipboard'
complete -c $PROG -f -n '__fish_pass_uses_command generate' -s f -l force -d 'Do not prompt before overwritting'
complete -c $PROG -f -n '__fish_pass_uses_command generate' -s i -l in-place -d 'Replace only the first line with the generated password'
complete -c $PROG -f -n '__fish_pass_uses_command generate' -a "(__fish_pass_print_entry_dirs)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a mv -d 'Command: rename existing password'
complete -c $PROG -f -n '__fish_pass_uses_command mv' -s f -l force -d 'Force rename'
complete -c $PROG -f -n '__fish_pass_uses_command mv' -a "(__fish_pass_print_entries_and_dirs)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a cp -d 'Command: copy existing password'
complete -c $PROG -f -n '__fish_pass_uses_command cp' -s f -l force -d 'Force copy'
complete -c $PROG -f -n '__fish_pass_uses_command cp' -a "(__fish_pass_print_entries_and_dirs)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a rm -d 'Command: remove existing password'
complete -c $PROG -f -n '__fish_pass_uses_command rm' -s r -l recursive -d 'Remove password groups recursively'
complete -c $PROG -f -n '__fish_pass_uses_command rm' -s f -l force -d 'Force removal'
complete -c $PROG -f -n '__fish_pass_uses_command rm' -a "(__fish_pass_print_entries_and_dirs)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a edit -d 'Command: edit password using text editor'
complete -c $PROG -f -n '__fish_pass_uses_command edit' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a show -d 'Command: show existing password'
complete -c $PROG -f -n '__fish_pass_uses_command show' -s c -l clip -d 'Put password in clipboard'
complete -c $PROG -f -n '__fish_pass_uses_command show' -a "(__fish_pass_print_entries)"
# When no command is given, `show` is defaulted.
complete -c $PROG -f -n '__fish_pass_needs_command' -s c -l clip -d 'Put password in clipboard'
complete -c $PROG -f -n '__fish_pass_needs_command' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -n '__fish_pass_uses_command -c' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -n '__fish_pass_uses_command --clip' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -n '__fish_pass_needs_command' -a git -d 'Command: execute a git command'
complete -c $PROG -f -n '__fish_pass_uses_command git' -a '(__fish_pass_git_complete)'
complete -c $PROG -f -n '__fish_pass_needs_command' -a find -d 'Command: find a password file or directory matching pattern'
complete -c $PROG -f -n '__fish_pass_needs_command' -a grep -d 'Command: search inside of decrypted password files for matching pattern'
complete -c $PROG -f -n '__fish_pass_uses_command grep' -a '(begin
set -l cmd (commandline -opc) (commandline -ct)
set -e cmd[1 2] # Drop "pass grep".
complete -C"grep $cmd"
end)'

235
dot_config/fish/completions/timetrace.fish

@ -0,0 +1,235 @@
# fish completion for timetrace -*- shell-script -*-
function __timetrace_debug
set -l file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __timetrace_perform_completion
__timetrace_debug "Starting __timetrace_perform_completion"
# Extract all args except the last one
set -l args (commandline -opc)
# Extract the last arg and escape it in case it is a space
set -l lastArg (string escape -- (commandline -ct))
__timetrace_debug "args: $args"
__timetrace_debug "last arg: $lastArg"
# Disable ActiveHelp which is not supported for fish shell
set -l requestComp "TIMETRACE_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
__timetrace_debug "Calling $requestComp"
set -l results (eval $requestComp 2> /dev/null)
# Some programs may output extra empty lines after the directive.
# Let's ignore them or else it will break completion.
# Ref: https://github.com/spf13/cobra/issues/1279
for line in $results[-1..1]
if test (string trim -- $line) = ""
# Found an empty line, remove it
set results $results[1..-2]
else
# Found non-empty line, we have our proper output
break
end
end
set -l comps $results[1..-2]
set -l directiveLine $results[-1]
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
# completions must be prefixed with the flag
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
__timetrace_debug "Comps: $comps"
__timetrace_debug "DirectiveLine: $directiveLine"
__timetrace_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
end
printf "%s\n" "$directiveLine"
end
# this function limits calls to __timetrace_perform_completion, by caching the result behind $__timetrace_perform_completion_once_result
function __timetrace_perform_completion_once
__timetrace_debug "Starting __timetrace_perform_completion_once"
if test -n "$__timetrace_perform_completion_once_result"
__timetrace_debug "Seems like a valid result already exists, skipping __timetrace_perform_completion"
return 0
end
set --global __timetrace_perform_completion_once_result (__timetrace_perform_completion)
if test -z "$__timetrace_perform_completion_once_result"
__timetrace_debug "No completions, probably due to a failure"
return 1
end
__timetrace_debug "Performed completions and set __timetrace_perform_completion_once_result"
return 0
end
# this function is used to clear the $__timetrace_perform_completion_once_result variable after completions are run
function __timetrace_clear_perform_completion_once_result
__timetrace_debug ""
__timetrace_debug "========= clearing previously set __timetrace_perform_completion_once_result variable =========="
set --erase __timetrace_perform_completion_once_result
__timetrace_debug "Succesfully erased the variable __timetrace_perform_completion_once_result"
end
function __timetrace_requires_order_preservation
__timetrace_debug ""
__timetrace_debug "========= checking if order preservation is required =========="
__timetrace_perform_completion_once
if test -z "$__timetrace_perform_completion_once_result"
__timetrace_debug "Error determining if order preservation is required"
return 1
end
set -l directive (string sub --start 2 $__timetrace_perform_completion_once_result[-1])
__timetrace_debug "Directive is: $directive"
set -l shellCompDirectiveKeepOrder 32
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
__timetrace_debug "Keeporder is: $keeporder"
if test $keeporder -ne 0
__timetrace_debug "This does require order preservation"
return 0
end
__timetrace_debug "This doesn't require order preservation"
return 1
end
# This function does two things:
# - Obtain the completions and store them in the global __timetrace_comp_results
# - Return false if file completion should be performed
function __timetrace_prepare_completions
__timetrace_debug ""
__timetrace_debug "========= starting completion logic =========="
# Start fresh
set --erase __timetrace_comp_results
__timetrace_perform_completion_once
__timetrace_debug "Completion results: $__timetrace_perform_completion_once_result"
if test -z "$__timetrace_perform_completion_once_result"
__timetrace_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
return 1
end
set -l directive (string sub --start 2 $__timetrace_perform_completion_once_result[-1])
set --global __timetrace_comp_results $__timetrace_perform_completion_once_result[1..-2]
__timetrace_debug "Completions are: $__timetrace_comp_results"
__timetrace_debug "Directive is: $directive"
set -l shellCompDirectiveError 1
set -l shellCompDirectiveNoSpace 2
set -l shellCompDirectiveNoFileComp 4
set -l shellCompDirectiveFilterFileExt 8
set -l shellCompDirectiveFilterDirs 16
if test -z "$directive"
set directive 0
end
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
if test $compErr -eq 1
__timetrace_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
return 1
end
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
if test $filefilter -eq 1; or test $dirfilter -eq 1
__timetrace_debug "File extension filtering or directory filtering not supported"
# Do full file completion instead
return 1
end
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
__timetrace_debug "nospace: $nospace, nofiles: $nofiles"
# If we want to prevent a space, or if file completion is NOT disabled,
# we need to count the number of valid completions.
# To do so, we will filter on prefix as the completions we have received
# may not already be filtered so as to allow fish to match on different
# criteria than the prefix.
if test $nospace -ne 0; or test $nofiles -eq 0
set -l prefix (commandline -t | string escape --style=regex)
__timetrace_debug "prefix: $prefix"
set -l completions (string match -r -- "^$prefix.*" $__timetrace_comp_results)
set --global __timetrace_comp_results $completions
__timetrace_debug "Filtered completions are: $__timetrace_comp_results"
# Important not to quote the variable for count to work
set -l numComps (count $__timetrace_comp_results)
__timetrace_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# We must first split on \t to get rid of the descriptions to be
# able to check what the actual completion will be.
# We don't need descriptions anyway since there is only a single
# real completion which the shell will expand immediately.
set -l split (string split --max 1 \t $__timetrace_comp_results[1])
# Fish won't add a space if the completion ends with any
# of the following characters: @=/:.,
set -l lastChar (string sub -s -1 -- $split)
if not string match -r -q "[@=/:.,]" -- "$lastChar"
# In other cases, to support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
__timetrace_debug "Adding second completion to perform nospace directive"
set --global __timetrace_comp_results $split[1] $split[1].
__timetrace_debug "Completions are now: $__timetrace_comp_results"
end
end
if test $numComps -eq 0; and test $nofiles -eq 0
# To be consistent with bash and zsh, we only trigger file
# completion when there are no other completions
__timetrace_debug "Requesting file completion"
return 1
end
end
return 0
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.
# Only do this if the program can be found, or else fish may print some errors; besides,
# the existing completions will only be loaded if the program can be found.
if type -q "timetrace"
# The space after the program name is essential to trigger completion for the program
# and not completion of the program name itself.
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
complete --do-complete "timetrace " > /dev/null 2>&1
end
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c timetrace -e
# this will get called after the two calls below and clear the $__timetrace_perform_completion_once_result global
complete -c timetrace -n '__timetrace_clear_perform_completion_once_result'
# The call to __timetrace_prepare_completions will setup __timetrace_comp_results
# which provides the program's completion choices.
# If this doesn't require order preservation, we don't use the -k flag
complete -c timetrace -n 'not __timetrace_requires_order_preservation && __timetrace_prepare_completions' -f -a '$__timetrace_comp_results'
# otherwise we use the -k flag
complete -k -c timetrace -n '__timetrace_requires_order_preservation && __timetrace_prepare_completions' -f -a '$__timetrace_comp_results'

45
dot_config/fish/config.fish.tmpl

@ -71,7 +71,7 @@ set -x HASTE_SERVER https://pste.gq
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 PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors $GOPATH/bin ~/.minetest/minetest/bin ~/.gem/ruby/*/bin ~/.yarn/bin ~/.linuxbrew/bin ~/.fnm/current/bin ~/.nimble/bin
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
# Java [[[ #
@ -87,6 +87,13 @@ set -x PATH $JAVA_HOME/bin $PATH
# ]]] Java #
# pnpm
set -gx PNPM_HOME "/home/kevin/.local/share/pnpm"
if not string match -q -- $PNPM_HOME $PATH
set -gx PATH "$PNPM_HOME" $PATH
end
# pnpm end
# system ]]]
# space prompt[[[
@ -117,7 +124,7 @@ set -xU BROWSER "firefox"
set -xU FZF_DEFAULT_COMMAND "find ."
set -x LAPTOP_IP "192.168.0.19"
set -x PHONE_IP "192.168.0.101"
set -x PHONE_IP "192.168.0.104"
set -x PIXEL_IP "192.168.0.18"
set -x WORK_LAPTOP_IP "kmok@192.168.0.11"
@ -132,16 +139,17 @@ 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"
set -x FULLNODE_API_INFO wss://api.chain.love
set -x IPAD_IMG 18
source /home/kevin/coding/aws.fish
#source /home/kevin/coding/aws.fish
set -x LIBVIRT_DEFAULT_URI qemu:///system
set --erase DB_NAME
# ]]] universal var's #
# fish-specific [[[ #
@ -187,21 +195,22 @@ abbr ! "sudo !!"
# task [[[ #
abbr aan "task-anno ''"
abbr ae "task-edit"
abbr aed "task-edit"
abbr adl "task-delete"
abbr adn "task-done"
abbr adu "task-due"
abbr adr "task-due-rm"
abbr an "task-next"
abbr anx "task-next"
abbr anr "task-next-rm"
abbr ant "task-notes"
abbr aon "taskopen-new"
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 asr "task-start"
abbr ar "task-start"
abbr at "task-mod-tag"
abbr atj "task-mod-tag jira"
abbr aw "task-wait"
@ -215,10 +224,10 @@ abbr bq "benq-brightness"
abbr bn "discord-burner"
abbr bun "backup nzxt"
abbr bupp "backup-phone-pics"
abbr ca "cad-to-us"
#abbr ca "cad-to-us"
abbr cccs "sync-alt-cal class"
abbr cl "clip"
abbr cli "clip-ipad"
#abbr cl "clip"
#abbr cli "clip-ipad"
abbr cpc "copy cat"
abbr cpe "copy echo"
abbr cpp "copy echo (pwd)"
@ -264,6 +273,7 @@ abbr mtm "maven-test-method"
abbr pgr "grep-pdf"
abbr pgrf "grep-pdf-file"
abbr pst "pastebin"
abbr q "bc-qalc '"
abbr qh "qalc-history"
abbr qu "qalc-update"
abbr re "reminder ''"
@ -289,7 +299,7 @@ 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 us "us-to-cad"
abbr ut "unix-timestamp"
abbr uzr "unzip-rm"
abbr vsnp "vim-snippet"
@ -302,6 +312,15 @@ abbr xya "export-pkgs"
# school [[[ #
abbr aw "aws ec2"
abbr awav "aws-attach-volume"
abbr awlv "aws ec2 describe-volumes --query \"sort_by(Volumes, &CreateTime)[*].{ID:VolumeId,Name:Tags[?Key=='Name']|[0].Value,Created:CreateTime}\" --output table"
abbr awdtv "aws ec2 detach-volume --volume-id"
abbr awdlv "aws ec2 delete-volume --volume-id"
abbr awli "aws ec2 describe-instances --query \"sort_by(Reservations[].Instances[], &LaunchTime)[*].[InstanceId, Tags[?Key=='Name'].Value | [0], LaunchTime, InstanceType, State.Name]\" --output table"
abbr awsai "aws ec2 start-instances --instance-ids"
abbr awsti "aws ec2 stop-instances --instance-ids"
# ]]] school #
# ]]] fxn abbr's #
@ -311,3 +330,7 @@ abbr xya "export-pkgs"
source /home/kevin/.config/fish/key_abbr.fish > /dev/null
cat /home/kevin/.cache/wal/sequences
# ~/scripts/xmodmap-custom
#ssh-add ~/.ssh/ai16z-test.pem > /dev/null
# keychain --agents ssh id_rsa
#set -Ux SSH_AUTH_SOCK (keychain --eval --agents ssh id_rsa | grep setenv | sed -E 's/setenv (\S+) (\S+);/\2/')

3
dot_config/fish/functions/aws-attach-volume.fish

@ -0,0 +1,3 @@
function aws-attach-volume
aws ec2 attach-volume --volume-id $argv[1] --instance-id $argv[2] --device /dev/sda1
end

8
dot_config/fish/functions/bc-qalc.fish

@ -0,0 +1,8 @@
#function bc-qalc
#echo "scale=4; $argv[1]" | bc
#end
function bc-qalc
set -l expression "scale=4; $argv[1]"
set -l result (echo "$expression" | bc -l)
python3 -c "print(f'{float($result):,}')"
end

3
dot_config/fish/functions/taskopen-new.fish

@ -0,0 +1,3 @@
function taskopen-new
echo "md" | taskopen -A $argv[1] && taskopen -A $argv[1]
end

49
dot_config/i3/config.tmpl

@ -23,8 +23,8 @@ exec wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/editi
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 $ws6; exec signal-desktop'
#exec --no-startup-id i3-msg workspace $ws6; exec discord
#exec --no-startup-id i3-msg 'workspace $ws6; exec signal-desktop'
# exec --no-startup-id i3-msg workspace $ws1; exec $term -e fish -c 'tmux-attach school'
# ]]] startup #
@ -32,10 +32,12 @@ exec --no-startup-id i3-msg workspace $ws6; exec discord
# applications [[[ #
set $mod Mod1
set $browser "firefox"
set $browser_secondary "chromium"
#set $browser "firefox"
set $browser "google-chrome"
#set $browser_secondary "chromium"
#set $browser_secondary "google-chrome-stable"
# set $browser "chromium"
# set $browser_secondary "firefox"
set $browser_secondary "firefox"
set $scripts_path "/home/kevin/scripts"
set $sch_dir "$HOME/Documents/School"
@ -83,7 +85,8 @@ bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail &&
bindsym $mod+Mod4+o workspace $ws11; exec obs
# bindsym Mod4+p workspace $ws4; exec pgadmin3
# bindsym Mod4+p exec pycharm
bindsym Mod4+p exec passmenu
#bindsym Mod4+p exec passmenu
bindsym Mod4+p exec /home/kevin/scripts/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
@ -325,7 +328,7 @@ bindsym Control+$mod+y exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Back
# ws names [[[ #
set $ws1 "1 "
set $ws1 "1  "
{{ if eq .chezmoi.hostname "x1-carbon" }}
set $secondary "HDMI2"
set $main "eDP1"
@ -334,6 +337,9 @@ set $secondary "DVI-I-1"
set $main "HDMI-0"
{{ end }}
set $secondary "DVI-I-1"
set $main "HDMI-0"
# workspace $ws1 output $main
workspace $ws1 output $secondary
bindsym $mod+F1 workspace $ws1; exec $term
@ -341,7 +347,7 @@ 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 $ws2 "2  "
set $work_laptop_ip "192.168.0.11"
workspace $ws2 output $secondary
bindsym $mod+F2 workspace $ws2; exec $term
@ -353,7 +359,7 @@ bindsym $mod+Shift+F2 workspace $ws2; exec $term -e mosh kmok@$work_laptop_ip --
# ws3 [[[ #
set $ws3 "3 "
set $ws3 "3  "
# set $ws3 "3 "
# workspace $ws3 output $main
# bindsym $mod+F3 workspace $ws3; exec $browser
@ -373,7 +379,7 @@ bindsym Mod4+$mod+b layout tabbed; exec $term -e fish -c "buku-fzf fq"
# ]]] ws3 #
set $ws4 "4 󱓧"
set $ws4 "4 󱓧 "
workspace $ws4 output $secondary
# bindsym $mod+F4 workspace $ws4; exec $term
# bindsym Control+Shift+F4 workspace $ws4; exec $term -e fish -c 'tmux-attach misc'
@ -385,7 +391,7 @@ bindsym Mod4+g workspace $ws4; layout tabbed; exec gimp
# ws5 [[[ #
set $ws5 "5 "
set $ws5 "5  "
# workspace $ws5 output $secondary
assign [class="Steam"] $ws5
bindsym $mod+F5 workspace $ws5; exec $browser
@ -394,7 +400,7 @@ 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 $mod+Shift+F5 workspace $ws5; exec $browser_secondary
# 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
@ -416,7 +422,7 @@ for_window [class="ada-mario"] move absolute position 640 0
# ws6 [[[ #
set $ws6 "6 "
set $ws6 "6  "
workspace $ws6 output $secondary
assign [class="Slack"] $ws6
bindsym Mod4+d workspace $ws6; exec discord
@ -430,7 +436,7 @@ bindsym Mod4+k workspace $ws6; exec slack
# ]]] ws6 #
set $ws7 "7 "
set $ws7 "7  "
workspace $ws7 output $secondary
# bindsym $mod+F7 workspace $ws7; exec $term
# bindsym $mod+F7 workspace $ws7; exec $term -e mosh kmok@$work_laptop_ip -- tmux a -t nzxt
@ -440,7 +446,7 @@ 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 "
set $ws8 "8  "
# assign [class="jetbrains-"] $ws8
workspace $ws8 output $secondary
# bindsym $mod+F8 workspace $ws8; exec $term
@ -449,13 +455,13 @@ 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 "
set $ws9 "9  "
workspace $ws9 output $secondary
# bindsym $mod+F9 workspace $ws9; exec $term
# bindsym $mod+F9 workspace $ws9; exec $term -e tmux a -t config
bindsym $mod+F9 workspace $ws9; exec $term -e fish -c 'tmux-attach config'
set $ws10 "10 "
set $ws10 "10  "
# set $ws10 "10 🎵"
assign [class="spotify"] $ws10
workspace $ws10 output $secondary
@ -467,12 +473,13 @@ bindsym Mod4+v workspace $ws10; exec $term -e alsamixer -c 1
# bindsym Mod4+s workspace $ws10; exec ~/scripts/spotify-clean
bindsym Mod4+s workspace $ws10; exec spotify
set $ws11 "11 "
set $ws11 "11  "
# set $ws11 "11 📊"
# assign [class="Summoners War Exporter"] $ws11
workspace $ws11 output $secondary
# bindsym $mod+F11 workspace $ws11; exec $term -e htop -s PERCENT_CPU
bindsym $mod+F11 workspace $ws11; exec $term -e htop -s PERCENT_MEM
#bindsym $mod+F11 workspace $ws11; exec $term -e htop -s PERCENT_MEM
bindsym $mod+F11 workspace $ws11; exec $term -e btop
# bindsym Mod4+$mod+F11 workspace $ws11; exec $term -e fish -c 'tmux-attach backup'
bindsym Control+Shift+F11 workspace $ws11; exec $term -e fish -c 'tmux-attach backup'
bindsym Mod4+t workspace $ws11; exec nordvpn connect && transmission-gtk
@ -614,8 +621,8 @@ bar {
font pango:$sb_font 18
{{ else }}
# font pango:$sb_font 21
font pango:$sb_font 20
# font pango:$sb_font 17
#font pango:$sb_font 20
font pango:$sb_font 18
{{ end }}
# output $main
i3bar_command i3bar -t

30
dot_config/i3blocks/i3blocks-secondary.conf.tmpl

@ -19,35 +19,34 @@ color=#cbe4ff
# sys.monitoring [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
[temperature]
label=
interval=5
[cpu_usage]
label=
interval=2
label=
interval=5
[memory]
label=
label=
# color=#3da061
interval=2
{{ end }}
# ]]] sys.monitoring #
# volume/spotify [[[ #
# [spotify]
# # command=python ~/linux-config/configs/i3blocks-scripts/spotify.py
# # label=
# label=
[spotify]
#command=python ~/linux-config/configs/i3blocks-scripts/spotify.py
command=/home/kevin/.config/i3blocks/scripts/spotify
# label=
label=
# # label=🎧
# # green
# # color=#198c19
# # aqua
# # color=#2d7272
# interval=5
interval=5
# [spotify]
# label=
@ -67,16 +66,13 @@ interval=60
[calendar]
interval=30
label=
# {{ if eq .chezmoi.hostname "nzxt" }}
# DATEFMT=+%H:%M.%a-%m-%d
# {{ else }}
# DATEFMT=+%H:%M
# {{ end }}
DATEFMT=+%H:%M
#DATEFMT=+%H:%M
# SHORTFMT=+%H:%M:%S
SHORTFMT=+%H:%M.%a-%m-%d
HEIGHT=180
WIDTH=220
#SHORTFMT=+%H:%M.%a-%m-%d
#HEIGHT=180
#WIDTH=220
# ]]] time #

83
dot_config/i3blocks/i3blocks.conf.tmpl

@ -15,8 +15,6 @@ color=#cbe4ff
# ticker [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
# [ticker]
# label=SOL 
# TICKER=SOL-USD
@ -37,9 +35,24 @@ color=#cbe4ff
# TICKER=ETH-USD
# interval=30
[dexscreener]
label=HERO
#CHAIN=solana
#PAIR=B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
command=/home/kevin/.config/i3blocks/scripts/dexscreener abstract 0x3771b51b5a705338fa19702f249afcaa94b0cd8c
interval=5
[kraken]
label=BTC
TICKER=BTCUSDC
#TICKER=BTCUSDC
#command=/home/kevin/.config/i3blocks/scripts/kraken BTCUSDC
command=/home/kevin/.config/i3blocks/scripts/kraken BTCUSDC
interval=30
[kraken]
label=ETH
#TICKER=ETHUSDC
command=/home/kevin/.config/i3blocks/scripts/kraken ETHUSDC
interval=30
# [ticker]
@ -49,7 +62,8 @@ interval=30
[kraken]
label=SOL
TICKER=SOLUSD
#TICKER=SOLUSD
command=/home/kevin/.config/i3blocks/scripts/kraken SOLUSD
interval=30
# [kraken]
@ -59,25 +73,38 @@ interval=30
[dexscreener]
label=PIXL
CHAIN=ethereum
PAIR=0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
#CHAIN=ethereum
#PAIR=0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
command=/home/kevin/.config/i3blocks/scripts/dexscreener ethereum 0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
interval=30
[kraken]
label=ETH
TICKER=ETHUSDC
interval=30
#[dexscreener]
#label=PENGU
##CHAIN=solana
##PAIR=B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
#command=/home/kevin/.config/i3blocks/scripts/dexscreener solana B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
#interval=5
[dexscreener]
label=PENGU
CHAIN=solana
PAIR=B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
interval=5
#[dexscreener-fdv]
#label=TRUMP
#command=/home/kevin/.config/i3blocks/scripts/dexscreener-fdv solana a8nphpcjqtqhdquk35uj9hy2ysgxfkczgunwvkd3k7vc
#interval=30
[kraken]
label=AVAX
TICKER=AVAXUSD
interval=30
#[dexscreener]
#label=ANIME
#command=/home/kevin/.config/i3blocks/scripts/dexscreener arbitrum 0xbbf3209130df7d19356d72eb8a193e2d9ec5c234
#interval=30
#[dexscreener]
#label=TRUMP
#command=/home/kevin/.config/i3blocks/scripts/dexscreener solana a8nphpcjqtqhdquk35uj9hy2ysgxfkczgunwvkd3k7vc
#interval=30
#[kraken]
#label=AVAX
##TICKER=AVAXUSD
#command=/home/kevin/.config/i3blocks/scripts/kraken AVAXUSD
#interval=30
#[dexscreener]
#label=LOCK
@ -95,13 +122,10 @@ interval=30
# TICKER=^IXIC
# interval=30
{{ end }}
# ]]] ticker #
# volume/spotify [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
[volume]
interval=once
signal=1
@ -123,7 +147,6 @@ interval=60
# # aqua
# # color=#2d7272
# interval=5
{{ end }}
# ]]] volume/spotify #
@ -144,12 +167,10 @@ label=
interval=5
{{ end }}
# {{ if eq .chezmoi.hostname "nzxt" }}
# [wifi]
# label=
# instance=wlp4s0
# interval=10
# {{ end }}
# ]]] laptop #
@ -157,22 +178,17 @@ interval=5
[calendar]
interval=5
label=
# {{ if eq .chezmoi.hostname "nzxt" }}
label=
# DATEFMT=+%H:%M
# {{ else }}
# DATEFMT=+%H:%M.%a-%m-%d
# {{ end }}
DATEFMT=+%H:%M.%a-%m-%d
# SHORTFMT=+%H:%M:%S
HEIGHT=180
WIDTH=220
#HEIGHT=180
#WIDTH=220
# ]]] time #
# sys.monitoring [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
# [temperature]
# label=
# interval=5
@ -193,7 +209,6 @@ WIDTH=220
# [name]
# label=
# interval=30
{{ end }}
# ]]] name #

3
dot_config/i3blocks/scripts/executable_calendar

@ -2,7 +2,8 @@
WIDTH=${WIDTH:-200}
HEIGHT=${HEIGHT:-200}
DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
#DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
DATEFMT=${DATEFMT:-"+ %a %-m/%d %H:%M"}
SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
OPTIND=1

3
dot_config/i3blocks/scripts/executable_dexscreener

@ -1,5 +1,6 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
ticker=$(~/scripts/dexscreener $CHAIN $PAIR)
#ticker=$(~/scripts/dexscreener $CHAIN $PAIR)
ticker=$(~/scripts/dexscreener $1 $2)
printf "%s\n\n%s\n" "$ticker" "$color7"

6
dot_config/i3blocks/scripts/executable_dexscreener-fdv

@ -0,0 +1,6 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
#ticker=$(~/scripts/dexscreener $CHAIN $PAIR)
ticker=$(~/scripts/dexscreener-fdv $1 $2)
printf "%s\n\n%s\n" "$ticker" "$color7"

6
dot_config/i3blocks/scripts/executable_dexscreener-mc

@ -0,0 +1,6 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
#ticker=$(~/scripts/dexscreener $CHAIN $PAIR)
ticker=$(~/scripts/dexscreener-mc $1 $2)
printf "%s\n\n%s\n" "$ticker" "$color7"

3
dot_config/i3blocks/scripts/executable_kraken

@ -1,5 +1,6 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
ticker=$(~/scripts/kraken $TICKER)
#ticker=$(~/scripts/kraken $TICKER)
ticker=$(~/scripts/kraken $1)
printf "%s\n\n%s\n" "$ticker" "$color7"

6
dot_config/i3blocks/scripts/executable_spotify

@ -9,6 +9,8 @@ case "$BLOCK_BUTTON" in
esac
. "/home/kevin/.cache/wal/colors.sh"
long_title=$(spotify-now -i "$LONG_NAME" -p '' -e '' | sed 's/&/&amp;/g')
short_title=$(spotify-now -i "$SHORT_NAME" -p '' -e '' | sed 's/&/&amp;/g')
#long_title=$(spotify-now -i "$LONG_NAME" -p '' -e '' | sed 's/&/&amp;/g')
#short_title=$(spotify-now -i "$SHORT_NAME" -p '' -e '' | sed 's/&/&amp;/g')
long_title=$(spotify-now)
short_title=$(spotify-now)
printf "$long_title\n$short_title\n%s\n" "$color7"

2
dot_config/i3blocks/scripts/executable_volume

@ -152,7 +152,7 @@ function print_format {
SINK_SYMB=""
;;
*"pci"*)
SINK_SYMB=""
SINK_SYMB=" "
;;
esac
# echo "$1" | envsubst '${SYMB}${VOL}${INDEX}${NAME}'

13
dot_config/mimeapps-ffox.list

@ -1,9 +1,9 @@
[Default Applications]
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=chromium.desktop
x-scheme-handler/unknown=chromium.desktop
text/html=firefox_firefox.desktop
x-scheme-handler/http=firefox_firefox.desktop
x-scheme-handler/https=firefox_firefox.desktop
x-scheme-handler/about=firefox_firefox.desktop
x-scheme-handler/unknown=firefox_firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
@ -17,6 +17,8 @@ message/rfc822=userapp-Thunderbird-DQE3YZ.desktop
image/jpeg=sxiv.desktop
image/png=sxiv.desktop
x-scheme-handler/discord-409416265891971072=discord-409416265891971072.desktop
x-scheme-handler/eclipse+command=_usr_lib_dbeaver_.desktop
video/mp4=mpv.desktop
[Added Associations]
x-scheme-handler/http=firefox.desktop;
@ -31,3 +33,4 @@ application/json=firefox.desktop;
image/jpeg=gimp.desktop;imv.desktop;
text/markdown=nvim.desktop;
image/png=imv.desktop;
video/mp4=mpv.desktop;

10
dot_config/mimeapps.list

@ -1,9 +1,9 @@
[Default Applications]
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/unknown=firefox.desktop
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop

4
dot_config/neofetch/config.conf

@ -336,8 +336,8 @@ public_ip_host="http://ident.me"
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
# disk_show=('/' '/home' '/mnt/linux-files' )
disk_show=('/dev/sdc1' '/dev/sdc3' '/dev/sdd1' )
disk_show=('/' '/home' '/mnt/linux-files-2' )
#disk_show=('/dev/sda1' '/dev/sdaf' '/dev/sdd1' )
# Disk subtitle.
# What to append to the Disk subtitle.

6
dot_config/ranger/executable_scope.sh

@ -234,3 +234,9 @@ handle_mime "${MIMETYPE}"
handle_fallback
exit 1
#if [ "$KITTY_WINDOW_ID" ]; then
#kitty +kitten icat --transfer-mode file --stdin yes
#exit 1
#fi
preview_images_method="ueberzug"

9
dot_config/ranger/rc.conf.tmpl

@ -668,8 +668,8 @@ set preview_images true
# The same as urxvt but utilizing not only the preview pane but the
# whole terminal window.
# set preview_images_method w3m
set preview_images_method ueberzug
# set preview_images_method kitty
#set preview_images_method ueberzug
set preview_images_method kitty
# set preview_images_method urxvt
# set preview_images_method urxvt-full
@ -711,4 +711,9 @@ map dg shell dragon-drop -a -x %p
# https://github.com/alexanderjeurissen/ranger_devicons
default_linemode devicons
set clipboard_program xclip
map tsx set editor nvim
set editor nvim
# ]]] custom #

1
dot_config/ranger/rifle.conf

@ -110,6 +110,7 @@ ext pl = perl -- "$1"
ext rb = ruby -- "$1"
ext js = node -- "$1"
ext sh = sh -- "$1"
ext tsx = nvim "$@"
ext php = php -- "$1"
#--------------------------------------------

4
dot_gitconfig.tmpl

@ -1,7 +1,7 @@
[user]
email = kevin.mok@mail.utoronto.ca
email = me@kevin-mok.com
name = Kevin Mok
signingkey = 6DEED612B26C08E2
signingkey = FB0DA56BEB5D98F3
[color]
ui = auto
[core]

4
dot_imwheelrc

@ -3,5 +3,5 @@
/* None, Down, Button5, 3 */
/* None, Up, Button4, .5 */
/* None, Down, Button5, .5 */
None, Up, Button4, .1
None, Down, Button5, .1
None, Up, Button4, .01
None, Down, Button5, .01

155
dot_taskopenrc

@ -1,72 +1,83 @@
# BROWSER='xdg-open $FILE &>/dev/null'
BROWSER='firefox'
EDITOR='nvim'
#FILE_CMD='xdg-open'
TASKBIN='task'
# If you sync tasks NOTES_FOLDER should be a location that syncs and is available to
# other computers, i.e. /users/dropbox/tasknotes
# NOTES_FOLDER to store notes in, must already exist!
NOTES_FOLDER="$HOME/.task/notes/"
# Preferred extension for tasknotes
NOTES_EXT=".md"
# Path to notes file. UUID will be replaced with the actual uuid of
# the task. If NOTES_CMD
# Default is: ${NOTES_FOLDER}UUID${NOTES_EXT}
#NOTES_FILE="$HOME/tasknotes/UUID.txt"
# Command that opens notes. UUID will be replaced with the actual uuid of
# the task.
# Default is: $EDITOR $NOTES_FILE
#NOTES_CMD="vim "$HOME/tasknotes/$UUID.txt""
# Specify the default sorting.
# Default is taskwarrior's default sorting, i.e. sorting by task IDs.
#DEFAULT_SORT="urgency-,label,annot"
# Apply a default taskwarrior filter in order to exclude certain tasks.
# Default is: status.is:pending
#DEFAULT_FILTER=
# Default command for '-i'
# Default is: ls -la
#DEFAULT-i="ls -la"
# Add some paths to the taskopen's PATH variable
#PATH_EXT=/path/to/taskopen/scripts
PATH_EXT=/usr/share/taskopen/scripts
# Regular expression that referes to the NOTES_FILE.
# Default is: Notes
#NOTES_REGEX="Notes"
# Regular expression that identifies annotations openable by BROWSER.
# Default is: www|http
#BROWSER_REGEX="www|http"
# Regular expression that identifies file paths in annotations. Will be opened by xdg-open.
# Default is: \.|\/|~
#FILE_REGEX="\.|\/|~"
# Regular expression that identifies a text annotation. Automatically triggers raw edit mode like '-r'.
#TEXT_REGEX=".*"
# Custom regular expression that specifies annotations passed to CUSTOM1_CMD, e.g:
#CUSTOM1_REGEX="Message-[Ii][Dd]:|message:"
#CUSTOM1_CMD="muttjumpwrapper"
# Custom regular expression that specifies annotations passed to CUSTOM2_CMD.
#CUSTOM2_REGEX=""
#CUSTOM2_CMD=""
# Execute an arbitrary command if there is no annotation available. The corresponding taskwarrior IDs will
# be passed as arguments, e.g. "addnote 21 42"
#NO_ANNOTATION_HOOK=addnote
# Make additional taskwarrior attributes available as sort keys and environment variables.
# E.g. TASK_ATTRIBUTES="project,tags" allows to sort by "task_project" or "task_tags" and to use
# "$TASK_PROJECT" or "$TASK_TAGS" within your (custom) commands.
#TASK_ATTRIBUTES=""
[General]
EDITOR = nvim # Use your preferred editor
path_ext = /usr/share/taskopen/scripts
taskbin = task
[Actions]
notes.regex = "Notes" # Match tasks with the "Notes" annotation
notes.command = "$EDITOR $HOME/.task/notes/$UUID.md" # Custom notes directory
#notes.modes = any
notes.modes = normal
# # BROWSER='xdg-open $FILE &>/dev/null'
# BROWSER='firefox'
# EDITOR='nvim'
# #FILE_CMD='xdg-open'
# TASKBIN='task'
#
# # If you sync tasks NOTES_FOLDER should be a location that syncs and is available to
# # other computers, i.e. /users/dropbox/tasknotes
# # NOTES_FOLDER to store notes in, must already exist!
# NOTES_FOLDER="$HOME/.task/notes/"
# data_location="$HOME/.task/notes/"
#
# # Preferred extension for tasknotes
# NOTES_EXT=".md"
#
# # Path to notes file. UUID will be replaced with the actual uuid of
# # the task. If NOTES_CMD
# # Default is: ${NOTES_FOLDER}UUID${NOTES_EXT}
# #NOTES_FILE="$HOME/tasknotes/UUID.txt"
#
# # Command that opens notes. UUID will be replaced with the actual uuid of
# # the task.
# # Default is: $EDITOR $NOTES_FILE
# #NOTES_CMD="vim "$HOME/tasknotes/$UUID.txt""
#
# # Specify the default sorting.
# # Default is taskwarrior's default sorting, i.e. sorting by task IDs.
# #DEFAULT_SORT="urgency-,label,annot"
#
# # Apply a default taskwarrior filter in order to exclude certain tasks.
# # Default is: status.is:pending
# #DEFAULT_FILTER=
#
# # Default command for '-i'
# # Default is: ls -la
# #DEFAULT-i="ls -la"
#
# # Add some paths to the taskopen's PATH variable
# #PATH_EXT=/path/to/taskopen/scripts
# PATH_EXT=/usr/share/taskopen/scripts
#
# # Regular expression that referes to the NOTES_FILE.
# # Default is: Notes
# #NOTES_REGEX="Notes"
#
# # Regular expression that identifies annotations openable by BROWSER.
# # Default is: www|http
# #BROWSER_REGEX="www|http"
#
# # Regular expression that identifies file paths in annotations. Will be opened by xdg-open.
# # Default is: \.|\/|~
# #FILE_REGEX="\.|\/|~"
#
# # Regular expression that identifies a text annotation. Automatically triggers raw edit mode like '-r'.
# #TEXT_REGEX=".*"
#
# # Custom regular expression that specifies annotations passed to CUSTOM1_CMD, e.g:
# #CUSTOM1_REGEX="Message-[Ii][Dd]:|message:"
# #CUSTOM1_CMD="muttjumpwrapper"
#
# # Custom regular expression that specifies annotations passed to CUSTOM2_CMD.
# #CUSTOM2_REGEX=""
# #CUSTOM2_CMD=""
#
# # Execute an arbitrary command if there is no annotation available. The corresponding taskwarrior IDs will
# # be passed as arguments, e.g. "addnote 21 42"
# #NO_ANNOTATION_HOOK=addnote
#
# # Make additional taskwarrior attributes available as sort keys and environment variables.
# # E.g. TASK_ATTRIBUTES="project,tags" allows to sort by "task_project" or "task_tags" and to use
# # "$TASK_PROJECT" or "$TASK_TAGS" within your (custom) commands.
# #TASK_ATTRIBUTES=""

8
dot_taskrc

@ -20,7 +20,7 @@ data.location=~/.task
# Color theme (uncomment one to use){{{
#include /usr/share/doc/task/rc/light-16.theme
#include /usr/share/doc/task/rc/light-256.theme
include /usr/share/doc/task/rc/dark-16.theme
# include /usr/share/doc/task/rc/dark-16.theme
# include /usr/share/doc/task/rc/dark-256.theme
#include /usr/share/doc/task/rc/dark-red-256.theme
#include /usr/share/doc/task/rc/dark-green-256.theme
@ -81,10 +81,14 @@ context.out=project:out
context.mny=project:mny
context.pey=project:pey
context.sch=project:sch
#context.sniper=project:sniper project:job
context.sniper=(project:sniper or project:job)
#context=none
context=sniper
# context=home
# context=out
context=sch
#context=sch
# context=mny
# context=pey
# context=not-pey

5
dot_vimrc.tmpl

@ -61,7 +61,7 @@ filetype plugin indent on
autocmd BufNewFile,BufRead .* set syntax=sh
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
autocmd FileType *css,gitcommit,haskell,htmldjango,html,graphql,javascript,javascriptreact,json,lisp,markdown,
\racket,tex,text,yaml set tabstop=2 shiftwidth=2
\racket,tex,text,typescript,typescriptreact,yaml set tabstop=2 shiftwidth=2
" autocmd BufNewFile,BufRead *.md set filetype=markdown
" autocmd Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0
@ -345,6 +345,9 @@ Plug 'jidn/vim-dbml'
Plug 'tpope/vim-surround'
" Plug 'tpope/vim-commentary'
Plug 'preservim/nerdcommenter'
"Plug 'vimwiki/vimwiki'
"let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
"Plug 'tools-life/taskwiki'
" ]]] vim-plug "
" Mappings [[[ "

5
dot_xinitrc.tmpl

@ -13,10 +13,9 @@ redshift -O 3000
xset r rate $XSET_DELAY $XSET_RATE
# exec /home/kevin/Downloads/dwm/reload-dwm.sh
{{ if eq .chezmoi.hostname "nzxt" }}
# dunst &
/usr/lib/notification-daemon-1.0/notification-daemon &
compton -b
picom &
imwheel &
numlockx on &
start-pulseaudio-x11 &
@ -24,8 +23,6 @@ start-pulseaudio-x11 &
# wal -i "$(/home/kevin/scripts/shuffler \"$HOME/Pictures/Backgrounds/dim/non-editing\")" && /home/kevin/st/make-st.sh &
# wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") &
wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/editing") &
{{ end }}
exec i3
# # Statusbar loop
# while true; do

2
private_dot_gnupg/gpg-agent.conf

@ -0,0 +1,2 @@
default-cache-ttl 86400
max-cache-ttl 86400

3
scripts/executable_backup-pc

@ -15,6 +15,9 @@ case $1 in
x1 )
backup_dest="$mount_dir/laptop"
;;
ubuntu )
backup_dest="$mount_dir/ubuntu"
;;
esac
exclude_dirs_list="/home/kevin/txt/exclude-dirs-backup.txt"
exclude_dirs_list_full="/home/kevin/txt/exclude-dirs-backup-full.txt"

29
scripts/executable_currency

@ -0,0 +1,29 @@
#!/usr/bin/env python3
import sys
import requests
def convert_currency(amount, from_currency, to_currency):
url = f"https://api.frankfurter.app/latest?amount={amount}&from={from_currency}&to={to_currency}"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
converted_amount = data['rates'][to_currency]
print(f"{amount} {from_currency} = {converted_amount} {to_currency}")
else:
print("Error: Unable to fetch exchange rates.")
def main():
if len(sys.argv) != 4:
print("Usage: currency_converter.py <amount> <from_currency> <to_currency>")
print("Example: currency_converter.py 100 CAD USD")
sys.exit(1)
amount = float(sys.argv[3])
from_currency = sys.argv[1].upper()
to_currency = sys.argv[2].upper()
convert_currency(amount, from_currency, to_currency)
if __name__ == "__main__":
main()

21
scripts/executable_dexscreener

@ -7,12 +7,25 @@ price=$(echo "$raw" | jq -r ".pairs | .[] | .priceUsd")
# printf "%0.4f\n" "$price" | cut -c 4-
# elif (( $(echo "$price < .1" | bc -l) )); then
# printf "%0.3f\n" "$price" | cut -c 4-
if (( $(echo "$price < .09" | bc -l) )); then
#if (( $(echo "$price < .09" | bc -l) )); then
#printf "%0.4f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < .1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < 1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif (( $(echo "$price < 10" | bc -l) )); then
#printf "%0.2f\n" "$price"
#fi
if [ $(echo "$price < 0.09" | bc -l) -eq 1 ]; then
printf "%0.4f\n" "$price" | cut -c 4-
elif (( $(echo "$price < .1" | bc -l) )); then
elif [ $(echo "$price < 0.1" | bc -l) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 4-
elif (( $(echo "$price < 1" | bc -l) )); then
elif [ $(echo "$price < 1" | bc -l) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 10" | bc -l) )); then
elif [ $(echo "$price < 10" | bc -l) -eq 1 ]; then
printf "%0.2f\n" "$price"
elif [ $(echo "$price < 100" | bc -l) -eq 1 ]; then
#printf "%0.2f\n" "$price"
echo "$price" | awk '{print int($1*10)}'
fi

24
scripts/executable_dexscreener-fdv

@ -0,0 +1,24 @@
# /bin/bash
# curl -s https://api.dexscreener.com/latest/dex/pairs/$1/$2| jq -r '.pairs | .[] | .priceUsd'
#raw=$(curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2")
#price=$(echo "$raw" | jq '.pairs[0].marketCap / 1000000000 | . as $marketCap | "\($marketCap | floor).$(($marketCap * 10 | floor % 10))"')
#price=$(echo "$raw" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )B"')
#curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )"'
curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2" | jq -r '.pairs[0].fdv / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )"' | jq -r 'tostring | gsub("\\.";"")'
# if (( $(echo "$price < .05" | bc -l) )); then
# printf "%0.4f\n" "$price" | cut -c 4-
# elif (( $(echo "$price < .1" | bc -l) )); then
# printf "%0.3f\n" "$price" | cut -c 4-
#if (( $(echo "$price < .09" | bc -l) )); then
#printf "%0.4f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < .1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < 1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif (( $(echo "$price < 10" | bc -l) )); then
#printf "%0.2f\n" "$price"
#fi

24
scripts/executable_dexscreener-mc

@ -0,0 +1,24 @@
# /bin/bash
# curl -s https://api.dexscreener.com/latest/dex/pairs/$1/$2| jq -r '.pairs | .[] | .priceUsd'
#raw=$(curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2")
#price=$(echo "$raw" | jq '.pairs[0].marketCap / 1000000000 | . as $marketCap | "\($marketCap | floor).$(($marketCap * 10 | floor % 10))"')
#price=$(echo "$raw" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )B"')
#curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )"'
curl -s "https://api.dexscreener.com/latest/dex/pairs/$1/$2" | jq -r '.pairs[0].marketCap / 1000000000 | "\(floor).\( (. * 10 | floor % 10) )"' | jq -r 'tostring | gsub("\\.";"")'
# if (( $(echo "$price < .05" | bc -l) )); then
# printf "%0.4f\n" "$price" | cut -c 4-
# elif (( $(echo "$price < .1" | bc -l) )); then
# printf "%0.3f\n" "$price" | cut -c 4-
#if (( $(echo "$price < .09" | bc -l) )); then
#printf "%0.4f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < .1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < 1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif (( $(echo "$price < 10" | bc -l) )); then
#printf "%0.2f\n" "$price"
#fi

127
scripts/executable_dual-monitor-slideshow

@ -0,0 +1,127 @@
#!/usr/bin/env fish
# Find a random image
#set image (fdfind -e jpg -e jpeg -e png -e webp . /mnt/linux-files-2/Pictures/hevin | shuf -n 1)
## Create blurred lock image
#convert "$image" -resize 1920x1080^ -gravity center -extent 1920x1080 /tmp/lock.png
## Lock with i3lock-color
#i3lock -n -i /tmp/lock.png
# --------------------
#!/usr/bin/env fish
#set WALLPAPER_DIR "/mnt/linux-files-2/Pictures/hevin"
#set CYCLE_TIME 5 # Seconds between image changes
#set LOCK_AFTER 500 # Activate real lock after 30 seconds of screensaver
## Use a transparent window to cover everything
#while true
#set image (fdfind -e jpg -e jpeg -e png -e webp . $WALLPAPER_DIR | shuf -n 1)
## Create fullscreen image
#convert "$image" -resize (xrandr | grep '*' | head -1 | awk '{print $1}')^ \
#-gravity center -extent (xrandr | grep '*' | head -1 | awk '{print $1}') \
#/tmp/screensaver.png
## Display fullscreen using feh
#feh --fullscreen --hide-pointer --no-fehbg /tmp/screensaver.png &
#set feh_pid $last_pid
## Wait for timeout or mouse movement
#sleep $CYCLE_TIME
#kill $feh_pid
## After longer timeout, activate real lock
#if test (math $CYCLE_TIME \* $count) -ge $LOCK_AFTER
#i3lock -n -i /tmp/screensaver.png
#set count 0
#else
#set count (math $count + 1)
#end
#end
# --------------------
#!/usr/bin/env fish
# Configuration
set WALLPAPER_DIR "/mnt/linux-files-2/Pictures/hevin"
set CYCLE_TIME 2 # Seconds between image changes
#set BLUR_AMOUNT "0x5" # Set to "0x0" for no blur
set BLUR_AMOUNT "0x0" # Set to "0x0" for no blur
# Get monitor information - sanitize names by replacing hyphens with underscores
set monitors (xrandr --query | grep " connected" | awk '{print $1}' | string replace -a '-' '_')
set geometries (xrandr --query | grep -A1 " connected" | grep -v " connected" | awk '{print $1}')
# Verify we found monitors
if test (count $monitors) -eq 0
echo "Error: No monitors detected!"
exit 1
end
# Create monitor geometry mapping
set -g monitor_geometries
for i in (seq (count $monitors))
set monitor $monitors[$i]
set geo $geometries[$i]
if test -z "$geo"
echo "Warning: Could not get geometry for monitor $monitor, using default 1920x1080"
set geo "1920x1080"
end
set monitor_geometries $monitor_geometries "$monitor:$geo"
end
while true
# Use only the first monitor's geometry
set entry $monitor_geometries[1]
set monitor (echo $entry | cut -d':' -f1)
set geo (echo $entry | cut -d':' -f2)
set width (echo $geo | cut -d'x' -f1)
set height (echo $geo | cut -d'x' -f2)
# Select and process image
set image (fdfind -e jpg -e jpeg -e png -e webp . $WALLPAPER_DIR | shuf -n 1)
if test -n "$image"
echo "Found image: $image"
# Get image dimensions
set img_info (identify -format "%wx%h" "$image")
set img_width (echo $img_info | cut -d'x' -f1)
set img_height (echo $img_info | cut -d'x' -f2)
# Process image based on orientation
if test $img_height -gt $img_width
# Vertical image - fit to height with black background
convert "$image" \
-resize x{$height}^ \
-gravity center \
-background black \
-extent {$width}x{$height} \
-blur $BLUR_AMOUNT \
"/tmp/screensaver-$monitor.png"
else
# Horizontal image - fit to width
convert "$image" \
-resize {$width}x^ \
-gravity center \
-extent {$width}x{$height} \
-blur $BLUR_AMOUNT \
"/tmp/screensaver-$monitor.png"
end
# Display image on single monitor
feh --no-fehbg --hide-pointer --fullscreen --title 'screensaver' "/tmp/screensaver-$monitor.png" &
set feh_pid $last_pid
# Wait for cycle time
sleep $CYCLE_TIME
# Kill feh process
kill $feh_pid 2>/dev/null
else
echo "Error: No images found in $WALLPAPER_DIR"
exit 1
end
end

36
scripts/executable_glhf-metadata

@ -0,0 +1,36 @@
#!/usr/bin/env python
import requests
def get_tier_value(num):
url = f"https://www.glhfers.com/api/rom-metadata/{num}"
try:
response = requests.get(url)
response.raise_for_status() # Raise an error for bad status codes
data = response.json()
# Find the Tier trait value
for attribute in data.get("attributes", []):
if attribute.get("trait_type") == "Tier":
return attribute.get("value")
# value = attribute.get("value")
return "Tier not found"
except requests.exceptions.RequestException as e:
return f"Error fetching data: {e}"
def main():
while True:
try:
num = input("Enter a number: ")
if num.lower() == 'exit':
break
num = int(num) # Convert input to integer
tier_value = get_tier_value(num)
print(f"{tier_value}")
except ValueError:
print("Invalid input. Please enter a number or 'exit' to quit.")
if __name__ == "__main__":
main()

31
scripts/executable_kraken

@ -1,3 +1,5 @@
#!/bin/bash
# price=$(curl -s "https://api.kraken.com/0/public/Ticker?pair=$1" | jq -r ".result.$1.b[0]")
raw=$(curl -s "https://api.kraken.com/0/public/Ticker?pair=$1")
# echo $raw
@ -6,17 +8,34 @@ if [ "$1" = "BTCUSDC" ]; then
else
price=$(echo "$raw" | jq -r ".result.$1.b[0]")
fi
# echo "$price"
#if [ $(echo "$price < 1" | bc -l) -eq 1 ]; then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif [ $(echo "$price < 10" | bc -l) -eq 1 ]; then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif [ $(echo "$price < 100" | bc -l) -eq 1 ]; then
#echo "$price" | numfmt --grouping | cut -c -2
#elif [ $(echo "$price < 1000" | bc -l) -eq 1 ]; then
#echo "$price" | numfmt --grouping | cut -c -3
#elif [ $(echo "$price < 10000" | bc -l) -eq 1 ]; then
##echo "$price" | numfmt --grouping | cut -c -3
#echo "$price" | cut -c -3
#elif [ $(echo "$price > 100000" | bc -l) -eq 1 ]; then
#echo "$price" | numfmt --grouping | cut -c -3
#fi
if (( $(echo "$price < 1" | bc -l) )); then
printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 10" | bc -l) )); then
printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 100" | bc -l) )); then
#echo "$price" | numfmt --grouping | cut -c -2
echo "$price" | tr -d '.' | awk '{print substr($0, 1, 3)}'
elif (( $(echo "$price < 1000" | bc -l) )); then
printf "%'0.1f\n" "$price" | sed 's/,//'
echo "$price" | numfmt --grouping | cut -c -3
elif (( $(echo "$price < 10000" | bc -l) )); then
printf "%'0.0f\n" "$price" | sed 's/,//'
elif (( $(echo "$price > 100000" | bc -l) )); then
printf "%'0.0f\n" "$price" | sed 's/,//' | cut -c -4
else
echo "$price" | numfmt --grouping | cut -c -4
elif (( $(echo "$price < 100000" | bc -l) )); then
echo "$price" | cut -c -3
elif (( $(echo "$price > 100000" | bc -l) )); then
echo "$price" | numfmt --grouping | cut -c -3
fi

34
scripts/executable_spotify-now

@ -0,0 +1,34 @@
#!/usr/bin/python
import dbus
import os
import sys
try:
bus = dbus.SessionBus()
spotify = bus.get_object("org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2")
if os.environ.get('BLOCK_BUTTON'):
control_iface = dbus.Interface(spotify, 'org.mpris.MediaPlayer2.Player')
if (os.environ['BLOCK_BUTTON'] == '1'):
control_iface.Previous()
elif (os.environ['BLOCK_BUTTON'] == '2'):
control_iface.PlayPause()
elif (os.environ['BLOCK_BUTTON'] == '3'):
control_iface.Next()
spotify_iface = dbus.Interface(spotify, 'org.freedesktop.DBus.Properties')
props = spotify_iface.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
if (sys.version_info > (3, 0)):
print(str(props['xesam:artist'][0]) + " - " + str(props['xesam:title']))
else:
print(props['xesam:artist'][0] + " - " + props['xesam:title']).encode('utf-8')
exit
except dbus.exceptions.DBusException:
exit

16
scripts/executable_ubuntu-start

@ -0,0 +1,16 @@
#!/bin/bash
picom &
pulseaudio --start
imwheel
xmodmap ~/.Xmodmap
redshift -O 3000
xset r rate $XSET_DELAY $XSET_RATE
/usr/lib/notification-daemon-1.0/notification-daemon &
picom &
imwheel &
numlockx on &
start-pulseaudio-x11 &
wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/editing") &

6
txt/exclude-dirs-backup.txt.tmpl

@ -17,8 +17,14 @@
/run
/sys
/tmp
/var/cache/apt/archives
/var/cache/pacman
/var/lib/systemd/coredump
/var/lib/dhcpcd/proc
/var/lib/docker/overlay2
/var/log/journal
/var/log
/var/tmp
/var/lib/apt/lists
/var/lib/dpkg/info
/var/lib/snapd

2438
txt/ubuntu/apt-packages.txt
File diff suppressed because it is too large
View File

5
txt/ubuntu/npm-packages.txt

@ -0,0 +1,5 @@
/home/kevin/.local/share/fnm/node-versions/v23.6.0/installation/lib
├── corepack@0.30.0
├── node-gyp@11.0.0
└── npm@10.9.2

92
txt/ubuntu/pip-packages.txt

@ -0,0 +1,92 @@
argcomplete==3.1.4
attrs==23.2.0
Babel==2.10.3
bcc==0.29.1
bcrypt==3.2.2
blinker==1.7.0
Brlapi==0.8.5
certifi==2023.11.17
chardet==5.2.0
click==8.1.6
cloud-init==24.4
colorama==0.4.6
command-not-found==0.3
configobj==5.0.8
cryptography==41.0.7
cupshelpers==1.0
dbus-python==1.3.2
defer==1.0.6
distro==1.9.0
distro-info==1.7+build1
docopt==0.6.2
duplicity==2.1.4
fasteners==0.18
greenlet==3.0.3
gyp==0.1
httplib2==0.20.4
idna==3.6
iotop==0.6
Jinja2==3.1.2
jsonpatch==1.32
jsonpointer==2.0
jsonschema==4.10.3
language-selector==0.1
launchpadlib==1.11.0
lazr.restfulclient==0.14.6
lazr.uri==1.0.6
louis==3.29.0
Mako==1.3.2.dev0
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
monotonic==1.6
msgpack==1.0.3
netaddr==0.8.0
netifaces==0.11.0
oauthlib==3.2.2
olefile==0.46
packaging==24.0
paramiko==2.12.0
pexpect==4.9.0
pillow==10.2.0
pipx==1.4.3
platformdirs==4.2.0
psutil==5.9.8
ptyprocess==0.7.0
pycairo==1.25.1
pycups==2.0.1
Pygments==2.17.2
PyGObject==3.48.2
PyJWT==2.7.0
PyNaCl==1.5.0
pynvim==0.5.0
pyparsing==3.1.1
pyrsistent==0.20.0
pyserial==3.5
python-apt==2.7.7+ubuntu3
python-dateutil==2.8.2
python-debian==0.1.49+ubuntu2
python-xlib==0.33
pytz==2024.1
pyxdg==0.28
PyYAML==6.0.1
ranger-fm==1.9.3
requests==2.31.0
rich==13.7.1
screen-resolution-extra==0.0.0
setuptools==68.1.2
six==1.16.0
systemd-python==235
typing_extensions==4.10.0
ubuntu-drivers-common==0.0.0
ubuntu-pro-client==8001
ueberzug==18.2.2
ufw==0.36.2
unattended-upgrades==0.1
urllib3==2.0.7
usb-creator==0.3.16
userpath==1.9.1
wadllib==1.3.6
wheel==0.42.0
xdg==5
xkit==0.0.0

24
txt/ubuntu/snap-packages.txt

@ -0,0 +1,24 @@
Name Version Rev Tracking Publisher Notes
bare 1.0 5 latest/stable canonical** base
core 16-2.61.4-20240607 17200 latest/stable canonical** core
core18 20240920 2846 latest/stable canonical** base
core20 20240911 2434 latest/stable canonical** base
core22 20241119 1722 latest/stable canonical** base
core24 20241119 716 latest/stable canonical** base
discord 0.0.80 222 latest/stable snapcrafters* -
firefox 129.0.2-1 4793 latest/stable/… mozilla** -
firmware-updater 0+git.7983059 147 1/stable/… canonical** -
gimp 2.10.38 484 latest/stable snapcrafters* -
gnome-3-38-2004 0+git.efb213a 143 latest/stable canonical** -
gnome-42-2204 0+git.510a601 176 latest/stable/… canonical** -
gnome-46-2404 0+git.7d0cf36 77 latest/stable canonical** -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical** -
gtk2-common-themes 0.1 13 latest/stable canonical** -
mesa-2404 24.0.9 143 latest/stable canonical** -
signal-desktop 7.38.0 745 latest/stable snapcrafters* -
snap-store 0+git.7a3a49a6 1248 2/stable/… canonical** -
snapd 2.67 23545 latest/stable canonical** snapd
snapd-desktop-integration 0.9 253 latest/stable/… canonical** -
spotify 1.2.52.442.g01893f92 82 latest/stable spotify** -
thunderbird 128.6.0esr-1 609 latest/stable canonical** -
tldr 3.3.0 627 latest/stable kbdk -
|||||||
100:0
Loading…
Cancel
Save