From 184cebcfebca207fd8367d251ce0d6521b434fa8 Mon Sep 17 00:00:00 2001 From: primardj Date: Mon, 22 Jan 2024 18:40:27 +0000 Subject: [PATCH] merge both image-lock.sh and image-lock-sleep.sh in swaylock-script --- swaylock-script | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/swaylock-script b/swaylock-script index 413a3d3..d95572d 100755 --- a/swaylock-script +++ b/swaylock-script @@ -10,7 +10,7 @@ PARAMETTER -h, --help Print this help message and quit -v, --version Print the version and quit --sleep Launch the script without waiting anytime - --swaylock-effects Lauch the swaylock effects options. + --swaylock-only Lauch the locker with swaylock original options. " for i in $@; do @@ -23,6 +23,43 @@ for i in $@; do echo "swaylock-script $Version" exit 0 ;; + "--sleep") + sleep_flag="set" + ;; + "--swaylock-only") + sw_effects="set" + ;; esac done +option_sw_effects="-f \ + --screenshots \ + --clock \ + --indicator \ + --indicator-radius 200 \ + --indicator-thickness 10 \ + --inside-color 000000BB \ + --effect-vignette 0.6:1 \ + --effect-blur 3x5 \ + --ring-color ff7f50 \ + --separator-color 000000ff" + + +option_sw="" + +if [ "${sleep_flag}" == "set" ] +then + option_sw_effects="${option_sw_effects} \ + --fade-in 4" + # no options_sw because I hadden't had time to add them. +fi + +if [ "${sw_effects}" == "set" ] +then + swaylock ${option_sw} + echo "ici" +else + swaylock ${option_sw_effects} +fi + +