Giter Site home page Giter Site logo

betterlockscreen / betterlockscreen Goto Github PK

View Code? Open in Web Editor NEW
2.4K 21.0 177.0 7.91 MB

🍀 sweet looking lockscreen for linux system

License: MIT License

Shell 98.23% Nix 1.77%
i3lock i3lock-color i3wm feh lockscreen lockscreen-background betterlockscreen linux hacktoberfest

betterlockscreen's Introduction

BLS-Logo

Betterlockscreen

fast and sweet looking lockscreen for linux systems with effects!

GitHub release (latest by date including pre-releases) GitHub release (latest by date) GitHub Workflow Status (main) GitHub Workflow Status (next) GitHub milestone GitHub commits since latest release (by date) for a branch

You want to support us?


GitHub Repo stars GitHub forks


scrot2

Table of Contents

About

Most of i3lock wrapper-scripts out there take an image, add some effect(s) then lock with the modified image as locker-background. Overall experience doesn't feel natural given delay of 2-3 seconds.

Who would like a delay of 2-3 seconds while locking screen?

So Betterlockscreen was my attempt to solve this problem, as we dont need to change lockscreen background frequently this script caches images with effect so overall experience is simple and as fast as native i3lock.

How it works

The script takes a directory or image, adds various effects and caches the images in special directory. Those cached images will be used as locker-background depending on configuration provided by user.

System Requirements

Note: Make sure your system has all dependencies satisfied

Installation

Package Manager

Packaging status

Betterlockscreen is available via package manager on some linux-distributions, if you miss your favorite one you can follow along with our installation-script or manual-installation.

If you are using Arch Linux, you can install the AUR package betterlockscreen to get the latest version, or betterlockscreen-git for the most up-to-date (unstable) changes.

If you are using Gentoo Linux, you can install betterlockscreen from Gentoo's GURU overlay using emerge x11-misc/betterlockscreen.

If you are using NixOS, betterlockscreen is available in both the stable and unstable channels and can be installed using nix-env -iA nixos.betterlockscreen.

If you are using Void Linux, you can install betterlockscreen using xbps-install -S betterlockscreen.

Installation Script

We have created an automatic install-script for Betterlockscreen. The script is very simple and takes three parameters:

  • <install-mode>: (string) 'user' installs to '~/.local/bin/', 'system' installs to '/usr/local/bin'
  • [<version>]: (string) defaults to 'latest' which will determinate the latest tag from git or specified branch/tag
  • [<systemd-service>]: (boolean) defaults to 'false' - Whether to copy and enable system-service.

For system-installation:

wget https://raw.githubusercontent.com/betterlockscreen/betterlockscreen/main/install.sh -O - -q | sudo bash -s system

For user-installation:

wget https://raw.githubusercontent.com/betterlockscreen/betterlockscreen/main/install.sh -O - -q | bash -s user

Manual Installation

Ỳou can download the latest release here, please ensure to fullfill the system-requirements!

You will need to copy "betterlockscreen" to you desired binary-directory, if you want to use the systemd-service you will need to copy the service-file from "system/" to the desired location on your system.

Example (Ubuntu):

wget https://github.com/betterlockscreen/betterlockscreen/archive/refs/heads/main.zip
unzip main.zip

cd betterlockscreen-main/
chmod u+x betterlockscreen
cp betterlockscreen /usr/local/bin/

cp system/[email protected] /usr/lib/systemd/system/
systemctl enable betterlockscreen@$USER

Configuration

You can customize Betterlockscreen for your needs, copy the config file from the examples-directory to the user-configuration directory ~/.config/betterlockscreen/ and edit it accordingly.

mkdir -p ~/.config/betterlockscreen/
cp /usr/share/doc/betterlockscreen/examples/betterlockscreenrc ~/.config/betterlockscreen/

If no configuration-file is found, then the default configurations (which is equal to the example but hardcoded) will be used.

Custom script's on pre/post-lock

If present in user-configuration directory (see above) the "custom-(pre|post).sh" gets sourced at the appropriate time. This can be used to pause notification (not needed for dunst!), switch keyboard-layout on pre/post-lock etc.

Usage

Run betterlockscreen and point it to either a directory (betterlockscreen -u "path/to/dir") or an image (betterlockscreen -u "/path/to/img.jpg") and that's all. betterlockscreen will change update its cache with image you provided.

Usage: betterlockscreen [-u <PATH>] [-l <EFFECT>] [-w <EFFECT>]

  -u --update <PATH>
      Update lock screen image

  -l --lock <EFFECT>
      Lock screen with cached image

  -w --wall <EFFECT>
      Set wallpaper with cached image

