From ebbda18dfb774064e1151b0fcd354de24fe49202 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 13 Dec 2016 10:07:53 +0100 Subject: more key things --- config/awesome/rc.lua | 81 +++++++++++++++++++++++++--------- config/awesome/themes/weasel/theme.lua | 2 +- 2 files changed, 61 insertions(+), 22 deletions(-) diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 64e251c..6d4c95e 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -59,18 +59,18 @@ modkey = "Mod4" -- Table of layouts to cover with awful.layout.inc, order matters. local layouts = { - awful.layout.suit.floating, awful.layout.suit.tile, - awful.layout.suit.tile.left, + -- awful.layout.suit.tile.left, awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top, + -- awful.layout.suit.tile.top, awful.layout.suit.fair, - awful.layout.suit.fair.horizontal, - awful.layout.suit.spiral, - awful.layout.suit.spiral.dwindle, + -- awful.layout.suit.fair.horizontal, + -- awful.layout.suit.spiral, + -- awful.layout.suit.spiral.dwindle, awful.layout.suit.max, - awful.layout.suit.max.fullscreen, - awful.layout.suit.magnifier + -- awful.layout.suit.max.fullscreen, + -- awful.layout.suit.magnifier + awful.layout.suit.floating, } -- }}} @@ -87,7 +87,10 @@ end tags = {} for s = 1, screen.count() do -- Each screen has its own tag table. - tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) + -- tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }, s, layouts[1]) + --tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) + -- tags[s] = awful.tag({ 1, 2, 3, 4, 5, "q", "w", "e", "r", "t", "A", "S", "D", "F", "G" }, s, layouts[1]) + tags[s] = awful.tag({ 1, 2, 3, 4, 5, "11", "12", "13", "14", "15", "21", "22", "23", "24", "25" }, s, layouts[1]) end -- }}} @@ -221,7 +224,7 @@ root.buttons(awful.util.table.join( globalkeys = awful.util.table.join( awful.key({ modkey, }, "Left", awful.tag.viewprev ), awful.key({ modkey, }, "Right", awful.tag.viewnext ), - awful.key({ modkey, }, "Escape", awful.tag.history.restore), + -- awful.key({ modkey, }, "Escape", awful.tag.history.restore), awful.key({ modkey, }, "j", function () @@ -266,32 +269,66 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Control" }, "n", awful.client.restore), -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), + -- awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", + awful.key({ modkey, "Shift" }, ";", function () awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox[mouse.screen].widget, awful.util.eval, nil, awful.util.getdir("cache") .. "/history_eval") end), + + -- weasel + awful.key({ modkey }, "`", function () mypromptbox[mouse.screen]:run() end), + + awful.key({ modkey }, "x", function () awful.util.spawn_with_shell("urxvt") end), + awful.key({ modkey }, "m", function () awful.util.spawn_with_shell("xterm-mail") end), + awful.key({ modkey, "Shift" }, "m", function () awful.util.spawn_with_shell("xterm-mail-cosy") end), + awful.key({ modkey }, "i", function () awful.util.spawn_with_shell("xterm-irc") end), + + awful.key({ modkey, }, "Up" , function () awful.tag.viewidx(-5) end ), + awful.key({ modkey, }, "Down", function () awful.tag.viewidx( 5) end ), -- Menubar awful.key({ modkey }, "p", function() menubar.show() end) ) +-- more weasel + + local tag_keys = { + "1", "2", "3", "4", "5", + "q", "w", "e", "r", "t", + "a", "s", "d", "f", "g" } + for i = 1, #tag_keys do + globalkeys = awful.util.table.join(globalkeys, + -- View tag only. + awful.key({ "Mod3" }, tag_keys[i], function () local screen = mouse.screen local tag = awful.tag.gettags(screen)[i] if tag then awful.tag.viewonly(tag) end end), + -- Toggle tag. + awful.key({ "Mod3", "Control" }, tag_keys[i], function () local screen = mouse.screen local tag = awful.tag.gettags(screen)[i] if tag then awful.tag.viewtoggle(tag) end end), + -- Move client to tag. + awful.key({ "Mod3", "Shift" }, tag_keys[i], function () if client.focus then local tag = awful.tag.gettags(client.focus.screen)[i] if tag then awful.client.movetotag(tag) end end end), + -- Toggle tag. + awful.key({ "Mod3", "Control", "Shift" }, tag_keys[i], function () if client.focus then local tag = awful.tag.gettags(client.focus.screen)[i] if tag then awful.client.toggletag(tag) end end end) + ) + end + clientkeys = awful.util.table.join( awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), + -- awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), awful.key({ modkey, }, "o", awful.client.movetoscreen ), awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), - awful.key({ modkey, }, "n", - function (c) - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - c.minimized = true - end), + + -- weasel + awful.key({ modkey }, "Escape", function (c) c:kill() end), + + --awful.key({ modkey, }, "n", + -- function (c) + -- -- The client currently has the input focus, so it cannot be + -- -- minimized, since minimized clients can't have the focus. + -- c.minimized = true + -- end), awful.key({ modkey, }, "m", function (c) c.maximized_horizontal = not c.maximized_horizontal @@ -346,8 +383,8 @@ end clientbuttons = awful.util.table.join( awful.button({ }, 1, function (c) client.focus = c; c:raise() end), - awful.button({ modkey }, 1, awful.mouse.client.move), - awful.button({ modkey }, 3, awful.mouse.client.resize)) + awful.button({ "Mod1" }, 1, awful.mouse.client.move), + awful.button({ "Mod1" }, 3, awful.mouse.client.resize)) -- Set keys root.keys(globalkeys) @@ -453,3 +490,5 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n -- }}} terminal = "urxvt" +awful.util.spawn("nm-applet") +awful.util.spawn("xscreensaver -no-splash") diff --git a/config/awesome/themes/weasel/theme.lua b/config/awesome/themes/weasel/theme.lua index 98b86f0..32e9bb7 100644 --- a/config/awesome/themes/weasel/theme.lua +++ b/config/awesome/themes/weasel/theme.lua @@ -1,7 +1,7 @@ theme = {} theme.bg_normal = "#222222" -theme.bg_focus = "#333d4c" +theme.bg_focus = "#666d8c" theme.border_width = 1 theme.border_normal = "#222222" -- cgit v1.2.3