17 Commits

Author SHA1 Message Date
f1ad855f23 Hevin screensaver on one monitor 2025-03-25 17:54:29 -04:00
82baa8a23d Ubuntu start script, HERO ticker, Chrome default browser 2025-02-22 20:36:23 -05:00
05231501e7 Python currency converter 2025-02-03 17:44:47 -05:00
d04af8e39f Setup task, AWS aliases 2025-01-30 10:57:57 -05:00
941bee835a Ubuntu pkgs 2025-01-25 03:34:47 -05:00
720e104f55 Dexscreener MC 2025-01-18 12:39:25 -05:00
aef13d7f26 AVAX first 3 digits 2025-01-18 11:14:21 -05:00
85fb63208d Git signing key, volume i3block spacing 2025-01-18 11:07:00 -05:00
6f8c0b08d7 Tickers color scheme 2025-01-18 10:55:50 -05:00
5c098bd26d Basic i3 setup 2025-01-17 21:54:48 -05:00
d405f264db Pre-Ubuntu install 2025-01-17 11:43:32 -05:00
f9c5f9afe0 i3 Metamask shortcut 2025-01-14 14:48:37 -05:00
072980eaf1 Slow down scroll 2024-11-02 07:51:24 -04:00
adf0cb89b9 Fix Vim commenting 2024-10-30 10:42:09 -04:00
d56c047782 Vim commenting 2024-09-11 07:14:22 -04:00
71b0aa5ada Vim surround (brackets) 2024-09-03 14:05:12 -04:00
11681ecc9f Merge with single-screen branch 2024-08-27 10:45:29 -04:00
54 changed files with 3718 additions and 288 deletions

View File

@@ -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,8 @@ 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"
xx "exit"
@@ -289,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 #
@@ -335,6 +343,7 @@ mst "sudo rm ~/st/config.h && sudo bear make -C ~/st install"
# mst "sudo ~/st/make-st.sh"
mlf2 "sudo mount /dev/sdd1 /mnt/linux-files-2"
bkuh "sudo rsync -PraAX --exclude-from='/home/kevin/txt/exclude-dirs-backup-full.txt' /home '/mnt/linux-files-2/arch-2/full'"
kgpg "kill -9 gpg-agent && gpg-agent"
@@ -348,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"
@@ -361,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"
@@ -406,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"
@@ -416,7 +430,8 @@ cht "chatterino"
clc "cloc . --vcs=git"
cm "compton &"
cv "cava"
dg "dragon-drop -x"
dg "dragon -x"
dgh "dragon -x ."
fx "firefox -P"
fxd "firefox -P default"
fxw "firefox -P work"
@@ -434,8 +449,10 @@ htm "htop -s PERCENT_MEM"
ia "sxiv -a"
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"
@@ -458,8 +475,10 @@ mra "man ranger"
n "nvim"
nl "nload devices wlp4s0 -u M"
nm "nomacs . &"
noti "/usr/lib/notification-daemon-1.0/notification-daemon &"
np "nvim --"
ndu "ncdu"
pc "pcmanfm &"
p3 "python3"
pdft "pdftotext"
pdu "pdfunite"
@@ -467,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)"
@@ -498,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"
@@ -534,6 +554,7 @@ pei "pass edit info"
pi "pass insert -m"
pg "pass generate -c"
ps "pass show"
psr "pass rm"
psi "pass show info | bat"
pev "pass edit finances/visa-cash"
@@ -594,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"
@@ -915,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 #
@@ -1027,9 +1047,11 @@ 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 #
# school [[[ #
# work [[[ #
# basic
# wlf "watson log --all --tag=final"
@@ -1037,13 +1059,24 @@ cpsdv "cp * /home/kevin/Documents/stardew-valley-sdv-saves/hevintales"
gpa "column -ts',' ~/Documents/gpa.md"
ssc "mosh mokkar@teach.cs.utoronto.ca"
zs "zathura --fork syllabus.pdf"
ttlo "timetrace start look@job"
ttle "timetrace start leetcode@job"
pvabn "npm run serve:localhost"
pvafn "npm run start:localhost"
ssv "ssh -p 3022 kevin@127.0.0.1"
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"
# ]]] school #
# ]]] work #
# red-hat [[[ #
@@ -1076,7 +1109,7 @@ ghr "github-release"
do "docker"
db "docker build"
dc "docker-compose"
dcm "docker-compose"
dcu "docker-compose up -d"
dcd "docker-compose down"
di "docker image"
@@ -1095,11 +1128,11 @@ dst "docker stop"
# kubectl [[[ #
k "kubectl"
ka "kubectl apply -f"
kap "kubectl apply -f"
kcr "kubectl create"
kcf "kubectl create ns kogito; kubectl config set-context --current --namespace=kogito"
kct "kubectx"
kd "kubectl describe"
#kd "kubectl describe"
kdd "kubectl describe deployment"
kdp "kubectl describe pod"
kdi "kubectl describe kogitoinfra"
@@ -1234,6 +1267,7 @@ hu "helm upgrade"
# ]]] helm #
zr "zathura --fork ~/coding/mf-site/static/pdf/kevin-mok-resume.pdf"
zra "zathura --fork ~/coding/mf-site/static/pdf/kevin-mok-resume-aws.pdf"
zrw "zathura --fork ~/coding/mf-site/static/pdf/kevin-mok-resume-web-dev.pdf"
# ]]] red-hat #
@@ -1254,3 +1288,4 @@ vpt "nordvpn status"
# ]]] vpn #
ft "dexscreener ethereum 0x983b92EA1F0A20844466f3E4BB988c1dE145293E"

