aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-04-03 01:18:01 +0300
committerYaroslav <contact@yaroslavps.com>2020-04-03 01:18:01 +0300
commita902076085c48665e62197c3f4465906ccf09f4d (patch)
tree89c4b0efef1dfa7095fcd0ba792897a45a71d739 /dotfiles
parent74456ddfdb8be3d556c16e589c9aeb42eea54d37 (diff)
downloadswayrice-a902076085c48665e62197c3f4465906ccf09f4d.tar.gz
swayrice-a902076085c48665e62197c3f4465906ccf09f4d.zip
lockscreen improvements
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/.config/swaylock/config23
-rw-r--r--dotfiles/.config/waybar/config2
-rwxr-xr-xdotfiles/.local/bin/lock-color84
-rwxr-xr-xdotfiles/.local/bin/setbglblur21
-rwxr-xr-xdotfiles/.local/bin/setbglsimple9
5 files changed, 54 insertions, 85 deletions
diff --git a/dotfiles/.config/swaylock/config b/dotfiles/.config/swaylock/config
index 07de89b..5907f4a 100644
--- a/dotfiles/.config/swaylock/config
+++ b/dotfiles/.config/swaylock/config
@@ -1,5 +1,26 @@
image=~/.config/lockwall.png
-color=#000000
+color=#00000000
+font=BlexMono Nerd Font Mono
+font-size=48
+scaling=fill
indicator-radius=100
show-failed-attempts
+hide-keyboard-layout
inside-color=#00000000
+inside-ver-color=#3f6e90
+inside-wrong-color=#b73030
+inside-clear-color=#a1a6b2cc
+ring-color=#5b8277
+ring-ver-color=#3f6e90
+ring-wrong-color=#b73030
+ring-clear-color=#a1a6b2
+line-color=#434c5e
+line-ver-color=#434c5e
+line-wrong-color=#434c5e
+line-clear-color=#434c5e
+separator-color=#00000000
+key-hl-color=#9eba86
+text-color=#1d2021
+text-ver-color=#1d2021
+text-wrong-color=#1d2021
+text-clear-color=#1d2021
diff --git a/dotfiles/.config/waybar/config b/dotfiles/.config/waybar/config
index 7ec4d73..5debd2e 100644
--- a/dotfiles/.config/waybar/config
+++ b/dotfiles/.config/waybar/config
@@ -1,7 +1,7 @@
{
"layer": "bottom",
- "height": 25,
+ "height": 27,
"modules-left": [
"sway/workspaces",
"sway/mode",
diff --git a/dotfiles/.local/bin/lock-color b/dotfiles/.local/bin/lock-color
index 445d779..0eb8b8d 100755
--- a/dotfiles/.local/bin/lock-color
+++ b/dotfiles/.local/bin/lock-color
@@ -1,86 +1,10 @@
#!/bin/sh
-#B='#00000000' # blank
-#C='#ffffff22' # clear ish
-#D='#b58900ff' # default
-#T='#fcbd00dd' # text
-#W='#880000bb' # wrong
-#V='#fcbd00dd' # verifying
+swaymsg input type:keyboard xkb_switch_layout 0
-B='#00000000' # blank
-C='#ffffff22' # clear ish
-D='#ffffffff' # default
-T='#dac99dff' # text
-W='#880000bb' # wrong
-V='#023982dd' # verifying
-# Approximate timeout rate in milliseconds (checked every 5 seconds).
-timeout="30000"
+swayidle timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
+swaylock
-if [ "$(ps cax | grep sway)" ]; then
- swaylock &
-
- swayidle timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
-
- while [ "$(pgrep -x swaylock)" ]
- do
- sleep 1
- done
-
- pkill -n swayidle
- exit
-fi
-# Take a screenshot:
-#scrot /tmp/screen.png
-
-#cp ~/.config/wall.png /tmp/screen.png
-# Create a blur on the shot:
-#convert /tmp/screen.png -paint 1 -swirl 360 /tmp/screen.png
-#convert /tmp/screen.png -brightness-contrast -20,-20 -paint 1 -noise 0x8 -blur 9,9 /tmp/screen.png
-
-i3lock \
- --layoutcolor=$T \
- --timecolor=$T \
- --datecolor=$T \
- --verifcolor=$T \
- --wrongcolor=$W \
- --keyhlcolor=$V \
- --insidecolor=$B \
- --ringcolor=$T \
- --linecolor=$B \
- --separatorcolor=$D \
- --insidecolor=$B \
- --insidewrongcolor=$B \
- --insidevercolor=$B \
- --color=#000000 \
- --clock \
- --radius=150 \
- --ring-width=5 \
- --timestr="%H:%M:%S" \
- --datestr="%A %e, %b %Y" \
- --veriftext="Verifying..." \
- --wrongtext="Nope!" \
- --noinputtext="BLANK" \
- --time-font=furacodenerdfontmono \
- --date-font=ibmplexsans \
- --timesize=45 \
- --datesize=24 \
-
-# If still locked after $timeout milliseconds, turn off screen.
-while [ "$(pgrep -x i3lock)" ]
-do
- if [ $timeout -lt $(xssstate -i) ]
- then
- xset dpms force off
- fi
- sleep 1
-done
-
-# --blur 7 \
-# --keylayout 2 \
-# --textsize=20
-# --modsize=10
-# --timefont=comic-sans
-# --datefont=monofur
-# etc
+pkill -n swayidle
diff --git a/dotfiles/.local/bin/setbglblur b/dotfiles/.local/bin/setbglblur
index 8a3d51b..b0c55bc 100755
--- a/dotfiles/.local/bin/setbglblur
+++ b/dotfiles/.local/bin/setbglblur
@@ -2,7 +2,22 @@
vertical=$(swaymsg -t get_outputs | jq ".[0].current_mode.height")
horizontal=$(swaymsg -t get_outputs | jq ".[0].current_mode.width")
+scale=$(swaymsg -t get_outputs | jq ".[0].scale")
+barheight=$(echo ""$scale" * 27" | bc -l)
-convert $1 -resize ${horizontal}x${vertical}\> ~/.config/lockwall.png
-convert ~/.config/lockwall.png -brightness-contrast -20,-20 -paint 1 -noise 0x8 -blur 9,9 ~/.config/lockwall.png
-convert ~/.config/lockwall.png ~/.config/lock.png -gravity center -composite ~/.config/lockwall.png
+convert $1 -resize "$horizontal"x"$vertical" ~/.config/lockwall.png
+convert ~/.config/lockwall.png \
+ -brightness-contrast -20,-20 \
+ -paint 1 \
+ -noise 0x8 \
+ -blur 9,9 \
+ -background "#00000000" \
+ -gravity North \
+ -chop 0x"$barheight" \
+ -gravity South \
+ -extent "$horizontal"x"$vertical" \
+ ~/.config/lockwall.png
+convert ~/.config/lockwall.png ~/.config/lock.png \
+ -gravity center \
+ -composite \
+ ~/.config/lockwall.png
diff --git a/dotfiles/.local/bin/setbglsimple b/dotfiles/.local/bin/setbglsimple
index 51ac5ba..dacd9c8 100755
--- a/dotfiles/.local/bin/setbglsimple
+++ b/dotfiles/.local/bin/setbglsimple
@@ -2,6 +2,15 @@
vertical=$(swaymsg -t get_outputs | jq ".[0].current_mode.height")
horizontal=$(swaymsg -t get_outputs | jq ".[0].current_mode.width")
+scale=$(swaymsg -t get_outputs | jq ".[0].scale")
+barheight=$(echo ""$scale" * 28" | bc -l)
convert $1 -resize ${horizontal}x${vertical}\> ~/.config/lockwall.png
+convert ~/.config/lockwall.png \
+ -background "#00000000" \
+ -gravity North \
+ -chop 0x"$barheight" \
+ -gravity South \
+ -extent "$horizontal"x"$vertical" \
+ ~/.config/lockwall.png
convert ~/.config/lockwall.png ~/.config/lock.png -gravity center -composite ~/.config/lockwall.png