Additional arguments:

  --display <N>
      Set display to draw loginbox

  --span
      Scale image to span multiple displays

  --off <N>
      Turn display off after N seconds

  --fx <EFFECT,EFFECT,EFFECT>
      List of effects to apply

  -- <ARGS>
      Pass following arguments to i3lock

Effects arguments:

  --dim <N>
      Dim image N percent (0-100)

  --blur <N>
      Blur image N amount (0.0-1.0)

  --pixel <N,N>
      Pixelate image with N shrink and N grow (unsupported)

  --color <HEX>
      Solid color background with HEX

Examples

  1. Update image cache with random image betterlockscreen -u ~/Wallpapers

  2. Update image cache with only dim and pixel effects betterlockscreen -u ~/Wallpapers/image.png --fx dim,pixel

  3. Update image cache with random image, multiple monitors, login on 1, spanning betterlockscreen -u ~/Wallpapers/Dual/ --display 1 --span

  4. Update image cache with solid background only (ignore errors) betterlockscreen -u . --fx color --color 5833ff

  5. Update image cache with different background images betterlockscreen -u ~/Wallpapers/image1.png -u ~/Wallpapers/image2.png

  6. Lock screen with blur effect betterlockscreen --lock blur

  7. Lock screen with multiple monitors, spanning betterlockscreen -l dimblur --display 1 --span

AwesomeWM - naughty

It has been discovered that the integrated notification-system "naughty" which is included and enabled by default, causes issue with dunst when running parallel.

If dunst is not installed, there should be no issue, if dunst is installed (even not running) our integration will try to pause dunst on lock/resume on unlock, which lead to a DBus reply timeout.

To fix this, please add the following line to your rc.lua:

package.loaded["naughty.dbus"] = {}

Source: #284 (thanks to @nullbyto), awesomeWM/awesome#1285

Background

Add this line to .xinitrc.

# set desktop background with custom effect
betterlockscreen -w dim

# Alternative (set last used background)
source ~/.fehbg

i3wm

Add this line to ~/.config/i3/config

# set desktop background with custom effect
exec --no-startup-id betterlockscreen -w dim

# Alternative (set last used background)
exec --no-startup-id source ~/.fehbg

Keybindings

To lockscreen using keyboard shortcut

i3wm

Add this line to your ~/.config/i3/config

bindsym $mod+shift+x exec betterlockscreen -l dim

bspwm

Add this line to your ~/.config/sxhkd/sxhkdrc

# lockscreen
alt + shift + x
    betterlockscreen -l dim

Systemd-Service: Lockscreen after sleep/suspend

# move service file to proper dir (the aur package does this for you)
cp [email protected] /usr/lib/systemd/system/

# enable systemd service
systemctl enable betterlockscreen@$USER

# disable systemd service
systemctl disable betterlockscreen@$USER

# Note: Now you can call systemctl suspend to suspend your system
# and betterlockscreen service will be activated
# so when your system wakes your screen will be locked.

Hint: The systemd-unit expects betterlockscreen to be installed in "/usr/local/bin", so maybe you want to check or change this!

Resources and more informations:

Contributing

Please see CONTRIBUTING.md.

License

Betterlockscreen is under MIT license.

Feel free to use and distribute

  • Hat tip to anyone who's code was used
  • Thanks to those who contributed to make it better
  • Inspiration - r/unixporn

Supported by

JetBrains Logo (Main) logo

betterlockscreen's People

Contributors

123vivekr avatar aicaya avatar alexozer avatar andrhua avatar atagen avatar autplayed avatar avatarmod avatar bjarkt avatar chapeupreto avatar duncan-f avatar ettom avatar funemy avatar jeffmhubbard avatar lelio-brun avatar m1m3-50 avatar monkeypac avatar obynio avatar pavanjadhaw avatar raymo111 avatar rememberyou avatar samyakraj avatar sebtm avatar souravdas142 avatar stevegcarpenter avatar targuinia avatar thetarkus avatar ti-mo avatar twin avatar yurisuki avatar zv0n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

betterlockscreen's Issues

Won't blur image

Hello, I have the following issue.
When I try to set an image as lockscreen background, it sets it and everything works, except for the blur effect, or dim. It doesn't blur/dim the image at all. If I provide an already blurred/dimmed image, it "unblures" it. I use the following line to set image x:

