~heckyel/i3-config

4070f6f227a04630a7b16d40fd469c4a1f3b3c90 — Jesús 1 year, 5 months ago 6993d61 master
i3lock: cant work without pam https://github.com/i3/i3lock/issues/134
5 files changed, 2 insertions(+), 40 deletions(-)

M README.md
M config
D images/imagelock.png
M install.sh
D scripts/i3lock.bash
M README.md => README.md +0 -1
@@ 15,7 15,6 @@ This repository saves the custom configuration used by heckyel in i3wm
- feh
- i3-wm
- i3blocks
- i3lock
- nitrogen
- ranger
- rofi

M config => config +0 -3
@@ 254,9 254,6 @@ mode "$mode_mount" {
# Declare here the shortcut to mount-device selection menu
bindsym $mod+m mode "$mode_mount"

# i3lock
bindsym Pause exec "bash $HOME/.config/i3/scripts/i3lock.bash"

## Manual management of external displays
# Set the shortcuts and what they do
set $mode_display Ext Screen (v) VGA ON, (h) HDMI ON, (x) VGA OFF, (y) HDMI OFF

D images/imagelock.png => images/imagelock.png +0 -0
M install.sh => install.sh +2 -2
@@ 19,7 19,7 @@ do
            # i3 base
            $root_key pacman -S --noconfirm i3-wm i3status dmenu sysstat
            # i3 blocks and dependecies
            $root_key pacman -S --noconfirm i3blocks i3lock rofi \
            $root_key pacman -S --noconfirm i3blocks rofi \
                      conky acpi scrot st sakura feh ranger bubblewrap \
                      ttf-hack xenocara-xbacklight xdg-user-dirs
        fi


@@ 30,7 30,7 @@ do

        printf '%b%s%b%s%b\n' '\e[1;32m' '==> ' '\e[0m\033[1m' 'Copying images...' '\e[m'
        install -d -m755 "$HOME/.config/i3/images"
        for i in background.png imagelock.png; do
        for i in background.png; do
            install -m644 -v "/tmp/i3config/images/$i" "$HOME/.config/i3/images/$i"
        done


D scripts/i3lock.bash => scripts/i3lock.bash +0 -34
@@ 1,34 0,0 @@
#!/bin/bash
revert() {
  rm /tmp/*screen*.png
  xset dpms 0 0 0
}

trap revert HUP INT TERM

if [[ $(command -v xset) ]]; then
    xset +dpms dpms 0 0 5
else
    echo 'xset command not found' >> "$HOME/.config/i3/logs/xset-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
fi

if [[ $(command -v scrot) ]]; then
    scrot -d 1 /tmp/locking_screen.png
else
    echo 'scrot is not installed' >> "$HOME/.config/i3/logs/scrot-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
fi

if [[ $(command -v convert) ]]; then
    convert -blur 0x8 /tmp/locking_screen.png /tmp/screen_blur.png
    convert -composite /tmp/screen_blur.png "$HOME/.config/i3/images/imagelock.png" -gravity South -geometry -20x1200 /tmp/screen.png
else
    echo 'convert command not found' >> "$HOME/.config/i3/logs/convert-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
fi

if [[ $(command -v i3lock) ]]; then
    i3lock -i /tmp/screen.png
else
    echo 'i3lock is not installed' >> "$HOME/.config/i3/logs/i3lock-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
fi

revert "$@"