diff options
53 files changed, 1364 insertions, 0 deletions
diff --git a/awesome/autorun.sh b/awesome/autorun.sh new file mode 100755 index 0000000..7d21924 --- /dev/null +++ b/awesome/autorun.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +function run { + if ! pgrep -f $1 ; + then + $@& + fi +} + +run compton +run xset r rate 200 150 +run setxkbmap -layout "us,fr" -option "grp:alt_shift_toggle" diff --git a/awesome/awesome-wm-widgets b/awesome/awesome-wm-widgets new file mode 160000 +Subproject 06e254cd1e180e3b97549f1635eb053403def72 diff --git a/awesome/json.lua b/awesome/json.lua new file mode 100644 index 0000000..711ef78 --- /dev/null +++ b/awesome/json.lua @@ -0,0 +1,388 @@ +-- +-- json.lua +-- +-- Copyright (c) 2020 rxi +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy of +-- this software and associated documentation files (the "Software"), to deal in +-- the Software without restriction, including without limitation the rights to +-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. +-- + +local json = { _version = "0.1.2" } + +------------------------------------------------------------------------------- +-- Encode +------------------------------------------------------------------------------- + +local encode + +local escape_char_map = { + [ "\\" ] = "\\", + [ "\"" ] = "\"", + [ "\b" ] = "b", + [ "\f" ] = "f", + [ "\n" ] = "n", + [ "\r" ] = "r", + [ "\t" ] = "t", +} + +local escape_char_map_inv = { [ "/" ] = "/" } +for k, v in pairs(escape_char_map) do + escape_char_map_inv[v] = k +end + + +local function escape_char(c) + return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte())) +end + + +local function encode_nil(val) + return "null" +end + + +local function encode_table(val, stack) + local res = {} + stack = stack or {} + + -- Circular reference? + if stack[val] then error("circular reference") end + + stack[val] = true + + if rawget(val, 1) ~= nil or next(val) == nil then + -- Treat as array -- check keys are valid and it is not sparse + local n = 0 + for k in pairs(val) do + if type(k) ~= "number" then + error("invalid table: mixed or invalid key types") + end + n = n + 1 + end + if n ~= #val then + error("invalid table: sparse array") + end + -- Encode + for i, v in ipairs(val) do + table.insert(res, encode(v, stack)) + end + stack[val] = nil + return "[" .. table.concat(res, ",") .. "]" + + else + -- Treat as an object + for k, v in pairs(val) do + if type(k) ~= "string" then + error("invalid table: mixed or invalid key types") + end + table.insert(res, encode(k, stack) .. ":" .. encode(v, stack)) + end + stack[val] = nil + return "{" .. table.concat(res, ",") .. "}" + end +end + + +local function encode_string(val) + return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' +end + + +local function encode_number(val) + -- Check for NaN, -inf and inf + if val ~= val or val <= -math.huge or val >= math.huge then + error("unexpected number value '" .. tostring(val) .. "'") + end + return string.format("%.14g", val) +end + + +local type_func_map = { + [ "nil" ] = encode_nil, + [ "table" ] = encode_table, + [ "string" ] = encode_string, + [ "number" ] = encode_number, + [ "boolean" ] = tostring, +} + + +encode = function(val, stack) + local t = type(val) + local f = type_func_map[t] + if f then + return f(val, stack) + end + error("unexpected type '" .. t .. "'") +end + + +function json.encode(val) + return ( encode(val) ) +end + + +------------------------------------------------------------------------------- +-- Decode +------------------------------------------------------------------------------- + +local parse + +local function create_set(...) + local res = {} + for i = 1, select("#", ...) do + res[ select(i, ...) ] = true + end + return res +end + +local space_chars = create_set(" ", "\t", "\r", "\n") +local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",") +local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u") +local literals = create_set("true", "false", "null") + +local literal_map = { + [ "true" ] = true, + [ "false" ] = false, + [ "null" ] = nil, +} + + +local function next_char(str, idx, set, negate) + for i = idx, #str do + if set[str:sub(i, i)] ~= negate then + return i + end + end + return #str + 1 +end + + +local function decode_error(str, idx, msg) + local line_count = 1 + local col_count = 1 + for i = 1, idx - 1 do + col_count = col_count + 1 + if str:sub(i, i) == "\n" then + line_count = line_count + 1 + col_count = 1 + end + end + error( string.format("%s at line %d col %d", msg, line_count, col_count) ) +end + + +local function codepoint_to_utf8(n) + -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa + local f = math.floor + if n <= 0x7f then + return string.char(n) + elseif n <= 0x7ff then + return string.char(f(n / 64) + 192, n % 64 + 128) + elseif n <= 0xffff then + return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128) + elseif n <= 0x10ffff then + return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, + f(n % 4096 / 64) + 128, n % 64 + 128) + end + error( string.format("invalid unicode codepoint '%x'", n) ) +end + + +local function parse_unicode_escape(s) + local n1 = tonumber( s:sub(1, 4), 16 ) + local n2 = tonumber( s:sub(7, 10), 16 ) + -- Surrogate pair? + if n2 then + return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) + else + return codepoint_to_utf8(n1) + end +end + + +local function parse_string(str, i) + local res = "" + local j = i + 1 + local k = j + + while j <= #str do + local x = str:byte(j) + + if x < 32 then + decode_error(str, j, "control character in string") + + elseif x == 92 then -- `\`: Escape + res = res .. str:sub(k, j - 1) + j = j + 1 + local c = str:sub(j, j) + if c == "u" then + local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) + or str:match("^%x%x%x%x", j + 1) + or decode_error(str, j - 1, "invalid unicode escape in string") + res = res .. parse_unicode_escape(hex) + j = j + #hex + else + if not escape_chars[c] then + decode_error(str, j - 1, "invalid escape char '" .. c .. "' in string") + end + res = res .. escape_char_map_inv[c] + end + k = j + 1 + + elseif x == 34 then -- `"`: End of string + res = res .. str:sub(k, j - 1) + return res, j + 1 + end + + j = j + 1 + end + + decode_error(str, i, "expected closing quote for string") +end + + +local function parse_number(str, i) + local x = next_char(str, i, delim_chars) + local s = str:sub(i, x - 1) + local n = tonumber(s) + if not n then + decode_error(str, i, "invalid number '" .. s .. "'") + end + return n, x +end + + +local function parse_literal(str, i) + local x = next_char(str, i, delim_chars) + local word = str:sub(i, x - 1) + if not literals[word] then + decode_error(str, i, "invalid literal '" .. word .. "'") + end + return literal_map[word], x +end + + +local function parse_array(str, i) + local res = {} + local n = 1 + i = i + 1 + while 1 do + local x + i = next_char(str, i, space_chars, true) + -- Empty / end of array? + if str:sub(i, i) == "]" then + i = i + 1 + break + end + -- Read token + x, i = parse(str, i) + res[n] = x + n = n + 1 + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "]" then break end + if chr ~= "," then decode_error(str, i, "expected ']' or ','") end + end + return res, i +end + + +local function parse_object(str, i) + local res = {} + i = i + 1 + while 1 do + local key, val + i = next_char(str, i, space_chars, true) + -- Empty / end of object? + if str:sub(i, i) == "}" then + i = i + 1 + break + end + -- Read key + if str:sub(i, i) ~= '"' then + decode_error(str, i, "expected string for key") + end + key, i = parse(str, i) + -- Read ':' delimiter + i = next_char(str, i, space_chars, true) + if str:sub(i, i) ~= ":" then + decode_error(str, i, "expected ':' after key") + end + i = next_char(str, i + 1, space_chars, true) + -- Read value + val, i = parse(str, i) + -- Set + res[key] = val + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "}" then break end + if chr ~= "," then decode_error(str, i, "expected '}' or ','") end + end + return res, i +end + + +local char_func_map = { + [ '"' ] = parse_string, + [ "0" ] = parse_number, + [ "1" ] = parse_number, + [ "2" ] = parse_number, + [ "3" ] = parse_number, + [ "4" ] = parse_number, + [ "5" ] = parse_number, + [ "6" ] = parse_number, + [ "7" ] = parse_number, + [ "8" ] = parse_number, + [ "9" ] = parse_number, + [ "-" ] = parse_number, + [ "t" ] = parse_literal, + [ "f" ] = parse_literal, + [ "n" ] = parse_literal, + [ "[" ] = parse_array, + [ "{" ] = parse_object, +} + + +parse = function(str, idx) + local chr = str:sub(idx, idx) + local f = char_func_map[chr] + if f then + return f(str, idx) + end + decode_error(str, idx, "unexpected character '" .. chr .. "'") +end + + +function json.decode(str) + if type(str) ~= "string" then + error("expected argument of type string, got " .. type(str)) + end + local res, idx = parse(str, next_char(str, 1, space_chars, true)) + idx = next_char(str, idx, space_chars, true) + if idx <= #str then + decode_error(str, idx, "trailing garbage") + end + return res +end + + +return json diff --git a/awesome/lain b/awesome/lain new file mode 160000 +Subproject 10076e1d69cabd9ac45b3576f06feafe1190d5e diff --git a/awesome/rc.lua b/awesome/rc.lua new file mode 100644 index 0000000..f629f07 --- /dev/null +++ b/awesome/rc.lua @@ -0,0 +1,567 @@ +-- awesome_mode: api-level=4:screen=on +-- If LuaRocks is installed, make sure that packages installed through it are +-- found (e.g. lgi). If LuaRocks is not installed, do nothing. +pcall(require, "luarocks.loader") + +-- Standard awesome library +local gears = require("gears") +local awful = require("awful") +require("awful.autofocus") +-- Widget and layout library +local wibox = require("wibox") +-- custom widgets +-- local lain = require("lain") +local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget") +local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget") +local weather_widget = require("awesome-wm-widgets.weather-widget.weather") +-- Theme handling library +local beautiful = require("beautiful") +-- Notification library +local naughty = require("naughty") +-- Declarative object management +local ruled = require("ruled") +local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup") +-- Enable hotkeys help widget for VIM and other apps +-- when client with a matching name is opened: +require("awful.hotkeys_popup.keys") + +-- {{{ 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) +naughty.connect_signal("request::display_error", function(message, startup) + naughty.notification { + urgency = "critical", + title = "Oops, an error happened"..(startup and " during startup!" or "!"), + message = message + } +end) +-- }}} +-- {{{ Autorun.sh +awful.spawn.with_shell("~/.config/awesome/autorun.sh") +-- }}} + +-- {{{ Variable definitions +-- Themes define colours, icons, font and wallpapers. +beautiful.init("~/.config/awesome/themes/zenburn/theme.lua") + +-- This is used later as the default terminal and editor to run. +terminal = "st" +browser = "firefox-esr" +editor = os.getenv("EDITOR") or "nvim" +editor_cmd = terminal .. " -e " .. editor + +-- 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" +-- }}} + +-- {{{ Menu +-- Create a launcher widget and a main menu +myawesomemenu = { + { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, + { "manual", terminal .. " -e man awesome" }, + { "edit config", editor_cmd .. " " .. awesome.conffile }, + { "restart", awesome.restart }, + { "quit", function() awesome.quit() end }, +} + +mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, + { "open terminal", terminal } + } + }) + +mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, + menu = mymainmenu }) + +-- Menubar configuration +menubar.utils.terminal = terminal -- Set the terminal for applications that require it +-- }}} + +-- {{{ Tag +-- Table of layouts to cover with awful.layout.inc, order matters. +tag.connect_signal("request::default_layouts", function() + awful.layout.append_default_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, + awful.layout.suit.corner.nw, + }) +end) +-- }}} + +-- {{{ Wibar + +-- Keyboard map indicator and switcher +mykeyboardlayout = awful.widget.keyboardlayout() + +-- Create a textclock widget +mytextclock = wibox.widget.textclock() + +screen.connect_signal("request::wallpaper", function(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) + +screen.connect_signal("request::desktop_decoration", function(s) + -- Each screen has its own tag table. + awful.tag({ "1", "2", "3", "4", "5" }, s, awful.layout.layouts[1]) + -- awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + + -- Create an imagebox widget which will contain an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox { + screen = s, + buttons = { + 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 { + screen = s, + filter = awful.widget.taglist.filter.all, + buttons = { + 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.viewprev(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end), + } + } + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist { + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + buttons = { + awful.button({ }, 1, function (c) + c:activate { context = "tasklist", action = "toggle_minimization" } + end), + awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end), + awful.button({ }, 4, function() awful.client.focus.byidx(-1) end), + awful.button({ }, 5, function() awful.client.focus.byidx( 1) end), + } + } + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s }) + + -- Add widgets to the wibox + s.mywibox.widget = { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + mylauncher, + s.mytaglist, + s.mypromptbox, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + weather_widget({api_key='3e321f9414eaedbfab34983bda77a66e', coordinates= {45.7485, 4.8467}}), + cpu_widget(), + ram_widget(), + mykeyboardlayout, + wibox.widget.systray(), + mytextclock, + s.mylayoutbox, + }, + } +end) +-- }}} + +-- {{{ Mouse bindings +awful.mouse.append_global_mousebindings({ + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewprev), + awful.button({ }, 5, awful.tag.viewnext), +}) +-- }}} + +-- {{{ Key bindings + +-- General Awesome keys +awful.keyboard.append_global_keybindings({ + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + awful.key({ modkey, }, "w", function () mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + 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 }, "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"}), + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}), + +}) + +-- Tags related keybindings +awful.keyboard.append_global_keybindings({ + 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"}), +}) + +-- Focus related keybindings +awful.keyboard.append_global_keybindings({ + 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, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", 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, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + c:activate { raise = true, context = "key.unminimize" } + end + end, + {description = "restore minimized", group = "client"}), +}) + +-- Layout related keybindings +awful.keyboard.append_global_keybindings({ + 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, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + 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.keyboard.append_global_keybindings({ + awful.key { + modifiers = { modkey }, + keygroup = "numrow", + description = "only view tag", + group = "tag", + on_press = function (index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + tag:view_only() + end + end, + }, + awful.key { + modifiers = { modkey, "Control" }, + keygroup = "numrow", + description = "toggle tag", + group = "tag", + on_press = function (index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + awful.tag.viewtoggle(tag) + end + end, + }, + awful.key { + modifiers = { modkey, "Shift" }, + keygroup = "numrow", + description = "move focused client to tag", + group = "tag", + on_press = function (index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + }, + awful.key { + modifiers = { modkey, "Control", "Shift" }, + keygroup = "numrow", + description = "toggle focused client on tag", + group = "tag", + on_press = function (index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + }, + awful.key { + modifiers = { modkey }, + keygroup = "numpad", + description = "select layout directly", + group = "layout", + on_press = function (index) + local t = awful.screen.focused().selected_tag + if t then + t.layout = t.layouts[index] or t.layout + end + end, + } +}) + +client.connect_signal("request::default_mousebindings", function() + awful.mouse.append_client_mousebindings({ + awful.button({ }, 1, function (c) + c:activate { context = "mouse_click" } + end), + awful.button({ modkey }, 1, function (c) + c:activate { context = "mouse_click", action = "mouse_move" } + end), + awful.button({ modkey }, 3, function (c) + c:activate { context = "mouse_click", action = "mouse_resize"} + end), + }) +end) + +client.connect_signal("request::default_keybindings", function() + awful.keyboard.append_client_keybindings({ + 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 = "(un)maximize", group = "client"}), + awful.key({ modkey, "Control" }, "m", + function (c) + c.maximized_vertical = not c.maximized_vertical + c:raise() + end , + {description = "(un)maximize vertically", group = "client"}), + awful.key({ modkey, "Shift" }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c:raise() + end , + {description = "(un)maximize horizontally", group = "client"}), + }) +end) + +-- }}} + +-- {{{ Rules +-- Rules to apply to new clients. +ruled.client.connect_signal("request::rules", function() + -- All clients will match this rule. + ruled.client.append_rule { + id = "global", + rule = { }, + properties = { + focus = awful.client.focus.filter, + raise = true, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + } + + -- Floating clients. + ruled.client.append_rule { + id = "floating", + rule_any = { + instance = { "copyq", "pinentry" }, + class = { + "Arandr", "Blueman-manager", "Gpick", "Kruler", "Sxiv", + "Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer" + }, + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, + properties = { floating = true } + } + + -- Add titlebars to normal clients and dialogs + ruled.client.append_rule { + id = "titlebars", + rule_any = { type = { "normal", "dialog" } }, + properties = { titlebars_enabled = false } + } + + -- Set Firefox to always map on the tag named "2" on screen 1. + -- ruled.client.append_rule { + -- rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } + -- } +end) + +-- }}} + +-- {{{ Titlebars +-- 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.button({ }, 1, function() + c:activate { context = "titlebar", action = "mouse_move" } + end), + awful.button({ }, 3, function() + c:activate { context = "titlebar", action = "mouse_resize"} + end), + } + + awful.titlebar(c).widget = { + { -- 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) + +-- {{{ Notifications + +ruled.notification.connect_signal('request::rules', function() + -- All notifications will match this rule. + ruled.notification.append_rule { + rule = { }, + properties = { + screen = awful.screen.preferred, + implicit_timeout = 5, + } + } +end) + +naughty.connect_signal("request::display", function(n) + naughty.layout.box { notification = n } +end) + +-- }}} + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + c:activate { context = "mouse_enter", raise = false } +end) diff --git a/awesome/themes/default/theme.lua b/awesome/themes/default/theme.lua new file mode 100644 index 0000000..1e9173d --- /dev/null +++ b/awesome/themes/default/theme.lua @@ -0,0 +1,140 @@ +--------------------------- +-- Default awesome theme -- +--------------------------- + +local theme_assets = require("beautiful.theme_assets") +local xresources = require("beautiful.xresources") +local rnotification = require("ruled.notification") +local dpi = xresources.apply_dpi + +local gfs = require("gears.filesystem") +local themes_path = gfs.get_themes_dir() + +local theme = {} + +theme.font = "sans 8" + +theme.bg_normal = "#222222" +theme.bg_focus = "#535d6c" +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 = dpi(0) +theme.border_width = dpi(1) +theme.border_color_normal = "#000000" +theme.border_color_active = "#535d6c" +theme.border_color_marked = "#91231c" + +-- There are other variable sets +-- overriding the default one when +-- defined, the sets are: +-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile] +-- 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] +-- prompt_[fg|bg|fg_cursor|bg_cursor|font] +-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font] +-- Example: +--theme.taglist_bg_focus = "#ff0000" + +-- Generate taglist squares: +local taglist_square_size = dpi(4) +theme.taglist_squares_sel = theme_assets.taglist_squares_sel( + taglist_square_size, theme.fg_normal +) +theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( + taglist_square_size, theme.fg_normal +) + +-- Variables set for theming notifications: +-- notification_font +-- notification_[bg|fg] +-- notification_[width|height|margin] +-- notification_[border_color|border_width|shape|opacity] + +-- Variables set for theming the menu: +-- menu_[bg|fg]_[normal|focus] +-- menu_[border_color|border_width] +theme.menu_submenu_icon = themes_path.."default/submenu.png" +theme.menu_height = dpi(15) +theme.menu_width = dpi(100) + +-- 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 = themes_path.."default/titlebar/close_normal.png" +theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png" + +theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png" + +theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png" + +theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png" + +theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png" + +theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png" + +theme.wallpaper = "~/.config/awesome/themes/default/towers.png" + +-- You can use your own layout icons like this: +theme.layout_fairh = themes_path.."default/layouts/fairhw.png" +theme.layout_fairv = themes_path.."default/layouts/fairvw.png" +theme.layout_floating = themes_path.."default/layouts/floatingw.png" +theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png" +theme.layout_max = themes_path.."default/layouts/maxw.png" +theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png" +theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png" +theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png" +theme.layout_tile = themes_path.."default/layouts/tilew.png" +theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png" +theme.layout_spiral = themes_path.."default/layouts/spiralw.png" +theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png" +theme.layout_cornernw = themes_path.."default/layouts/cornernww.png" +theme.layout_cornerne = themes_path.."default/layouts/cornernew.png" +theme.layout_cornersw = themes_path.."default/layouts/cornersww.png" +theme.layout_cornerse = themes_path.."default/layouts/cornersew.png" + +-- Generate Awesome icon: +theme.awesome_icon = theme_assets.awesome_icon( + theme.menu_height, theme.bg_focus, theme.fg_focus +) + +-- 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 + +-- Set different colors for urgent notifications. +rnotification.connect_signal('request::rules', function() + rnotification.append_rule { + rule = { urgency = 'critical' }, + properties = { bg = '#ff0000', fg = '#ffffff' } + } +end) + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/awesome/themes/default/towers.png b/awesome/themes/default/towers.png Binary files differnew file mode 100644 index 0000000..5c09ecc --- /dev/null +++ b/awesome/themes/default/towers.png diff --git a/awesome/themes/sky/awesome-icon.png b/awesome/themes/sky/awesome-icon.png Binary files differnew file mode 100644 index 0000000..551564e --- /dev/null +++ b/awesome/themes/sky/awesome-icon.png diff --git a/awesome/themes/sky/layouts/cornerne.png b/awesome/themes/sky/layouts/cornerne.png Binary files differnew file mode 100644 index 0000000..221c4c8 --- /dev/null +++ b/awesome/themes/sky/layouts/cornerne.png diff --git a/awesome/themes/sky/layouts/cornernw.png b/awesome/themes/sky/layouts/cornernw.png Binary files differnew file mode 100644 index 0000000..1147e5a --- /dev/null +++ b/awesome/themes/sky/layouts/cornernw.png diff --git a/awesome/themes/sky/layouts/cornerse.png b/awesome/themes/sky/layouts/cornerse.png Binary files differnew file mode 100644 index 0000000..a0d23bc --- /dev/null +++ b/awesome/themes/sky/layouts/cornerse.png diff --git a/awesome/themes/sky/layouts/cornersw.png b/awesome/themes/sky/layouts/cornersw.png Binary files differnew file mode 100644 index 0000000..c608729 --- /dev/null +++ b/awesome/themes/sky/layouts/cornersw.png diff --git a/awesome/themes/sky/layouts/dwindle.png b/awesome/themes/sky/layouts/dwindle.png Binary files differnew file mode 100644 index 0000000..c985335 --- /dev/null +++ b/awesome/themes/sky/layouts/dwindle.png diff --git a/awesome/themes/sky/layouts/fairh.png b/awesome/themes/sky/layouts/fairh.png Binary files differnew file mode 100644 index 0000000..e8d7ddb --- /dev/null +++ b/awesome/themes/sky/layouts/fairh.png diff --git a/awesome/themes/sky/layouts/fairv.png b/awesome/themes/sky/layouts/fairv.png Binary files differnew file mode 100644 index 0000000..ef47f9f --- /dev/null +++ b/awesome/themes/sky/layouts/fairv.png diff --git a/awesome/themes/sky/layouts/floating.png b/awesome/themes/sky/layouts/floating.png Binary files differnew file mode 100644 index 0000000..978f723 --- /dev/null +++ b/awesome/themes/sky/layouts/floating.png diff --git a/awesome/themes/sky/layouts/fullscreen.png b/awesome/themes/sky/layouts/fullscreen.png Binary files differnew file mode 100644 index 0000000..b1de003 --- /dev/null +++ b/awesome/themes/sky/layouts/fullscreen.png diff --git a/awesome/themes/sky/layouts/magnifier.png b/awesome/themes/sky/layouts/magnifier.png Binary files differnew file mode 100644 index 0000000..d69ac68 --- /dev/null +++ b/awesome/themes/sky/layouts/magnifier.png diff --git a/awesome/themes/sky/layouts/max.png b/awesome/themes/sky/layouts/max.png Binary files differnew file mode 100644 index 0000000..37491f9 --- /dev/null +++ b/awesome/themes/sky/layouts/max.png diff --git a/awesome/themes/sky/layouts/spiral.png b/awesome/themes/sky/layouts/spiral.png Binary files differnew file mode 100644 index 0000000..f0a07ce --- /dev/null +++ b/awesome/themes/sky/layouts/spiral.png diff --git a/awesome/themes/sky/layouts/tile.png b/awesome/themes/sky/layouts/tile.png Binary files differnew file mode 100644 index 0000000..550393a --- /dev/null +++ b/awesome/themes/sky/layouts/tile.png diff --git a/awesome/themes/sky/layouts/tilebottom.png b/awesome/themes/sky/layouts/tilebottom.png Binary files differnew file mode 100644 index 0000000..1dcc227 --- /dev/null +++ b/awesome/themes/sky/layouts/tilebottom.png diff --git a/awesome/themes/sky/layouts/tileleft.png b/awesome/themes/sky/layouts/tileleft.png Binary files differnew file mode 100644 index 0000000..14e13f5 --- /dev/null +++ b/awesome/themes/sky/layouts/tileleft.png diff --git a/awesome/themes/sky/layouts/tiletop.png b/awesome/themes/sky/layouts/tiletop.png Binary files differnew file mode 100644 index 0000000..2bcb161 --- /dev/null +++ b/awesome/themes/sky/layouts/tiletop.png diff --git a/awesome/themes/sky/sky-background.png b/awesome/themes/sky/sky-background.png Binary files differnew file mode 100644 index 0000000..bbc07cc --- /dev/null +++ b/awesome/themes/sky/sky-background.png diff --git a/awesome/themes/sky/theme.lua b/awesome/themes/sky/theme.lua new file mode 100644 index 0000000..18c678c --- /dev/null +++ b/awesome/themes/sky/theme.lua @@ -0,0 +1,112 @@ +------------------------------- +-- "Sky" awesome theme -- +-- By Andrei "Garoth" Thorp -- +------------------------------- +-- If you want SVGs and extras, get them from garoth.com/awesome/sky-theme + +local theme_assets = require("beautiful.theme_assets") +local xresources = require("beautiful.xresources") +local rnotification = require("ruled.notification") +local dpi = xresources.apply_dpi +local themes_path = require("gears.filesystem").get_themes_dir() + + +-- BASICS +local theme = {} +theme.font = "sans 8" + +theme.bg_focus = "#e2eeea" +theme.bg_normal = "#729fcf" +theme.bg_urgent = "#fce94f" +theme.bg_minimize = "#0067ce" +theme.bg_systray = theme.bg_normal + +theme.fg_normal = "#2e3436" +theme.fg_focus = "#2e3436" +theme.fg_urgent = "#2e3436" +theme.fg_minimize = "#2e3436" + +theme.useless_gap = dpi(0) +theme.border_width = dpi(2) +theme.border_color_normal = "#dae3e0" +theme.border_color_active = "#729fcf" +theme.border_color_marked = "#eeeeec" + +-- IMAGES +theme.layout_fairh = themes_path .. "sky/layouts/fairh.png" +theme.layout_fairv = themes_path .. "sky/layouts/fairv.png" +theme.layout_floating = themes_path .. "sky/layouts/floating.png" +theme.layout_magnifier = themes_path .. "sky/layouts/magnifier.png" +theme.layout_max = themes_path .. "sky/layouts/max.png" +theme.layout_fullscreen = themes_path .. "sky/layouts/fullscreen.png" +theme.layout_tilebottom = themes_path .. "sky/layouts/tilebottom.png" +theme.layout_tileleft = themes_path .. "sky/layouts/tileleft.png" +theme.layout_tile = themes_path .. "sky/layouts/tile.png" +theme.layout_tiletop = themes_path .. "sky/layouts/tiletop.png" +theme.layout_spiral = themes_path .. "sky/layouts/spiral.png" +theme.layout_dwindle = themes_path .. "sky/layouts/dwindle.png" +theme.layout_cornernw = themes_path .. "sky/layouts/cornernw.png" +theme.layout_cornerne = themes_path .. "sky/layouts/cornerne.png" +theme.layout_cornersw = themes_path .. "sky/layouts/cornersw.png" +theme.layout_cornerse = themes_path .. "sky/layouts/cornerse.png" + +theme.awesome_icon = themes_path .. "sky/awesome-icon.png" + +-- from default for now... +theme.menu_submenu_icon = themes_path .. "default/submenu.png" + +-- Generate taglist squares: +local taglist_square_size = dpi(4) +theme.taglist_squares_sel = theme_assets.taglist_squares_sel( + taglist_square_size, theme.fg_normal +) +theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( + taglist_square_size, theme.fg_normal +) + +-- MISC +theme.wallpaper = themes_path .. "sky/sky-background.png" +theme.taglist_squares = "true" +theme.titlebar_close_button = "true" +theme.menu_height = dpi(15) +theme.menu_width = dpi(100) + +-- Define the image to load +theme.titlebar_close_button_normal = themes_path .. "default/titlebar/close_normal.png" +theme.titlebar_close_button_focus = themes_path .. "default/titlebar/close_focus.png" + +theme.titlebar_minimize_button_normal = themes_path .. "default/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = themes_path .. "default/titlebar/minimize_focus.png" + +theme.titlebar_ontop_button_normal_inactive = themes_path .. "default/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = themes_path .. "default/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = themes_path .. "default/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = themes_path .. "default/titlebar/ontop_focus_active.png" + +theme.titlebar_sticky_button_normal_inactive = themes_path .. "default/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = themes_path .. "default/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = themes_path .. "default/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = themes_path .. "default/titlebar/sticky_focus_active.png" + +theme.titlebar_floating_button_normal_inactive = themes_path .. "default/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = themes_path .. "default/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = themes_path .. "default/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = themes_path .. "default/titlebar/floating_focus_active.png" + +theme.titlebar_maximized_button_normal_inactive = themes_path .. "default/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = themes_path .. "default/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = themes_path .. "default/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = themes_path .. "default/titlebar/maximized_focus_active.png" + + +-- Set different colors for urgent notifications. +rnotification.connect_signal('request::rules', function() + rnotification.append_rule { + rule = { urgency = 'critical' }, + properties = { bg = '#ff0000', fg = '#ffffff' } + } +end) + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/awesome/themes/zenburn/awesome-icon.png b/awesome/themes/zenburn/awesome-icon.png Binary files differnew file mode 100644 index 0000000..70978d3 --- /dev/null +++ b/awesome/themes/zenburn/awesome-icon.png diff --git a/awesome/themes/zenburn/darksea.png b/awesome/themes/zenburn/darksea.png Binary files differnew file mode 100644 index 0000000..70f3375 --- /dev/null +++ b/awesome/themes/zenburn/darksea.png diff --git a/awesome/themes/zenburn/layouts/cornerne.png b/awesome/themes/zenburn/layouts/cornerne.png Binary files differnew file mode 100644 index 0000000..d541a43 --- /dev/null +++ b/awesome/themes/zenburn/layouts/cornerne.png diff --git a/awesome/themes/zenburn/layouts/cornernw.png b/awesome/themes/zenburn/layouts/cornernw.png Binary files differnew file mode 100644 index 0000000..78fa394 --- /dev/null +++ b/awesome/themes/zenburn/layouts/cornernw.png diff --git a/awesome/themes/zenburn/layouts/cornerse.png b/awesome/themes/zenburn/layouts/cornerse.png Binary files differnew file mode 100644 index 0000000..19b85c3 --- /dev/null +++ b/awesome/themes/zenburn/layouts/cornerse.png diff --git a/awesome/themes/zenburn/layouts/cornersw.png b/awesome/themes/zenburn/layouts/cornersw.png Binary files differnew file mode 100644 index 0000000..a35c476 --- /dev/null +++ b/awesome/themes/zenburn/layouts/cornersw.png diff --git a/awesome/themes/zenburn/layouts/dwindle.png b/awesome/themes/zenburn/layouts/dwindle.png Binary files differnew file mode 100644 index 0000000..1aa4bf2 --- /dev/null +++ b/awesome/themes/zenburn/layouts/dwindle.png diff --git a/awesome/themes/zenburn/layouts/fairh.png b/awesome/themes/zenburn/layouts/fairh.png Binary files differnew file mode 100644 index 0000000..e176bb3 --- /dev/null +++ b/awesome/themes/zenburn/layouts/fairh.png diff --git a/awesome/themes/zenburn/layouts/fairv.png b/awesome/themes/zenburn/layouts/fairv.png Binary files differnew file mode 100644 index 0000000..7c0a92c --- /dev/null +++ b/awesome/themes/zenburn/layouts/fairv.png diff --git a/awesome/themes/zenburn/layouts/floating.png b/awesome/themes/zenburn/layouts/floating.png Binary files differnew file mode 100644 index 0000000..a399092 --- /dev/null +++ b/awesome/themes/zenburn/layouts/floating.png diff --git a/awesome/themes/zenburn/layouts/fullscreen.png b/awesome/themes/zenburn/layouts/fullscreen.png Binary files differnew file mode 100644 index 0000000..a0c795c --- /dev/null +++ b/awesome/themes/zenburn/layouts/fullscreen.png diff --git a/awesome/themes/zenburn/layouts/magnifier.png b/awesome/themes/zenburn/layouts/magnifier.png Binary files differnew file mode 100644 index 0000000..bca6db9 --- /dev/null +++ b/awesome/themes/zenburn/layouts/magnifier.png diff --git a/awesome/themes/zenburn/layouts/max.png b/awesome/themes/zenburn/layouts/max.png Binary files differnew file mode 100644 index 0000000..a24900c --- /dev/null +++ b/awesome/themes/zenburn/layouts/max.png diff --git a/awesome/themes/zenburn/layouts/spiral.png b/awesome/themes/zenburn/layouts/spiral.png Binary files differnew file mode 100644 index 0000000..8f5aeed --- /dev/null +++ b/awesome/themes/zenburn/layouts/spiral.png diff --git a/awesome/themes/zenburn/layouts/tile.png b/awesome/themes/zenburn/layouts/tile.png Binary files differnew file mode 100644 index 0000000..3fcc904 --- /dev/null +++ b/awesome/themes/zenburn/layouts/tile.png diff --git a/awesome/themes/zenburn/layouts/tilebottom.png b/awesome/themes/zenburn/layouts/tilebottom.png Binary files differnew file mode 100644 index 0000000..dfe7832 --- /dev/null +++ b/awesome/themes/zenburn/layouts/tilebottom.png diff --git a/awesome/themes/zenburn/layouts/tileleft.png b/awesome/themes/zenburn/layouts/tileleft.png Binary files differnew file mode 100644 index 0000000..c5decfd --- /dev/null +++ b/awesome/themes/zenburn/layouts/tileleft.png diff --git a/awesome/themes/zenburn/layouts/tiletop.png b/awesome/themes/zenburn/layouts/tiletop.png Binary files differnew file mode 100644 index 0000000..b251661 --- /dev/null +++ b/awesome/themes/zenburn/layouts/tiletop.png diff --git a/awesome/themes/zenburn/taglist/squarefz.png b/awesome/themes/zenburn/taglist/squarefz.png Binary files differnew file mode 100644 index 0000000..0927720 --- /dev/null +++ b/awesome/themes/zenburn/taglist/squarefz.png diff --git a/awesome/themes/zenburn/taglist/squarez.png b/awesome/themes/zenburn/taglist/squarez.png Binary files differnew file mode 100644 index 0000000..9b41c26 --- /dev/null +++ b/awesome/themes/zenburn/taglist/squarez.png diff --git a/awesome/themes/zenburn/theme.lua b/awesome/themes/zenburn/theme.lua new file mode 100644 index 0000000..2e53060 --- /dev/null +++ b/awesome/themes/zenburn/theme.lua @@ -0,0 +1,145 @@ +------------------------------- +-- "Zenburn" awesome theme -- +-- By Adrian C. (anrxc) -- +------------------------------- + +local themes_path = require("gears.filesystem").get_themes_dir() +local rnotification = require("ruled.notification") +local dpi = require("beautiful.xresources").apply_dpi + +-- {{{ Main +local theme = {} +theme.wallpaper = "~/.config/awesome/themes/zenburn/darksea.png" +-- }}} + +-- {{{ Styles +theme.font = "sans 10" + +-- {{{ Colors +theme.fg_normal = "#DCDCCC" +theme.fg_focus = "#F0DFAF" +theme.fg_urgent = "#CC9393" +theme.bg_normal = "#3F3F3F" +theme.bg_focus = "#1E2320" +theme.bg_urgent = "#3F3F3F" +theme.bg_systray = theme.bg_normal +-- }}} + +-- {{{ Borders +theme.useless_gap = dpi(0) +theme.border_width = dpi(4) +theme.border_color_normal = "#3F3F3F" +theme.border_color_active = "#6F6F6F" +theme.border_color_marked = "#CC9393" +-- }}} + +-- {{{ Titlebars +theme.titlebar_bg_focus = "#3F3F3F" +theme.titlebar_bg_normal = "#3F3F3F" +-- }}} + +-- There are other variable sets +-- overriding the default one when +-- defined, the sets are: +-- [taglist|tasklist]_[bg|fg]_[focus|urgent|occupied|empty|volatile] +-- titlebar_[normal|focus] +-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] +-- Example: +--theme.taglist_bg_focus = "#CC9393" +-- }}} + +-- {{{ Widgets +-- You can add as many variables as +-- you wish and access them by using +-- beautiful.variable in your rc.lua +--theme.fg_widget = "#AECF96" +--theme.fg_center_widget = "#88A175" +--theme.fg_end_widget = "#FF5656" +--theme.bg_widget = "#494B4F" +--theme.border_widget = "#3F3F3F" +-- }}} + +-- {{{ Mouse finder +theme.mouse_finder_color = "#CC9393" +-- mouse_finder_[timeout|animate_timeout|radius|factor] +-- }}} + +-- {{{ Menu +-- Variables set for theming the menu: +-- menu_[bg|fg]_[normal|focus] +-- menu_[border_color|border_width] +theme.menu_height = dpi(15) +theme.menu_width = dpi(100) +-- }}} + +-- {{{ Icons +-- {{{ Taglist +theme.taglist_squares_sel = themes_path .. "zenburn/taglist/squarefz.png" +theme.taglist_squares_unsel = themes_path .. "zenburn/taglist/squarez.png" +--theme.taglist_squares_resize = "false" +-- }}} + +-- {{{ Misc +theme.awesome_icon = themes_path .. "zenburn/awesome-icon.png" +theme.menu_submenu_icon = themes_path .. "default/submenu.png" +-- }}} + +-- {{{ Layout +theme.layout_tile = themes_path .. "zenburn/layouts/tile.png" +theme.layout_tileleft = themes_path .. "zenburn/layouts/tileleft.png" +theme.layout_tilebottom = themes_path .. "zenburn/layouts/tilebottom.png" +theme.layout_tiletop = themes_path .. "zenburn/layouts/tiletop.png" +theme.layout_fairv = themes_path .. "zenburn/layouts/fairv.png" +theme.layout_fairh = themes_path .. "zenburn/layouts/fairh.png" +theme.layout_spiral = themes_path .. "zenburn/layouts/spiral.png" +theme.layout_dwindle = themes_path .. "zenburn/layouts/dwindle.png" +theme.layout_max = themes_path .. "zenburn/layouts/max.png" +theme.layout_fullscreen = themes_path .. "zenburn/layouts/fullscreen.png" +theme.layout_magnifier = themes_path .. "zenburn/layouts/magnifier.png" +theme.layout_floating = themes_path .. "zenburn/layouts/floating.png" +theme.layout_cornernw = themes_path .. "zenburn/layouts/cornernw.png" +theme.layout_cornerne = themes_path .. "zenburn/layouts/cornerne.png" +theme.layout_cornersw = themes_path .. "zenburn/layouts/cornersw.png" +theme.layout_cornerse = themes_path .. "zenburn/layouts/cornerse.png" +-- }}} + +-- {{{ Titlebar +theme.titlebar_close_button_focus = themes_path .. "zenburn/titlebar/close_focus.png" +theme.titlebar_close_button_normal = themes_path .. "zenburn/titlebar/close_normal.png" + +theme.titlebar_minimize_button_normal = themes_path .. "default/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = themes_path .. "default/titlebar/minimize_focus.png" + +theme.titlebar_ontop_button_focus_active = themes_path .. "zenburn/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = themes_path .. "zenburn/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = themes_path .. "zenburn/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = themes_path .. "zenburn/titlebar/ontop_normal_inactive.png" + +theme.titlebar_sticky_button_focus_active = themes_path .. "zenburn/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = themes_path .. "zenburn/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = themes_path .. "zenburn/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = themes_path .. "zenburn/titlebar/sticky_normal_inactive.png" + +theme.titlebar_floating_button_focus_active = themes_path .. "zenburn/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = themes_path .. "zenburn/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = themes_path .. "zenburn/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = themes_path .. "zenburn/titlebar/floating_normal_inactive.png" + +theme.titlebar_maximized_button_focus_active = themes_path .. "zenburn/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = themes_path .. "zenburn/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = themes_path .. "zenburn/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = themes_path .. "zenburn/titlebar/maximized_normal_inactive.png" +-- }}} +-- }}} + +-- Set different colors for urgent notifications. +rnotification.connect_signal('request::rules', function() + rnotification.append_rule { + rule = { urgency = 'critical' }, + properties = { bg = '#ff0000', fg = '#ffffff' } + } +end) + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/awesome/themes/zenburn/titlebar/close_focus.png b/awesome/themes/zenburn/titlebar/close_focus.png Binary files differnew file mode 100644 index 0000000..cccbadc --- /dev/null +++ b/awesome/themes/zenburn/titlebar/close_focus.png diff --git a/awesome/themes/zenburn/titlebar/floating_focus_active.png b/awesome/themes/zenburn/titlebar/floating_focus_active.png Binary files differnew file mode 100644 index 0000000..77ea127 --- /dev/null +++ b/awesome/themes/zenburn/titlebar/floating_focus_active.png diff --git a/awesome/themes/zenburn/titlebar/maximized_focus_active.png b/awesome/themes/zenburn/titlebar/maximized_focus_active.png Binary files differnew file mode 100644 index 0000000..9fc0483 --- /dev/null +++ b/awesome/themes/zenburn/titlebar/maximized_focus_active.png diff --git a/awesome/themes/zenburn/titlebar/ontop_focus_active.png b/awesome/themes/zenburn/titlebar/ontop_focus_active.png Binary files differnew file mode 100644 index 0000000..86e61b7 --- /dev/null +++ b/awesome/themes/zenburn/titlebar/ontop_focus_active.png diff --git a/awesome/themes/zenburn/titlebar/sticky_focus_active.png b/awesome/themes/zenburn/titlebar/sticky_focus_active.png Binary files differnew file mode 100644 index 0000000..5af45c1 --- /dev/null +++ b/awesome/themes/zenburn/titlebar/sticky_focus_active.png diff --git a/awesome/themes/zenburn/zenburn-background.png b/awesome/themes/zenburn/zenburn-background.png Binary files differnew file mode 100644 index 0000000..b2c14d9 --- /dev/null +++ b/awesome/themes/zenburn/zenburn-background.png |