Compare commits

...

5 Commits

  1. 15
      aliases/key_aliases.tmpl
  2. 5
      aliases/key_dirs.tmpl
  3. 8
      dot_Xmodmap-ubuntu
  4. 115
      dot_config/fish/completions/pass.fish
  5. 13
      dot_config/fish/config.fish.tmpl
  6. 15
      dot_config/i3/config.tmpl
  7. 26
      dot_config/i3blocks/i3blocks-secondary.conf.tmpl
  8. 52
      dot_config/i3blocks/i3blocks.conf.tmpl
  9. 3
      dot_config/i3blocks/scripts/executable_calendar
  10. 3
      dot_config/i3blocks/scripts/executable_dexscreener
  11. 6
      dot_config/i3blocks/scripts/executable_dexscreener-mc
  12. 3
      dot_config/i3blocks/scripts/executable_kraken
  13. 6
      dot_config/i3blocks/scripts/executable_spotify
  14. 10
      dot_config/mimeapps.list
  15. 4
      dot_gitconfig.tmpl
  16. 2
      private_dot_gnupg/gpg-agent.conf
  17. 3
      scripts/executable_backup-pc
  18. 18
      scripts/executable_dexscreener
  19. 24
      scripts/executable_dexscreener-mc
  20. 29
      scripts/executable_kraken
  21. 34
      scripts/executable_spotify-now
  22. 6
      txt/exclude-dirs-backup.txt.tmpl

15
aliases/key_aliases.tmpl

@ -57,8 +57,9 @@ b "bat"
# ba "bat *" # ba "bat *"
awkp "awk -F',' '{print \$0}'" awkp "awk -F',' '{print \$0}'"
cpr "cp -r" cpr "cp -r"
fdc "fd -i"
fde "fd -e"
fd "fdfind"
fdc "fdfind -i"
fde "fdfind -e"
grep "grep --color=auto -n" grep "grep --color=auto -n"
grpr "grep -r" grpr "grep -r"
rgc "rg -i" rgc "rg -i"
@ -203,8 +204,8 @@ uzl "unzip -l"
# power options [[[ # # power options [[[ #
# s "systemctl suspend"
s "xset dpms force off"
s "systemctl suspend"
#s "xset dpms force off"
# sl "i3lock-fancy && systemctl suspend" # sl "i3lock-fancy && systemctl suspend"
# so "xset dpms force off" # so "xset dpms force off"
xx "exit" xx "exit"
@ -290,6 +291,12 @@ apr "apt remove"
apu "apt upgrade" apu "apt upgrade"
{{ end }} {{ end }}
{{ if eq .linux_os "ubuntu" }}
ai "sudo apt install"
ar "sudo apt remove"
au "sudo apt upgrade"
{{ end }}
# ]]] apt # # ]]] apt #
# ]]] pkg management # # ]]] pkg management #

5
aliases/key_dirs.tmpl

@ -51,7 +51,7 @@ cn ~/coding
drk ~/coding/dark-sky drk ~/coding/dark-sky
ffx ~/linux-config/dot_config/fish/functions ffx ~/linux-config/dot_config/fish/functions
hbd ~/.habitctl hbd ~/.habitctl
ib ~/linux-config/dot_config/i3blocks/scripts
ib ~/linux-config/dot_config/i3blocks
mbd ~/coding/minikube mbd ~/coding/minikube
pig ~/coding/pigallery pig ~/coding/pigallery
mbk ~/coding/minikube-kompose mbk ~/coding/minikube-kompose
@ -72,7 +72,6 @@ ttdr ~/.timetrace/records
tx ~/linux-config/txt tx ~/linux-config/txt
wd ~/.config/watson wd ~/.config/watson
{{ if eq .chezmoi.hostname "nzxt" }}
b1 ~/coding/mf-site/themes/base16 b1 ~/coding/mf-site/themes/base16
2d ~/coding/godot-demos/2d-plat 2d ~/coding/godot-demos/2d-plat
ada ~/coding/ada-mario ada ~/coding/ada-mario
@ -115,8 +114,6 @@ te ~/Pictures/twitch-emotes
# ]]] gaming # # ]]] gaming #
{{ end }}
{{ if eq .chezmoi.hostname "x1-carbon" }} {{ if eq .chezmoi.hostname "x1-carbon" }}
adb ~/coding/ada-mario/build adb ~/coding/ada-mario/build
adm ~/coding/ada-mario/media adm ~/coding/ada-mario/media

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

