aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Jadhaw <pavanjadhaw96@gmail.com>2018-09-18 18:40:52 +0000
committerGitHub <noreply@github.com>2018-09-18 18:40:52 +0000
commit08a5bfc2cbd683d4f9161802905eaa3c547f8682 (patch)
tree3e87b9ca631d52ab56f06ca5cabd5e1d5e8e2336
parent6d00aaa0947da9f9a015a9d9561f66fd452d7db6 (diff)
Update: README.md
-rw-r--r--README.md252
1 files changed, 136 insertions, 116 deletions
diff --git a/README.md b/README.md
index 78d0a7a..dc81829 100644
--- a/README.md
+++ b/README.md
@@ -14,169 +14,189 @@ without the need to apply same effect again and again
![scrot2](https://github.com/pavanjadhaw/betterlockscreen.demo/raw/master/scrots/scrot2.png "scrot2.png")
-### Demo
+## In action
* [Demonstration](https://www.youtube.com/watch?v=9Ng5FZwnn6M&feature=youtu.be) - youtube.com
-## Features
+## Table of Contents
-```
-# Lock screen
-betterlockscreen -l | --lock [modifier]
-
-# Lock screen with custom text
-betterlockscreen -l | --lock [modifier] -t | --text "custom lockscreen text"
-E.g: $ betterlockscreen -l dim -t \"Don't touch my machine!\""
-
-# Set wallpaper
-betterlockscreen -w | --wall [modifier]
-# Suspend system
-betterlockscreen -s | --suspend [modifier]
-# Update image cache
-betterlockscreen -u | --update (path/to/image.png | path/to/directory)
- \ [-r | --resolution <resolution>] [-b | --blur <factor>]
-
-Modifiers:
-dim
-blur
-dimblur
-
-Example update image cache:
-betterlockscreen -u path/to/directory -r 1920x1080 -b 0.5
-In this case a random image from the directory is chosen
-and converted to a 1920x1080 resolution with the blur factor set to 0.5
-```
+- **[Requirements](#requirements)**
+ - [Dependencies](#dependencies)
+- **[Installation](#installation)**
+ - [Manual/Git install](#manualgit-install)
+ - [OS/Distro Packages](#osdistro-packages)
+ - [Arch Linux](#arch-linux)
+ - [Debian and derivatives](#debian-and-derivatives)
+- **[Usage](#usage)**
+- **[Desktop Background](#set-desktop-background-on-startup)**
+- **[i3wm keybinding](#i3wm-keybinding-for-lockscreen)**
+- **[Lockscreen whenever suspended](#lockscreen-when-suspendedsystemd-service)**
-## Lockscreen when suspended
-```
-# move service file to proper dir (the aur package does this for you)
-cp betterlockscreen@.service /etc/systemd/system/
+## Requirements
-# enable systemd service
-systemctl enable betterlockscreen@$USER
+### Dependencies
-# disable systemd service
-systemctl disable betterlockscreen@$USER
+- [i3lock-color](https://github.com/PandorasFox/i3lock-color)
+ - i3lock fork with additional features( >= 2.11-c )
+- [imagemagick](https://www.imagemagick.org/script/index.php)
+ - To apply effects to images
+- [xdpyinfo](https://www.x.org/archive/X11R7.7/doc/man/man1/xdpyinfo.1.xhtml), [xrandr](https://www.x.org/wiki/Projects/XRandR/), [bc](https://www.gnu.org/software/bc/) and [feh](https://feh.finalrewind.org/)
+ - To find screen resolution, set custom blur level and wallpaper handling.
+Note: Make sure all dependencies are satisfied beforehand.
-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.
-```
+## Installation
-## Installation via AUR package
+### Manual/Git install
-### [release](https://aur.archlinux.org/packages/betterlockscreen/)
-recommended if you want to spend less on bandwidth(less than 10kb)
-```
-pacaur -S aur/betterlockscreen
-```
-```
-yaourt -S betterlockscreen
-```
+```sh
+git clone https://github.com/pavanjadhaw/betterlockscreen
+cd betterlockscreen
+cp betterlockscreen ~/.local/bin
-### [dev](https://aur.archlinux.org/packages/betterlockscreen-git/)
-latest features but includes git history so 8mb+ of downloading.
-```
-pacaur -S aur/betterlockscreen-git
-```
-```
-yaourt -S betterlockscreen-git
+# or wget the script ~12KB
+wget -O betterlockscreen https://git.io/fASUJ
+chmod u+x betterlockscreen
+cp betterlockscreen ~/.local/bin
+
+# Add betterlockscreen to PATH:
+# (In your .bashrc, .zshrc etc)
+export PATH="${PATH}:${HOME}/.local/bin/"
```
-## Manual Installation
-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.
+### OS/Distro Packages
-```
-git clone https://github.com/pavanjadhaw/betterlockscreen
-# optionally copy the script to /usr/local/bin so you can execute it everywhere
-cp betterlockscreen/betterlockscreen /usr/local/bin/betterlockscreen
-```
-OR
+#### Arch Linux
-If you dont want to clone the repo and save some bandwidth and diskspace you can do the following
+###### Installing dependencies(not required if using betterlockscreen aur package)
+`pacman -S imagemagick feh xorg-xrandr xorg-xdpyinfo`
+- i3lock-color
+ - `trizen -S i3lock-color`
-```
-wget https://raw.githubusercontent.com/pavanjadhaw/betterlockscreen/master/betterlockscreen
-chmod u+x betterlockscreen
-```
+#### Aur package
-### Prerequisites
+`betterlockscreen` is available in the Arch User repos as `betterlockscreen` and `betterlockscreen-git`.
+- betterlockscreen
+ - `trizen -S betterlockscreen`
+- betterlockscreen-git
+ - `trizen -S betterlockscreen-git`
-Make sure you have following packages installed.
-* [i3lock-color](https://github.com/PandorasFox/i3lock-color) - i3lock fork with additional features (currently supported versions are 2.11-c and newer)
-* [imagemagick](https://www.imagemagick.org/script/index.php) - to apply effects to images
-* [xdpyinfo](https://www.x.org/archive/X11R7.7/doc/man/man1/xdpyinfo.1.xhtml) - find your screen resolution (to resize images accordingly)
-* [xrandr](https://www.x.org/wiki/Projects/XRandR/) - depends for xdpyinfo
-* [bc](https://www.gnu.org/software/bc/) - used for setting the blur level
-* [feh](https://feh.finalrewind.org/) - used to set custom wallpaper
+#### Debian and derivatives
-*Note: systemd is required for the suspend feature.*
+UtkarshVerma was so kind to provide an installation script for debian based systems, ![check it out here](https://github.com/UtkarshVerma/installer-scripts).
-### Arch users
-To install required packages
-Install feh, imagemagick, xrandr and xdpyinfo (currently used to find screenresolution)
-If anyone knows better way so that these dependencies could be minimized, please open issue.
+## Usage
-```
-pacman -S imagemagick feh xorg-xrandr xorg-xdpyinfo
-```
+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.
-Install i3lock-color from AUR
+```sh
+usage: betterlockscreen [-u "path/to/img.jpg"] [-l "dim, blur or dimblur"]
+ [-w "dim, blur, or dimblur"] [-t "custom text"] [-s "lockscreen and suspend"]
+ [-r "resolution"] [-b "factor"]
-Pacaur Users
-```
-pacaur -S aur/i3lock-color
-```
+betterlockscreen - faster and sweet looking lockscreen for linux systems.
-Yaourt users
-```
-yaourt -S i3lock-color
-```
----
+required:
+ -u, --update "path/to/img.jpg" caches all required images
-### Debian based users
+usage:
+ -l, --lock effect-name
+ locks with provided effect
+ -w, --wall effect-name
+ set desktop background with provided effect
+ -s, --suspend effect-name
+ lockscreen and suspend
-UtkarshVerma was so kind to provide an installation script for debian based systems, [check it out here.](https://github.com/UtkarshVerma/installer-scripts/blob/master/betterlockscreen.sh)
+ Available effects:
+ dim, blur or dimblur
----
+ -t, --text "custom text"
+ set custom lockscreen text
+ -b, blur 0.0 - 1.0
+ set blur range
+ -r, --resolution res
+ uses a custom resolution
-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 betterlockscreen -w
-```
+Usage examples:
+1. Updating image cache(required)
+betterlockscreen -u ~/Pictures/Forests.png # caches given image
+betterlockscreen -u ~/Pictures # caches random image from ~/Pictures directory
-If you are i3wm user, add following line to your i3config (~/.config/i3/config or ~/.i3/config)
+2. Custom resolution and blur range
+betterlockscreen -u path/to/directory -r 1920x1080 -b 0.5
-*custom shortcut to lockscreen*
-```
-# custom keybinding to lockscreen, use --lock dim or --lock blur below for different backgrounds
-bindsym $mod+shift+x exec betterlockscreen --lock
+3. Lockscreen
+betterlockscreen -l dim # lockscreen with dim effect
+
+4. Lockscreen with custom text
+betterlockscreen -l dim -t "custom lockscreen text"
+
+5. Set desktop background
+betterlockscreen -w blur # set desktop background with blur effect
```
-*set last cached image as desktop background*
+
+## Set desktop background on startup
+
+Add this line to `.xinitrc`.
+
+```sh
+# set desktop background with custom effect
+betterlockscreen -w dim
+
+# Alternative (set last used background)
+source ~/.fehbg
```
-# Set last used image as desktop background
-exec --no-startup-id betterlockscreen -w
+
+
+#### i3wm
+
+Add this line to `~/.config/i3/config`
+
+```sh
+# set desktop background with custom effect
+exec --no-startup-id betterlockscreen -w dim
+
+# Alternative (set last used background)
+exec --no-startup-id source ~/.fehbg
```
-*set the image cache to a random image from a directory of your choice on each startup*
+
+#### i3wm keybinding for lockscreen
+
+Add this line to your `~/.config/i3/config`
+
+```sh
+bindsym $mod+shift+x exec betterlockscreen --l dim
```
-# where Pictures/Wallpapers is the directory you would want to get random wallpapers from
-exec --no-startup-id betterlockscreen -u ~/Pictures/Wallpapers
-# add this only if you want to use same random image as desktop background too
-# it might not work as it takes few seconds for images to be cached,
-# try adding delay of 5 seconds if thats the case
-exec --no-startup-id betterlockscreen -w
+
+## Lockscreen when suspended(systemd service)
+
+```sh
+# move service file to proper dir (the aur package does this for you)
+cp betterlockscreen@.service /etc/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.
```
+
---
## Feel free to use and distribute