using termite instead of urxvt, switched to xdg dir-theme and added a python script for a pretty lock screen(needs improvement)

This commit is contained in:
TuDatTr
2017-12-20 00:24:46 +01:00
parent a3fead2296
commit 647f7c53f1
3 changed files with 536 additions and 0 deletions

33
.scripts/i3lock.py Normal file
View File

@@ -0,0 +1,33 @@
import os
from PIL import Image
def screenshot():
os.system('import -window root /tmp/.i3lock.png')
def pixelate():
backgroundColor = (0,)*3
pixelSize = 9
image = Image.open('/tmp/.i3lock.png')
image = image.resize((int(image.size[0]/pixelSize), int(image.size[1]/pixelSize)), Image.NEAREST)
image = image.resize((image.size[0]*pixelSize, image.size[1]*pixelSize), Image.NEAREST)
pixel = image.load()
for i in range(0,image.size[0],pixelSize):
for j in range(0,image.size[1],pixelSize):
for r in range(pixelSize):
pixel[i+r,j] = backgroundColor
pixel[i,j+r] = backgroundColor
image.save('/tmp/.i3lock.png')
def lock():
os.system('i3lock -u -i /tmp/.i3lock.png')
if __name__=='__main__':
screenshot()
pixelate()
lock()