betterlockscreen -u ~/Pictures/wallhaven-618958.jpg -r 1920x1080 -b 0.5

I tried different factors of blur, but it doesn't change at all. Any suggestions?
Martin

Support for other DEs?

I am using i3 & kde.
The script works wonderfully in i3. No issues at all.

However it also almost works perfectly on KDE.
The one issue I face is that during suspend (I've enabled the systemd service), betterlockscreen gets called and on top of that sddm's own lock screen gets called too, leading to 2 lockscreens at a time.
I checked sleep.target.wants/ and suspend.target.wants/: to see if theres any service of sddm there but there isnt.

Is there a way i can disable sddm's lockscreen and/or make kde use betterlockscreen?

updating lock screen background without generating cache?

As of now I have a script that takes a snapshot of my screen before I lock and locks the screen with the snapshot of my screen as the background of the lockscreen. With the -u option, it generates an image cache and it's a bit slow for locking purposes. I was wondering if there is any way to just set the lock screen background without generating a cache. Thanks for your time

Memory leaks

Hello.

Fresh AUR install on fresh Arch. Can it be fixed?

==8157==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1024 byte(s) in 4 object(s) allocated from:
#0 0x7f7d27a1cae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
#1 0x7f7d25edf6ee (/usr/lib/libfontconfig.so.1+0x1f6ee)

Direct leak of 96 byte(s) in 4 object(s) allocated from:
#0 0x7f7d27a1cae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
#1 0x7f7d25eded7e in FcPatternCreate (/usr/lib/libfontconfig.so.1+0x1ed7e)

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
#0 0x7f7d27a1cce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
#1 0x7f7d25edfdd9 (/usr/lib/libfontconfig.so.1+0x1fdd9)

SUMMARY: AddressSanitizer: 1248 byte(s) leaked in 12 allocation(s).

Bug Report and some Helps

I have 3 Issues.
First I want to know if its possible to use xautolock with betterlockscreen and how to, here is the command for i3block:

exec_always --no-startup-id xautolock -time 10 -locker i3lock

How do I write to work in manjaro i3?

exec_always --no-startup-id xautolock -time 10 -locker betterlockscreen -l

The second problem is qutebrowser doesn't reconize the font:
http://i.imgur.com/zMm7pLu.png

The third problem is some kind of security bug, I was using my notebook and when I used the comand:

bindsym s exec --no-startup-id i3exit suspend, mode "default"

I was listening to some music and the command dint kill it, so I was "well, i need to stop the music and then block right?", so I acidentaly pressed enter and the betterlockscreen just released without any password, wtf. I cant reproduce this bug again, so i'm just reporting here.

OS: Manjaro Linux x86_64 ​
Kernel: 4.14.48-2-MANJARO
Bash Urxvt
betterlockscreen 2.0-1

Is there a way to pick on which monitor the lock shows?

I have a two monitor setup, and the lock shows up on the wrong one. (actually it's not wrong, it's showing in the main monitor but I want it to show up in the other monitor.)

Is there a way to specify the monitor it shows on? I hope I explained myself clearly...

Missing dependency versions

The listed dependency i3lock-color has to be rather new (the stable release doesn't work).

It would help if you list the versions of a needed dependency if it's not the stable one.

Thanks

ffmpeg faster than convert (blur)

time convert $in -filter Gaussian -resize "20" -define "filter:sigma=.6" \
-resize "$res" -gravity center -extent "$res" $out

real    0m0.762s
user    0m1.227s
sys     0m0.098s
time ffmpeg -loglevel quiet -y -i $in \
-vf "scale=iw/2:-1, gblur=60, scale=2*iw:-1" $out

real    0m0.343s
user    0m0.370s
sys     0m0.031s

Color

Is there a way to change the color that lights up when you type a character or remove one? I see your script but I'm not sure where it is so I could edit the colors. Thanks c:

Incorrect sizing of clock since latest release

I just updated to the current release (with the AUR package) and my lockscreen looks now like this
screenshot from 2018-04-12 16-13-22
The clock seems to be bigger than before and does not fit the rectangular area anymore.
Do you have any idea on how to fix this?

Duplicate Background

Is there a way to make my laptop duplicate the background while using a second monitor rather than stretching the image awkwardly

Status bar in front of lockscreen

Hi,
I use a monitor with inside a USB hub with attached mouse and keyboard.
When I lock my PC without turn off the monitor everything works fine (see image lck1), however when I turn off the monitor and then turn on again the result is what you can see in the second image (lck2). In my case I'm using polybar as status bar and it come in front of the lockscreen.
I'm using Arch updated today. Betterlockscreen package installed from AUR.

Thank you

lck1
lck2

Feh and betterlockscreen random

Hey. I'm using feh to autoload a new wallpaper eveytime i3 is restared exec_always feh --no-xinerama --bg-scale --randomize ~/.i3/wallpaper/*

How would I automatically add the same wallpaper to betterlockscreen?

Update lockscreen while locked

I propose that the lockscreen image should update when locked if, for example, a service runs betterlockscreen -u image.png whilst locked.

Add Spotify current music

Hi !

As a Spotify fan, I would like to know if there is a way to show the artist and the title on the lockscreen ?
Do I need to try to develop it myself ?

Thanks 😃

lock before sleep script

I'm having an issue with the script not locking before sleep.

When I run 'systemctl suspend' to test I can see the lock image flash very quickly before the system goes to sleep but when I wake up it's not locked.

When I just run 'betterlockscreen -s' it works. I would like to have the system lock before going to sleep when I leave it idle or close the lid for example so using the '-s' command only is not an option.

Any ideas why?

Suspend doesn't work?

The command is (essentially) betterlockscreen -l && systemctl suspend. However, betterlockscreen -l is a blocking command, and only exits when I type my password to end the lock. At which point it seems to exit non-zero so the suspend doesn't happen regardless. I wrote a script to achieve the desired behavior:

#!/usr/bin/env sh

betterlockscreen -l &
sleep 0.5 && systemctl suspend

Perhaps this is useful in some way :)

AUR package

Current state is betterlockscreen-git which downloads the whole repo with git pull.

This, like all -git packages, has of course the disadvantage of also downloading the README, which has gotten quite big.

There are 3 possible solutions for this

  • we leave it as is
  • I change the -git package to just download the script (we loose versioning)
  • I create a new package without the -git and we do the whole release stuff (I think this is how the other big non-git packages work)

Script returns 1 after lock

Hello,
I was trying to set up your script with systemd, so it would lock before suspend (when I closed the lid). However, systemd complains the script returns the exit code 1, which it indeed does:

betterlockscreen -l blur
echo $? # Outputs 1

I tried forking the process with another script, that would return 0 if your script returned 1, but systemd fails shortly after with lock_suspend.service: Main process exited, code=exited, status=1/FAILURE.

Here's the service I'm trying to implement:

[Unit]
Description=Detects a suspend event and locks the screen before
Before=suspend.target

[Service]
User=drscience
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/local/bin/screenlocker
# ExecStart=/usr/bin/i3lock

[Install]
WantedBy=suspend.target

Using i3lock alone, I encounter no issue.
Do you have an idea how I could sort this out?

Memory leak after locking screen

After logging in after screen lock I get the following memory leak error:

=================================================================

=================================================================
==20967==ERROR: LeakSanitizer: detected memory leaks
==20966==ERROR: LeakSanitizer: detected memory leaks


Direct leak of 256 byte(s) in 1 object(s) allocated from:
Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x7f1ec06bbae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
    #1 0x7f1ebcbde7ee  (/usr/lib/libfontconfig.so.1+0x1d7ee)
    #0 0x7f1ec06bbae9 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62

    #1 0x7f1ebcbde7ee  (/usr/lib/libfontconfig.so.1+0x1d7ee)

Indirect leak of 96 byte(s) in 3 object(s) allocated from:
Indirect leak of 96 byte(s) in 3 object(s) allocated from:
    #0 0x7f1ec06bbce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
    #0 0x7f1ec06bbce1 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x7f1ebcbdeed9  (/usr/lib/libfontconfig.so.1+0x1ded9)
    #1 0x7f1ebcbdeed9  (/usr/lib/libfontconfig.so.1+0x1ded9)


Indirect leak of 11 byte(s) in 1 object(s) allocated from:
    #0 0x7f1ec06523b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
Indirect leak of 11 byte(s) in 1 object(s) allocated from:
    #1 0x7f1ebcbde1f5 in FcValueSave (/usr/lib/libfontconfig.so.1+0x1d1f5)

SUMMARY: AddressSanitizer: 363 byte(s) leaked in 5 allocation(s).
    #0 0x7f1ec06523b1 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:560
    #1 0x7f1ebcbde1f5 in FcValueSave (/usr/lib/libfontconfig.so.1+0x1d1f5)

SUMMARY: AddressSanitizer: 363 byte(s) leaked in 5 allocation(s).

This has been tested on two different machines, both running Arch Linux 4.14.13-1

MPRIS Integration

Are there any plans to integrate MPRIS support?

I was thinking about two things:

  1. Display current song/artist/album similar to how the clock is displayed
  • I think that's more doable
  1. Allow media player interaction
  • Pause/play, next, previous
  • Would require interactive elements on top of i3lock
  • Possibly opens up the lockscreen to exploits

Dunst notifications are broken

Due to #28 postlock is called immediately. It results in dunst notifications being shown on top of i3lock. Also it causes some issues with xset dpms.

transparency on bottom right bar

How do I edit the source code so that I can have transparency like the one in the demo picture? Currently I have a solid black box. Thanks.

i3lock-color update

The new update of i3lock-color breaks the script, mostly because positioning is different and some arguments got renamed.

I switched the aur packages to require release i3lock-color instead of i3lock-color-git because of that, but there will probably be a release soon.

That's why the script needs a little tweaking and maybe a version check so it's still compatible with the older versions of i3lock-color.

Missing Dependencies

When running lock.sh, it would error since it couldn't find the package xdpyinfo and xrandr. You might want to note that on your README.md. After installing those two, lock.sh works as expected.

Feature: modify lock text

I had thought it would be a good thing to be able to modify the lock text even if i3lock limits it to a string of 31 characters.

To do this, what do you think to add a new variable that will contain the lock text: l_text and add a new flag with the following code:

    -t | --text)
        l_text="$2"
	;;

