X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=herbstluftwm%2Fautostart;h=cf2247d5094897eeb2eadeb513a1a4b6b94b2a5d;hb=599641e1dc79094d2ff3ba7feefac83035b7b0b2;hp=97980b27e323106dba0ec484492e4b8ba71ab08e;hpb=72cba8d8ac97dc3c34cfd4cd244e258fe5d40f87;p=config%2Fdotfiles.git diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index 97980b2..cf2247d 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -66,17 +66,25 @@ 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 +for locker in xscreensaver xtrlock ''; do if installed "$locker"; then break fi done if test -z "$locker"; then - echo 'No screen locker found!' | notify 60 + echo 'No screen locker found!' | notify 60 & +fi +# Additional options. +locker_pre= +if test x"$locker" = xxscreensaver; then + # Start xscreensaver if it's not already running. xscreensaver-command + # ensures xscreensaver is availble for the current X session. + locker_pre='xscreensaver-command -time >/dev/null 2>&1 || xscreensaver &' + locker='xscreensaver-command -lock' 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 $locker" +hc keybind $mod-z spawn sh -c "$locker_pre sleep 1; exec $locker" # Tag key bindings. Create tags 1 to 9 with bindings to switch and move # windows to them. @@ -123,6 +131,8 @@ hc mouseunbind --all # Necessary for Java so it recognizes herbstluftwm as tiling window manager. hc set wmname LG3D +# Auto-detect new monitors. +hc set auto_detect_monitors 1 # WINDOW and FRAME SETTINGS