13
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 LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
set -x GOPATH ~/go 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 $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 /home/kevin/.linuxbrew/bin ~/.fnm/current/bin
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
# Java [[[ # # Java [[[ #
@ -87,6 +87,13 @@ set -x PATH $JAVA_HOME/bin $PATH
# ]]] Java # # ]]] 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 ]]] # system ]]]
# space prompt[[[ # space prompt[[[
@ -117,7 +124,7 @@ set -xU BROWSER "firefox"
set -xU FZF_DEFAULT_COMMAND "find ." set -xU FZF_DEFAULT_COMMAND "find ."
set -x LAPTOP_IP "192.168.0.19" 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 PIXEL_IP "192.168.0.18"
set -x WORK_LAPTOP_IP "kmok@192.168.0.11" set -x WORK_LAPTOP_IP "kmok@192.168.0.11"
@ -138,7 +145,7 @@ set -x FULLNODE_API_INFO wss://api.chain.love
set -x IPAD_IMG 18 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 -x LIBVIRT_DEFAULT_URI qemu:///system

15
dot_config/i3/config.tmpl

@ -33,7 +33,8 @@ exec --no-startup-id i3-msg workspace $ws6; exec discord
set $mod Mod1 set $mod Mod1
set $browser "firefox" set $browser "firefox"
set $browser_secondary "chromium"
#set $browser_secondary "chromium"
set $browser_secondary "google-chrome-stable"
# set $browser "chromium" # set $browser "chromium"
# set $browser_secondary "firefox" # set $browser_secondary "firefox"
set $scripts_path "/home/kevin/scripts" set $scripts_path "/home/kevin/scripts"
@ -83,7 +84,8 @@ bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail &&
bindsym $mod+Mod4+o workspace $ws11; exec obs bindsym $mod+Mod4+o workspace $ws11; exec obs
# bindsym Mod4+p workspace $ws4; exec pgadmin3 # bindsym Mod4+p workspace $ws4; exec pgadmin3
# bindsym Mod4+p exec pycharm # 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+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+$mod+p exec notify-send "ping" "$(ping -c 3 -W 1 8.8.8.8)"
# bindsym Mod4+q exec qdirstat # bindsym Mod4+q exec qdirstat
@ -334,6 +336,9 @@ set $secondary "DVI-I-1"
set $main "HDMI-0" set $main "HDMI-0"
{{ end }} {{ end }}
set $secondary "DVI-I-1"
set $main "HDMI-0"
# workspace $ws1 output $main # workspace $ws1 output $main
workspace $ws1 output $secondary workspace $ws1 output $secondary
bindsym $mod+F1 workspace $ws1; exec $term bindsym $mod+F1 workspace $ws1; exec $term
@ -394,7 +399,7 @@ bindsym $mod+Mod4+F5 workspace $ws5; exec firefox -P nft
# bindsym $mod+Mod4+F5 workspace $ws5; exec firefox --private-window # bindsym $mod+Mod4+F5 workspace $ws5; exec firefox --private-window
bindsym Control+Shift+F5 workspace $ws5; exec firefox -P work bindsym Control+Shift+F5 workspace $ws5; exec firefox -P work
bindsym Mod4+f workspace $ws5; exec firefox --private-window google.ca 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 stacking; exec $term -e steam
# bindsym Mod4+g workspace $ws5; layout tabbed; exec gimp # bindsym Mod4+g workspace $ws5; layout tabbed; exec gimp
# bindsym Mod4+g workspace $ws5; exec mgba-qt # bindsym Mod4+g workspace $ws5; exec mgba-qt
@ -614,8 +619,8 @@ bar {
font pango:$sb_font 18 font pango:$sb_font 18
{{ else }} {{ 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 20
font pango:$sb_font 18
{{ end }} {{ end }}
# output $main # output $main
i3bar_command i3bar -t i3bar_command i3bar -t

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

@ -19,35 +19,34 @@ color=#cbe4ff
# sys.monitoring [[[ # # sys.monitoring [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
[temperature] [temperature]
label= label=
interval=5 interval=5
[cpu_usage] [cpu_usage]
label= label=
interval=2
interval=5
[memory] [memory]
label= label=
# color=#3da061 # color=#3da061
interval=2 interval=2
{{ end }}
# ]]] sys.monitoring # # ]]] sys.monitoring #
# volume/spotify [[[ # # 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=🎧 # # label=🎧
# # green # # green
# # color=#198c19 # # color=#198c19
# # aqua # # aqua
# # color=#2d7272 # # color=#2d7272
# interval=5
interval=5
# [spotify] # [spotify]
# label= # label=
@ -67,16 +66,13 @@ interval=60
[calendar] [calendar]
interval=30 interval=30
label= label=
# {{ if eq .chezmoi.hostname "nzxt" }}
# DATEFMT=+%H:%M.%a-%m-%d # DATEFMT=+%H:%M.%a-%m-%d
# {{ else }}
# DATEFMT=+%H:%M # DATEFMT=+%H:%M
# {{ end }}
DATEFMT=+%H:%M
#DATEFMT=+%H:%M
# SHORTFMT=+%H:%M:%S # 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 # # ]]] time #

52
dot_config/i3blocks/i3blocks.conf.tmpl

@ -15,8 +15,6 @@ color=#cbe4ff
# ticker [[[ # # ticker [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
# [ticker] # [ticker]
# label=SOL  # label=SOL 
# TICKER=SOL-USD # TICKER=SOL-USD
@ -39,7 +37,9 @@ color=#cbe4ff
[kraken] [kraken]
label=BTC label=BTC
TICKER=BTCUSDC
#TICKER=BTCUSDC
#command=/home/kevin/.config/i3blocks/scripts/kraken BTCUSDC
command=/home/kevin/.config/i3blocks/scripts/kraken BTCUSDC
interval=30 interval=30
# [ticker] # [ticker]
@ -49,7 +49,8 @@ interval=30
[kraken] [kraken]
label=SOL label=SOL
TICKER=SOLUSD
#TICKER=SOLUSD
command=/home/kevin/.config/i3blocks/scripts/kraken SOLUSD
interval=30 interval=30
# [kraken] # [kraken]
@ -59,25 +60,34 @@ interval=30
[dexscreener] [dexscreener]
label=PIXL label=PIXL
CHAIN=ethereum
PAIR=0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
#CHAIN=ethereum
#PAIR=0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
command=/home/kevin/.config/i3blocks/scripts/dexscreener ethereum 0x31c0ba10e4e12be6cdceb612e5e829d977532bfc
interval=30
[dexscreener-mc]
label=TRUMP
command=/home/kevin/.config/i3blocks/scripts/dexscreener-mc solana a8nphpcjqtqhdquk35uj9hy2ysgxfkczgunwvkd3k7vc
interval=30 interval=30
[kraken] [kraken]
label=ETH label=ETH
TICKER=ETHUSDC
#TICKER=ETHUSDC
command=/home/kevin/.config/i3blocks/scripts/kraken ETHUSDC
interval=30 interval=30
[dexscreener] [dexscreener]
label=PENGU label=PENGU
CHAIN=solana
PAIR=B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
#CHAIN=solana
#PAIR=B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
command=/home/kevin/.config/i3blocks/scripts/dexscreener solana B4Vwozy1FGtp8SELXSXydWSzavPUGnJ77DURV2k4MhUV
interval=5 interval=5
[kraken]
label=AVAX
TICKER=AVAXUSD
interval=30
#[kraken]
#label=AVAX
##TICKER=AVAXUSD
#command=/home/kevin/.config/i3blocks/scripts/kraken AVAXUSD
#interval=30
#[dexscreener] #[dexscreener]
#label=LOCK #label=LOCK
@ -95,13 +105,10 @@ interval=30
# TICKER=^IXIC # TICKER=^IXIC
# interval=30 # interval=30
{{ end }}
# ]]] ticker # # ]]] ticker #
# volume/spotify [[[ # # volume/spotify [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
[volume] [volume]
interval=once interval=once
signal=1 signal=1
@ -123,7 +130,6 @@ interval=60
# # aqua # # aqua
# # color=#2d7272 # # color=#2d7272
# interval=5 # interval=5
{{ end }}
# ]]] volume/spotify # # ]]] volume/spotify #
@ -144,12 +150,10 @@ label=
interval=5 interval=5
{{ end }} {{ end }}
# {{ if eq .chezmoi.hostname "nzxt" }}
# [wifi] # [wifi]
# label= # label=
# instance=wlp4s0 # instance=wlp4s0
# interval=10 # interval=10
# {{ end }}
# ]]] laptop # # ]]] laptop #
@ -158,21 +162,16 @@ interval=5
[calendar] [calendar]
interval=5 interval=5
label= label=
# {{ if eq .chezmoi.hostname "nzxt" }}
# DATEFMT=+%H:%M # DATEFMT=+%H:%M
# {{ else }}
# DATEFMT=+%H:%M.%a-%m-%d # DATEFMT=+%H:%M.%a-%m-%d
# {{ end }}
DATEFMT=+%H:%M.%a-%m-%d
# SHORTFMT=+%H:%M:%S # SHORTFMT=+%H:%M:%S
HEIGHT=180
WIDTH=220
#HEIGHT=180
#WIDTH=220
# ]]] time # # ]]] time #
# sys.monitoring [[[ # # sys.monitoring [[[ #
{{ if eq .chezmoi.hostname "nzxt" }}
# [temperature] # [temperature]
# label= # label=
# interval=5 # interval=5
@ -193,7 +192,6 @@ WIDTH=220
# [name] # [name]
# label= # label=
# interval=30 # interval=30
{{ end }}
# ]]] name # # ]]] name #

3
dot_config/i3blocks/scripts/executable_calendar

@ -2,7 +2,8 @@
WIDTH=${WIDTH:-200} WIDTH=${WIDTH:-200}
HEIGHT=${HEIGHT:-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"} SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
OPTIND=1 OPTIND=1

3
dot_config/i3blocks/scripts/executable_dexscreener

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
. "/home/kevin/.cache/wal/colors.sh" . "/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" 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 #!/bin/bash
. "/home/kevin/.cache/wal/colors.sh" . "/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" printf "%s\n\n%s\n" "$ticker" "$color7"

6
dot_config/i3blocks/scripts/executable_spotify

@ -9,6 +9,8 @@ case "$BLOCK_BUTTON" in
esac esac
. "/home/kevin/.cache/wal/colors.sh" . "/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" printf "$long_title\n$short_title\n%s\n" "$color7"

10
dot_config/mimeapps.list

@ -1,9 +1,9 @@
[Default Applications] [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=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/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop application/x-extension-htm=firefox.desktop

4
dot_gitconfig.tmpl

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

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 ) x1 )
backup_dest="$mount_dir/laptop" backup_dest="$mount_dir/laptop"
;; ;;
ubuntu )
backup_dest="$mount_dir/ubuntu"
;;
esac esac
exclude_dirs_list="/home/kevin/txt/exclude-dirs-backup.txt" exclude_dirs_list="/home/kevin/txt/exclude-dirs-backup.txt"
exclude_dirs_list_full="/home/kevin/txt/exclude-dirs-backup-full.txt" exclude_dirs_list_full="/home/kevin/txt/exclude-dirs-backup-full.txt"

18
scripts/executable_dexscreener

@ -7,12 +7,22 @@ price=$(echo "$raw" | jq -r ".pairs | .[] | .priceUsd")
# printf "%0.4f\n" "$price" | cut -c 4- # printf "%0.4f\n" "$price" | cut -c 4-
# elif (( $(echo "$price < .1" | bc -l) )); then # elif (( $(echo "$price < .1" | bc -l) )); then
# printf "%0.3f\n" "$price" | cut -c 4- # 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- 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- 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- 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" printf "%0.2f\n" "$price"
fi 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

29
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]") # 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") raw=$(curl -s "https://api.kraken.com/0/public/Ticker?pair=$1")
# echo $raw # echo $raw
@ -6,17 +8,32 @@ if [ "$1" = "BTCUSDC" ]; then
else else
price=$(echo "$raw" | jq -r ".result.$1.b[0]") price=$(echo "$raw" | jq -r ".result.$1.b[0]")
fi 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 if (( $(echo "$price < 1" | bc -l) )); then
printf "%0.3f\n" "$price" | cut -c 3- printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 10" | bc -l) )); then elif (( $(echo "$price < 10" | bc -l) )); then
printf "%0.3f\n" "$price" | cut -c 3- 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 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 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" | cut -c -3 echo "$price" | cut -c -3
elif (( $(echo "$price > 100000" | bc -l) )); then
echo "$price" | numfmt --grouping | cut -c -3
fi 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

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

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