Of course, you should not forget to update the help page and allow betterlockscreen to be used in this way: betterlockscreen -t "Don't touch to my laptop" -l

Multi-Monitor Support

I have 3 monitors, all with different sizes and the wallpaper doesn't work at all. It is awkwardly placed across all three screens as if it were trying to spread one giant image. Are you willing to add multi-monitor support?

Ring not properly scaling

The size of the ring is not scaled to adhere to the screen size.

E.g I have a 4k and a 2k display, result will be that the ring is too big.

i3lock
-n -i "$1"
--timepos="x-90:h-ch+30"
--datepos="tx+24:ty+25"
--clock --datestr "Type password to unlock..."
--insidecolor=$background --ringcolor=$foreground --line-uses-inside
--keyhlcolor=$letterEnteredColor --bshlcolor=$letterRemovedColor --separatorcolor=$background
--insidevercolor=$passwordCorrect --insidewrongcolor=$passwordIncorrect
--ringvercolor=$foreground --ringwrongcolor=$foreground --indpos="x+280:h-70"
--radius=10 --ring-width=2 --veriftext="" --wrongtext=""
--textcolor="$foreground" --timecolor="$foreground" --datecolor="$foreground"

To fix my issue i had to change the radius and ring-width to half the size. These should probably be depending on the resolution of the display.

