Compare commits
merge into: Kevin-Mok:master
Kevin-Mok:arch-2
Kevin-Mok:aws
Kevin-Mok:master
Kevin-Mok:red-hat-laptop
Kevin-Mok:single-screen
Kevin-Mok:ubuntu
pull from: Kevin-Mok:ubuntu
Kevin-Mok:arch-2
Kevin-Mok:aws
Kevin-Mok:master
Kevin-Mok:red-hat-laptop
Kevin-Mok:single-screen
Kevin-Mok:ubuntu
5 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Kevin Mok |
720e104f55
|
Dexscreener MC
|
4 days ago |
Kevin Mok |
aef13d7f26
|
AVAX first 3 digits
|
4 days ago |
Kevin Mok |
85fb63208d
|
Git signing key, volume i3block spacing
|
4 days ago |
Kevin Mok | 6f8c0b08d7 |
Tickers color scheme
|
4 days ago |
Kevin Mok | 5c098bd26d |
Basic i3 setup
|
5 days ago |
23 changed files with 335 additions and 95 deletions
-
15aliases/key_aliases.tmpl
-
5aliases/key_dirs.tmpl
-
8dot_Xmodmap-ubuntu
-
115dot_config/fish/completions/pass.fish
-
13dot_config/fish/config.fish.tmpl
-
15dot_config/i3/config.tmpl
-
26dot_config/i3blocks/i3blocks-secondary.conf.tmpl
-
52dot_config/i3blocks/i3blocks.conf.tmpl
-
3dot_config/i3blocks/scripts/executable_calendar
-
3dot_config/i3blocks/scripts/executable_dexscreener
-
6dot_config/i3blocks/scripts/executable_dexscreener-mc
-
3dot_config/i3blocks/scripts/executable_kraken
-
6dot_config/i3blocks/scripts/executable_spotify
-
10dot_config/mimeapps.list
-
4dot_gitconfig.tmpl
-
2private_dot_gnupg/gpg-agent.conf
-
3scripts/executable_backup-pc
-
18scripts/executable_dexscreener
-
24scripts/executable_dexscreener-mc
-
29scripts/executable_kraken
-
34scripts/executable_spotify-now
-
6txt/exclude-dirs-backup.txt.tmpl
@ -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 |
@ -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)' |
@ -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" |
@ -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" |
@ -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" |
@ -0,0 +1,2 @@ |
|||||
|
default-cache-ttl 86400 |
||||
|
max-cache-ttl 86400 |
@ -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 |
||||
|
|
||||
|
|
@ -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 |
||||
|
|
||||
|
|
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue