Skip to content

Commit

Permalink
Merge pull request #336 from betterlockscreen/next
Browse files Browse the repository at this point in the history
MR for v4.0.4 release
  • Loading branch information
SebTM committed May 9, 2022
2 parents 5d8b8aa + d200417 commit e6c5530
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 27 deletions.
70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Bug
description: File a bug/issue
labels: ["bug"]
body:
- type: markdown
attributes:
value: Thank you for taking the time to file a bug report. To address this bug as fast as possible, we need some information.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: input
id: os
attributes:
label: Operating system
description: "Which operating system do you use? Please provide the version as well."
placeholder: "Ubuntu 20.04.3 LTS"
validations:
required: true
- type: dropdown
id: installation
attributes:
label: Installation method
description: How did you install Betterlockscreen?
options:
- Package Manager (from OS)
- Install-Script
- Manual (please specify in the description!)
validations:
required: true
- type: textarea
id: betterlockscreen
attributes:
label: Betterlockscreen & Dependency-Versions
description: Please provide the full output of "betterlockscreen -v". For previous versions which do not have this command, please provide the used version(s).
render: shell
value: |
- Betterlockscreen:
- i3lock-color:
- ImageMagick:
- dunst (if used):
- feh (if used):
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Bug description
description: What happened?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Which steps do we need to take to reproduce this error?
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please provide relevant log output (e.g. from journalctl). No need for backticks here.
render: shell
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature Request
description: You have an idea for extending?
labels: ["feature-request"]
body:
- type: markdown
attributes:
value: Thank you for taking the time to share your idea's with us!
- type: textarea
id: feature-request
attributes:
label: Feature Request
description: Whats your idea?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Implementation
description: Can you give us your vision, how you would implement it? (if possible)
- type: dropdown
id: contribute
attributes:
label: Have you planned working on this feature?
options:
- "Yes"
- "No"
validations:
required: true
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Description

Please include a summary of the changes and if applicable which issue it fixes. Please also include relevant motivation and context. If there are changes to the dependencies/min. version-constraints please mention them.

Fixes # (issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

# Checklist:

- [ ] I have performed a self-review of my own code/checked that ShellCheck succeeds
- [ ] I have made corresponding changes to the documentation (if applicable)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :-)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<a href="https://github.com/pavanjadhaw/betterlockscreen/releases"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/pavanjadhaw/betterlockscreen?label=Stable&style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/actions/workflows/main.yml?query=branch%3Amain"><img alt="GitHub Workflow Status (main)" src="https://img.shields.io/github/workflow/status/pavanjadhaw/betterlockscreen/Main/main?label=main&style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/actions/workflows/main.yml?query=branch%3Anext"><img alt="GitHub Workflow Status (next)" src="https://img.shields.io/github/workflow/status/pavanjadhaw/betterlockscreen/Main/next?label=next&style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/milestone/²"><img alt="GitHub milestone" src="https://img.shields.io/github/milestones/progress/pavanjadhaw/betterlockscreen/2?style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/compare/v4.0.3...next"><img alt="GitHub commits since latest release (by date) for a branch" src="https://img.shields.io/github/commits-since/pavanjadhaw/betterlockscreen/v4.0.3/next?style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/milestone/2"><img alt="GitHub milestone" src="https://img.shields.io/github/milestones/progress/pavanjadhaw/betterlockscreen/2?style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/compare/v4.0.4...next"><img alt="GitHub commits since latest release (by date) for a branch" src="https://img.shields.io/github/commits-since/pavanjadhaw/betterlockscreen/v4.0.4/next?style=for-the-badge"></a>
<a href="https://github.com/pavanjadhaw/betterlockscreen/blob/main/LICENSE"><img src="https://img.shields.io/github/license/pavanjadhaw/betterlockscreen.svg?style=for-the-badge"></a>
</div>

Expand Down Expand Up @@ -269,7 +269,7 @@ Resources and more informations:

---

## Countributing
## Contributing

Please see [CONTRIBUTING.md](CONTRIBUTING.md).

Expand Down
45 changes: 24 additions & 21 deletions betterlockscreen
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,6 +19,7 @@ init_config () {
pixel_scale=10,1000
solid_color=333333
description=""
quiet=false
i3lockcolor_bin="i3lock-color"

if ! cmd_exists "$i3lockcolor_bin" && cmd_exists "i3lock"; then
Expand Down Expand Up @@ -64,7 +64,7 @@ init_config () {
fi

# Please make sure to adjust this before release!
VERSION="4.0.3"
VERSION="4.0.4"

# paths
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/betterlockscreen"
Expand Down Expand Up @@ -277,7 +277,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 ;;
Expand All @@ -290,7 +290,7 @@ lockselect() {
esac

echof act "Running postlock..."
postlock &
postlock
}

# calculate adjustments for hidpi displays
Expand All @@ -313,14 +313,8 @@ logical_px() {
# adjust scaling
if [ -n "$dpi" ]; then
local scale
scale=$(echo "scale=2; $dpi / 96.0" | bc)

# check if scaling the value is worthy
if [ "$(echo "$scale > 1.25" | bc -l)" -eq 0 ]; then
echo "$pixels"
else
echo "$scale * $pixels / 1" | bc
fi
scale=$(echo "scale=3; $dpi / 96.0" | bc)
echo "$scale * $pixels / 1" | bc
else
# return the default value if no DPI is set
echo "$pixels"
Expand Down Expand Up @@ -612,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

Expand Down Expand Up @@ -764,14 +758,17 @@ echof() {
error) msgpfx="[\e[1;91m!\e[m]";;
*) msgpfx="";;
esac
echo -e "$msgpfx $message"
[ "$quiet" != true ] && echo -e "$msgpfx $message"
}

# help message
usage() {
echo
echo "Usage: betterlockscreen [-u <PATH>] [-l <EFFECT>] [-w <EFFECT>]"
echo
echo " -q --quiet"
echo " Do not produce any text output on locking"
echo
echo " -u --update <PATH>"
echo " Update lock screen image"
echo
Expand All @@ -790,7 +787,7 @@ usage() {
echo " Scale image to span multiple displays"
echo
echo " --off <N>"
echo " Turn display off after N minutes"
echo " Turn display off after N seconds"
echo
echo " --fx <EFFECT,EFFECT,EFFECT>"
echo " List of effects to generate"
Expand Down Expand Up @@ -828,8 +825,6 @@ usage() {
exit 1
}

echof header "Betterlockscreen"

init_config

# show usage when no arguments passed
Expand All @@ -841,6 +836,12 @@ for arg in "$@"; do
[[ "${arg:0:1}" = '-' ]] || continue

case "$1" in

-q | --quiet)
quiet=true
shift
;;

-u | --update)
runupdate=true
imagepaths+=("$2")
Expand Down Expand Up @@ -959,6 +960,8 @@ for arg in "$@"; do
esac
done

echof header "Betterlockscreen"

# Run image generation
[[ $runupdate ]] && update "${imagepaths[@]}"

Expand All @@ -967,4 +970,4 @@ done
[[ $runlock ]] && lockselect "$lockstyle" && \
{ [[ $runsuspend ]] && systemctl suspend; }

exit 0
exit 0
1 change: 1 addition & 0 deletions examples/betterlockscreenrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ blur_level=1
pixel_scale=10,1000
solid_color=333333
wallpaper_cmd="feh --bg-fill"
quiet=false
# i3lockcolor_bin="i3lock-color" # Manually set command for i3lock-color

# default theme
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'... "
Expand Down

0 comments on commit e6c5530

Please sign in to comment.