#!/bin/zsh # note: requires i3lock-color which i3lock >/dev/null 2>&1 || { notify-send 'i3lock-color' 'could not find installation of i3lock' } source $HOME/.config/wryn/env.zsh source $DOTWRYN/bin/get-colorscheme-hex ##################################################################### RADIUS=$(xrandr | grep 'connected primary' | sed 's/.* \([0-9]\+\)x.*/\1/' | awk '{print int($1*0.08)}') ARGS=( --ignore-empty-password --force-clock --pass-screen-keys --pass-media-keys --pass-volume-keys --pass-power-keys --verif-text='' --wrong-text='' ) [ $NOBLUR ] && ARGS+=(--color=$(GET_COLORSCHEME_HEX 0)69) || ARGS+=(--blur=11) [ $RADIUS ] && ARGS+=(--radius=$RADIUS) i3lock ${ARGS[@]} \ --insidever-color=$(GET_COLORSCHEME_HEX 6) \ --ringver-color=$(GET_COLORSCHEME_HEX 10) \ --insidewrong-color=$(GET_COLORSCHEME_HEX 1) \ --ringwrong-color=$(GET_COLORSCHEME_HEX 9) \ --inside-color=$(GET_COLORSCHEME_HEX 0) \ --ring-color=$(GET_COLORSCHEME_HEX 2) \ --time-color=$(GET_COLORSCHEME_HEX 7) \ --date-color=$(GET_COLORSCHEME_HEX 15) \ --keyhl-color=$(GET_COLORSCHEME_HEX 11) \ --bshl-color=$(GET_COLORSCHEME_HEX 13) \ || notify-send 'i3lock-color' 'something went wrong; unable to lock' \ ;