mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-23 18:28:34 +02:00
xlock: move xautolock and notify stuff into shell scripts
This commit is contained in:
parent
55a342e987
commit
c30c2062ad
3 changed files with 21 additions and 7 deletions
8
bin/notify-lock
Executable file
8
bin/notify-lock
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
icon="$1"
|
||||||
|
|
||||||
|
exec notify-send "Lock screen" \
|
||||||
|
${icon:+-i $icon} \
|
||||||
|
-t 10000 \
|
||||||
|
"Lock screen will be started in 10 seconds..."
|
10
bin/xautolock
Executable file
10
bin/xautolock
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
icon="$1"
|
||||||
|
notify=$(dirname $(readlink -f "$0"))/notify-lock
|
||||||
|
|
||||||
|
exec xautolock \
|
||||||
|
-time 4 \
|
||||||
|
-locker "i3lock -n -i $HOME/.cache/awesome/current-wallpaper.png" \
|
||||||
|
-notify 10 \
|
||||||
|
-notifier "$notify $icon"
|
10
rc/xlock.lua
10
rc/xlock.lua
|
@ -3,13 +3,9 @@
|
||||||
local icons = loadrc("icons", "vbe/icons")
|
local icons = loadrc("icons", "vbe/icons")
|
||||||
|
|
||||||
xrun("xautolock",
|
xrun("xautolock",
|
||||||
"xautolock -notify 10 -notifier " ..
|
awful.util.getdir("config") ..
|
||||||
" 'notify-send Lock\\ screen -i " ..
|
"/bin/xautolock " ..
|
||||||
icons.lookup({name = "system-lock-screen", type = "actions" }) ..
|
icons.lookup({name = "system-lock-screen", type = "actions" }))
|
||||||
" -t 10000 " ..
|
|
||||||
" Lock\\ screen\\ will\\ be\\ started\\ in\\ 10\\ seconds...' " ..
|
|
||||||
" -time 3 -locker " ..
|
|
||||||
" 'i3lock -n -i " .. awful.util.getdir("cache") .. "/current-wallpaper.png'")
|
|
||||||
|
|
||||||
config.keys.global = awful.util.table.join(
|
config.keys.global = awful.util.table.join(
|
||||||
config.keys.global,
|
config.keys.global,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue