Giter Site home page Giter Site logo

betterlockscreen's Introduction

better_lockscreen

A simple lock script for i3lock Most of i3lock script out there converts your defined image to add blur, glitch or dim effect to image and it feels so slow and btw who needs dynamic lock background, its not like I change lockscreen background every 5 minutes. I wanted something that was fast and still should have all the effects I want for lockscreen background. This script generates or already caches the variant for your custom images before hand so they can be later used any number of time as lockscreen background, without the need to apply same effect again and again

Screenshots

Screenshots or it didnt happen... :P

scrot1

scrot2

demo.mp4

Getting Started

Clone this repo, push this script somewhere handy or you can even copy this script to /usr/local/bin so that it can be used from your i3config without defining whole path.

Prerequisites

Make sure you have following packages installed.

Arch users

To install required packages

Install feh and imagemagick

pacman -S imagemagick feh

Install i3lock-color-git from AUR

Pacaur Users

pacaur -S aur/i3lock-color-git

Yaourt users

yaourt -S i3lock-color-git

How to get started

Clone this repo

git clone https://github.com/pavanjadhaw/betterlockscreen

navigate to cloned repository

cd betterlockscreen

If you dont want to clone the repo and save some bandwidth and diskspace you can do the following

wget https://raw.githubusercontent.com/pavanjadhaw/betterlockscreen/master/lock.sh

chmod +x lock.sh

grab your fav image for lockscreen background

./lock.sh -u path/to/image.img

# OR use wallaper.jpg supplied from this repo

./lock.sh -u wallaper.jpg

To lockscreen

Original image as background

./lock.sh -l

Use dimmed image as lockscreen background

./lock.sh -l dim

Use blurred image as lockscreen background

./lock.sh -l blur

Use dim + blurred image as lockscreen background

./lock.sh -l dimblur

To set wallpaper

Original Image

./lock.sh -w

Use dimmed image as desktop background

./lock.sh -w dim

Use blurred image as desktop background

./lock.sh -w blur

Use dim + blurred image as desktop background

./lock.sh -w dimblur

To set desktop background on startup, add following lines to your .xintrc after pushing script to your path or you can use absolute path to script too

exec lock.sh -u ~/.wall.png &

exec lock.sh -w

If you are i3wm user, add following line to your i3config (~/.config/i3/config or ~/.i3/config)

# custom keybinding to lockscreen, use --lock dim or --lock blur below for different backgrounds
bindsym $mod+shift+x exec lock.sh --lock
# bindsym $mod+shift+x exec lock.sh --lock dim
# bindsym $mod+shift+x exec lock.sh --lock blur

# Update image cache
exec --no-startup-id lock.sh -U ~/.wall.png

# Set last used image as desktop background, comment out below line if you use different desktop background utility
exec --no-startup-id lock.sh -w

Feel free to use and distribute

This is my first bash script so if you think this could be improved or if you have any suggestion. Feel free.

  • Hat tip to anyone who's code was used
  • Inspiration - r/unixporn
  • etc

betterlockscreen's People

Contributors

deluxo avatar pavanjadhaw avatar

Watchers

 avatar  avatar

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.