From 645fa3753741fcde3648fd80cad00d0a111bf3e6 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sun, 1 Jul 2012 17:33:50 +0400 Subject: [PATCH] awesome && xscreensaver && lock --- autostart.lua | 1 + rc.lua | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/autostart.lua b/autostart.lua index cad8cf1..0e4e82d 100644 --- a/autostart.lua +++ b/autostart.lua @@ -1 +1,2 @@ +os.execute ("xscreensaver -no-splash &") os.execute ("pidgin &") diff --git a/rc.lua b/rc.lua index 3c31a3f..08e0d74 100644 --- a/rc.lua +++ b/rc.lua @@ -85,16 +85,26 @@ myawesomemenu = { { "manual", terminal .. " -e man awesome" }, { "edit config", editor_cmd .. " " .. awesome.conffile }, { "restart", awesome.restart }, + { "lock", "xscreensaver-command --lock" }, { "quit", awesome.quit } } +function lock_screen () + os.execute ("xscreensaver-command --lock") +end mywebmenu = { { "firefox", "firefox" }, { "pidgin", "pidgin" } } +myconfigmenu = { + { "xscreensaver", "xscreensaver-demo" } +} + mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, { "web", mywebmenu, beautiful.awesome_icon }, + { "config", myconfigmenu, beautiful.awesome_icon }, + { "lock", "xscreensaver-command --lock" }, { "open terminal", terminal } } }) @@ -254,6 +264,7 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Shift" }, "q", awesome.quit), + awful.key({ modkey, "Control" }, "l", lock_screen), awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),