Variable fallback

When using the systemd service, it is impossible to set any flags.
Using a variable fallback would allow a user to set the flag settings without having direct access to the command and without hard-modification.

For example: (export being optional depending on circumstances)

export BETTERLOCKSCREEN_STYLE="dimblur"  # May be too verbose...
betterlockscreen -l

would be equivalent to:

betterlockscreen -l dimblur

Thoughts?

Setting wallpaper doesn't work in Ubuntu 18.04

The same issue as in https://askubuntu.com/questions/1048016/feh-command-updates-wallpaper-only-in-unity-not-in-xfce - using feh --bg-fill doesn't work in Ubuntu 18.04. What worked for me was to update https://github.com/pavanjadhaw/betterlockscreen/blob/master/betterlockscreen#L227-L249 to:

-w | --wall)
	case "$2" in
		"")
			# set resized image as wallpaper if no argument is supplied by user
			gsettings set org.gnome.desktop.background picture-uri "file://$resized"
			;;

		dim)
			# set dimmed image as wallpaper
			gsettings set org.gnome.desktop.background picture-uri "file://$dim"
			;;

		blur)
			# set blurred image as wallpaper
			gsettings set org.gnome.desktop.background picture-uri "file://$blur"
			;;

		dimblur)
			# set dimmed + blurred image as wallpaper
			gsettings set org.gnome.desktop.background picture-uri "file://$dimblur"
			;;
	esac
	;;

It's not very universal, so I don't expect to have it in the master branch but maybe it'll help someone with the same problem.

missing textcolor property

I installed the i3lock-color.
./i3lock --version
i3lock: version 2.10.1-2-c-25-gf567142 (2018-03-29, branch "master") © 2010 Michael Stapelberg
But it complains about the textcolor property

Removing this line from the script gives.
./betterlockscreen -l
Failed to reason about 'h-ch+30' given by '--timepos'

It seems that there is some mismatch between the i3lock-color and the version that betterlockscreen expects

invalid example argument

In the example config for i3wm, you provide lock.sh -U, when it should be lock.sh -u. Caused a bit of a head-scratch until I tried with lowercase u.

Brilliant script though, loving it.

Cheers.

Impossible to load image since new release

noname120% betterlockscreen -u ~/wallpapers 
Got 1366x768 /home/rop/.cache/i3lock/1366x768
Creating '/home/rop/.cache/i3lock/current' directory to cache processed images.
mkdir: cannot create directory ‘/home/rop/.cache/i3lock/current’: File exists
cp: cannot create regular file '/home/rop/.cache/i3lock/current/user_image.png': No such file or directory
Please specify the path to the image you would like to use
noname120% ls ~/wallpapers 
archlinux_wallpaper.jpg

I've tried to delete /home/rop/.cache/i3lock/current but I get the same error.

Error: i3lock: unrecognized option '--timepos=x-90:h-ch+30'

I installed i3lock-color & betterlockscreen. When I try to run betterlockscreen I'm getting the error shown below, can anyone please help?

[ag@algallaf ~]$ betterlockscreen -l
i3lock: unrecognized option '--timepos=x-90:h-ch+30'
i3lock: Syntax: i3lock [-v] [-n] [-b] [-d] [-c color] [-u] [-p win|default] [-i image.png] [-t] [-e] [-I timeout] [-f]

Display charging status for laptops

I did some digging around and I found the file /sys/class/power_supply/BAT0/uevent on my laptop. The file displays battery info, such as the current power status and whether the laptop is charging or not.

It would be cool to parse this file, or some similar file, then draw the battery info onto the lockscreen.

lockscreen after suspend using systemd service

By using this method we can automatically lock screen whenever system is suspended.

cat /etc/systemd/system/betterlockscreen.service

[Unit]
Description=i3lock on suspend
Before=sleep.target

[Service]
User=pavan
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/local/bin/betterlockscreen -l blur

[Install]
WantedBy=sleep.target

# systemctl enable betterlockscreen.service

Now whenever suspend command is issued screen is locked.
systemctl suspend

But this requires forking argument -n to be removed from script.

Detect if screen is locked with xautolock before trying to lock it again

I'm not sure if the problem is exactly as I wrote on the title.

Steps to reproduce:

  1. Install the [email protected] and enable it.
  2. Run xautolock with betterlockscreen.
  3. Either run xautolock -locknow or wait the time you have specified in step 2.
  4. Suspend and wake the machine.

After step 4, the machine is locked, no problems on this, but two messages (locking..., then failed to lock) will appear on top of the circle that detects keyboard presses, which just looks ugly.

i3 shortcut not working but call `betterlockscreen -l` from bash do

$ betterlockscreen -l locks the screen successfully.
When I press $mod+l, nothing happens.
Here's my i3 config:

set $mod Mod4
# bindsym $mod+l exec i3lock -t -i ~/background/cropped-1920-1080-756030.png # this works
bindsym $mod+l exec betterlockscreen -l

lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

uname -a

Linux xxx 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Feature : remove the red circle when typing password

I have been using betterlockscreen for a bit and I love it as it does everything I want him to do.
However, I don't really like the red circle that highlights whenever I am typing my password and I would like to remove it if possible.
I highly appreciate your work anyway.

Custom time format

Date string is formatted to add custom text.
Could we customize the time format? It would allow a 12-hour clock to be possible.

The flag for i3lock would be something like --timestr '%l:%H:%S %p'

Would you accept a pull request for this? If so, what should the flag be?

hibernate mode

Is hibernate mode not supported? I'm asking specifically for i3.

Unrecognized i3lock option "--verifcolor"

I just pulled down the newest versions of betterlockscreen and i3lock-color and my hotkey to lock stopped working. i looked into it and when I tried manually running the "betterlockscreen -l" command, it outputted this as an error:

i3lock: unrecognized option '--verifcolor=ffffffff' i3lock: Syntax: i3lock [-v] [-n] [-b] [-d] [-c color] [-u] [-p win|default] [-i image.png] [-t] [-e] [-f] Please see the manpage for a full list of arguments.

I commented out line 54 that has that command and the lock works. However now the clock isn't showing up. That is about the end of my expertise on troubleshooting this kind of stuff. Let me know if I can provide any more information to help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.