diff options
Diffstat (limited to '')
-rw-r--r-- | .config/awesome/functions/error.lua | 26 | ||||
-rw-r--r-- | .config/awesome/functions/helper.lua | 17 | ||||
-rw-r--r-- | .config/awesome/functions/run_once.lua | 35 | ||||
-rw-r--r-- | .config/awesome/icons/awesome.svg | 62 | ||||
-rw-r--r-- | .config/awesome/icons/debian.svg | 17 | ||||
-rw-r--r-- | .config/awesome/icons/googleplaymusic.png | bin | 0 -> 19123 bytes | |||
-rw-r--r-- | .config/awesome/icons/linux.svg | 63 | ||||
m--------- | .config/awesome/lain | 0 | ||||
-rw-r--r-- | .config/awesome/rc.lua | 874 | ||||
-rw-r--r-- | .config/awesome/stock/binds.lua | 204 | ||||
-rw-r--r-- | .config/awesome/stock/signals.lua | 73 | ||||
-rw-r--r-- | .config/awesome/theme.lua | 110 | ||||
m--------- | .config/awesome/vicious | 0 |
13 files changed, 1481 insertions, 0 deletions
diff --git a/.config/awesome/functions/error.lua b/.config/awesome/functions/error.lua new file mode 100644 index 0000000..74d5af4 --- /dev/null +++ b/.config/awesome/functions/error.lua @@ -0,0 +1,26 @@ +local naughty = require("naughty") + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +-- Handle runtime errors after startup +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err) }) + in_error = false + end) +end +-- }}} diff --git a/.config/awesome/functions/helper.lua b/.config/awesome/functions/helper.lua new file mode 100644 index 0000000..a16080e --- /dev/null +++ b/.config/awesome/functions/helper.lua @@ -0,0 +1,17 @@ +awful = require("awful") +beautiful = require("beautiful") + +-- {{{ Helper functions +local function client_menu_toggle_fn() + local instance = nil + + return function () + if instance and instance.wibox.visible then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ theme = { width = 250 } }) + end + end +end +-- }}} diff --git a/.config/awesome/functions/run_once.lua b/.config/awesome/functions/run_once.lua new file mode 100644 index 0000000..7c57482 --- /dev/null +++ b/.config/awesome/functions/run_once.lua @@ -0,0 +1,35 @@ +local awful = require("awful") +local lfs = require("lfs") + +local function processwalker() + local function yieldprocess() + for dir in lfs.dir("/proc") do + if tonumber(dir) ~= nil then + local f, err = io.open("/proc/"..dir.."/cmdline") + if f then + local cmdline = f:read("*all") + f:close() + if cmdline ~= "" then + coroutine.yield(cmdline) + end + end + end + end + end + return coroutine.wrap(yieldprocess) +end + +function run_once(process, cmd) + assert(type(process) == "string") + local regex_killer = { + ["+"] = "%+", ["-"] = "%-", + ["*"] = "%*", ["?"] = "%?" } + + for p in processwalker() do + if p:find(process:gsub("[-+?*]", regex_killer)) then + return + end + end + return awful.spawn(cmd or process) +end +-- run once END diff --git a/.config/awesome/icons/awesome.svg b/.config/awesome/icons/awesome.svg new file mode 100644 index 0000000..88a3000 --- /dev/null +++ b/.config/awesome/icons/awesome.svg @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="64px" + height="64px" + id="svg2160" + sodipodi:version="0.32" + inkscape:version="0.45.1" + sodipodi:docbase="/home/blackfox/Documents/Branko/Projekti/Awsome/package" + sodipodi:docname="aw-block_icon_64px.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/blackfox/Documents/Branko/Projekti/Awsome/package/aw-block_icon_64px.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs2162" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="5.5" + inkscape:cx="18.374202" + inkscape:cy="37.52583" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:document-units="px" + inkscape:grid-bbox="true" + inkscape:window-width="737" + inkscape:window-height="582" + inkscape:window-x="192" + inkscape:window-y="251" /> + <metadata + id="metadata2165"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + style="opacity:1;fill:#535d6c;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M -1.3e-07,4.440892e-16 L -1.3e-07,20 L 20,20 L 44,20 L 44,22 L 20,22 L -1.3e-07,22 L -1.3e-07,46 L -1.3e-07,64 L 27.0625,64 L 42,64 L 42,44 L 27.0625,44 L 20,44 L 20,42 L 44,42 L 44,44 L 44,48 L 44,64 L 64,64 L 64,48 L 64,44 L 64,18 L 64,4.440892e-16 L 44,4.440892e-16 L 20,4.440892e-16 L -1.3e-07,4.440892e-16 z " + id="rect3458" /> + </g> +</svg> diff --git a/.config/awesome/icons/debian.svg b/.config/awesome/icons/debian.svg new file mode 100644 index 0000000..3d9eb01 --- /dev/null +++ b/.config/awesome/icons/debian.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-60 -75 210 260">
+ <g fill="#D70751">
+ <path d="M64.525,62.053c-4.125,0.058,0.78,2.125,6.165,2.954,1.488-1.161,2.838-2.336,4.04-3.479-3.354,0.821-6.765,0.838-10.205,0.525"/>
+ <path d="M86.665,56.533c2.457-3.389,4.246-7.102,4.878-10.939-0.551,2.736-2.035,5.099-3.435,7.592-7.711,4.854-0.726-2.883-0.004-5.824-8.29,10.436-1.138,6.257-1.439,9.171"/>
+ <path d="M94.839,35.268c0.497-7.428-1.462-5.08-2.121-2.245,0.766,0.4,1.377,5.237,2.121,2.245"/>
+ <path d="M48.883-66.264c2.201,0.395,4.757,0.698,4.398,1.224,2.407-0.528,2.954-1.015-4.398-1.224"/>
+ <path d="M53.281-65.04l-1.556,0.32,1.448-0.127,0.108-0.193"/>
+ <path d="M121.93,38.085c0.247,6.671-1.95,9.907-3.932,15.637l-3.564,1.781c-2.919,5.666,0.282,3.598-1.807,8.105-4.556,4.049-13.823,12.67-16.789,13.457-2.163-0.047,1.469-2.554,1.943-3.537-6.097,4.188-4.894,6.285-14.217,8.83l-0.273-0.607c-23.001,10.818-54.947-10.622-54.526-39.876-0.246,1.857-0.698,1.393-1.208,2.144-1.186-15.052,6.952-30.17,20.675-36.343,13.427-6.646,29.163-3.918,38.78,5.044-5.282-6.92-15.795-14.254-28.255-13.568-12.208,0.193-23.625,7.95-27.436,16.369-6.253,3.938-6.979,15.177-9.704,17.233-3.665,26.943,6.896,38.583,24.762,52.275,2.812,1.896,0.792,2.184,1.173,3.627-5.936-2.779-11.372-6.976-15.841-12.114,2.372,3.473,4.931,6.847,8.239,9.499-5.596-1.897-13.074-13.563-15.256-14.038,9.647,17.274,39.142,30.295,54.587,23.836-7.146,0.263-16.226,0.146-24.256-2.822-3.371-1.734-7.958-5.331-7.14-6.003,21.079,7.875,42.854,5.965,61.09-8.655,4.641-3.614,9.709-9.761,11.173-9.846-2.206,3.317,0.377,1.596-1.318,4.523,4.625-7.456-2.008-3.035,4.779-12.877l2.507,3.453c-0.931-6.188,7.687-13.704,6.813-23.492,1.975-2.994,2.206,3.22,0.107,10.107,2.912-7.64,0.767-8.867,1.516-15.171,0.81,2.118,1.867,4.37,2.412,6.606-1.895-7.382,1.948-12.433,2.898-16.724-0.937-0.415-2.928,3.264-3.383-5.457,0.065-3.788,1.054-1.985,1.435-2.917-0.744-0.427-2.694-3.33-3.88-8.9,0.86-1.308,2.3,3.393,3.47,3.586-0.753-4.429-2.049-7.805-2.103-11.202-3.421-7.149-1.211,0.953-3.985-3.069-3.641-11.357,3.021-2.637,3.47-7.796,5.52,7.995,8.667,20.387,10.11,25.519-1.103-6.258-2.883-12.32-5.058-18.185,1.677,0.705-2.699-12.875,2.18-3.882-5.21-19.172-22.302-37.087-38.025-45.493,1.924,1.76,4.354,3.971,3.481,4.317-7.819-4.656-6.444-5.018-7.565-6.985-6.369-2.591-6.788,0.208-11.007,0.004-12.005-6.368-14.318-5.69-25.368-9.681l0.502,2.349c-7.953-2.649-9.265,1.005-17.862,0.009-0.523-0.409,2.753-1.479,5.452-1.871-7.69,1.015-7.329-1.515-14.854,0.279,1.855-1.301,3.815-2.162,5.793-3.269-6.271,0.381-14.971,3.649-12.286,0.677-10.235,4.569-28.403,10.976-38.597,20.535l-0.321-2.142c-4.672,5.608-20.371,16.748-21.622,24.011l-1.249,0.291c-2.431,4.116-4.004,8.781-5.932,13.016-3.18,5.417-4.661,2.085-4.208,2.934-6.253,12.679-9.359,23.332-12.043,32.069,1.912,2.858,0.046,17.206,0.769,28.688-3.141,56.709,39.8,111.77,86.737,124.48,6.88,2.459,17.11,2.364,25.813,2.618-10.268-2.937-11.595-1.556-21.595-5.044-7.215-3.398-8.797-7.277-13.907-11.711l2.022,3.573c-10.021-3.547-5.829-4.39-13.982-6.972l2.16-2.82c-3.249-0.246-8.604-5.475-10.069-8.371l-3.553,0.14c-4.27-5.269-6.545-9.063-6.379-12.005l-1.148,2.047c-1.301-2.235-15.709-19.759-8.234-15.679-1.389-1.271-3.235-2.067-5.237-5.703l1.522-1.739c-3.597-4.627-6.621-10.562-6.391-12.536,1.919,2.592,3.25,3.075,4.568,3.52-9.083-22.539-9.593-1.242-16.474-22.942l1.456-0.116c-1.116-1.682-1.793-3.506-2.69-5.298l0.633-6.313c-6.541-7.562-1.829-32.151-0.887-45.637,0.655-5.485,5.459-11.322,9.114-20.477l-2.227-0.384c4.256-7.423,24.301-29.814,33.583-28.662,4.499-5.649-0.892-0.02-1.772-1.443,9.878-10.223,12.984-7.222,19.65-9.061,7.19-4.268-6.17,1.664-2.761-1.628,12.427-3.174,8.808-7.216,25.021-8.828,1.71,0.973-3.969,1.503-5.395,2.766,10.354-5.066,32.769-3.914,47.326,2.811,16.895,7.896,35.873,31.232,36.622,53.189l0.852,0.229c-0.431,8.729,1.336,18.822-1.727,28.094l2.1-4.385"/>
+ <path d="M19.5,67.715l-0.578,2.893c2.71,3.683,4.861,7.673,8.323,10.552-2.49-4.863-4.341-6.872-7.745-13.445"/>
+ <path d="M25.909,67.464c-1.435-1.587-2.284-3.497-3.235-5.4,0.909,3.345,2.771,6.219,4.504,9.143l-1.269-3.743"/>
+ <path d="M139.32,42.814l-0.605,1.52c-1.111,7.892-3.511,15.701-7.189,22.941,4.06-7.639,6.69-15.995,7.79-24.461"/>
+ <path d="M49.698-68.243c2.789-1.022,6.855-0.56,9.814-1.233-3.855,0.324-7.693,0.517-11.484,1.005l1.67,0.228"/>
+ <path d="M-48.219-16.176c0.642,5.951-4.477,8.26,1.134,4.337,3.007-6.773-1.175-1.87-1.134-4.337"/>
+ <path d="M-54.812,11.362c1.292-3.967,1.526-6.349,2.02-8.645-3.571,4.566-1.643,5.539-2.02,8.645"/>
+ </g>
+</svg>
\ No newline at end of file diff --git a/.config/awesome/icons/googleplaymusic.png b/.config/awesome/icons/googleplaymusic.png Binary files differnew file mode 100644 index 0000000..0dfa1f4 --- /dev/null +++ b/.config/awesome/icons/googleplaymusic.png diff --git a/.config/awesome/icons/linux.svg b/.config/awesome/icons/linux.svg new file mode 100644 index 0000000..a77db4e --- /dev/null +++ b/.config/awesome/icons/linux.svg @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + version="1.0" + width="100%" + height="100%" + viewBox="0 0 600 700" + id="svg3191"> + <defs + id="defs3213" /> + <metadata + id="metadata3193"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <path + d="m 495,294.4 c -16.1,0 -18.8,0.2 -29.5,3 -13.2,3.5 -20.9,7.9 -29.9,17 -4.6,4.5 -6.9,7.4 -9.1,11.1 -5.5,9.5 -9.1,20.3 -11.3,34.9 -1.2,7.1 -1.3,9.7 -1.2,27.3 0,18.5 2.2,74.9 3.5,91.8 0.9,11.2 0.5,12.4 -8.9,25.5 -3.3,4.6 -7.9,11.3 -10.2,14.9 -6.3,9.7 -15.2,22.2 -22.5,31.8 -13.5,17.4 -16.9,23.8 -25.4,46.9 -8.2,22.6 -13.2,33.8 -25.3,57.3 -6.2,11.8 -7.8,16.8 -8.1,25.2 -0.4,7.2 0.6,17.2 1.7,19 0.9,1.2 2,1.5 4.2,0.9 -0.3,0.3 -0.5,0.5 -0.7,0.6 -3.5,2.3 -7.5,7.2 -10,13.4 -0.1,0.1 -0.1,0.3 -0.2,0.4 -0.9,1.4 -1.9,3.8 -3.1,7.5 -3.6,10.2 -6.6,14.7 -12,17.6 -4.6,2.5 -8.7,3.1 -20.7,3.1 -12.4,0 -15.1,0.6 -18.8,3.8 -6.6,5.6 -7.6,16.7 -3.1,32.1 4.1,13.9 3.9,20.3 -1.4,35.9 -2.9,8.6 -3.3,10.4 -3.3,14.1 0,2.8 0.3,4.9 0.9,6.2 1.3,2.7 5.4,6 9.4,7.7 4.5,1.7 27.1,7.3 43.3,10.5 25.1,5.1 34.1,7.8 57.4,17.1 20.7,8.2 29.5,11.2 36.5,12.3 3.3,0.5 10.1,-0.1 13.2,-1.3 3.7,-1.3 7.2,-3.7 14.9,-10.2 13.6,-11.4 21,-15 36.2,-17.4 5.7,-0.9 10.9,-1 54.4,-1 26.4,0 49.7,0.2 51.8,0.5 4.9,0.6 6.8,2.2 10.9,9.4 6.3,11.3 14,16.3 28,18.4 6.6,1 17.9,1.1 23.1,0.3 11.4,-1.9 17.1,-5.3 30,-18.2 15,-15.1 29,-24.6 48.7,-33.2 10,-4.4 14.5,-6.9 26.3,-14.9 14.5,-9.8 17.3,-12.9 17.3,-19.3 0,-6.7 -3.6,-10.9 -16.9,-19.7 -12.7,-8.4 -18.4,-13.5 -23.7,-21.3 -3.7,-5.5 -5,-9.7 -5.5,-17.9 -0.2,-3.8 -0.6,-6.4 -1.1,-8 -0.5,-5.7 -2.8,-12.2 -6.9,-14.3 -5.7,-3 -7.7,-2.1 -9.6,-0.9 6.4,-7.2 8.5,-10.6 10.6,-16.8 3.7,-11 2.9,-23.3 -3.5,-55.3 -7.4,-37.2 -20,-63.8 -46,-97.2 -16.5,-21.3 -23.2,-31.9 -39.3,-62.1 -8,-15.1 -10.3,-20.3 -12.2,-28.4 -2.8,-11.7 -4.1,-22.2 -6.2,-52.1 -2,-27.9 -3.4,-39.4 -6,-49.1 -6.9,-26.4 -27.6,-46.4 -56.5,-54.7 -12.3,-3.5 -17.6,-4.2 -34.2,-4.2 z" + transform="translate(-200.8403,-238.943)" + id="path3195" + style="fill:#ffffff" /> + <g + transform="translate(-200.8403,-238.943)" + id="g3197" + style="fill:#f8bf11"> + <path + d="m 552,300.4 c 0,25.1 -29.9,30.4 -44.4,39.4 -13.5,12.5 -91.2,47.8 -111.8,47.8 -33.1,-7 -73.4,-56.4 -78.6,-89.2 0,-19.1 24.3,-34.4 37.9,-46.9 13.5,-12.5 29.1,-24.3 55.7,-19.3 20.6,0 52.8,9.8 66.3,22.3 27,9 74.9,14.8 74.9,45.9 z" + transform="matrix(0.55569,0,0,0.55569,249.6684,292.4824)" + id="path3199" /> + <path + d="m 7.597,971.1 c 30.75,14 102.4,31.9 127.6,34.9 16.9,7 128.5,33 154.2,33 38.1,-27 44.4,-67.9 33.7,-109.3 -47.5,-76.7 -84.2,-177.2 -173,-211.8 -8.9,4.4 -16.2,16.3 -19.4,18.3 -6.4,4.1 -13.5,13 -18,24.1 -4.7,11.6 -9,25.8 -14.24,46.5 -10.26,20.6 -52.15,2 -80.84,17 -10.46,31.7 7.39,109.9 -10.02,147.3 z" + transform="matrix(0.55569,0,0,0.55569,249.6684,292.4824)" + id="path3201" /> + <path + d="m 834.2,853.6 c 19.2,15.7 49.3,27.4 62.9,53.5 -25.9,30.9 -48.2,41.8 -81,57.4 -45,21.4 -73.2,41.5 -93.8,55.5 -20.6,18 -68.4,29 -90.1,26 -13.7,-9 -29.1,-118.3 -24.1,-154 0,-19 -23.3,-95.1 14,-141.5 36.1,-6.9 67.1,26.1 90,48.6 18.9,-12.7 48.8,-32.2 71.4,-37.1 7.4,-1.7 7.7,-9.4 23.2,-1.3 7.4,3.9 11.7,16.1 12.5,26.5 1.3,16.8 3,52.4 15,66.4 z" + transform="matrix(0.55569,0,0,0.55569,249.6684,292.4824)" + id="path3203" /> + </g> + <g + transform="translate(-200.8403,-238.943)" + id="g3205"> + <g + transform="matrix(0.55569,0,0,0.55569,249.6684,292.4824)" + id="g3207"> + <path + d="m 265.5,1063 c -12.6,-2 -28.5,-7 -65.7,-22 -42,-17 -58.1,-21 -103.3,-31 C 67.4,1005 26.59,994.5 18.62,991.3 11.41,988.4 3.92,982.4 1.63,977.5 0.562,975.3 0,971.4 0,966.4 c 0,-6.8 0.7248,-9.8 5.962,-25.3 9.516,-28.2 9.976,-39.7 2.577,-64.7 -8.194,-27.7 -6.277,-47.7 5.529,-57.8 6.67,-5.7 11.53,-6.7 33.8,-6.7 21.64,0 28.95,-1.1 37.33,-5.7 9.65,-5.3 15.08,-13.3 21.48,-31.7 4.1,-11.9 6.8,-16.6 9.4,-16.6 2.1,0 3.9,5.2 3.9,11.5 0,5.6 -6.3,29.2 -9.4,35.3 -3.3,6.6 -7.8,11.7 -12.99,14.7 -9.68,5.7 -28.33,7.2 -48.79,4.1 -13.07,-2.1 -20.57,-1.6 -25.57,1.4 -7.4,4.5 -8.61,14.6 -3.24,27.1 10.4,24.1 12.39,29.3 14.59,37.4 2.61,9.7 3.03,18.2 1.39,28.3 -1.63,10 -4.5,16.3 -12.99,28.2 -4.38,6.2 -8.39,12.8 -8.92,14.8 -1.5,5.4 0.71,9.5 6.67,12.6 5.06,2.5 77.22,21.2 128.2,32.7 15.7,4 44.3,11 63.5,16 19.3,5 39.3,9 44.5,10 16.1,2 31,0 41.3,-6 14.3,-9 24.3,-29.7 25.5,-53.8 0.8,-15.9 -2.7,-30.2 -12,-48.7 -7.1,-14.2 -10.6,-19.7 -44.3,-70.6 -59.5,-89.6 -85.3,-119.5 -107.3,-124.1 -7.1,-1.4 -11.8,-0.6 -21.3,3.7 -9.1,4.1 -12.2,4.3 -14.4,1 -2.1,-3.2 -3.8,-21.1 -3.2,-34.1 0.7,-15.1 3.6,-24.1 14.6,-45.5 21.8,-42.2 30.7,-62.4 45.6,-103 15.3,-41.6 21.5,-53.1 45.6,-84.5 13.2,-17.1 29.2,-39.7 40.5,-57.1 4.3,-6.5 12.6,-18.6 18.5,-26.9 16.8,-23.6 17.6,-25.8 16,-45.9 -2.4,-30.3 -6.4,-131.9 -6.4,-165.1 -0.1,-31.6 0.1,-36.4 2.1,-49.2 4.1,-26.16 10.5,-45.79 20.5,-62.79 3.8,-6.64 8.1,-11.89 16.2,-20.07 16.2,-16.34 30.2,-24.18 53.9,-30.38 19.3,-5.052 24.2,-5.554 53.1,-5.528 29.8,0.026 39.3,1.205 61.5,7.583 52,14.94 89.3,50.96 101.8,98.39 4.6,17.5 7.1,38.3 10.7,88.5 3.8,53.7 6.1,72.6 11.2,93.8 3.4,14.4 7.5,23.9 21.9,51 29,54.4 41,73.4 70.7,111.6 46.8,60.2 69.4,108 82.8,175 11.5,57.6 12.9,79.7 6.3,99.6 -4,12 -7.9,18 -21.6,33.1 -28.8,31.9 -60.9,51.9 -82.9,51.9 -20,0 -38.3,-13.6 -51.4,-38.3 -6.1,-13.6 -5.3,-24.5 -22.8,-20.6 -8.5,2.3 -15.5,12.6 -17.6,25.9 -1.6,9.5 -1.3,45.9 0.4,55 0.7,4.1 3.1,16.3 5.1,27 3.6,18.5 3.8,20.5 3.8,39.5 0,17.5 -0.4,22.8 -3.3,42 -2.7,18 -3.2,24.2 -2.9,34 0.4,11.4 0.6,12.5 4,19.6 4.1,9 13.1,19 20.9,24 17.2,11 41.2,12 61.4,2 5.7,-3 14,-9 28,-20 22.7,-18.4 39.6,-30.1 52.4,-36.6 4.9,-2.4 16.7,-6.9 26.2,-10 39.4,-12.7 57.4,-20.3 67.4,-28.6 11.9,-9.7 17.6,-20.2 15.5,-28.1 -2.7,-9.8 -14,-16.8 -37.1,-22.8 -17.4,-4.6 -21.6,-6.7 -28.7,-14.5 -6.3,-6.9 -11.2,-16.8 -14.8,-30 -3.5,-12.9 -4,-33.8 -1,-42 2.1,-5.8 4.2,-8.5 6.6,-8.5 2.8,0 4.2,4.9 5,18 1,14.6 3.3,22.3 10,32.1 9.5,14.1 19.6,23.2 42.5,38.4 23.9,15.8 30.5,23.4 30.5,35.5 0,11.5 -5.1,17.1 -31.1,34.6 -21.3,14.4 -29.3,19 -47.3,26.8 -35.5,15.5 -60.7,32.7 -87.8,59.7 -23.2,23 -33.3,30 -54,33 -9.3,1 -29.6,1 -41.5,-1 -25.2,-3 -38.9,-12 -50.4,-33 -7.3,-13 -10.7,-16 -19.5,-17 -3.8,0 -45.8,-1 -93.4,-1 -78.2,0 -87.6,1 -97.7,2 -27.4,5 -40.9,11 -65.3,31 -13.8,12 -20.1,16 -26.8,19 -5.5,2 -17.8,3 -23.7,2 z m 90.2,-64.5 c 2.2,-1.9 5.5,-6.3 7.4,-9.8 3,-5.6 3.4,-7.3 3.7,-15.9 0.7,-15.8 -2.7,-24.7 -13.9,-36.5 -7.7,-8.1 -8.8,-11.6 -4.4,-13.6 4.1,-1.8 9.3,0.5 18.6,8.3 17.6,14.9 28,17.4 66.4,16.6 41.3,-1 63.8,-5.3 86.5,-16.7 14.7,-7.4 24.4,-15.8 36.7,-32.1 8.7,-11.4 12.6,-15.3 17.5,-17.3 8.1,-3.4 12.4,3.2 12.2,18.9 -0.1,7.3 -0.9,11.9 -4.2,24.1 -9,32.5 -11.8,50.8 -9.3,60.1 1.5,5.4 6.2,9.5 10.5,9.1 3,-0.3 3.1,-0.5 3.9,-6.3 0.4,-3.3 2.1,-14.5 3.8,-25 1.6,-10.4 3.6,-23.9 4.5,-30 2.1,-15.8 3.7,-64.8 3.8,-118 0.1,-45.9 0.1,-46 2.5,-53 1.9,-5.4 3.6,-8.1 7.5,-12 6.1,-6 11.8,-8.2 24.7,-9.1 l 8.6,-0.7 1.2,-6.1 c 2.9,-13.9 11.2,-21.8 27.6,-26.2 5.3,-1.4 10.6,-1.9 22,-1.9 16.5,0 21.1,1 36,8.2 6.7,3.2 12.5,4.3 12.5,2.4 0,-1.5 -8.1,-9.1 -14.6,-13.7 -3.4,-2.5 -9.3,-5.7 -13,-7.2 -5.1,-2.1 -7,-3.4 -7.2,-4.9 -0.2,-1.2 1.3,-7.9 3.3,-15 5.8,-21 7.7,-34.3 7.8,-54.3 0.2,-32.9 -5.6,-54.7 -24.7,-91.6 -17.7,-34.2 -36.4,-59.3 -51.2,-68.7 -4.3,-2.6 -9.4,-4.4 -9.4,-3.3 0,0.4 3.6,5.7 7.9,11.9 20.4,28.9 41.6,65.8 50.6,88.3 7.3,18 12.8,42.4 14.5,64.6 2.9,36.4 -7,67.5 -24,75.1 -3.4,1.6 -7.2,2.2 -15.5,2.4 -13.2,0.5 -15,-0.2 -18.5,-7.2 l -2.5,-5 -0.6,-40 c -1.1,-68.1 -4.3,-79.7 -40,-144.2 -11,-19.8 -13.2,-25 -17.9,-43 -9.6,-37 -18.9,-58.7 -33.5,-78.3 -22.3,-29.8 -25.2,-42.2 -16.3,-69.7 5.7,-17.9 5.6,-27.1 -0.4,-33.2 -4.4,-4.5 -7.8,-6.1 -27.9,-12.5 -30.5,-9.7 -44.6,-18.4 -48.5,-29.9 -3.9,-11.3 -1.1,-29.7 5.9,-38.8 5,-6.6 11.4,-9.4 21.2,-9.4 6.5,0.1 9.1,0.6 13.6,2.6 6.9,3.3 12.4,8 15.2,13.3 3,5.7 2.9,19.2 -0.2,29.1 -5.1,16.1 -4.9,14.4 -1.3,17.6 6.5,5.8 16.8,6.3 21.3,0.9 3.9,-4.6 5.1,-9.3 5.6,-22.5 0.6,-14.4 -0.9,-24 -6.8,-42.1 -8.1,-24.8 -16.2,-32 -40.7,-36 -18.3,-3 -28.3,-0.6 -37.5,8.9 -14.4,15 -21.6,38.9 -18.7,62.9 1.6,13.3 1.3,13.9 -6.2,11.5 -6.7,-2.1 -21.4,-3.8 -29.9,-3.5 -9.1,0.4 -9.9,-0.4 -9.9,-10.6 -0.1,-41.5 -12.6,-64.1 -35.5,-63.9 -15.9,0 -28.8,12.1 -33.6,31.3 -1.9,7.5 -1.5,29 0.6,41.5 4.3,24.6 13.6,36.9 20.9,27.3 3,-4.1 5.6,-9.3 5.6,-11 0,-0.7 -2.3,-2.3 -5,-3.6 -3,-1.4 -5.7,-3.6 -6.9,-5.6 -5.7,-9.1 -8.5,-25.4 -6.1,-34.1 3.1,-11 18.2,-17.8 28.6,-12.9 8.8,4.2 18.2,23.6 17.2,35.8 -0.8,9.7 -2.6,12.7 -11.4,19.2 -4.4,3.2 -11.5,9 -15.9,12.9 -4.4,3.9 -9.8,8.4 -12,10 -11.2,8.1 -17.5,17.6 -17.5,26.6 0,5.9 2.4,9.1 9.9,12.8 5.9,3 11.2,8.2 16.8,16.4 7.5,10.8 16.4,14.2 36.8,14.1 24.9,-0.1 47.2,-5.4 89,-21 22.7,-8.5 29,-11.2 30.3,-13.2 3.7,-5.4 8,-9.2 10.6,-9.2 3.5,0 6.6,3.3 6.6,6.9 0,6.1 -9.4,11.1 -42,22.2 -9.6,3.3 -24.5,9.3 -33,13.3 -17.2,8.2 -22,9.9 -33.3,12.1 -9.3,1.8 -30.8,2 -42.6,0.4 -9.6,-1.3 -15.4,-0.6 -14.9,1.9 0.5,2.6 22.7,19.9 27.8,21.8 7.2,2.5 21.4,3 30.6,0.9 13.9,-3 57.8,-21.9 79.6,-34.1 7.3,-4.1 11.4,-5.8 14,-5.8 4.4,-0.1 7.8,2.7 7.8,6.2 0,3.8 -7.4,10.3 -15.5,13.7 -14.3,5.8 -17.3,7.4 -31.5,16.4 -19.4,12.4 -27.9,18.6 -40.7,29.8 -13.7,11.9 -17.6,13.5 -32.8,13.7 -12.1,0.1 -15.8,-1.1 -23.7,-7.9 -6.2,-5.3 -21,-23.7 -25.2,-31.4 -4.4,-8 -14.2,-19.1 -16.8,-19.1 -1.7,0 -1.9,0.4 -4.8,13 -2,9 -9.4,26 -21.4,49.5 -14.4,28.3 -15.1,30.8 -15.1,60.5 0,24.8 0.6,22.7 -11.5,39.5 -14.8,20.8 -37.8,75.1 -43.3,102.5 -4.2,20.5 -7.1,55.4 -6.3,75 0.6,15.6 -0.2,20.2 -3.9,22.5 -3.8,2.4 -8.3,-0.1 -17.6,-9.3 -14.6,-14.7 -19.3,-26.9 -19.2,-50.2 0.1,-14.8 1.4,-26.2 4.3,-37.2 2.5,-9.4 2.6,-12.1 0.3,-11.6 -2.4,0.4 -7.8,11.5 -10.4,21.4 -1.6,5.9 -2.2,12 -2.6,24.4 -0.4,15.2 -0.3,17.4 2.1,28 3,13.3 8.7,25.7 16.6,36.1 12.1,16 73.4,70.4 114.2,101.5 9.8,7.4 20.7,16.7 24.3,20.6 21.6,23.4 17.4,44.8 -12.1,61.3 -4.6,2.6 -8.4,4.9 -8.4,5.1 0,0.2 3.8,5.5 8.4,11.6 16.9,22.8 26.7,39.5 30.1,51.2 2.3,7.7 2.2,18.8 -0.3,25.9 -1,3.2 -1.6,5.8 -1.2,5.8 0.4,0 2.5,-2 4.7,-3.5 z M 373,253.9 c -3.1,-5.9 2.7,-11 12.6,-11 3.5,0 6.6,0.4 6.9,1 0.7,1.2 -2.7,3 -5.7,3 -1.8,0 -2.8,1 -4.3,4.3 -1.6,3.5 -2.5,4.3 -5.2,4.5 -2.4,0.2 -3.4,-0.2 -4.3,-1.8 z m 59.3,-4.3 c -5.8,-2.1 -10.3,-5 -9.2,-6.1 0.3,-0.3 3.7,-0.8 7.5,-1.2 9,-0.8 12.4,0.5 12.4,4.5 0,2 -0.7,3.4 -1.9,4.1 -1.1,0.5 -2.1,1 -2.3,0.9 -0.1,0 -3.1,-1 -6.5,-2.2 z M 224.1,529.9 c 9.6,-9.9 12.3,-14.9 11.7,-22 -0.3,-4.9 -2.2,-6.6 -6.2,-5.6 -2.9,0.7 -4.5,3.7 -7.1,12.8 -1.1,4.4 -2.9,7.3 -7,11.9 -5.5,6.2 -6.5,8.5 -4.3,10.7 2.3,2.3 4.2,1.2 12.9,-7.8 z M 608.7,361.1 c 2.1,-1.3 6.3,-11.6 6.3,-15.5 0,-3.1 -0.6,-4.5 -3.1,-6.8 -1.7,-1.6 -3.5,-2.9 -4,-2.9 -0.5,0 -4.4,-1.6 -8.7,-3.7 -5.2,-2.5 -9.8,-5.6 -14.3,-10 -3.6,-3.4 -7.1,-6.3 -7.7,-6.3 -0.6,0 -1.4,1.2 -1.8,2.6 -1.1,4.6 0.5,11.7 4.7,20.1 3.6,7.5 4.9,9 13.2,15.8 8.9,7.3 12.2,8.7 15.4,6.7 z M 368.1,227.2 c 1.2,-3.1 0.9,-5.5 -2.2,-15.6 -1.3,-4.4 -3.2,-8.1 -5.2,-10.3 -2.9,-3.1 -3.4,-3.3 -5.7,-2.1 -3.3,1.8 -3,5.8 0.9,10.2 2.9,3.3 5.4,9.6 6.6,16.8 0.8,4.6 4,5.2 5.6,1 z M 509,224.4 c 2.2,-2.6 0.6,-15 -2.4,-19.6 -3.1,-4.7 -10.3,-9 -16,-9.6 -3.8,-0.5 -4.5,-0.2 -5.6,1.7 -1.4,2.6 -0.7,3.4 4.2,4.9 6.2,2 11.9,10.5 13.4,19.9 0.6,3.5 1.1,4.2 2.9,4.2 1.3,0 2.8,-0.7 3.5,-1.5 z m 6.7,-134.7 c 7.2,-4.97 7.7,-5.19 14.6,-5.37 8.8,-0.23 10.7,-0.97 10.7,-4.07 0,-4.83 -16.6,-19.55 -23.6,-20.85 -7,-1.32 -9.5,2.48 -10.9,16.71 -0.6,5.32 -1.3,7.54 -3.6,10.39 -3.1,3.93 -3.6,6.24 -1.6,8.22 2,2.05 6.3,0.54 14.4,-5.03 z" + id="path3209" + style="fill:#000000" /> + </g> + </g> +</svg> diff --git a/.config/awesome/lain b/.config/awesome/lain new file mode 160000 +Subproject 245ab7c33a3261bd2730fdb054e888e31b26f1d diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua new file mode 100644 index 0000000..21f79e8 --- /dev/null +++ b/.config/awesome/rc.lua @@ -0,0 +1,874 @@ +-- Standard awesome library +local gears = require("gears") +local awful = require("awful") +require("awful.autofocus") +-- Widget and layout library +local wibox = require("wibox") +-- Theme handling library +local beautiful = require("beautiful") +-- Notification library +local naughty = require("naughty") +local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup").widget + +-- Load Debian menu entries +require("debian.menu") + +-- Load vicious +vicious = require("vicious") +vicious.contrib = require("vicious.contrib") + +-- Load lain +lain = require("lain") +lain.helpers = require("lain.helpers") + +-- Load run_once function +require("functions.run_once") + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +-- Handle runtime errors after startup +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err) }) + in_error = false + end) +end +-- }}} + +-- {{{ Variable definitions +configpath="/home/"..os.getenv("USER").."/.config/awesome/" + +-- Themes define colours, icons, font and wallpapers. +beautiful.init(configpath .. "/theme.lua") + +-- This is used later as the default terminal and editor to run. +terminal = "/usr/bin/urxvtcd" +editor = os.getenv("EDITOR") or "editor" +editor_cmd = terminal .. " -e " .. editor + +-- System Info +local popen_cmds = io.popen("hostname -f; egrep -o '([0-9]+)\.([0-9]+)(.[0-9]+)\-([0-9]+)' /proc/sys/kernel/version") +local hostname = popen_cmds:read("*l") +local kernel = popen_cmds:read("*l") +popen_cmds:close() + +-- Default modkey. +-- Usually, Mod4 is the key with a logo between Control and Alt. +-- If you do not like this or do not have such a key, +-- I suggest you to remap Mod4 to another key using xmodmap or other tools. +-- However, you can use another modifier like Mod1, but it may interact with others. +modkey = "Mod4" + +-- Static configs +naughty.config.defaults.icon_size = 150 + +-- Table of layouts to cover with awful.layout.inc, order matters. +awful.layout.layouts = { + 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.floating, + awful.layout.suit.max, + -- awful.layout.suit.max.fullscreen, + -- awful.layout.suit.magnifier, + awful.layout.suit.corner.nw, + awful.layout.suit.corner.ne, + awful.layout.suit.corner.sw, + awful.layout.suit.corner.se, +} +-- }}} + +-- {{{ Helper functions +local function client_menu_toggle_fn() + local instance = nil + + return function () + if instance and instance.wibox.visible then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ theme = { width = 250 } }) + end + end +end +-- }}} + +-- {{{ Menu +-- Create a launcher widget and a main menu +systemmenu = { + { "hotkeys", function() return false, hotkeys_popup.show_help end}, + { "monitor standby", "sleep 2 && xset dpms force off" }, -- xset s blank + { "lock screen", "sleep 2 && xautolock -locknow"}, + { "suspend", "systemctl suspend" }, + { "hibernate", "systemctl hibernate" }, + { "restart awesome", awesome.restart }, + { "logoff", function() awesome.quit() end }, + { "reboot to EFI", "systemctl reboot --firmware-setup" }, + { "reboot", "systemctl reboot" }, + { "halt", "systemctl poweroff" } +} + +mymainmenu = awful.menu({ items = { { hostname , nil, beautiful.debian_icon }, + { "linux " .. kernel, nil, beautiful.linux_icon }, + { "awesome " .. awesome.version, nil, beautiful.awesome_icon }, + { "" }, + -- { "open terminal", terminal }, + { "applications", debian.menu.Debian_menu.Debian }, + { "system", systemmenu } + } + }) + +mylauncher = awful.widget.launcher({ image = beautiful.debian_icon, + menu = mymainmenu }) + +-- Menubar configuration +menubar.utils.terminal = terminal -- Set the terminal for applications that require it +-- }}} + +-- Keyboard map indicator and switcher +mykeyboardlayout = awful.widget.keyboardlayout() + +-- {{{ Wibar +-- Create a textclock widget +mytextclock = wibox.widget.textclock("%a, %d %b %Y %H:%M") +laincal = lain.widget.calendar({ + attach_to = { mytextclock }, + followtag = true, + cal = "/usr/bin/gcal -H no", + notification_preset = { + fg = "#FFFFFF", + bg = beautiful.bg_normal, + position = "bottom_right", + font = "dejavu sans mono 8" + } +}) + +-- {{ Divider widgets +dividerwidget = wibox.widget.textbox() +dividerwidget:set_text(" | ") + +ldividerwidget = wibox.widget.textbox() +ldividerwidget:set_text("| ") + +rdividerwidget = wibox.widget.textbox() +rdividerwidget:set_text(" |") + +spacewidget = wibox.widget.textbox() +spacewidget:set_text(" ") +-- }} + +-- {{ Load widget +loadwidget = wibox.widget.textbox() +vicious.cache(vicious.widgets.uptime) +vicious.register(loadwidget, vicious.widgets.uptime, "load: $4, $5, $6", 3) +loadwidget:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell(terminal .. " -n htop -e htop") end) + ) + ) +-- }} + +-- {{ Memory widget +memwidget = wibox.widget.textbox() +vicious.cache(vicious.widgets.mem) +vicious.register(memwidget, vicious.widgets.mem, "mem: $1%", 3) +-- }} + +-- {{ CPU widget +cpuwidget = wibox.widget.textbox() +vicious.cache(vicious.widgets.cpu) +vicious.register(cpuwidget, vicious.widgets.cpu, "cpu: $1%", 3) +-- }} + +-- {{ Network widget +netwidget = wibox.widget.textbox() +vicious.cache(vicious.widgets.net) +vicious.register(netwidget, vicious.widgets.net, "net: ↑${eth0 up_kb}kb/s↑ ↓${eth0 down_kb}kb/s↓", 3) +-- }} + +-- {{ Volume widget +volwidget = wibox.widget.textbox() +volmenu = awful.menu({ items = { { "pavucontrol", function() awful.spawn.with_shell("/usr/bin/pavucontrol") end }, + { "" }, + { "headphones", function() awful.spawn.with_shell("pacmd set-default-sink headphones") end }, + { "speakers", function() awful.spawn.with_shell("pacmd set-default-sink speakers") end } + } + }) +vicious.cache(vicious.contrib.pulse) +vicious.register(volwidget, vicious.contrib.pulse, + function(widget, args) + local volvalue = nil + if args[1] == 0 then + volvalue = " M" + else + volvalue = args[1] + end + return "vol: " .. volvalue .. "%" + end, 1, "alsa_output.pci-0000_05_00.0.analog-surround-71" ) +volwidget:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("pactl set-sink-mute 0 toggle") end), + awful.button({ }, 3, function() volmenu:show() end), + awful.button({ }, 4, function() awful.spawn.with_shell("pactl set-sink-volume 0 +5%") end), + awful.button({ }, 5, function() awful.spawn.with_shell("pactl set-sink-volume 0 -5%") end) + ) + ) +-- }} + +-- {{ Package widget +pkgwidget = wibox.widget.textbox() +vicious.cache(vicious.widgets.pkg) +vicious.register(pkgwidget, vicious.widgets.pkg, "pkg: $1", 1800, "Debian") +-- }} + +-- {{ Weather widget +weatherwidget = lain.widget.weather({ + city_id = 2964574, -- Dublin, Ireland + units = "metric", + cnt = 1, + forecast_call = "curl -s 'http://api.openweathermap.org/data/2.5/forecast?id=%s&units=%s&lang=%s&cnt=%s&APPID=%s'", + notification_preset = {fg = "#FFFFFF",bg = beautiful.bg_normal,position = "bottom_right",font = "dejavu sans mono 8" }, + notification_text_fun = function(wn) + --local day = os.date("%A", wn["dt"]) + local desc = wn["weather"][1]["description"] + local temp = math.floor(wn["main"]["temp"]) + --local sunrise = tonumber(wn["sys"]["sunrise"]) + local pres = math.floor(wn["main"]["pressure"]) + local humi = math.floor(wn["main"]["humidity"]) + local wspe = math.floor(wn["wind"]["speed"]) + local wdeg = math.floor(wn["wind"]["deg"]) + local clou = math.floor(wn["clouds"]["all"]) + local rain3h = 0 + if wn["rain"]["3h"] then + rain3h = math.floor(wn["rain"]["3h"]) + end + + -- format infos as you like, HTML text markup is allowed + return string.format("%s<br>temperature: %d°C<br>pressure: %dhPa<br>humidity: %d%%<br>wind: %d m/s at %d°<br>cloudliness: %d%%<br>rain: %d mm", desc, temp, pres, humi, wspe, wdeg, clou, rain3h) + end, + settings = function() + units = math.floor(weather_now["main"]["temp"]) + widget:set_text(units .. "°C") + end +}) +weatherwidget.widget:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/firefox http://www.met.ie/latest/rainfall_radar.asp") end), + awful.button({ }, 3, function() awful.spawn.with_shell("/usr/bin/firefox http://www.met.ie/forecasts/5day-ireland.asp") end) + ) + ) + + +-- {{ gmusicbrowser widget (set using awesome-client) +gmbwidget = wibox.widget.textbox() +gmbwidget:set_text("music: nothing playing") +gmbwidget:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/gmusicbrowser -cmd PlayPause") end), + awful.button({ }, 3, function() screen[2].tags[3]:view_only() end), + awful.button({ }, 4, function() awful.spawn.with_shell("/usr/bin/gmusicbrowser -cmd NextSong -ifnotrunning abort") end), + awful.button({ }, 5, function() awful.spawn.with_shell("/usr/bin/gmusicbrowser -cmd PrevSong -ifnotrunning abort") end) + ) + ) +-- }} + +-- {{ quodlibet widget (using quodlibet dbus signal) +quodlibetwidget = wibox.widget.textbox() +quodlibetwidget:set_text("music: nothing playing") +dbus.add_match("session", "interface='net.sacredchao.QuodLibet'") +dbus.connect_signal("net.sacredchao.QuodLibet", function(...) + local dbussignal = {...} + if dbussignal[1].member == 'SongStarted' then + quodlibetwidget:set_text("music: " .. dbussignal[2].title .. " by " .. dbussignal[2].artist ) + else if dbussignal[1].member == 'SongEnded' then + quodlibetwidget:set_text("music: nothing playing") + end + end + end) +quodlibetwidget:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/quodlibet --run --play-pause") end), + --awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/xdotool key ctrl+shift+8") end), + awful.button({ }, 3, function() screen[2].tags[3]:view_only() end), + awful.button({ }, 4, function() awful.spawn.with_shell("/usr/bin/quodlibet --next") end), + awful.button({ }, 5, function() awful.spawn.with_shell("/usr/bin/quodlibet --force-previous") end) + ) + ) +-- }} + +-- {{ Quicklaunch +quicklaunch_urxvt = wibox.widget.imagebox() +quicklaunch_urxvt:set_image("/usr/share/pixmaps/urxvt_32x32.xpm") +quicklaunch_urxvt:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/urxvt") end) + ) + ) + +quicklaunch_firefox = wibox.widget.imagebox() +quicklaunch_firefox:set_image("/usr/share/icons/hicolor/32x32/apps/firefox.png") +quicklaunch_firefox:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/firefox") end), + awful.button({ }, 3, function() awful.spawn.with_shell("/usr/bin/firefox -private-window") end) + ) + ) + +quicklaunch_chromium = wibox.widget.imagebox() +quicklaunch_chromium:set_image("/usr/share/icons/hicolor/48x48/apps/chromium.png") +quicklaunch_chromium:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/chromium %U --incognito --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\"" ) end), + awful.button({ }, 3, function() awful.spawn.with_shell("/usr/bin/chromium %U --incognito --user-agent=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\" --disable-plugins --disable-bundled-ppapi-flash --proxy-server=alpha:8123 --host-resolver-rules=\"MAP * 0.0.0.0 , EXCLUDE alpha\" http://check.torproject.org") end) + ) + ) + +quicklaunch_chrome = wibox.widget.imagebox() +quicklaunch_chrome:set_image("/opt/google/chrome/product_logo_64.png") +quicklaunch_chrome:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/google-chrome") end) + ) + ) + +quicklaunch_torbrowser = wibox.widget.imagebox() +quicklaunch_torbrowser:set_image("/usr/share/pixmaps/torbrowser.png") +quicklaunch_torbrowser:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/torbrowser-launcher" ) end) + ) + ) + +quicklaunch_chrome_gpm = wibox.widget.imagebox() +quicklaunch_chrome_gpm:set_image("/home/jmccrohan/.config/awesome/icons/googleplaymusic.png") +quicklaunch_chrome_gpm:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/google-chrome --app=https://play.google.com/music/listen") end) + ) + ) + +quicklaunch_mutt = wibox.widget.imagebox() +quicklaunch_mutt:set_image("/usr/share/pixmaps/mutt.xpm") +quicklaunch_mutt:buttons(awful.util.table.join( + awful.button({ }, 1, function() os.execute("sleep 1"); awful.spawn.with_shell(terminal .. " -n mutt -e mutt") end) + ) + ) + +quicklaunch_vlc = wibox.widget.imagebox() +quicklaunch_vlc:set_image("/usr/share/icons/hicolor/32x32/apps/vlc.png") +quicklaunch_vlc:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/vlc") end) + ) + ) + +--quicklaunch_gmusicbrowser = wibox.widget.imagebox() +--quicklaunch_gmusicbrowser:set_image("/usr/share/icons/hicolor/32x32/apps/gmusicbrowser.png") +--quicklaunch_gmusicbrowser:buttons(awful.util.table.join( +-- ) +-- ) + +quicklaunch_quodlibet = wibox.widget.imagebox() +quicklaunch_quodlibet:set_image("/usr/share/icons/hicolor/64x64/apps/quodlibet.png") +quicklaunch_quodlibet:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/quodlibet") end) + ) + ) + +quicklaunch_virtmanager = wibox.widget.imagebox() +quicklaunch_virtmanager:set_image("/usr/share/icons/hicolor/32x32/apps/virt-manager.png") +quicklaunch_virtmanager:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/virt-manager") end) + ) + ) + +quicklaunch_remmina = wibox.widget.imagebox() +quicklaunch_remmina:set_image("/usr/share/icons/hicolor/32x32/apps/remmina.png") +quicklaunch_remmina:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/remmina") end) + ) + ) + +quicklaunch_thunar = wibox.widget.imagebox() +quicklaunch_thunar:set_image("/usr/share/icons/gnome/32x32/places/user-home.png") +quicklaunch_thunar:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.spawn.with_shell("/usr/bin/thunar") end) + ) + ) + +-- Create Quicklaunch wibox +local quicklaunch = wibox.layout.fixed.horizontal() +quicklaunch:add(quicklaunch_urxvt) +quicklaunch:add(quicklaunch_firefox) +quicklaunch:add(quicklaunch_mutt) +quicklaunch:add(quicklaunch_quodlibet) +quicklaunch:add(quicklaunch_chrome_gpm) +quicklaunch:add(quicklaunch_chromium) +quicklaunch:add(quicklaunch_chrome) +quicklaunch:add(quicklaunch_torbrowser) +quicklaunch:add(quicklaunch_vlc) +quicklaunch:add(quicklaunch_virtmanager) +quicklaunch:add(quicklaunch_remmina) +quicklaunch:add(quicklaunch_thunar) +--}} + +-- Create a wibox for each screen and add it +local taglist_buttons = awful.util.table.join( + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end), + awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) + ) + +local tasklist_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() and c.first_tag then + c.first_tag:view_only() + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() + end + end), + awful.button({ }, 3, client_menu_toggle_fn()), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + end)) + +local function set_wallpaper(s) + -- Wallpaper + if beautiful.wallpaper then + local wallpaper = beautiful.wallpaper + -- If wallpaper is a function, call it with the screen + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + end +end + +-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) +screen.connect_signal("property::geometry", set_wallpaper) + +awful.screen.connect_for_each_screen(function(s) + -- Wallpaper + set_wallpaper(s) + + -- Each screen has its own tag table. + awful.tag({ "", "", "", "", "", "" }, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(awful.util.table.join( + awful.button({ }, 1, function () awful.layout.inc( 1) end), + awful.button({ }, 3, function () awful.layout.inc(-1) end), + awful.button({ }, 4, function () awful.layout.inc( 1) end), + awful.button({ }, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "bottom", height = "15", screen = s }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + s.index == 1 and mylauncher, + s.index == 1 and spacewidget, + s.index == 1 and spacewidget, + s.index == 1 and spacewidget, + s.index == 1 and spacewidget, + s.index == 1 and quicklaunch, + s.index == 1 and spacewidget, + s.index == 1 and spacewidget, + s.index == 1 and spacewidget, + s.index == 1 and spacewidget, + + s.mypromptbox, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + s.index == 1 and mykeyboardlayout, + s.index == 1 and wibox.widget.systray(), + s.index == 1 and dividerwidget, + s.index == 1 and volwidget, + s.index == 1 and dividerwidget, + s.index == 1 and weatherwidget, + s.index == 1 and dividerwidget, + s.index == 1 and mytextclock, + + s.index == 2 and ldividerwidget, + s.index == 2 and quodlibetwidget, + s.index == 2 and dividerwidget, + s.index == 2 and loadwidget, + s.index == 2 and dividerwidget, + s.index == 2 and memwidget, + s.index == 2 and dividerwidget, + s.index == 2 and netwidget, + s.index == 2 and dividerwidget, + s.index == 2 and pkgwidget, + + s.mylayoutbox, + s.mytaglist, + }, + } +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) +)) +-- }}} + +-- {{{ Key bindings +globalkeys = awful.util.table.join( + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + awful.key({ modkey, }, "Left", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + awful.key({ modkey, }, "Right", awful.tag.viewnext, + {description = "view next", group = "tag"}), + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), + + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), + awful.key({ modkey, }, "w", function () mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Control" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Shift" }, "q", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + awful.key({ modkey, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + client.focus = c + c:raise() + end + end, + {description = "restore minimized", group = "client"}), + + -- Prompt + awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), + + awful.key({ modkey }, "x", + function () + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}), + -- Menubar + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}) +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + 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 , + {description = "minimize", group = "client"}), + awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "maximize", group = "client"}) +) + +-- 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, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + tag:view_only() + end + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + awful.tag.viewtoggle(tag) + end + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}) + ) +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) +-- }}} + +-- {{{ Rules +-- Rules to apply to new clients (through the "manage" signal). +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, + raise = true, + keys = clientkeys, + buttons = clientbuttons, + size_hints_honor = false, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + }, + + { rule = { class = "gimp" }, properties = { floating = true } }, + { rule = { class = "Firefox" }, properties = { floating = true } }, + { rule = { class = "Firefox", instance = "Navigator" }, properties = { tag = screen[1].tags[1], floating = false } }, + { rule = { class = "Thunar" }, properties = { tag = screen[1].tags[2], switchtotag = true } }, + { rule = { class = "Evince" }, properties = { tag = screen[1].tags[3], switchtotag = true } }, + { rule = { class = "Eog" }, properties = { tag = screen[1].tags[4], switchtotag = true } }, + { rule = { name = "mutt" }, properties = { tag = screen[2].tags[2] } }, + { rule = { class = "Gmusicbrowser" }, properties = { tag = screen[2].tags[3] } }, + { rule = { class = "Quodlibet" }, properties = { tag = screen[2].tags[3] } }, + { rule = { class = "Google-chrome", instance = "play.google.com__music" }, properties = { tag = screen[2].tags[3] } }, + { rule = { class = "Steam" }, properties = { floating = true, tag = screen[2].tags[4] } }, + { rule = { instance = "plugin-container" }, properties = { floating = true }, callback = awful.titlebar.add }, + { rule = { instance = "exe", class = "Exe" }, properties = { floating = true } }, + { rule = { class = "Wine" }, properties = { floating = true } }, + + -- Add titlebars to normal clients and dialogs + --{ rule_any = {type = { "normal", "dialog" } + -- }, properties = { titlebars_enabled = true } + --}, + + -- Set Firefox to always map on the tag named "2" on screen 1. + -- { rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } }, +} +-- }}} + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup and + not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- 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) + ) + + awful.titlebar(c) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) + +-- Enable sloppy focus, so that focus follows mouse. +client.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) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} + +-- {{{ Startup Apps +run_once("redshift") +run_once("xbindkeys") +-- run_once("parcellite", "parcellite --no-icon") +run_once("nitrogen", "nitrogen --restore") +run_once("xautolock", "xautolock -time 20 -locker 'i3lock -denc 000000' -killtime 60 -killer 'systemctl suspend' -detectsleep") +run_once("pulseaudio", "pulseaudio --daemonize") +-- }}} diff --git a/.config/awesome/stock/binds.lua b/.config/awesome/stock/binds.lua new file mode 100644 index 0000000..73bc09c --- /dev/null +++ b/.config/awesome/stock/binds.lua @@ -0,0 +1,204 @@ +local awful = require("awful") +local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup").widget + + +-- {{{ 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) +)) +-- }}} + +-- {{{ Key bindings +globalkeys = awful.util.table.join( + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + awful.key({ modkey, }, "Left", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + awful.key({ modkey, }, "Right", awful.tag.viewnext, + {description = "view next", group = "tag"}), + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), + + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), + awful.key({ modkey, }, "w", function () mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Control" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Shift" }, "q", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + awful.key({ modkey, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + client.focus = c + c:raise() + end + end, + {description = "restore minimized", group = "client"}), + + -- Prompt + --awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end, + -- {description = "run prompt", group = "launcher"}), + awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), + + awful.key({ modkey }, "x", + function () + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}), + -- Menubar + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}) +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + 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 , + {description = "minimize", group = "client"}), + awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "maximize", group = "client"}) +) + +-- 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, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + tag:view_only() + end + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + awful.tag.viewtoggle(tag) + end + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}) + ) +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)) + + diff --git a/.config/awesome/stock/signals.lua b/.config/awesome/stock/signals.lua new file mode 100644 index 0000000..2c6b1ef --- /dev/null +++ b/.config/awesome/stock/signals.lua @@ -0,0 +1,73 @@ +awful = require("awful") +beautiful = require("beautiful") + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup and + not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- 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) + ) + + awful.titlebar(c) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) + +-- Enable sloppy focus, so that focus follows mouse. +client.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) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} + + diff --git a/.config/awesome/theme.lua b/.config/awesome/theme.lua new file mode 100644 index 0000000..35ef62f --- /dev/null +++ b/.config/awesome/theme.lua @@ -0,0 +1,110 @@ +--------------------------- +-- Default awesome theme -- +--------------------------- + +local theme = {} + +theme.font = "dejavu sans 7" + +theme.bg_normal = "#222222" +theme.bg_focus = "#222222" +theme.bg_urgent = "#ff0000" +theme.bg_minimize = "#444444" +theme.bg_systray = theme.bg_normal + +theme.fg_normal = "#aaaaaa" +theme.fg_focus = "#ffffff" +theme.fg_urgent = "#ffffff" +theme.fg_minimize = "#ffffff" + +theme.useless_gap = 0 +theme.border_width = 1 +theme.border_normal = "#000000" +theme.border_focus = "#535d6c" +theme.border_marked = "#91231c" + +-- There are other variable sets +-- overriding the default one when +-- defined, the sets are: +-- taglist_[bg|fg]_[focus|urgent|occupied|empty] +-- tasklist_[bg|fg]_[focus|urgent] +-- titlebar_[bg|fg]_[normal|focus] +-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] +-- mouse_finder_[color|timeout|animate_timeout|radius|factor] +-- Example: +--theme.taglist_bg_focus = "#ff0000" + +-- Display the taglist squares +theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png" +theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png" + +-- Variables set for theming the menu: +-- menu_[bg|fg]_[normal|focus] +-- menu_[border_color|border_width] +theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png" +theme.menu_height = 15 +theme.menu_width = 150 + +-- You can add as many variables as +-- you wish and access them by using +-- beautiful.variable in your rc.lua +--theme.bg_widget = "#cc0000" + +-- Define the image to load +theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png" +theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png" + +theme.titlebar_minimize_button_normal = "/usr/share/awesome/themes/default/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = "/usr/share/awesome/themes/default/titlebar/minimize_focus.png" + +theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png" + +theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png" + +theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png" + +theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png" + +-- theme.wallpaper = "/usr/share/awesome/themes/default/background.png" + +-- You can use your own layout icons like this: +theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png" +theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png" +theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png" +theme.layout_magnifier = "/usr/share/awesome/themes/default/layouts/magnifierw.png" +theme.layout_max = "/usr/share/awesome/themes/default/layouts/maxw.png" +theme.layout_fullscreen = "/usr/share/awesome/themes/default/layouts/fullscreenw.png" +theme.layout_tilebottom = "/usr/share/awesome/themes/default/layouts/tilebottomw.png" +theme.layout_tileleft = "/usr/share/awesome/themes/default/layouts/tileleftw.png" +theme.layout_tile = "/usr/share/awesome/themes/default/layouts/tilew.png" +theme.layout_tiletop = "/usr/share/awesome/themes/default/layouts/tiletopw.png" +theme.layout_spiral = "/usr/share/awesome/themes/default/layouts/spiralw.png" +theme.layout_dwindle = "/usr/share/awesome/themes/default/layouts/dwindlew.png" +theme.layout_cornernw = "/usr/share/awesome/themes/default/layouts/cornernww.png" +theme.layout_cornerne = "/usr/share/awesome/themes/default/layouts/cornernew.png" +theme.layout_cornersw = "/usr/share/awesome/themes/default/layouts/cornersww.png" +theme.layout_cornerse = "/usr/share/awesome/themes/default/layouts/cornersew.png" + +theme.awesome_icon = configpath .. "/icons/awesome.svg" +theme.debian_icon = configpath .. "/icons/debian.svg" +theme.linux_icon = configpath .. "/icons/linux.svg" + +-- Define the icon theme for application icons. If not set then the icons +-- from /usr/share/icons and /usr/share/icons/hicolor will be used. +theme.icon_theme = nil + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/.config/awesome/vicious b/.config/awesome/vicious new file mode 160000 +Subproject aabb3d3ae5289f9b837e80eea9e503a07c2f173 |