X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=herbstluftwm%2Fautostart;h=22dbd0fb4b38f64dbf50fe44eeeffbcf20c9d5f6;hb=ba31b019ce0cb3e1d8115fe38f440344ba770dbb;hp=bc73fe402a6198deef9f6d920b0d190ca56ec0ad;hpb=00ec637d3188ddbf6f219ba510804abfc9b112f8;p=config%2Fdotfiles.git diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index bc73fe4..22dbd0f 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -57,9 +57,18 @@ hc keybind $mod-Shift-Return spawn urxvt hc keybind $mod-Shift-c close hc keybind $mod-q reload hc keybind $mod-Shift-q quit +# Find an existing screen locker. +for locker in xtrlock ''; do + if installed "$locker"; then + break + fi +done +if test -z "$locker"; then + echo 'No screen locker found!' | notify 60 +fi # Lock the screen. The sleep is necessary to allow xtrlock to grab the # keyboard input. -hc keybind $mod-z spawn sh -c 'sleep 1 && exec xtrlock' +hc keybind $mod-z spawn sh -c "sleep 1 && exec $locker" # Tag key bindings. Create tags 1 to 9 with bindings to switch and move # windows to them.