View File

@@ -5,8 +5,9 @@
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
dl ~/Downloads
# dw ~/dwm
@@ -21,10 +22,12 @@ 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
std ~/st
@@ -49,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
@@ -70,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
@@ -113,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
@@ -149,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
@@ -274,6 +274,22 @@ ltc ~/coding/leetcode
jf ~/school/job-fair
jh ~/school/job-hunt
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 #

View File

@@ -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/24/4.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
@@ -97,6 +97,7 @@ sdv ~/Documents/stardew-valley-sdv/notes.md
snp ~/Documents/marvel-snap/strats.md
tc /mnt/linux-files/Videos/yt/fortnite/clips/twitch-clip-downloader/clips.txt
tdb ~/Documents/journal/todo/b.md
jop ~/Documents/journal/personal/jop.md
# ]]] gaming #
@@ -116,13 +117,13 @@ rt ~/Documents/red-hat/todo.md
lip ~/Documents/linkedin/linkedin-profile.md
jhi ~/school/job-hunt/info.md
jhb ~/school/job-hunt/b.md
# ]]] pey #
ej ~/Documents/emojis/emojis.md
nf ~/Documents/twitter/nft-24.md
ra ~/Documents/chat/reddit/avatar.md
ds ~/Documents/nft/deep-sea-research.md
nf ~/Documents/twitter/nft-25.md
sg ~/Documents/chat/signal/jay-groups.md
wd ~/Documents/journal/personal/weed.md
wo ~/Documents/workout-logs/7/running.md

View File

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

8
dot_Xmodmap-ubuntu Normal file
View File

@@ -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

11
dot_Xmodmap-vm Normal file
View File

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

View File

@@ -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)'

View File

@@ -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'

View File

@@ -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,13 +139,16 @@ 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 #
@@ -185,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"
@@ -213,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)"
@@ -262,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 ''"
@@ -287,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"
@@ -300,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 #
@@ -307,5 +328,9 @@ abbr xya "export-pkgs"
# task sync > /dev/null 2>&1
source /home/kevin/.config/fish/key_abbr.fish > /dev/null
wal -r
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/')

View File

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

View File

@@ -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

View File

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

View File

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

View File

@@ -1,16 +1,15 @@
# startup [[[ #
set $term kitty
set $term_alt urxvt
# set $term urxvt
# set $term_alt 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 kitty
set $term_alt st
# set $term_alt urxvt
exec dunst
#exec dunst
exec /usr/lib/notification-daemon-1.0/notification-daemon
exec compton
exec imwheel
exec numlockx on
@@ -25,6 +24,7 @@ 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 $ws1; exec $term -e fish -c 'tmux-attach school'
# ]]] startup #
@@ -32,10 +32,12 @@ exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
# 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"
@@ -58,7 +60,8 @@ bindsym Mod4+Return exec /home/kevin/scripts/dmenu-history -nb "$fg" -nf "$bg" -
# bindsym Mod4+b layout tabbed; exec zathura
# bindsym Mod4+c exec $browser
# bindsym Mod4+$mod+c exec chatterino
bindsym Mod4+c exec chatterino
#bindsym Mod4+c exec chatterino
bindsym Mod4+c exec pass -c finances/metamask
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
@@ -82,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
@@ -333,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
@@ -393,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
@@ -420,10 +427,11 @@ workspace $ws6 output $secondary
assign [class="Slack"] $ws6
bindsym Mod4+d workspace $ws6; exec discord
bindsym Mod4+$mod+d workspace $ws6; exec element-desktop
bindsym Mod4+i workspace $ws6; exec signal-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 'mosh kmok@$work_laptop_ip -- tmux a -t weechat'
# bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'tmux-attach weechat'
# ]]] ws6 #
@@ -470,7 +478,8 @@ 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
@@ -596,6 +605,7 @@ bar {
# status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
output $main
# output $secondary
wheel_up_cmd nop
wheel_down_cmd nop
}
@@ -605,13 +615,14 @@ bar {
# secondary bar [[[ #
bar {
# output $main
output $secondary
{{ if eq .chezmoi.hostname "x1-carbon" }}
font pango:$sb_font 18
{{ else }}
font pango:$sb_font 21
# font pango:$sb_font 21
#font pango:$sb_font 20
# font pango:$sb_font 17
font pango:$sb_font 18
{{ end }}
# output $main
i3bar_command i3bar -t

View File

@@ -19,7 +19,6 @@ color=#cbe4ff
# sys.monitoring [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
[temperature]
label=
interval=5
@@ -31,23 +30,23 @@ interval=5
[memory]
label=
# color=#3da061
interval=5
{{ end }}
interval=2
# ]]] 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 #

View File

@@ -15,8 +15,6 @@ color=#cbe4ff
# ticker [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
# [ticker]
# label=SOL
# TICKER=SOL-USD
@@ -37,26 +35,37 @@ 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
# [ticker]
# label=BTC
# TICKER=BTC-USD
# interval=30
[kraken]
label=ETH
TICKER=ETHUSDC
#TICKER=ETHUSDC
command=/home/kevin/.config/i3blocks/scripts/kraken ETHUSDC
interval=30
# [kraken]
# label=SOL
# TICKER=SOLUSD
# [ticker]
# label=btc
# ticker=btc-usd
# interval=30
[kraken]
label=SOL
#TICKER=SOLUSD
command=/home/kevin/.config/i3blocks/scripts/kraken SOLUSD
interval=30
# [kraken]
# label=SEI
# TICKER=SEIUSD
@@ -64,26 +73,43 @@ interval=30
[dexscreener]
label=PIXL
CHAIN=ethereum
PAIR=0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
#CHAIN=ethereum
#PAIR=0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
command=/home/kevin/.config/i3blocks/scripts/dexscreener ethereum 0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
interval=30
#[dexscreener]
# label=BLAST
# CHAIN=blast
# PAIR=0x9A0AA28d999a21d3cf6F2703CDBba9FeAF4a32F7
#label=PENGU
##CHAIN=solana
##PAIR=B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
#command=/home/kevin/.config/i3blocks/scripts/dexscreener solana B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
#interval=5
#[dexscreener-fdv]
#label=TRUMP
#command=/home/kevin/.config/i3blocks/scripts/dexscreener-fdv solana a8nphpcjqtqhdquk35uj9hy2ysgxfkczgunwvkd3k7vc
#interval=30
[dexscreener]
label=LOCK
CHAIN=solana
PAIR=AtWMAA6T9t8cq8XCccCFPGDNNQYXhScuNuY6WVRi7FKe
interval=30
#[dexscreener]
#label=ANIME
#command=/home/kevin/.config/i3blocks/scripts/dexscreener arbitrum 0xbbf3209130df7d19356d72eb8a193e2d9ec5c234
#interval=30
#[dexscreener]
# label=FLT
# CHAIN=ethereum
# PAIR=0x983b92EA1F0A20844466f3E4BB988c1dE145293E
#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
#CHAIN=solana
#PAIR=AtWMAA6T9t8cq8XCccCFPGDNNQYXhScuNuY6WVRi7FKe
#interval=30
# [ticker]
@@ -96,13 +122,10 @@ interval=30
# TICKER=^IXIC
# interval=30
{{ end }}
# ]]] ticker #
# volume/spotify [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
[volume]
interval=once
signal=1
@@ -114,17 +137,16 @@ interval=60
# SHORT_NAME=
# interval=5
[spotify]
# command=python ~/linux-config/configs/i3blocks-scripts/spotify.py
# label=
label=
# label=🎧
# green
# color=#198c19
# aqua
# color=#2d7272
interval=5
{{ end }}
# [spotify]
# # command=python ~/linux-config/configs/i3blocks-scripts/spotify.py
# # label=
# label=
# # label=🎧
# # green
# # color=#198c19
# # aqua
# # color=#2d7272
# interval=5
# ]]] volume/spotify #
@@ -145,35 +167,28 @@ label=
interval=5
{{ end }}
# {{ if eq .chezmoi.hostname "nzxt" }}
# [wifi]
# label=
# instance=wlp4s0
# interval=10
# {{ end }}
# ]]] laptop #
# time [[[ #
[calendar]
interval=30
interval=5
label=
# {{ if eq .chezmoi.hostname "nzxt" }}
# 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
@@ -191,10 +206,9 @@ WIDTH=220
# name [[[ #
[name]
label=
interval=30
{{ end }}
# [name]
# label=
# interval=30
# ]]] name #

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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;

View File

@@ -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

View File

@@ -15,13 +15,17 @@ Ctrl+RIGHT no-osd seek 0.2 exact
Ctrl+LEFT no-osd seek -0.2 exact
Shift+RIGHT no-osd seek 1 exact
Shift+LEFT no-osd seek -1 exact
RIGHT seek 3 exact
LEFT seek -3 exact
RIGHT seek 5 exact
LEFT seek -5 exact
UP seek 10 exact
DOWN seek -10 exact
Shift+UP seek 60 exact
Shift+DOWN seek -60 exact
# zoom
Ctrl+- add video-zoom -0.25
Ctrl+= add video-zoom 0.25
# mark
m revert-seek mark # mark position for revert-seek
Shift+m revert-seek

View File

@@ -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.

View File

@@ -96,8 +96,11 @@ handle_extension() {
jq --color-output '.' "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
# txt)
# cat "${FILE_PATH}" && exit 5
js)
bat "${FILE_PATH}" && exit 5
txt)
bat "${FILE_PATH}" && exit 5
esac
}
@@ -231,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"

View File

@@ -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 #

View File

@@ -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"
#--------------------------------------------

View File

@@ -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]

View File

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

1
dot_qalcrc Normal file
View File

@@ -0,0 +1 @@
decimal comma 1

View File

@@ -1,72 +1,83 @@
[General]
EDITOR = nvim # Use your preferred editor
path_ext = /usr/share/taskopen/scripts
taskbin = task
# BROWSER='xdg-open $FILE &>/dev/null'
BROWSER='firefox'
EDITOR='nvim'
#FILE_CMD='xdg-open'
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
# 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=""
# # 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=""

View File

@@ -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

View File

@@ -57,10 +57,11 @@ autocmd CursorHold * if !bufexists("[Command Line]") | checktime | endif
" commands for file types [[[ "
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
@@ -233,27 +234,8 @@ Plug 'Kevin-Mok/vim-snippets'
Plug 'ervandew/supertab'
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
" easily comment/uncomment lines
Plug 'scrooloose/nerdcommenter'
let g:NERDTrimTrailingWhitespace = 1
let g:NERDSpaceDelims = 1
" add quotes/brackets around chunks of text easily
Plug 'tpope/vim-surround'
nmap S ys
" navigate around file easily and precisely
Plug 'easymotion/vim-easymotion'
map <Space> <Plug>(easymotion-prefix)
" status bar displaying various info about the current buffer
Plug 'vim-airline/vim-airline'
let g:airline_section_c = '%F'
Plug 'vim-airline/vim-airline-themes'
let g:airline_powerline_fonts = 1
let g:airline_theme='supernova'
" continue Markdown lists when started
" arc
@@ -360,6 +342,12 @@ Plug 'mlaursen/vim-react-snippets', { 'branch': 'main' }
Plug 'cristianoliveira/vim-react-html-snippets'
Plug 'jidn/vim-dbml'
" Plug 'FuDesign2008/emoji-snippets.vim'
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 [[[ "
@@ -465,7 +453,7 @@ nnoremap <leader>m :vert Man
" apply normal command to selection
vnoremap <leader>n q:anorm
" turn off autoformat"
nnoremap <leader>na :set spell spelllang=en_us formatoptions=cjMqtvw<CR>
" nnoremap <leader>na :set spell spelllang=en_us formatoptions=cjMqtvw<CR>
nnoremap <leader>nt :NERDTree<CR>
" check if in neovim
nnoremap <leader>nv :echo has('nvim')<CR>

View File

@@ -13,9 +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 &
compton -b
# dunst &
/usr/lib/notification-daemon-1.0/notification-daemon &
picom &
imwheel &
numlockx on &
start-pulseaudio-x11 &
@@ -23,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

View File

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

View File

@@ -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"

View File

@@ -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()

View File

@@ -7,8 +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) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 3-
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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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,15 +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/,//'
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 Executable file
View File

@@ -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

View File

@@ -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") &

View File

@@ -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

5
txt/terminal-art.txt Normal file
View File

@@ -0,0 +1,5 @@
- cmatrix
- pipes.sh
- jp2a
- {pacman,invaders,colors}.sh, c screenfetch, archy, toilet/figlet, doge, etc.
- cbonsai

2438
txt/ubuntu/apt-packages.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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

View File

@@ -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 -