Add screen locking hotkey + config and default to i3lock-color (i3lock)
This commit is contained in:
parent
12668472f8
commit
41e377b06c
@ -14,6 +14,7 @@ By default, Simple Awesome uses
|
||||
|
||||
- `playerctl` - enables global media control. If not present on your system, only Spotify will work.
|
||||
- `network-manager-applet` (`nm-applet`) - network control "widget" **for `NetworkManager` only**. If present on your system, we will automatically run it.
|
||||
- `i3lock-color` - lock your screen in a simple and elegant way
|
||||
|
||||
## To do
|
||||
|
||||
|
@ -23,6 +23,10 @@ config.awesome = {
|
||||
application_launcher_check = "rofi -version",
|
||||
application_launcher = "rofi -show run -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
|
||||
|
||||
-- Screen locker
|
||||
lock_command = "i3lock --blur=5 -f -k --timecolor=ffffffff --datecolor=ffffffff --indicator --ringcolor=aaaaaaaa",
|
||||
-- lock_command = "xscreensaver-command -lock",
|
||||
|
||||
-- Terminal
|
||||
terminal = "terminator",
|
||||
|
||||
@ -75,6 +79,10 @@ config.keys.global_keys = {
|
||||
-- Application launcher
|
||||
launcher = { { config.keys.modkey }, "space", },
|
||||
|
||||
-- Screen locker
|
||||
lock_screen = { { config.keys.modkey }, "l" },
|
||||
|
||||
|
||||
--
|
||||
-- Media and volume controls
|
||||
-- See media_control.lua
|
||||
|
@ -138,6 +138,17 @@ for _, app in ipairs(config.autostart) do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Screen locker
|
||||
--
|
||||
function lockScreen()
|
||||
awful.spawn(config.awesome.lock_command)
|
||||
end
|
||||
hotkey.registerKeys(hotkey.make(config.keys.global_keys.lock_screen, lockScreen,
|
||||
{ description = "lock your screen", group = "awesome" }))
|
||||
|
||||
|
||||
--
|
||||
-- Launcher (start menu)
|
||||
--
|
||||
@ -160,7 +171,7 @@ os_menu = awful.widget.launcher({
|
||||
{ "Manual", config.awesome.terminal .. " -e man awesome" },
|
||||
{ "Edit config", config.awesome.editor_cmd .. " " .. awesome.conffile },
|
||||
{ "Open terminal", config.awesome.terminal },
|
||||
{ "Lock", function() awful.spawn("xscreensaver-command -lock") end, lock_icon },
|
||||
{ "Lock", lockScreen, lock_icon },
|
||||
{ "Logout", function() awesome.quit() end, logout_icon },
|
||||
{ "Restart", function() os.execute('shutdown -r now') end, restart_icon },
|
||||
{ "Shutdown", function() os.execute('shutdown now') end, shutdown_icon },
|
||||
@ -380,10 +391,10 @@ hotkey.registerKeys(awful.key({ config.keys.modkey, }, "s", hotkeys_popup.show_h
|
||||
awful.key({ config.keys.modkey, "Shift" }, "q", awesome.quit,
|
||||
{ description = "quit awesome", group = "awesome" }),
|
||||
|
||||
awful.key({ config.keys.modkey, }, "l", function() awful.tag.incmwfact(0.05) end,
|
||||
{ description = "increase master width factor", group = "layout" }),
|
||||
awful.key({ config.keys.modkey, }, "h", function() awful.tag.incmwfact(-0.05) end,
|
||||
{ description = "decrease master width factor", group = "layout" }),
|
||||
-- awful.key({ config.keys.modkey, }, "l", function() awful.tag.incmwfact(0.05) end,
|
||||
-- { description = "increase master width factor", group = "layout" }),
|
||||
-- awful.key({ config.keys.modkey, }, "h", function() awful.tag.incmwfact(-0.05) end,
|
||||
-- { description = "decrease master width factor", group = "layout" }),
|
||||
awful.key({ config.keys.modkey, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end,
|
||||
{ description = "increase the number of master clients", group = "layout" }),
|
||||
awful.key({ config.keys.modkey, "Shift" }, "l", function() awful.tag.incnmaster(-1, nil, true) end,
|
||||
|
Loading…
Reference in New Issue
Block a user