From e65c0b0ab8f299183ba74d183eecf379a11d2ffe Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Fri, 3 Oct 2025 11:32:23 +0200 Subject: add: lock & polybar --- scripts/lock.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 scripts/lock.sh (limited to 'scripts/lock.sh') diff --git a/scripts/lock.sh b/scripts/lock.sh new file mode 100755 index 0000000..11e2c1b --- /dev/null +++ b/scripts/lock.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +greet() { + hour=$(date +%H) + case $hour in + 0[6-9]|1[01]) + echo "Bonjour" ;; + 12) + echo "Bon appétit" ;; + 1[3-8]) + echo "Bonne après-midi" ;; + 19|2[0-3]) + echo "Bonsoir" ;; + *) + echo "Bonne nuit" ;; + esac +} + +i3lock --image=/home/marcellus/img/lockscreen.png\ + --force-clock\ + --greeter-text="$(greet)"\ + --date-str="%A %d %B %Y"\ + --greeter-color=6A9589FF\ + --time-color=6A9589FF\ + --date-color=6A9589FF\ + --keyhl-color=6A9589DF\ + --bshl-color=7E9CD8DF\ + --greeter-font=tintin\ + --time-font=tintin\ + --date-font=tintin\ + --ind-pos="w/2:((3*h) / 4) - 40"\ + --time-pos="w/2:40+h/4"\ + --date-pos="tx:ty+40"\ + --time-size=80\ + --date-size=30\ + --custom-key-commands\ + --cmd-brightness-up "bright up"\ + --cmd-brightness-down "bright down"\ + --cmd-audio-mute "pamixer -t"\ + --cmd-volume-up "pamixer -i 5"\ + --cmd-volume-down "pamixer -d 5"\ + --bar-indicator\ + --bar-cava-style\ + --bar-cava-decay 0.6\ + --bar-orientation=horizontal\ + --bar-direction=1\ + --bar-count 70\ + --bar-max-height 350\ + --bar-pos="y:h"\ + --bar-periodic-step 20\ + --bar-base-width 10\ + --bar-step 5 -- cgit v1.2.3