From 1900cd5b237f0cf31d1de75eca61350ebe73ea60 Mon Sep 17 00:00:00 2001 From: Timo Beckers Date: Fri, 14 Jan 2022 14:39:00 +0100 Subject: [PATCH 1/4] Copyright year 2022, update repository URL --- CONTRIBUTING.md | 2 +- LICENSE | 2 +- betterlockscreen | 5 ++--- install.sh | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0907149..9d3f4ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Thanks to all the amazing people for all your wonderful PRs, issues and ideas, all contributions are welcome! -We are using [next](https://github.com/pavanjadhaw/betterlockscreen/tree/next) as our development-branch and master for the latest stable release. Please provide your pull-requests based on our next-branch. +We are using [next](https://github.com/betterlockscreen/betterlockscreen/tree/next) as our development-branch and master for the latest stable release. Please provide your pull-requests based on our next-branch. For Nix-Users: We provide a nix-shell for development :-) diff --git a/LICENSE b/LICENSE index 1249907..a16fdf3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2021 Pavan Jadhaw, and others (https://github.com/pavanjadhaw/betterlockscreen/graphs/contributors) +Copyright (c) 2017-2022 Pavan Jadhaw, and others (https://github.com/betterlockscreen/betterlockscreen/graphs/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/betterlockscreen b/betterlockscreen index ffa9dfe..723c3e9 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -1,8 +1,7 @@ #!/usr/bin/env bash -# Author : Copyright (c) 2017-2021 Pavan Jadhaw, and others (https://github.com/pavanjadhaw/betterlockscreen/graphs/contributors) -# Github Profile : https://github.com/pavanjadhaw -# Project Repository : https://github.com/pavanjadhaw/betterlockscreen +# Author : Copyright (c) 2017-2022 Pavan Jadhaw, and others (https://github.com/betterlockscreen/betterlockscreen/graphs/contributors) +# Project Repository : https://github.com/betterlockscreen/betterlockscreen cmd_exists () { command -v "$1" >/dev/null diff --git a/install.sh b/install.sh index 8adc691..a7a0e4a 100755 --- a/install.sh +++ b/install.sh @@ -78,7 +78,7 @@ fi BLI_TEMP_DIR=$(mktemp -d) -git clone -b "$VERSION" https://github.com/pavanjadhaw/betterlockscreen "$BLI_TEMP_DIR" &>/dev/null +git clone -b "$VERSION" https://github.com/betterlockscreen/betterlockscreen "$BLI_TEMP_DIR" &>/dev/null cd "$BLI_TEMP_DIR" || exit 1 echof info "Installing Betterlockscreen to '$BL_INSTALL_DIR'... " From 1093ce51e69dcefb2da8f2cbca02f0f8fa11ad40 Mon Sep 17 00:00:00 2001 From: Timo Beckers Date: Fri, 14 Jan 2022 14:43:32 +0100 Subject: [PATCH 2/4] Run prelock and postlock synchronously to avoid race condition As reported in issue #285, running postlock in a subshell and immediately returning from lockselect() has a high chance of hitting `exit 0` before xset and dunstctl get a chance to execute. Run both prelock and postlock synchronously within lockselect(). --- betterlockscreen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/betterlockscreen b/betterlockscreen index ffa9dfe..40d9589 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -278,7 +278,7 @@ postlock() { lockselect() { echof act "Running prelock..." - prelock & + prelock case "$1" in dim) if [ -f "$CUR_L_DIM" ]; then lock "$CUR_L_DIM"; else failsafe; fi ;; @@ -291,7 +291,7 @@ lockselect() { esac echof act "Running postlock..." - postlock & + postlock } # calculate adjustments for hidpi displays From 321b3ebcea3a8b4a5409ddde3c1256979fff1531 Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Tue, 22 Feb 2022 21:27:01 +0100 Subject: [PATCH 3/4] Fix Shellcheck by also quoting the inner variable (reference: https://github-wiki-see.page/m/koalaman/shellcheck/wiki/SC2295) --- betterlockscreen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/betterlockscreen b/betterlockscreen index 723c3e9..47bb3b5 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -606,8 +606,8 @@ update () { local geometry="${dinfo[2]}" read -r -a cols <<< "${geometry//[x+-]/ }" - local position="${geometry#*${cols[1]}}" - local resolution="${geometry%${position}*}" + local position="${geometry#*"${cols[1]}"}" + local resolution="${geometry%"${position}"*}" if [[ $id -eq "$display_on" ]] || [[ "$display_on" -eq 0 ]]; then From 13f46dc1919610ab2dc886604b09eb5248669fc5 Mon Sep 17 00:00:00 2001 From: AVAtar Mod Date: Sun, 27 Feb 2022 13:41:44 +0300 Subject: [PATCH 4/4] Fixes wrong help message for --off --- betterlockscreen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/betterlockscreen b/betterlockscreen index 59e32c2..897fdd9 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -787,7 +787,7 @@ usage() { echo " Scale image to span multiple displays" echo echo " --off " - echo " Turn display off after N minutes" + echo " Turn display off after N seconds" echo echo " --fx " echo " List of effects to generate"