From 20f80bdd8c3ca50b54f799cef067bef0a208aee0 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Tue, 25 Mar 2025 16:24:54 -0400 Subject: [PATCH] Hevin screensaver on one monitor --- aliases/key_aliases.tmpl | 20 ++++++---- aliases/key_dirs.tmpl | 14 ++++--- dot_config/fish/config.fish.tmpl | 2 + dot_config/fish/functions/bc-qalc.fish | 8 ++++ dot_config/fish/functions/taskopen-new.fish | 3 ++ dot_config/i3/config.tmpl | 10 ++--- dot_config/neofetch/config.conf | 4 +- dot_config/ranger/rc.conf.tmpl | 3 ++ dot_config/ranger/rifle.conf | 1 + dot_taskrc | 5 ++- scripts/executable_dual-monitor-slideshow | 41 +++++++++++++++++++++ scripts/executable_kraken | 3 +- 12 files changed, 91 insertions(+), 23 deletions(-) create mode 100644 dot_config/fish/functions/bc-qalc.fish create mode 100644 dot_config/fish/functions/taskopen-new.fish create mode 100755 scripts/executable_dual-monitor-slideshow diff --git a/aliases/key_aliases.tmpl b/aliases/key_aliases.tmpl index ae2b7b5..d6763c7 100644 --- a/aliases/key_aliases.tmpl +++ b/aliases/key_aliases.tmpl @@ -357,7 +357,8 @@ am "antimicro" # task [[[ # a "task" -aa "task add proj:anp" +#aa "task add proj:anp" +aa "task add proj:sniper" aan "task add" aal "task add proj:lnx" aap "task add proj:" @@ -371,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" @@ -485,7 +486,7 @@ pipes "pipes.sh -t 3" pcp "pycp" pmv "pymv" py "python" -q "qalc '" +#q "qalc '" #qe "qalc -e '1USD to CAD'" qg "qalculate-gtk" r "ranger" @@ -938,8 +939,7 @@ mm "printf '\033c' && bear make clean move_mouse_with_head && ./move_mouse_with_ #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 # @@ -1062,13 +1062,17 @@ ttle "timetrace start leetcode@job" ts "npx tsc" njs "node src/download-json.js" -xi "npx ts-node src/index.ts" -xs "npx ts-node src/sync.ts" +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 "nodemon --exec tsx src/server.ts" +xsv "npx nodemon --exitcrash --exec tsx src/server.ts" cl "npx ts-node src/cli.ts list-nfts -p 5 -t 100" clw "watch npx ts-node src/cli.ts list-nfts -p 5 -t 100" +vp "vercel --prod" # ]]] work # diff --git a/aliases/key_dirs.tmpl b/aliases/key_dirs.tmpl index 081f409..406a040 100644 --- a/aliases/key_dirs.tmpl +++ b/aliases/key_dirs.tmpl @@ -282,12 +282,14 @@ anb ~/coding/ai-nft-proj/backend anf ~/coding/ai-nft-proj/frontend tt ~/coding/try-eliza-twitter-client -me ~/coding/me-sniper -mef ~/coding/me-sniper-fe -med ~/coding/me-sniper-discord -me2 ~/coding/me-sniper-2 - -mu ~/coding/stakemetrix +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 # diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index 0f1d5bd..b5411de 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -203,6 +203,7 @@ abbr adr "task-due-rm" 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" @@ -272,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 ''" diff --git a/dot_config/fish/functions/bc-qalc.fish b/dot_config/fish/functions/bc-qalc.fish new file mode 100644 index 0000000..74363c4 --- /dev/null +++ b/dot_config/fish/functions/bc-qalc.fish @@ -0,0 +1,8 @@ +#function bc-qalc + #echo "scale=4; $argv[1]" | bc +#end +function bc-qalc + set -l expression "scale=4; $argv[1]" + set -l result (echo "$expression" | bc -l) + python3 -c "print(f'{float($result):,}')" +end \ No newline at end of file diff --git a/dot_config/fish/functions/taskopen-new.fish b/dot_config/fish/functions/taskopen-new.fish new file mode 100644 index 0000000..0149f27 --- /dev/null +++ b/dot_config/fish/functions/taskopen-new.fish @@ -0,0 +1,3 @@ +function taskopen-new + echo "md" | taskopen -A $argv[1] && taskopen -A $argv[1] +end \ No newline at end of file diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index ae2e032..62daa6d 100755 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -21,10 +21,9 @@ exec wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/editi # exec --no-startup-id i3-msg 'workspace $ws1; exec $term' # exec --no-startup-id i3-msg 'workspace $ws2; exec $term -e fish -c "tmux-attach fortnite"' exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' -exec --no-startup-id i3-msg 'workspace $ws3; exec chrome' # 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 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' @@ -33,11 +32,12 @@ exec --no-startup-id i3-msg workspace $ws6; exec discord # applications [[[ # set $mod Mod1 -set $browser "firefox" +#set $browser "firefox" +set $browser "google-chrome" #set $browser_secondary "chromium" -set $browser_secondary "google-chrome-stable" +#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" diff --git a/dot_config/neofetch/config.conf b/dot_config/neofetch/config.conf index 883f9f9..dc90e8c 100755 --- a/dot_config/neofetch/config.conf +++ b/dot_config/neofetch/config.conf @@ -336,8 +336,8 @@ public_ip_host="http://ident.me" # disk_show=('/'): # 'Disk (/): 74G / 118G (66%)' # -# disk_show=('/' '/home' '/mnt/linux-files' ) -disk_show=('/dev/sdc1' '/dev/sdc3' '/dev/sdd1' ) + disk_show=('/' '/home' '/mnt/linux-files-2' ) +#disk_show=('/dev/sda1' '/dev/sdaf' '/dev/sdd1' ) # Disk subtitle. # What to append to the Disk subtitle. diff --git a/dot_config/ranger/rc.conf.tmpl b/dot_config/ranger/rc.conf.tmpl index d9b2bb1..70a06f6 100755 --- a/dot_config/ranger/rc.conf.tmpl +++ b/dot_config/ranger/rc.conf.tmpl @@ -713,4 +713,7 @@ default_linemode devicons set clipboard_program xclip +map tsx set editor nvim +set editor nvim + # ]]] custom # diff --git a/dot_config/ranger/rifle.conf b/dot_config/ranger/rifle.conf index 68121bb..25bbf4c 100755 --- a/dot_config/ranger/rifle.conf +++ b/dot_config/ranger/rifle.conf @@ -110,6 +110,7 @@ ext pl = perl -- "$1" ext rb = ruby -- "$1" ext js = node -- "$1" ext sh = sh -- "$1" +ext tsx = nvim "$@" ext php = php -- "$1" #-------------------------------------------- diff --git a/dot_taskrc b/dot_taskrc index d77087d..0e55291 100644 --- a/dot_taskrc +++ b/dot_taskrc @@ -81,8 +81,11 @@ 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=none +context=sniper # context=home # context=out #context=sch diff --git a/scripts/executable_dual-monitor-slideshow b/scripts/executable_dual-monitor-slideshow new file mode 100755 index 0000000..2f20312 --- /dev/null +++ b/scripts/executable_dual-monitor-slideshow @@ -0,0 +1,41 @@ +#!/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 + +# Directory containing your wallpapers +#set WALLPAPER_DIR ~/Pictures/Screensaver + +## Get a list of monitors +#set MONITORS (xrandr --listmonitors | grep -v 'Monitors:' | awk '{print $4}') + +## Generate blurred lock images for each monitor +#for monitor in $MONITORS + ## Pick a random image for this monitor + #set IMAGE (fdfind -e jpg -e jpeg -e png -e webp . $WALLPAPER_DIR | shuf -n 1) + + ## Generate a blurred version at /tmp/lock-$monitor.png + #convert "$IMAGE" \ + #-resize 1920x1080^ \ + #-gravity center \ + #-extent 1920x1080 \ + #-blur 0x8 \ + #"/tmp/lock-$monitor.png" +#end + +## Build i3lock command for each monitor +#set LOCK_CMD "i3lock-color -n" +#for monitor in $MONITORS + #set LOCK_CMD "$LOCK_CMD --image=/tmp/lock-$monitor.png --screen=$monitor --ignore-empty-password" +#end + +## Execute the lock command +#eval $LOCK_CMD diff --git a/scripts/executable_kraken b/scripts/executable_kraken index 19ecdf4..68bffaa 100755 --- a/scripts/executable_kraken +++ b/scripts/executable_kraken @@ -32,7 +32,8 @@ elif (( $(echo "$price < 100" | bc -l) )); then echo "$price" | tr -d '.' | awk '{print substr($0, 1, 3)}' elif (( $(echo "$price < 1000" | bc -l) )); then echo "$price" | numfmt --grouping | cut -c -3 -#elif (( $(echo "$price < 10000" | bc -l) )); then +elif (( $(echo "$price < 10000" | bc -l) )); then + 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