From 6bd3ed8f37d8d27abac1893baeac273fb970c254 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sat, 10 May 2014 18:24:30 -0400 Subject: [PATCH 01/21] Moved autostart away from theme.lua files --- myrc/run_once.lua | 10 ++++++++++ rc.lua.blackburn | 24 ++++++---------------- rc.lua.copland | 26 +++++++----------------- rc.lua.dremora | 24 ++++++---------------- rc.lua.holo | 26 +++++++----------------- rc.lua.multicolor | 43 +++++++++++++++------------------------- rc.lua.powerarrow-darker | 23 ++++++--------------- rc.lua.rainbow | 22 +++++--------------- rc.lua.steamburn | 24 ++++++---------------- settings/startup.lua | 9 +++++++++ 10 files changed, 78 insertions(+), 153 deletions(-) create mode 100644 myrc/run_once.lua create mode 100644 settings/startup.lua diff --git a/myrc/run_once.lua b/myrc/run_once.lua new file mode 100644 index 0000000..26a17ce --- /dev/null +++ b/myrc/run_once.lua @@ -0,0 +1,10 @@ +local awful = require("awful") + +function run_once(cmd) + findme = cmd + firstspace = cmd:find(" ") + if firstspace then + findme = cmd:sub(0, firstspace-1) + end + awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") +end diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 699a54f..3c41205 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -1,8 +1,8 @@ --[[ - - Blackburn Awesome WM config 2.0 - github.com/copycat-killer - + + Blackburn Awesome WM config 2.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,20 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") -run_once("compton") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization diff --git a/rc.lua.copland b/rc.lua.copland index dcf3db6..b8824cf 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -1,8 +1,8 @@ --[[ - - Copland Awesome WM config - github.com/copycat-killer - + + Copland Awesome WM config + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -39,20 +39,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") -run_once("compton") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization @@ -244,7 +232,7 @@ settings = function() volicon:set_image(beautiful.vol) end end, -colors = +colors = { background = beautiful.bg_normal, mute = "#EB8F8F", diff --git a/rc.lua.dremora b/rc.lua.dremora index ff7daed..f786382 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -1,8 +1,8 @@ --[[ - - Dremora Awesome WM config 2.0 - github.com/copycat-killer - + + Dremora Awesome WM config 2.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,20 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") -run_once("compton") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization diff --git a/rc.lua.holo b/rc.lua.holo index 8594453..022d3cf 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -1,8 +1,8 @@ --[[ - - Holo Awesome WM config 2.0 - github.com/copycat-killer - + + Holo Awesome WM config 2.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,20 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") -run_once("compton") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization @@ -175,7 +163,7 @@ mpdwidget = lain.widgets.mpd({ mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower) mpd_now.title = mpd_now.title:upper():gsub("&.-;", string.lower) widget:set_markup(markup.font("Tamsyn 4", " ") - .. markup.font("Tamsyn 8", + .. markup.font("Tamsyn 8", mpd_now.artist .. " - " .. mpd_now.title diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 95c1ca1..186103c 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -1,8 +1,8 @@ --[[ - - Multicolor Awesome WM config 2.0 - github.com/copycat-killer - + + Multicolor Awesome WM config 2.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,19 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization @@ -198,7 +187,7 @@ volumewidget = lain.widgets.alsa({ end }) --- Net +-- Net netdownicon = wibox.widget.imagebox(beautiful.widget_netdown) --netdownicon.align = "middle" netdowninfo = wibox.widget.textbox() @@ -301,11 +290,11 @@ mytasklist.buttons = awful.util.table.join( end)) for s = 1, screen.count() do - + -- Create a promptbox for each screen mypromptbox[s] = awful.widget.prompt() - + -- We need one layoutbox per screen. mylayoutbox[s] = awful.widget.layoutbox(s) mylayoutbox[s]:buttons(awful.util.table.join( @@ -321,9 +310,9 @@ for s = 1, screen.count() do mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) -- Create the upper wibox - mywibox[s] = awful.wibox({ position = "top", screen = s, height = 20 }) + mywibox[s] = awful.wibox({ position = "top", screen = s, height = 20 }) --border_width = 0, height = 20 }) - + -- Widgets that are aligned to the upper left local left_layout = wibox.layout.fixed.horizontal() left_layout:add(mytaglist[s]) @@ -362,20 +351,20 @@ for s = 1, screen.count() do layout:set_left(left_layout) --layout:set_middle(mytasklist[s]) layout:set_right(right_layout) - + mywibox[s]:set_widget(layout) -- Create the bottom wibox mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 20 }) --mybottomwibox[s].visible = false - + -- Widgets that are aligned to the bottom left bottom_left_layout = wibox.layout.fixed.horizontal() - + -- Widgets that are aligned to the bottom right bottom_right_layout = wibox.layout.fixed.horizontal() bottom_right_layout:add(mylayoutbox[s]) - + -- Now bring it all together (with the tasklist in the middle) bottom_layout = wibox.layout.align.horizontal() bottom_layout:set_left(bottom_left_layout) @@ -698,7 +687,7 @@ for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () c.border_width = 0 elseif awful.client.floating.get(c) or layout == "floating" then c.border_width = beautiful.border_width - elseif #clients == 1 then + elseif #clients == 1 then clients[1].border_width = 0 if layout ~= "max" then awful.client.moveresize(0, 0, 2, 0, clients[1]) diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index c143005..3ff3a09 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -1,8 +1,8 @@ --[[ - - Powerarrow Darker Awesome WM config 2.0 - github.com/copycat-killer - + + Powerarrow Darker Awesome WM config 2.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,19 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 9f58f3a..5dc3663 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -1,8 +1,8 @@ --[[ - Rainbow Awesome WM config 2.0 - github.com/copycat-killer - + Rainbow Awesome WM config 2.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,20 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") -run_once("compton") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization diff --git a/rc.lua.steamburn b/rc.lua.steamburn index f116819..b1feff5 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -1,8 +1,8 @@ --[[ - - Steamburn Awesome WM config 3.0 - github.com/copycat-killer - + + Steamburn Awesome WM config 3.0 + github.com/copycat-killer + --]] -- {{{ Required libraries @@ -38,20 +38,8 @@ do end -- }}} --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter") -run_once("compton") --- }}} +-- STARTUP apps +require("settings.startup") -- {{{ Variable definitions -- localization diff --git a/settings/startup.lua b/settings/startup.lua new file mode 100644 index 0000000..fbc3d57 --- /dev/null +++ b/settings/startup.lua @@ -0,0 +1,9 @@ +-- {{{ Autostart applications + +require("myrc.run_once") + +run_once("urxvtd") +run_once("unclutter") +run_once("compton") + +-- }}} From 79f7396b734340d7159b71399c67bc34acc4c719 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sat, 10 May 2014 20:06:54 -0400 Subject: [PATCH 02/21] Moved rules away from rc.lua.theme files --- rc.lua.blackburn | 35 ++--------------------------------- rc.lua.copland | 35 ++--------------------------------- rc.lua.dremora | 35 ++--------------------------------- rc.lua.holo | 35 ++--------------------------------- rc.lua.multicolor | 35 ++--------------------------------- rc.lua.powerarrow-darker | 35 ++--------------------------------- rc.lua.rainbow | 35 ++--------------------------------- rc.lua.steamburn | 35 ++--------------------------------- settings/rules.lua | 37 +++++++++++++++++++++++++++++++++++++ 9 files changed, 53 insertions(+), 264 deletions(-) create mode 100644 settings/rules.lua diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 3c41205..05569d4 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -545,39 +545,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.copland b/rc.lua.copland index b8824cf..632e274 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -599,39 +599,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][3] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.dremora b/rc.lua.dremora index f786382..42f3344 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -545,39 +545,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.holo b/rc.lua.holo index 022d3cf..505ff71 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -680,39 +680,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 186103c..2c56adf 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -609,39 +609,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 3ff3a09..1391990 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -598,39 +598,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 5dc3663..389026c 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -543,39 +543,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/rc.lua.steamburn b/rc.lua.steamburn index b1feff5..91f8d47 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -552,39 +552,8 @@ clientbuttons = awful.util.table.join( root.keys(globalkeys) -- }}} --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons, - size_hints_honor = false } }, - { rule = { class = "URxvt" }, - properties = { opacity = 0.99 } }, - - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - - { rule = { class = "Dwb" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Iron" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} +-- Rules +require("settings.rules") -- {{{ Signals -- Signal function to execute when a new client appears. diff --git a/settings/rules.lua b/settings/rules.lua new file mode 100644 index 0000000..faecbb9 --- /dev/null +++ b/settings/rules.lua @@ -0,0 +1,37 @@ +-- {{{ Rules + +local awful = require("awful") +local beautiful = require("beautiful") + +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = awful.client.focus.filter, + keys = clientkeys, + buttons = clientbuttons, + size_hints_honor = false } }, + { rule = { class = "URxvt" }, + properties = { opacity = 0.99 } }, + + { rule = { class = "MPlayer" }, + properties = { floating = true } }, + + { rule = { class = "Dwb" }, + properties = { tag = tags[1][1] } }, + + { rule = { class = "Iron" }, + properties = { tag = tags[1][1] } }, + + { rule = { instance = "plugin-container" }, + properties = { tag = tags[1][1] } }, + + { rule = { class = "Gimp" }, + properties = { tag = tags[1][4] } }, + + { rule = { class = "Gimp", role = "gimp-image-window" }, + properties = { maximized_horizontal = true, + maximized_vertical = true } }, +} +-- }}} From b88e5fe10b225ae8178177f76dfd90a8377b7649 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sat, 10 May 2014 20:15:20 -0400 Subject: [PATCH 03/21] Moved Error handling away from rc.lua.theme files --- myrc/errors.lua | 22 ++++++++++++++++++++++ rc.lua.blackburn | 22 ++-------------------- rc.lua.copland | 22 ++-------------------- rc.lua.dremora | 22 ++-------------------- rc.lua.holo | 22 ++-------------------- rc.lua.multicolor | 22 ++-------------------- rc.lua.powerarrow-darker | 22 ++-------------------- rc.lua.rainbow | 22 ++-------------------- rc.lua.steamburn | 22 ++-------------------- 9 files changed, 38 insertions(+), 160 deletions(-) create mode 100644 myrc/errors.lua diff --git a/myrc/errors.lua b/myrc/errors.lua new file mode 100644 index 0000000..af969cb --- /dev/null +++ b/myrc/errors.lua @@ -0,0 +1,22 @@ +local naughty = require("naughty") + +-- {{{ Error handling +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = err }) + in_error = false + end) +end +-- }}} diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 05569d4..49bd70b 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.copland b/rc.lua.copland index 632e274..d653cc1 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -18,26 +18,8 @@ local lain = require("lain") local eminent = require("eminent") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.dremora b/rc.lua.dremora index 42f3344..0179cb3 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.holo b/rc.lua.holo index 505ff71..357ed27 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 2c56adf..f933076 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 1391990..c32e580 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 389026c..473268d 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 91f8d47..87962b4 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -17,26 +17,8 @@ local drop = require("scratchdrop") local lain = require("lain") -- }}} --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} +-- Error handling +require("myrc.errors") -- STARTUP apps require("settings.startup") From 2cd0c1ce71d14cbb1c97aa6cdc1a11fc69b05c7f Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sat, 10 May 2014 20:22:28 -0400 Subject: [PATCH 04/21] looks beter --- settings/startup.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/settings/startup.lua b/settings/startup.lua index fbc3d57..0849178 100644 --- a/settings/startup.lua +++ b/settings/startup.lua @@ -1,7 +1,8 @@ --- {{{ Autostart applications - require("myrc.run_once") + +-- {{{ Autostart applications + run_once("urxvtd") run_once("unclutter") run_once("compton") From 62ae726bfda31218fc52776eafb176a95ccc1f03 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sat, 10 May 2014 20:23:05 -0400 Subject: [PATCH 05/21] looks better --- settings/rules.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/settings/rules.lua b/settings/rules.lua index faecbb9..048c7bf 100644 --- a/settings/rules.lua +++ b/settings/rules.lua @@ -1,8 +1,8 @@ --- {{{ Rules - local awful = require("awful") local beautiful = require("beautiful") +-- {{{ Rules + awful.rules.rules = { -- All clients will match this rule. { rule = { }, @@ -34,4 +34,5 @@ awful.rules.rules = { properties = { maximized_horizontal = true, maximized_vertical = true } }, } + -- }}} From 674ddfc0767b1dc7f7ba522747c38095b619f0d6 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 16:28:00 -0400 Subject: [PATCH 06/21] Moved signals out of rc.lua.theme files. Skipped copland because it is theme-specific --- myrc/signals.lua | 56 +++++++++++++++++++++++++++ rc.lua.blackburn | 55 +------------------------- rc.lua.dremora | 84 +--------------------------------------- rc.lua.holo | 55 +------------------------- rc.lua.multicolor | 59 +--------------------------- rc.lua.powerarrow-darker | 55 +------------------------- rc.lua.rainbow | 55 +------------------------- rc.lua.steamburn | 55 +------------------------- 8 files changed, 70 insertions(+), 404 deletions(-) create mode 100644 myrc/signals.lua diff --git a/myrc/signals.lua b/myrc/signals.lua new file mode 100644 index 0000000..e851b10 --- /dev/null +++ b/myrc/signals.lua @@ -0,0 +1,56 @@ +local awful = require("awful") +local beautiful = require("beautiful") + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c, startup) + -- Enable sloppy focus + c:connect_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c + end + end) + + if not startup and not c.size_hints.user_position + and not c.size_hints.program_position then + awful.placement.no_overlap(c) + awful.placement.no_offscreen(c) + end +end) + +-- No border for maximized clients +client.connect_signal("focus", + function(c) + if c.maximized_horizontal == true and c.maximized_vertical == true then + c.border_width = 0 + c.border_color = beautiful.border_normal + else + c.border_width = beautiful.border_width + c.border_color = beautiful.border_focus + end + end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} + +-- {{{ Arrange signal handler +for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () + local clients = awful.client.visible(s) + local layout = awful.layout.getname(awful.layout.get(s)) + + if #clients > 0 then -- Fine grained borders and floaters control + for _, c in pairs(clients) do -- Floaters always have borders + if awful.client.floating.get(c) or layout == "floating" then + c.border_width = beautiful.border_width + + -- No borders with only one visible client + elseif #clients == 1 or layout == "max" then + clients[1].border_width = 0 + else + c.border_width = beautiful.border_width + end + end + end + end) +end +-- }}} diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 49bd70b..4446078 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -530,56 +530,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - - -- No borders with only one visible client - elseif #clients == 1 or layout == "max" then - clients[1].border_width = 0 - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") diff --git a/rc.lua.dremora b/rc.lua.dremora index 0179cb3..3e24a82 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -530,85 +530,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end - - local titlebars_enabled = true - if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then - -- buttons for the titlebar - local buttons = awful.util.table.join( - awful.button({ }, 1, function() - client.focus = c - c:raise() - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - client.focus = c - c:raise() - awful.mouse.client.resize(c) - end) - ) - - -- Title in the middle - local middle_layout = wibox.layout.flex.horizontal() - local title = awful.titlebar.widget.titlewidget(c) - title:set_align("center") - middle_layout:add(title) - middle_layout:buttons(buttons) - - local layout = wibox.layout.align.horizontal() - layout:set_middle(middle_layout) - - awful.titlebar(c,{size=18}):set_widget(layout) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - - -- No borders with only one visible client - elseif #clients == 1 or layout == "max" then - clients[1].border_width = 0 - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") diff --git a/rc.lua.holo b/rc.lua.holo index 357ed27..571cdad 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -665,56 +665,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - - -- No borders with only one visible client - elseif #clients == 1 or layout == "max" then - clients[1].border_width = 0 - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") diff --git a/rc.lua.multicolor b/rc.lua.multicolor index f933076..91dcca8 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -594,60 +594,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - -- No borders with only one humanly visible client - if layout == "max" then - c.border_width = 0 - elseif awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - elseif #clients == 1 then - clients[1].border_width = 0 - if layout ~= "max" then - awful.client.moveresize(0, 0, 2, 0, clients[1]) - end - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index c32e580..ce55936 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -583,56 +583,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - - -- No borders with only one visible client - elseif #clients == 1 or layout == "max" then - clients[1].border_width = 0 - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 473268d..ff6efd0 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -528,56 +528,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - - -- No borders with only one visible client - elseif #clients == 1 or layout == "max" then - clients[1].border_width = 0 - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 87962b4..adce0d2 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -537,56 +537,5 @@ root.keys(globalkeys) -- Rules require("settings.rules") --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup and not c.size_hints.user_position - and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end -end) - --- No border for maximized clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - c.border_color = beautiful.border_normal - else - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then -- Fine grained borders and floaters control - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - - -- No borders with only one visible client - elseif #clients == 1 or layout == "max" then - clients[1].border_width = 0 - else - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} +-- Signals +require("myrc.signals") From 00c993dcf36c703fe18ff40e10654bc7f564a281 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 16:53:37 -0400 Subject: [PATCH 07/21] Moved mouse bindings out of rc.lua.theme files --- rc.lua.blackburn | 9 ++------- rc.lua.copland | 9 ++------- rc.lua.dremora | 9 ++------- rc.lua.holo | 9 ++------- rc.lua.multicolor | 9 ++------- rc.lua.powerarrow-darker | 9 ++------- rc.lua.rainbow | 9 ++------- rc.lua.steamburn | 9 ++------- settings/binds.lua | 9 +++++++++ 9 files changed, 25 insertions(+), 56 deletions(-) create mode 100644 settings/binds.lua diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 4446078..d348fdd 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -289,13 +289,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.copland b/rc.lua.copland index d653cc1..7e38a0c 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -339,13 +339,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.dremora b/rc.lua.dremora index 3e24a82..912ee99 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -289,13 +289,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.holo b/rc.lua.holo index 571cdad..cdfe937 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -424,13 +424,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 91dcca8..b74d3b9 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -356,13 +356,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse Bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index ce55936..4bae2f2 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -347,13 +347,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse Bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.rainbow b/rc.lua.rainbow index ff6efd0..32bb946 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -287,13 +287,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/rc.lua.steamburn b/rc.lua.steamburn index adce0d2..691d341 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -300,13 +300,8 @@ for s = 1, screen.count() do end -- }}} --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} +-- Bindings +require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join( diff --git a/settings/binds.lua b/settings/binds.lua new file mode 100644 index 0000000..daa552b --- /dev/null +++ b/settings/binds.lua @@ -0,0 +1,9 @@ +local awful = require("awful") + +-- {{{ Mouse bindings +root.buttons(awful.util.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) +-- }}} From 3dda0e3e9932939035da22fd1a9c78c9820b1581 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 17:27:50 -0400 Subject: [PATCH 08/21] Moved tag bindings to settings/binds.lua --- rc.lua.blackburn | 39 +-------------------------------------- rc.lua.copland | 39 +-------------------------------------- rc.lua.dremora | 39 +-------------------------------------- rc.lua.holo | 39 +-------------------------------------- rc.lua.multicolor | 39 +-------------------------------------- rc.lua.powerarrow-darker | 39 +-------------------------------------- rc.lua.rainbow | 39 +-------------------------------------- rc.lua.steamburn | 39 +-------------------------------------- settings/binds.lua | 37 +++++++++++++++++++++++++++++++++++++ 9 files changed, 45 insertions(+), 304 deletions(-) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index d348fdd..271a526 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -293,7 +293,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -476,43 +476,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.copland b/rc.lua.copland index 7e38a0c..43c13ff 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -343,7 +343,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -530,43 +530,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.dremora b/rc.lua.dremora index 912ee99..e3089cb 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -293,7 +293,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -476,43 +476,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.holo b/rc.lua.holo index cdfe937..ad8415d 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -428,7 +428,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -611,43 +611,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.multicolor b/rc.lua.multicolor index b74d3b9..b8c33e0 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -360,7 +360,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -540,43 +540,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 4bae2f2..2973f38 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -351,7 +351,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -529,43 +529,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 32bb946..aa40040 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -291,7 +291,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -474,43 +474,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 691d341..cb4123e 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -304,7 +304,7 @@ end require("settings.binds") -- {{{ Key bindings -globalkeys = awful.util.table.join( +globalkeys = awful.util.table.join(globalkeys, -- Take a screenshot -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot awful.key({ altkey }, "p", function() os.execute("screenshot") end), @@ -483,43 +483,6 @@ clientkeys = awful.util.table.join( end) ) --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.movetotag(tag) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - local tag = awful.tag.gettags(client.focus.screen)[i] - if client.focus and tag then - awful.client.toggletag(tag) - end - end)) -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), diff --git a/settings/binds.lua b/settings/binds.lua index daa552b..a19b040 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -7,3 +7,40 @@ root.buttons(awful.util.table.join( awful.button({ }, 5, awful.tag.viewprev) )) -- }}} + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it works on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, 9 do + globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = mouse.screen + local tag = awful.tag.gettags(screen)[i] + if tag then + awful.tag.viewonly(tag) + end + end), + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = mouse.screen + local tag = awful.tag.gettags(screen)[i] + if tag then + awful.tag.viewtoggle(tag) + end + end), + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + local tag = awful.tag.gettags(client.focus.screen)[i] + if client.focus and tag then + awful.client.movetotag(tag) + end + end), + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + local tag = awful.tag.gettags(client.focus.screen)[i] + if client.focus and tag then + awful.client.toggletag(tag) + end + end)) +end From 7061b480e49a21b923aaf16e4a6159e1d77266b4 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 18:02:36 -0400 Subject: [PATCH 09/21] Moved layout manipulation, standard program and dropdown terminal binds to settings/binds.lua --- rc.lua.blackburn | 34 +--------------------------------- rc.lua.copland | 34 +--------------------------------- rc.lua.dremora | 34 +--------------------------------- rc.lua.holo | 34 +--------------------------------- rc.lua.multicolor | 34 +--------------------------------- rc.lua.powerarrow-darker | 34 +--------------------------------- rc.lua.rainbow | 34 +--------------------------------- rc.lua.steamburn | 34 +--------------------------------- settings/binds.lua | 39 +++++++++++++++++++++++++++++++++++++++ 9 files changed, 47 insertions(+), 264 deletions(-) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 271a526..4540042 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -43,7 +42,7 @@ browser2 = "iron" gui_editor = "gvim" graphics = "gimp" -local layouts = { +layouts = { awful.layout.suit.floating, lain.layout.uselesstile, awful.layout.suit.fair, @@ -356,37 +355,6 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end), awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fshome.show(7) end), diff --git a/rc.lua.copland b/rc.lua.copland index 43c13ff..617d8fe 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") local eminent = require("eminent") -- }}} @@ -50,7 +49,7 @@ lain.layout.termfair.ncol = 1 lain.layout.centerfair.nmaster = 3 lain.layout.centerfair.ncol = 1 -local layouts = { +layouts = { awful.layout.suit.floating, awful.layout.suit.fair, awful.layout.suit.tile, @@ -409,37 +408,6 @@ globalkeys = awful.util.table.join(globalkeys, -- Rename tag awful.key({ altkey, "Shift" }, "r", function () lain.util.rename_tag(mypromptbox) end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fshomeupd.show(7) end), diff --git a/rc.lua.dremora b/rc.lua.dremora index e3089cb..02f7439 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -43,7 +42,7 @@ browser2 = "iron" gui_editor = "gvim" graphics = "gimp" -local layouts = { +layouts = { awful.layout.suit.floating, lain.layout.uselesstile, awful.layout.suit.fair, @@ -356,37 +355,6 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end), awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fshome.show(7) end), diff --git a/rc.lua.holo b/rc.lua.holo index ad8415d..bd2d5d3 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -44,7 +43,7 @@ gui_editor = "gvim" graphics = "gimp" musiplr = terminal .. " -e ncmpcpp " -local layouts = { +layouts = { awful.layout.suit.floating, lain.layout.uselesstile, awful.layout.suit.fair, @@ -492,37 +491,6 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end), awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "w", function () yawn.show(7) end), diff --git a/rc.lua.multicolor b/rc.lua.multicolor index b8c33e0..0e810f7 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -44,7 +43,7 @@ gui_editor = "gvim" graphics = "gimp" mail = terminal .. " -e mutt " -local layouts = { +layouts = { awful.layout.suit.floating, awful.layout.suit.tile, awful.layout.suit.tile.left, @@ -420,37 +419,6 @@ globalkeys = awful.util.table.join(globalkeys, mybottomwibox[mouse.screen].visible = not mybottomwibox[mouse.screen].visible end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fswidget.show(7) end), diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 2973f38..258e7c4 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -46,7 +45,7 @@ mail = terminal .. " -e mutt " iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all " musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp " -local layouts = { +layouts = { awful.layout.suit.floating, awful.layout.suit.tile, awful.layout.suit.tile.bottom, @@ -410,37 +409,6 @@ globalkeys = awful.util.table.join(globalkeys, mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fswidget.show(7) end), diff --git a/rc.lua.rainbow b/rc.lua.rainbow index aa40040..53f3970 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -47,7 +46,7 @@ graphics = "gimp" lain.layout.termfair.nmaster = 3 lain.layout.termfair.ncol = 1 -local layouts = { +layouts = { awful.layout.suit.floating, awful.layout.suit.fair, awful.layout.suit.tile, @@ -354,37 +353,6 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end), awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fshome.show(7) end), diff --git a/rc.lua.steamburn b/rc.lua.steamburn index cb4123e..a028131 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -13,7 +13,6 @@ require("awful.autofocus") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -local drop = require("scratchdrop") local lain = require("lain") -- }}} @@ -47,7 +46,7 @@ graphics = "gimp" lain.layout.termfair.nmaster = 3 lain.layout.termfair.ncol = 1 -local layouts = { +layouts = { awful.layout.suit.floating, lain.layout.uselessfair.horizontal, lain.layout.uselesstile, @@ -363,37 +362,6 @@ globalkeys = awful.util.table.join(globalkeys, mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible end), - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () drop(terminal) end), - -- Widgets popups awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey, }, "h", function () fshomeupd.show(7) end), diff --git a/settings/binds.lua b/settings/binds.lua index a19b040..2d12c32 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -1,4 +1,5 @@ local awful = require("awful") +local drop = require("scratchdrop") -- {{{ Mouse bindings root.buttons(awful.util.table.join( @@ -8,6 +9,42 @@ root.buttons(awful.util.table.join( )) -- }}} +-- {{{ Key bindings + +globalkeys = awful.util.table.join(globalkeys, + +-- Layout manipulation +awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), +awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), +awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), +awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), +awful.key({ modkey, }, "u", awful.client.urgent.jumpto), +awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end), +awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), +awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), +awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), +awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), +awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), +awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), +awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), +awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), +awful.key({ modkey, "Control" }, "n", awful.client.restore), + +-- Standard program +awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), +awful.key({ modkey, "Control" }, "r", awesome.restart), +awful.key({ modkey, "Shift" }, "q", awesome.quit), + +-- Dropdown terminal +awful.key({ modkey, }, "z", function () drop(terminal) end) +) + -- Bind all key numbers to tags. -- Be careful: we use keycodes to make it works on any keyboard layout. -- This should map on the top row of your keyboard, usually 1 to 9. @@ -44,3 +81,5 @@ for i = 1, 9 do end end)) end + +-- }}} From 98a60e70edb1adf358e47c879fef7225b2d1f769 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 18:40:25 -0400 Subject: [PATCH 10/21] Moved more bindings to binds.lua --- rc.lua.blackburn | 53 -------------------------------------- rc.lua.copland | 53 -------------------------------------- rc.lua.dremora | 53 -------------------------------------- rc.lua.holo | 53 -------------------------------------- rc.lua.multicolor | 53 -------------------------------------- rc.lua.powerarrow-darker | 53 -------------------------------------- rc.lua.rainbow | 53 -------------------------------------- rc.lua.steamburn | 53 -------------------------------------- settings/binds.lua | 55 +++++++++++++++++++++++++++++++++++++++- 9 files changed, 54 insertions(+), 425 deletions(-) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 4540042..f9ab6f5 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -293,59 +293,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.copland b/rc.lua.copland index 617d8fe..114d12f 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -343,59 +343,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.dremora b/rc.lua.dremora index 02f7439..0d96f7c 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -293,59 +293,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.holo b/rc.lua.holo index bd2d5d3..1072bf6 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -428,59 +428,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 0e810f7..b1b225e 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -360,59 +360,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 258e7c4..07663e5 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -351,59 +351,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 53f3970..00cd829 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -291,59 +291,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/rc.lua.steamburn b/rc.lua.steamburn index a028131..ffd5383 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -304,59 +304,6 @@ require("settings.binds") -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev ), - awful.key({ modkey }, "Right", awful.tag.viewnext ), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible diff --git a/settings/binds.lua b/settings/binds.lua index 2d12c32..2f84a99 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -42,7 +42,60 @@ awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Shift" }, "q", awesome.quit), -- Dropdown terminal -awful.key({ modkey, }, "z", function () drop(terminal) end) +awful.key({ modkey, }, "z", function () drop(terminal) end), + +-- Take a screenshot +-- https://github.com/copycat-killer/dots/blob/master/bin/screenshot +awful.key({ altkey }, "p", function() os.execute("screenshot") end), + +-- Tag browsing +awful.key({ modkey }, "Left", awful.tag.viewprev ), +awful.key({ modkey }, "Right", awful.tag.viewnext ), +awful.key({ modkey }, "Escape", awful.tag.history.restore), + +-- Non-empty tag browsing +awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), +awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), + +-- Default client focus +awful.key({ altkey }, "k", + function () + awful.client.focus.byidx( 1) + if client.focus then client.focus:raise() end + end), +awful.key({ altkey }, "j", + function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end), + +-- By direction client focus +awful.key({ modkey }, "j", + function() + awful.client.focus.bydirection("down") + if client.focus then client.focus:raise() end + end), +awful.key({ modkey }, "k", + function() + awful.client.focus.bydirection("up") + if client.focus then client.focus:raise() end + end), +awful.key({ modkey }, "h", + function() + awful.client.focus.bydirection("left") + if client.focus then client.focus:raise() end + end), +awful.key({ modkey }, "l", + function() + awful.client.focus.bydirection("right") + if client.focus then client.focus:raise() end + end), + +-- Show Menu +awful.key({ modkey }, "w", + function () + mymainmenu:show({ keygrabber = true }) + end) ) -- Bind all key numbers to tags. From 09387e8326c40fd2498f35f5a8995b1c3f240533 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 19:05:24 -0400 Subject: [PATCH 11/21] Moved more bindings! --- rc.lua.blackburn | 43 +--------------------------------------- rc.lua.copland | 43 +--------------------------------------- rc.lua.dremora | 43 +--------------------------------------- rc.lua.holo | 43 +--------------------------------------- rc.lua.multicolor | 43 +--------------------------------------- rc.lua.powerarrow-darker | 43 +--------------------------------------- rc.lua.rainbow | 43 +--------------------------------------- rc.lua.steamburn | 43 +--------------------------------------- settings/binds.lua | 43 +++++++++++++++++++++++++++++++++++++++- 9 files changed, 50 insertions(+), 337 deletions(-) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index f9ab6f5..edef94f 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -327,48 +327,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set Master playback 100%") volumewidget.update() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.copland b/rc.lua.copland index 114d12f..d5c4463 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -380,48 +380,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set " .. volume.channel .. " playback 100%") volume.notify() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.dremora b/rc.lua.dremora index 0d96f7c..f81208d 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -327,48 +327,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set Master playback 100%") volumewidget.update() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.holo b/rc.lua.holo index 1072bf6..d736b23 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -462,48 +462,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set " .. myvolumebar.channel .. " playback 100%") myvolumebar.notify() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.multicolor b/rc.lua.multicolor index b1b225e..6272618 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -391,48 +391,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set Master playback 100%") volumewidget.update() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 07663e5..a2d7f79 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -380,48 +380,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set Master playback 100%") volumewidget.update() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 00cd829..3dc39f8 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -325,48 +325,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set " .. volume.channel .. " playback 100%") volume.notify() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/rc.lua.steamburn b/rc.lua.steamburn index ffd5383..fe96431 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -334,48 +334,7 @@ globalkeys = awful.util.table.join(globalkeys, function () awful.util.spawn("amixer -q set Master playback 100%") volumewidget.update() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + end) ) clientkeys = awful.util.table.join( diff --git a/settings/binds.lua b/settings/binds.lua index 2f84a99..dfe217d 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -95,7 +95,48 @@ awful.key({ modkey }, "l", awful.key({ modkey }, "w", function () mymainmenu:show({ keygrabber = true }) - end) + end), + +-- MPD control +awful.key({ altkey, "Control" }, "Up", + function () + awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") + mpdwidget.update() + end), +awful.key({ altkey, "Control" }, "Down", + function () + awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") + mpdwidget.update() + end), +awful.key({ altkey, "Control" }, "Left", + function () + awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") + mpdwidget.update() + end), +awful.key({ altkey, "Control" }, "Right", + function () + awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") + mpdwidget.update() + end), + +-- Copy to clipboard +awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), + +-- User programs +awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), +awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), +awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), +awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), + +-- Prompt +awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), +awful.key({ modkey }, "x", + function () + awful.prompt.run({ prompt = "Run Lua code: " }, + mypromptbox[mouse.screen].widget, + awful.util.eval, nil, + awful.util.getdir("cache") .. "/history_eval") + end) ) -- Bind all key numbers to tags. From 76894ee07e0760d21472d535c100b01e3efabbd0 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 19:17:50 -0400 Subject: [PATCH 12/21] Moved singals to ./stock/signals --- rc.lua.blackburn | 2 +- rc.lua.dremora | 2 +- rc.lua.holo | 2 +- rc.lua.multicolor | 2 +- rc.lua.powerarrow-darker | 2 +- rc.lua.rainbow | 2 +- rc.lua.steamburn | 2 +- {myrc => stock}/signals.lua | 0 8 files changed, 7 insertions(+), 7 deletions(-) rename {myrc => stock}/signals.lua (100%) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index edef94f..8f6d9ab 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -363,4 +363,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/rc.lua.dremora b/rc.lua.dremora index f81208d..d64dd10 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -363,4 +363,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/rc.lua.holo b/rc.lua.holo index d736b23..3d1eb47 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -498,4 +498,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 6272618..1d4bfcd 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -427,4 +427,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index a2d7f79..e4a0642 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -416,4 +416,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 3dc39f8..05300a8 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -361,4 +361,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/rc.lua.steamburn b/rc.lua.steamburn index fe96431..52b8cd2 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -370,4 +370,4 @@ root.keys(globalkeys) require("settings.rules") -- Signals -require("myrc.signals") +require("stock.signals") diff --git a/myrc/signals.lua b/stock/signals.lua similarity index 100% rename from myrc/signals.lua rename to stock/signals.lua From 966c8e6f7238f2a9eb485336f12e63c308ea0ae0 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 19:38:10 -0400 Subject: [PATCH 13/21] Moved bindings. Kept 1 theme-specific binding in copland --- rc.lua.blackburn | 25 ------------------------- rc.lua.copland | 26 ++------------------------ rc.lua.dremora | 25 ------------------------- rc.lua.holo | 25 ------------------------- rc.lua.multicolor | 25 ------------------------- rc.lua.powerarrow-darker | 25 ------------------------- rc.lua.rainbow | 25 ------------------------- rc.lua.steamburn | 25 ------------------------- settings/binds.lua | 25 +++++++++++++++++++++++++ 9 files changed, 27 insertions(+), 199 deletions(-) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 8f6d9ab..1b794d4 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -330,31 +330,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.copland b/rc.lua.copland index d5c4463..65fe3f8 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -383,32 +383,10 @@ globalkeys = awful.util.table.join(globalkeys, end) ) -clientkeys = awful.util.table.join( - awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ), - 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - end) +clientkeys = awful.util.table.join(clientkeys, + awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ) ) -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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.dremora b/rc.lua.dremora index d64dd10..fbcf6dc 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -330,31 +330,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.holo b/rc.lua.holo index 3d1eb47..338a97d 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -465,31 +465,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 1d4bfcd..c918694 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -394,31 +394,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index e4a0642..ebe976e 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -383,31 +383,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 05300a8..e04ef63 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -328,31 +328,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 52b8cd2..ab65eb6 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -337,31 +337,6 @@ globalkeys = awful.util.table.join(globalkeys, 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, "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), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - 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)) - -- Set keys root.keys(globalkeys) -- }}} diff --git a/settings/binds.lua b/settings/binds.lua index dfe217d..4d74120 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -176,4 +176,29 @@ for i = 1, 9 do 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, "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), + awful.key({ modkey, }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c.maximized_vertical = not c.maximized_vertical + 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)) + -- }}} From 73cdf22ad6683820fb3843df2728e45d477fdc65 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 19:58:00 -0400 Subject: [PATCH 14/21] Moved taglist and tasklist to ./stock --- rc.lua.blackburn | 45 ++-------------------------------------- rc.lua.copland | 45 ++-------------------------------------- rc.lua.dremora | 45 ++-------------------------------------- rc.lua.holo | 45 ++-------------------------------------- rc.lua.multicolor | 45 ++-------------------------------------- rc.lua.powerarrow-darker | 45 ++-------------------------------------- rc.lua.rainbow | 44 ++------------------------------------- rc.lua.steamburn | 44 ++------------------------------------- stock/taglist.lua | 11 ++++++++++ stock/tasklist.lua | 36 ++++++++++++++++++++++++++++++++ 10 files changed, 63 insertions(+), 342 deletions(-) create mode 100644 stock/taglist.lua create mode 100644 stock/tasklist.lua diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 1b794d4..0cf7ac8 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -188,49 +188,8 @@ arrl_post:set_image(beautiful.arrl_lr_post) mywibox = {} mypromptbox = {} mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") for s = 1, screen.count() do -- Create a promptbox for each screen diff --git a/rc.lua.copland b/rc.lua.copland index 65fe3f8..4896f60 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -237,49 +237,8 @@ bar_spr = wibox.widget.textbox(' ' .. markup("#3333 mywibox = {} mypromptbox = {} mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") for s = 1, screen.count() do -- Create a promptbox for each screen diff --git a/rc.lua.dremora b/rc.lua.dremora index fbcf6dc..d4d5845 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -193,49 +193,8 @@ arrl_post:set_image(beautiful.arrl_lr_post) mywibox = {} mypromptbox = {} mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") for s = 1, screen.count() do -- Create a promptbox for each screen diff --git a/rc.lua.holo b/rc.lua.holo index 338a97d..efc13a4 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -286,49 +286,8 @@ mywibox = {} mybottomwibox = {} mypromptbox = {} mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") for s = 1, screen.count() do -- Create a promptbox for each screen diff --git a/rc.lua.multicolor b/rc.lua.multicolor index c918694..698b1cb 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -226,49 +226,8 @@ mywibox = {} mybottomwibox = {} mypromptbox = {} mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") for s = 1, screen.count() do diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index ebe976e..cd231cb 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -225,49 +225,8 @@ arrl_ld:set_image(beautiful.arrl_ld) mywibox = {} mypromptbox = {} mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") for s = 1, screen.count() do diff --git a/rc.lua.rainbow b/rc.lua.rainbow index e04ef63..01acbf4 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -178,48 +178,8 @@ med_spr = wibox.widget.textbox(' ') mywibox = {} mypromptbox = {} txtlayoutbox = {} -mytaglist = {} -mytasklist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)) -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") -- Writes a string representation of the current layout in a textbox widget function updatelayoutbox(layout, s) diff --git a/rc.lua.steamburn b/rc.lua.steamburn index ab65eb6..221859c 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -189,48 +189,8 @@ spr = wibox.widget.textbox(' ') mywibox = {} mypromptbox = {} txtlayoutbox = {} -mytaglist = {} -mytasklist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)) -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) +require("stock.taglist") +require("stock.tasklist") -- Writes a string representation of the current layout in a textbox widget function updatelayoutbox(layout, s) diff --git a/stock/taglist.lua b/stock/taglist.lua new file mode 100644 index 0000000..3b80c9d --- /dev/null +++ b/stock/taglist.lua @@ -0,0 +1,11 @@ +local awful = require("awful") + +mytaglist = {} +mytaglist.buttons = awful.util.table.join( + awful.button({ }, 1, awful.tag.viewonly), + awful.button({ modkey }, 1, awful.client.movetotag), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, awful.client.toggletag), + awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) + ) diff --git a/stock/tasklist.lua b/stock/tasklist.lua new file mode 100644 index 0000000..a3bf8cc --- /dev/null +++ b/stock/tasklist.lua @@ -0,0 +1,36 @@ +local awful = require("awful") + +mytasklist = {} +mytasklist.buttons = awful.util.table.join( + awful.button({ }, 1, function (c) + if c == client.focus then + c.minimized = true + else + -- Without this, the following + -- :isvisible() makes no sense + c.minimized = false + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() + end + end), + awful.button({ }, 3, function () + if instance then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ width=250 }) + end + end), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + if client.focus then client.focus:raise() end + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end)) From 8a6f4c82369b6d381bd7f54678804ada4af833a0 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 20:16:12 -0400 Subject: [PATCH 15/21] Forgot to require lain --- settings/binds.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/settings/binds.lua b/settings/binds.lua index 4d74120..a6a864c 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -1,5 +1,6 @@ local awful = require("awful") local drop = require("scratchdrop") +local lain = require("lain") -- {{{ Mouse bindings root.buttons(awful.util.table.join( From 34e4fd15903c67d46dd09d5072d3caf0713bac4d Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 20:34:01 -0400 Subject: [PATCH 16/21] Moved variables to ./settings/variables.lua --- rc.lua.blackburn | 14 ++------------ rc.lua.copland | 14 ++------------ rc.lua.dremora | 14 ++------------ rc.lua.holo | 13 ++----------- rc.lua.multicolor | 13 ++----------- rc.lua.powerarrow-darker | 13 ++----------- rc.lua.rainbow | 14 ++------------ rc.lua.steamburn | 14 ++------------ settings/variables.lua | 12 ++++++++++++ 9 files changed, 28 insertions(+), 93 deletions(-) create mode 100644 settings/variables.lua diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 0cf7ac8..4815a65 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -29,18 +29,8 @@ os.setlocale(os.getenv("LANG")) -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/blackburn/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor - --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" +-- variables +require("settings.variables") layouts = { awful.layout.suit.floating, diff --git a/rc.lua.copland b/rc.lua.copland index 4896f60..6eb4e15 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -30,18 +30,8 @@ os.setlocale(os.getenv("LANG")) -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/copland/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor - --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" +-- variables +require("settings.variables") -- lain lain.layout.termfair.nmaster = 3 diff --git a/rc.lua.dremora b/rc.lua.dremora index d4d5845..494c8bc 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -29,18 +29,8 @@ require("settings.startup") -- beautiful init beautiful.init(awful.util.getdir("config") .. "/themes/dremora/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor - --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" +-- variables +require("settings.variables") layouts = { awful.layout.suit.floating, diff --git a/rc.lua.holo b/rc.lua.holo index efc13a4..fe8efc6 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -29,18 +29,9 @@ require("settings.startup") -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/holo/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor +-- variables +require("settings.variables") --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" musiplr = terminal .. " -e ncmpcpp " layouts = { diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 698b1cb..1e946a8 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -29,18 +29,9 @@ os.setlocale(os.getenv("LANG")) -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor +-- variables +require("settings.variables") --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" mail = terminal .. " -e mutt " layouts = { diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index cd231cb..e0c40af 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -29,18 +29,9 @@ os.setlocale(os.getenv("LANG")) -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor +-- variables +require("settings.variables") --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" mail = terminal .. " -e mutt " iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all " musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp " diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 01acbf4..b383cfb 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -29,18 +29,8 @@ os.setlocale(os.getenv("LANG")) -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/rainbow/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor - --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" +-- variables +require("settings.variables") -- lain lain.layout.termfair.nmaster = 3 diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 221859c..e587420 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -29,18 +29,8 @@ os.setlocale(os.getenv("LANG")) -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/steamburn/theme.lua") --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor - --- user defined -browser = "dwb" -browser2 = "iron" -gui_editor = "gvim" -graphics = "gimp" +-- variables +require("settings.variables") -- lain lain.layout.termfair.nmaster = 3 diff --git a/settings/variables.lua b/settings/variables.lua new file mode 100644 index 0000000..a5e1357 --- /dev/null +++ b/settings/variables.lua @@ -0,0 +1,12 @@ +-- common +modkey = "Mod4" +altkey = "Mod1" +terminal = "urxvtc" or "xterm" +editor = os.getenv("EDITOR") or "nano" or "vi" +editor_cmd = terminal .. " -e " .. editor + +-- user defined +browser = "dwb" +browser2 = "iron" +gui_editor = "gvim" +graphics = "gimp" From 4bbf739daea20c4af195c2c0e0a681e716b02a94 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 20:48:51 -0400 Subject: [PATCH 17/21] Moved mail variable in settings/variables.lua --- rc.lua.multicolor | 2 -- rc.lua.powerarrow-darker | 1 - settings/variables.lua | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 1e946a8..d0fd318 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -32,8 +32,6 @@ beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lu -- variables require("settings.variables") -mail = terminal .. " -e mutt " - layouts = { awful.layout.suit.floating, awful.layout.suit.tile, diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index e0c40af..2b6c22b 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -32,7 +32,6 @@ beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/t -- variables require("settings.variables") -mail = terminal .. " -e mutt " iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all " musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp " diff --git a/settings/variables.lua b/settings/variables.lua index a5e1357..3c77b70 100644 --- a/settings/variables.lua +++ b/settings/variables.lua @@ -10,3 +10,4 @@ browser = "dwb" browser2 = "iron" gui_editor = "gvim" graphics = "gimp" +mail = terminal .. " -e mutt " From 773d424b8ffa6fd719eb99f49329821698f10985 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 22:45:24 -0400 Subject: [PATCH 18/21] Moved localization to ./settings/variables.lua --- rc.lua.blackburn | 3 --- rc.lua.copland | 3 --- rc.lua.dremora | 3 --- rc.lua.holo | 3 --- rc.lua.multicolor | 3 --- rc.lua.powerarrow-darker | 3 --- rc.lua.rainbow | 3 --- rc.lua.steamburn | 3 --- settings/variables.lua | 3 +++ 9 files changed, 3 insertions(+), 24 deletions(-) diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 4815a65..116c898 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization -os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/blackburn/theme.lua") diff --git a/rc.lua.copland b/rc.lua.copland index 6eb4e15..08fb8fa 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -24,9 +24,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization -os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/copland/theme.lua") diff --git a/rc.lua.dremora b/rc.lua.dremora index 494c8bc..f17b8cb 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization ---os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(awful.util.getdir("config") .. "/themes/dremora/theme.lua") diff --git a/rc.lua.holo b/rc.lua.holo index fe8efc6..b23c45a 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization ---os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/holo/theme.lua") diff --git a/rc.lua.multicolor b/rc.lua.multicolor index d0fd318..8cd36ec 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization -os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lua") diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 2b6c22b..1426f06 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization -os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker/theme.lua") diff --git a/rc.lua.rainbow b/rc.lua.rainbow index b383cfb..1de8844 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization -os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/rainbow/theme.lua") diff --git a/rc.lua.steamburn b/rc.lua.steamburn index e587420..dac1f98 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -23,9 +23,6 @@ require("myrc.errors") require("settings.startup") -- {{{ Variable definitions --- localization -os.setlocale(os.getenv("LANG")) - -- beautiful init beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/steamburn/theme.lua") diff --git a/settings/variables.lua b/settings/variables.lua index 3c77b70..28ae6d2 100644 --- a/settings/variables.lua +++ b/settings/variables.lua @@ -1,3 +1,6 @@ +-- localization +os.setlocale(os.getenv("LANG")) + -- common modkey = "Mod4" altkey = "Mod1" From fe44ee12a1cb30e0abce5898addc04cd165106e4 Mon Sep 17 00:00:00 2001 From: Alexandre Viau Date: Sun, 11 May 2014 22:54:41 -0400 Subject: [PATCH 19/21] Moved Wallpaper to ./stock/wallpaper --- rc.lua.blackburn | 6 +----- rc.lua.copland | 6 +----- rc.lua.dremora | 6 +----- rc.lua.holo | 6 +----- rc.lua.multicolor | 6 +----- rc.lua.powerarrow-darker | 6 +----- rc.lua.rainbow | 6 +----- rc.lua.steamburn | 6 +----- stock/wallpaper.lua | 10 ++++++++++ 9 files changed, 18 insertions(+), 40 deletions(-) create mode 100644 stock/wallpaper.lua diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 116c898..6343c15 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -49,11 +49,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/rc.lua.copland b/rc.lua.copland index 08fb8fa..69bddd4 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -60,11 +60,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/rc.lua.dremora b/rc.lua.dremora index f17b8cb..59e7d1f 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -49,11 +49,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/rc.lua.holo b/rc.lua.holo index b23c45a..9b5db6c 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -51,11 +51,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 8cd36ec..909853c 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -55,11 +55,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Freedesktop Menu diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 1426f06..b35fdb2 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -53,11 +53,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 1de8844..1c04243 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -56,11 +56,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/rc.lua.steamburn b/rc.lua.steamburn index dac1f98..f158066 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -54,11 +54,7 @@ end -- }}} -- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end +require("stock.wallpaper") -- }}} -- {{{ Menu diff --git a/stock/wallpaper.lua b/stock/wallpaper.lua new file mode 100644 index 0000000..2c70a7f --- /dev/null +++ b/stock/wallpaper.lua @@ -0,0 +1,10 @@ +local beautiful = require("beautiful") +local gears = require("gears") + +-- {{{ Wallpaper +if beautiful.wallpaper then + for s = 1, screen.count() do + gears.wallpaper.maximized(beautiful.wallpaper, s, true) + end +end +-- }}} From fbcc1210bb4cb4be405142abc9a7b21235ab67e5 Mon Sep 17 00:00:00 2001 From: aviau Date: Mon, 12 May 2014 14:21:42 -0400 Subject: [PATCH 20/21] Moved tags and layouts to ./settings/tags.lua --- rc.lua.blackburn | 19 ++----------------- rc.lua.copland | 23 ++--------------------- rc.lua.dremora | 19 ++----------------- rc.lua.holo | 19 ++----------------- rc.lua.multicolor | 25 ++----------------------- rc.lua.powerarrow-darker | 20 ++------------------ rc.lua.rainbow | 22 ++-------------------- rc.lua.steamburn | 20 ++------------------ settings/tags.lua | 36 ++++++++++++++++++++++++++++++++++++ 9 files changed, 52 insertions(+), 151 deletions(-) create mode 100644 settings/tags.lua diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 6343c15..7f4c1cd 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -29,23 +29,8 @@ beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/blackburn/theme.lua -- variables require("settings.variables") -layouts = { - awful.layout.suit.floating, - lain.layout.uselesstile, - awful.layout.suit.fair, - lain.layout.uselesstile.left, - lain.layout.uselesstile.top -} --- }}} - --- {{{ Tags -tags = { - names = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, - layout = { layouts[1], layouts[3], layouts[2], layouts[1], layouts[5] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.copland b/rc.lua.copland index 69bddd4..9b792ac 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -36,27 +36,8 @@ lain.layout.termfair.ncol = 1 lain.layout.centerfair.nmaster = 3 lain.layout.centerfair.ncol = 1 -layouts = { - awful.layout.suit.floating, - awful.layout.suit.fair, - awful.layout.suit.tile, - lain.layout.uselessfair.horizontal, - lain.layout.uselesstile, - lain.layout.uselessfair, - lain.layout.termfair, - lain.layout.centerfair, - lain.layout.uselesspiral.dwindle -} --- }}} - --- {{{ Tags -tags = { - names = { "start", "2", "3", "4", "5" }, - layout = { layouts[1], layouts[2], layouts[3], layouts[4], layouts[5] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.dremora b/rc.lua.dremora index 59e7d1f..08ef791 100644 --- a/rc.lua.dremora +++ b/rc.lua.dremora @@ -29,23 +29,8 @@ beautiful.init(awful.util.getdir("config") .. "/themes/dremora/theme.lua") -- variables require("settings.variables") -layouts = { - awful.layout.suit.floating, - lain.layout.uselesstile, - awful.layout.suit.fair, - lain.layout.uselesstile.left, - lain.layout.uselesstile.top -} --- }}} - --- {{{ Tags -tags = { - names = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, - layout = { layouts[1], layouts[3], layouts[2], layouts[1], layouts[5] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.holo b/rc.lua.holo index 9b5db6c..bfe21bb 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -31,23 +31,8 @@ require("settings.variables") musiplr = terminal .. " -e ncmpcpp " -layouts = { - awful.layout.suit.floating, - lain.layout.uselesstile, - awful.layout.suit.fair, - lain.layout.uselesstile.left, - lain.layout.uselesstile.top -} --- }}} - --- {{{ Tags -tags = { - names = { " WEB ", " TERMINAL ", " FILES ", " OTHER " }, - layout = { layouts[1], layouts[3], layouts[2], layouts[4] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 909853c..22b3ac8 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -29,29 +29,8 @@ beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/multicolor/theme.lu -- variables require("settings.variables") -layouts = { - awful.layout.suit.floating, - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - 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.max, -} --- }}} - --- {{{ Tags -tags = { - names = { "web", "term", "docs", "media", "files", "other" }, - layout = { layouts[1], layouts[3], layouts[4], layouts[1], layouts[7], layouts[1] } -} -for s = 1, screen.count() do --- Each screen has its own tag table. - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index b35fdb2..2ee55b6 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -32,24 +32,8 @@ require("settings.variables") iptraf = terminal .. " -g 180x54-20+34 -e sudo iptraf-ng -i all " musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp " -layouts = { - awful.layout.suit.floating, - awful.layout.suit.tile, - awful.layout.suit.tile.bottom, - awful.layout.suit.fair, - awful.layout.suit.fair.horizontal, -} --- }}} - --- {{{ Tags -tags = { - names = { "1", "2", "3", "4", "5"}, - layout = { layouts[1], layouts[2], layouts[3], layouts[1], layouts[4] } -} - -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.rainbow b/rc.lua.rainbow index 1c04243..9749f21 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -33,26 +33,8 @@ require("settings.variables") lain.layout.termfair.nmaster = 3 lain.layout.termfair.ncol = 1 -layouts = { - awful.layout.suit.floating, - awful.layout.suit.fair, - awful.layout.suit.tile, - lain.layout.uselessfair.horizontal, - lain.layout.uselesstile, - lain.layout.uselessfair, - lain.layout.termfair, - lain.layout.uselesspiral.dwindle -} --- }}} - --- {{{ Tags -tags = { - names = { "www", "dev", "docs", "media" }, - layout = { layouts[1], layouts[2], layouts[3], layouts[4] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/rc.lua.steamburn b/rc.lua.steamburn index f158066..00bdb00 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -33,24 +33,8 @@ require("settings.variables") lain.layout.termfair.nmaster = 3 lain.layout.termfair.ncol = 1 -layouts = { - awful.layout.suit.floating, - lain.layout.uselessfair.horizontal, - lain.layout.uselesstile, - lain.layout.uselessfair, - lain.layout.termfair, - lain.layout.uselesspiral.dwindle -} --- }}} - --- {{{ Tags -tags = { - names = { "web", "term", "docs", "media", "down"}, - layout = { layouts[1], layouts[3], layouts[4], layouts[1], layouts[6] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end +-- Tags and layouts +require("settings.tags") -- }}} -- {{{ Wallpaper diff --git a/settings/tags.lua b/settings/tags.lua new file mode 100644 index 0000000..898c07a --- /dev/null +++ b/settings/tags.lua @@ -0,0 +1,36 @@ +local awful = require("awful") + +layouts = { + awful.layout.suit.floating, + awful.layout.suit.tile, + awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + 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.max, + awful.layout.suit.max.fullscreen, + awful.layout.suit.magnifier +} + + +tags = { + names = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, + layout = { + layouts[1], + layouts[1], + layouts[1], + layouts[1], + layouts[1], + layouts[1], + layouts[1], + layouts[1], + layouts[1], + } +} + +for s = 1, screen.count() do + tags[s] = awful.tag(tags.names, s, tags.layout) +end From 33483978e5729c72a86bd990bc287291cdc62245 Mon Sep 17 00:00:00 2001 From: aviau Date: Mon, 12 May 2014 16:16:06 -0400 Subject: [PATCH 21/21] Better ident --- settings/binds.lua | 225 ++++++++++++++++++++++----------------------- 1 file changed, 112 insertions(+), 113 deletions(-) diff --git a/settings/binds.lua b/settings/binds.lua index a6a864c..67484d5 100644 --- a/settings/binds.lua +++ b/settings/binds.lua @@ -13,131 +13,130 @@ root.buttons(awful.util.table.join( -- {{{ Key bindings globalkeys = awful.util.table.join(globalkeys, + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end), + awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), + awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), + awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), + awful.key({ modkey, "Control" }, "n", awful.client.restore), --- Layout manipulation -awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), -awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), -awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), -awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), -awful.key({ modkey, }, "u", awful.client.urgent.jumpto), -awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), -awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), -awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), -awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), -awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), -awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), -awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), -awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), -awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), -awful.key({ modkey, "Control" }, "n", awful.client.restore), + -- Standard program + awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), + awful.key({ modkey, "Control" }, "r", awesome.restart), + awful.key({ modkey, "Shift" }, "q", awesome.quit), --- Standard program -awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), -awful.key({ modkey, "Control" }, "r", awesome.restart), -awful.key({ modkey, "Shift" }, "q", awesome.quit), + -- Dropdown terminal + awful.key({ modkey, }, "z", function () drop(terminal) end), --- Dropdown terminal -awful.key({ modkey, }, "z", function () drop(terminal) end), + -- Take a screenshot + -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot + awful.key({ altkey }, "p", function() os.execute("screenshot") end), --- Take a screenshot --- https://github.com/copycat-killer/dots/blob/master/bin/screenshot -awful.key({ altkey }, "p", function() os.execute("screenshot") end), + -- Tag browsing + awful.key({ modkey }, "Left", awful.tag.viewprev ), + awful.key({ modkey }, "Right", awful.tag.viewnext ), + awful.key({ modkey }, "Escape", awful.tag.history.restore), --- Tag browsing -awful.key({ modkey }, "Left", awful.tag.viewprev ), -awful.key({ modkey }, "Right", awful.tag.viewnext ), -awful.key({ modkey }, "Escape", awful.tag.history.restore), + -- Non-empty tag browsing + awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), + awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), --- Non-empty tag browsing -awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), -awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), + -- Default client focus + awful.key({ altkey }, "k", + function () + awful.client.focus.byidx( 1) + if client.focus then client.focus:raise() end + end), + awful.key({ altkey }, "j", + function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end), --- Default client focus -awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), -awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), + -- By direction client focus + awful.key({ modkey }, "j", + function() + awful.client.focus.bydirection("down") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey }, "k", + function() + awful.client.focus.bydirection("up") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey }, "h", + function() + awful.client.focus.bydirection("left") + if client.focus then client.focus:raise() end + end), + awful.key({ modkey }, "l", + function() + awful.client.focus.bydirection("right") + if client.focus then client.focus:raise() end + end), --- By direction client focus -awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), -awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), -awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), -awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), + -- Show Menu + awful.key({ modkey }, "w", + function () + mymainmenu:show({ keygrabber = true }) + end), --- Show Menu -awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), + -- MPD control + awful.key({ altkey, "Control" }, "Up", + function () + awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") + mpdwidget.update() + end), + awful.key({ altkey, "Control" }, "Down", + function () + awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") + mpdwidget.update() + end), + awful.key({ altkey, "Control" }, "Left", + function () + awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") + mpdwidget.update() + end), + awful.key({ altkey, "Control" }, "Right", + function () + awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") + mpdwidget.update() + end), --- MPD control -awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), -awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpcpp stop || ncmpc stop || pms stop") - mpdwidget.update() - end), -awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpcpp prev || ncmpc prev || pms prev") - mpdwidget.update() - end), -awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpcpp next || ncmpc next || pms next") - mpdwidget.update() - end), + -- Copy to clipboard + awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), --- Copy to clipboard -awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), + -- User programs + awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), + awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), + awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), + awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), --- User programs -awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), -awful.key({ modkey }, "i", function () awful.util.spawn(browser2) end), -awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), -awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - --- Prompt -awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), -awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end) + -- Prompt + awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), + awful.key({ modkey }, "x", + function () + awful.prompt.run({ prompt = "Run Lua code: " }, + mypromptbox[mouse.screen].widget, + awful.util.eval, nil, + awful.util.getdir("cache") .. "/history_eval") + end) ) -- Bind all key numbers to tags.