diff --git a/.gitignore b/.gitignore index dae2d47..1850b3c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ rc.lua rc.lua.save theme-personal.lua .luacheckrc +wip/ diff --git a/TODO b/TODO deleted file mode 100644 index 89f8296..0000000 --- a/TODO +++ /dev/null @@ -1,34 +0,0 @@ -. create zen and valparaiso and pro themes - . zen: http://www.holgerschurig.de/en/awesome-4.0-global-titlebar - . zen: clock variant: https://reagent-project.github.io/news/binary-clock.html - . zen: theming clock? https://www.gnome-look.org/browse/cat/208/ord/latest - . zen: replicate this: https://github.com/davidrlunu/dots-and-dashes - . zen: fullscreen, no statusbar, but with its functionalities, notifications for tag switch - . valparaiso: set circled progressbars, but made them look like textuals -. create 95 theme with win 7 aerosnap: https://awesomewm.org/doc/api/libraries/awful.placement.html - . check elv13 for icons and related stuff - . delayed resizing https://github.com/awesomeWM/awesome/blob/c349ff9206fcb2111b089ddf2d250e2eac20b6e0/docs/89-NEWS.md#mouse-move-and-resize-handlers -. lain, release 1.0: - . make the user define widget type in input (defaulted to textbox) - . default textbox filled with default settings - . read luaOpt and perfTips - . curl -> lgi.Gio in {mpd, imap, weather} - . close all issues - . follow lua perftips - . remove calendar? - . implement: https://github.com/lcpz/lain/pull/340#issuecomment-299716720 - . sysload/temp -> watchets - . add travis and luacov -. freedesktop: - . awful.placement for moving icons - . add this until it's merged upstream: https://github.com/awesomeWM/awesome/pull/1647 - . check if this will break menu: https://github.com/awesomeWM/awesome/pull/2111 - -$ lua -e 'print(require("lgi").GLib.find_program_in_path("does_not_exist"))' -nil -$ lua -e 'print(require("lgi").GLib.find_program_in_path("urxvt"))' -/usr/bin/urxvt - -https://github.com/awesomeWM/awesome/issues/1496#issuecomment-284734291 for copycats issue - -http://www.brendangregg.com/blog/2017-09-05/solaris-to-linux-2017.html diff --git a/clock.lua b/clock.lua deleted file mode 100644 index 0f6fb45..0000000 --- a/clock.lua +++ /dev/null @@ -1,148 +0,0 @@ - ---[[ - - Licensed under GNU General Public License v2 - * (c) 2017, Luke Bonham - * (c) 2013, maisvendoo - ---]] - -local timer = require("gears.timer") -local wibox = require("wibox") -local date = os.date -local math = math - -local clock = {} - -function clock.new(args) - local args = args or {} - local screen = args.screen or 1 - local font = args.font or "Times" - local width = args.width or 300 - local height = args.weight or 300 - local x = args.x or 20 - local y = args.y or 20 - local bg = args.bg or "#00000000" -- transparent - - clock.wibox = wibox { - bg = bg, - width = width, - height = height, - ontop = false, - visible = true, - screen = screen - } - - clock.wibox : geometry { x = x, y = y } - - clock.wibox : setup { - fit = function(self, context, width, height) - return width, height - end, - draw = function(self, context, cr, width, height) - -- Any params calculation - local radius = width/2 - 5 - local cx = width/2 - local cy = height/2 - local hour_len = 15 - local min_len = 7 - - -- Draw dial - - -- Draw hour divisions - cr:set_line_width(2) - cr:set_source_rgba(0.7, 0.7, 0.7, 1) - - local kx = 1.0 - local ky = 1.0 - - for i = 0,11 do - cr:move_to(cx + kx*(radius - hour_len)*math.sin(i*math.rad(30)), cy - kx*(radius - hour_len)*math.cos(i*math.rad(30))) - cr:line_to(cx + ky*radius*math.sin(i*math.rad(30)), cy - ky*radius*math.cos(i*math.rad(30))) - cr:stroke() - end - - -- Draw minute divisions - cr:set_line_width(1) - cr:set_source_rgba(0.7, 0.7, 0.7, 1) - - for i = 0,59 do - cr:move_to(cx + kx*(radius - min_len)*math.sin(i*math.rad(6)), cy - ky*(radius - min_len)*math.cos(i*math.rad(6))) - cr:line_to(cx + kx*radius*math.sin(i*math.rad(6)), cy - ky*radius*math.cos(i*math.rad(6))) - cr:stroke() - end - - -- Draw digits on dial - local dig_size = 50 - local dig_radius = radius/1.3 - local n_hours = 12 - - cr:select_font_face(font, 0, 0) - cr:set_font_size(dig_size) - - for i = 1,n_hours do - local dig = math.floor(i*12/n_hours) - local extents = cr:text_extents(dig) - - local dx = cx + kx*dig_radius*math.sin(i*math.rad(360/n_hours)) - local dy = cy - ky*dig_radius*math.cos(i*math.rad(360/n_hours)) - - local tx = dx - extents.width/2 - local ty = dy + extents.height/2 - - cr:move_to(tx, ty) - cr:show_text(dig) - end - - -- Draw arrows - - -- Get local time - local sec = date("%S") - local min = date("%M") - local hour = date("%H") - - -- Set arrow length - local hour_arrow_len = radius/1.8 - local min_arrow_len = radius - min_len - 8 - local sec_arrow_len = radius - min_len - 6 - - -- Draw hours arrow - cr:set_line_width(9) - cr:set_source_rgba(1, 1, 1, 1) - - cr:move_to(cx, cy) - cr:line_to(cx + hour_arrow_len*math.sin(math.rad((hour + min/60 + sec/3600)*30)), cy - hour_arrow_len*math.cos(math.rad((hour + min/60 + sec/3600)*30))) - cr:stroke() - - -- Draw minutes arrow - cr:set_line_width(4) - cr:set_source_rgba(1, 1, 1, 1) - - cr:move_to(cx, cy) - cr:line_to(cx + min_arrow_len*math.sin(math.rad((min + sec/60)*6)), cy - sec_arrow_len*math.cos(math.rad((min + sec/60)*6))) - cr:stroke() - - -- Draw seconds arrow - cr:set_line_width(2) - cr:set_source_rgba(1, 0.5, 0, 1) - - cr:move_to(cx, cy) - cr:line_to(cx + sec_arrow_len*math.sin(sec*math.rad(6)), cy - sec_arrow_len*math.cos(sec*math.rad(6))) - cr:stroke() - end, - layout = wibox.widget.base.make_widget - } - - -- Create timer - clock.timer = timer { timeout = 1 } - - -- Set timer callback - clock.timer:connect_signal("timeout", function() - clock.wibox.widget:emit_signal("widget::redraw_needed") - end) - - -- Start timer - clock.timer:start() -end - -return clock diff --git a/freedesktop b/freedesktop index e4b7566..e4ac597 160000 --- a/freedesktop +++ b/freedesktop @@ -1 +1 @@ -Subproject commit e4b75661c30a0525f318a3e15d623c201242e0a7 +Subproject commit e4ac597ea809cbc4b08be1d0dfdb871b6b0db9c3 diff --git a/themes/95/icons/bottombar/1024.png b/themes/95/icons/bottombar/1024.png deleted file mode 100644 index 74c59dc..0000000 Binary files a/themes/95/icons/bottombar/1024.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1152.png b/themes/95/icons/bottombar/1152.png deleted file mode 100644 index 025cc0e..0000000 Binary files a/themes/95/icons/bottombar/1152.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1280.png b/themes/95/icons/bottombar/1280.png deleted file mode 100644 index eea912f..0000000 Binary files a/themes/95/icons/bottombar/1280.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1366.png b/themes/95/icons/bottombar/1366.png deleted file mode 100644 index d1bbad2..0000000 Binary files a/themes/95/icons/bottombar/1366.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1440.png b/themes/95/icons/bottombar/1440.png deleted file mode 100644 index 39ee685..0000000 Binary files a/themes/95/icons/bottombar/1440.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1600.png b/themes/95/icons/bottombar/1600.png deleted file mode 100644 index 2de4cdd..0000000 Binary files a/themes/95/icons/bottombar/1600.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1680.png b/themes/95/icons/bottombar/1680.png deleted file mode 100644 index d2f6b56..0000000 Binary files a/themes/95/icons/bottombar/1680.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1920-1.png b/themes/95/icons/bottombar/1920-1.png deleted file mode 100644 index e2f7f9e..0000000 Binary files a/themes/95/icons/bottombar/1920-1.png and /dev/null differ diff --git a/themes/95/icons/bottombar/1920.png b/themes/95/icons/bottombar/1920.png deleted file mode 100644 index 6ea5faa..0000000 Binary files a/themes/95/icons/bottombar/1920.png and /dev/null differ diff --git a/themes/95/icons/bottombar/2560.png b/themes/95/icons/bottombar/2560.png deleted file mode 100644 index c8f6412..0000000 Binary files a/themes/95/icons/bottombar/2560.png and /dev/null differ diff --git a/themes/95/icons/bottombar/focus.png b/themes/95/icons/bottombar/focus.png deleted file mode 100644 index de10239..0000000 Binary files a/themes/95/icons/bottombar/focus.png and /dev/null differ diff --git a/themes/95/icons/bottombar/normal.png b/themes/95/icons/bottombar/normal.png deleted file mode 100644 index b58dcae..0000000 Binary files a/themes/95/icons/bottombar/normal.png and /dev/null differ diff --git a/themes/95/icons/dwindle.png b/themes/95/icons/dwindle.png deleted file mode 100644 index 66c78d5..0000000 Binary files a/themes/95/icons/dwindle.png and /dev/null differ diff --git a/themes/95/icons/fairh.png b/themes/95/icons/fairh.png deleted file mode 100644 index 6bb901f..0000000 Binary files a/themes/95/icons/fairh.png and /dev/null differ diff --git a/themes/95/icons/fairv.png b/themes/95/icons/fairv.png deleted file mode 100644 index b8d4017..0000000 Binary files a/themes/95/icons/fairv.png and /dev/null differ diff --git a/themes/95/icons/floating.png b/themes/95/icons/floating.png deleted file mode 100644 index c495593..0000000 Binary files a/themes/95/icons/floating.png and /dev/null differ diff --git a/themes/95/icons/fullscreen.png b/themes/95/icons/fullscreen.png deleted file mode 100644 index 76d0e67..0000000 Binary files a/themes/95/icons/fullscreen.png and /dev/null differ diff --git a/themes/95/icons/magnifier.png b/themes/95/icons/magnifier.png deleted file mode 100644 index b5cde39..0000000 Binary files a/themes/95/icons/magnifier.png and /dev/null differ diff --git a/themes/95/icons/max.png b/themes/95/icons/max.png deleted file mode 100644 index 6788598..0000000 Binary files a/themes/95/icons/max.png and /dev/null differ diff --git a/themes/95/icons/spiral.png b/themes/95/icons/spiral.png deleted file mode 100644 index 2a8da2f..0000000 Binary files a/themes/95/icons/spiral.png and /dev/null differ diff --git a/themes/95/icons/submenu.png b/themes/95/icons/submenu.png deleted file mode 100644 index 10ca014..0000000 Binary files a/themes/95/icons/submenu.png and /dev/null differ diff --git a/themes/95/icons/tile.png b/themes/95/icons/tile.png deleted file mode 100644 index 32e5d52..0000000 Binary files a/themes/95/icons/tile.png and /dev/null differ diff --git a/themes/95/icons/tilebottom.png b/themes/95/icons/tilebottom.png deleted file mode 100644 index 83587b2..0000000 Binary files a/themes/95/icons/tilebottom.png and /dev/null differ diff --git a/themes/95/icons/tileleft.png b/themes/95/icons/tileleft.png deleted file mode 100644 index 2aa31e3..0000000 Binary files a/themes/95/icons/tileleft.png and /dev/null differ diff --git a/themes/95/icons/tiletop.png b/themes/95/icons/tiletop.png deleted file mode 100644 index 937aa4c..0000000 Binary files a/themes/95/icons/tiletop.png and /dev/null differ diff --git a/themes/95/rc.lua.95 b/themes/95/rc.lua.95 deleted file mode 100644 index e879228..0000000 --- a/themes/95/rc.lua.95 +++ /dev/null @@ -1,630 +0,0 @@ - ---[[ - - 95 Awesome WM config - github.com/copycat-killer - ---]] - --- {{{ Required libraries -local gears = require("gears") -local awful = require("awful") -awful.rules = require("awful.rules") - require("awful.autofocus") -local wibox = require("wibox") -local beautiful = require("beautiful") -local naughty = require("naughty") -local lain = require("lain") -local eminent = require("eminent") -local freedesktop = require("freedesktop") ---local menubar = require("menubar") --- }}} - --- {{{ Error handling -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} - --- {{{ Autostart applications -function run_once(cmd) - findme = cmd - firstspace = cmd:find(" ") - if firstspace then - findme = cmd:sub(0, firstspace-1) - end - awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") -end - -run_once("urxvtd") -run_once("unclutter -root") --- }}} - --- {{{ Variable definitions - --- beautiful init -beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/95/theme.lua") - --- common -modkey = "Mod4" -altkey = "Mod1" -terminal = "urxvtc" or "xterm" -editor = os.getenv("EDITOR") or "nano" or "vi" -editor_cmd = terminal .. " -e " .. editor - --- user defined -browser = "firefox" -gui_editor = "gvim" -graphics = "gimp" - -local layouts = { - awful.layout.suit.floating, - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top -} - --- quake terminal -local quakeconsole = {} -for s = 1, screen.count() do - quakeconsole[s] = lain.util.quake({ app = terminal, vert = "bottom" }) - freedesktop.desktop.add_icons({screen = s}) -end --- }}} - --- {{{ Tags -tags = { - names = { "start", "2", "3", "4", "5" }, - layout = { layouts[1], layouts[3], layouts[2], layouts[1], layouts[5] } -} -for s = 1, screen.count() do - tags[s] = awful.tag(tags.names, s, tags.layout) -end --- }}} - --- {{{ Wallpaper -gears.wallpaper.tiled(beautiful.wallpaper) -if beautiful.wallpaper then - for s = 1, screen.count() do - end -end --- }}} - --- {{{ Menu -mymainmenu = awful.menu.new({ items = freedesktop.menu.build(), - theme = { height = 16, width = 130 }}) --- Menubar configuration ---menubar.utils.terminal = terminal -- Set the terminal for applications that require it --- }}} - --- {{{ Wibox -markup = lain.util.markup -gray = "#9E9C9A" - --- Textclock -mytextclock = awful.widget.textclock(" %H:%M ") - --- Calendar -lain.widgets.calendar:attach(mytextclock) - ---[[ Mail IMAP check --- commented because it needs to be set before use -mailwidget = lain.widgets.imap({ - timeout = 180, - server = "server", - mail = "mail", - password = "keyring get mail", - settings = function() - mail = "" - count = "" - - if mailcount > 0 then - mail = "Mail " - count = mailcount .. " " - end - - widget:set_markup(markup(gray, mail) .. count) - end -}) -]] - --- ALSA volume -volumewidget = lain.widgets.alsa({ - settings = function() - header = " Vol " - level = volume_now.level - - if volume_now.status == "off" then - level = level .. "M " - else - level = level .. " " - end - - widget:set_markup(markup(gray, header) .. level) - end -}) - - --- Separators -first = wibox.widget.textbox(' ') - --- Create a wibox for each screen and add it -mywibox = {} -mypromptbox = {} -mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) - -for s = 1, screen.count() do - -- Create a promptbox for each screen - mypromptbox[s] = awful.widget.prompt() - -- Create an imagebox widget which will contains an icon indicating which layout we're using. - -- We need one layoutbox per screen. - mylayoutbox[s] = awful.widget.layoutbox(s) - mylayoutbox[s]:buttons(awful.util.table.join( - awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), - awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) - -- Create a taglist widget - mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons) - - -- Create a tasklist widget - mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) - - -- Create the wibox - mywibox[s] = awful.wibox({ position = "bottom", screen = s, height = 25 }) - - -- Widgets that are aligned to the left - local left_layout = wibox.layout.fixed.horizontal() - left_layout:add(first) - left_layout:add(mytaglist[s]) - left_layout:add(mypromptbox[s]) - left_layout:add(first) - - -- Widgets that are aligned to the right - local right_layout = wibox.layout.fixed.horizontal() - if s == 1 then right_layout:add(wibox.widget.systray()) end - right_layout:add(first) - --right_layout:add(mailwidget) - right_layout:add(mylayoutbox[s]) - right_layout:add(volumewidget) - right_layout:add(mytextclock) - - -- Now bring it all together (with the tasklist in the middle) - local layout = wibox.layout.align.horizontal() - layout:set_left(left_layout) - layout:set_middle(mytasklist[s]) - layout:set_right(right_layout) - - mywibox[s]:set_widget(layout) - - -- Set proper background, instead of beautiful.bg_normal - mywibox[s]:set_bg(beautiful.bottombar_path .. math.floor(screen[mouse.screen].workarea.width) .. ".png") -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( - -- Take a screenshot - -- https://github.com/copycat-killer/dots/blob/master/bin/screenshot - awful.key({ altkey }, "p", function() os.execute("screenshot") end), - - -- Tag browsing - awful.key({ modkey }, "Left", awful.tag.viewprev), - awful.key({ modkey }, "Right", awful.tag.viewnext), - awful.key({ modkey }, "Escape", awful.tag.history.restore), - - -- Non-empty tag browsing - awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end), - awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end), - - -- Default client focus - awful.key({ altkey }, "k", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ altkey }, "j", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - - -- By direction client focus - awful.key({ modkey }, "j", - function() - awful.client.focus.bydirection("down") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "k", - function() - awful.client.focus.bydirection("up") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "h", - function() - awful.client.focus.bydirection("left") - if client.focus then client.focus:raise() end - end), - awful.key({ modkey }, "l", - function() - awful.client.focus.bydirection("right") - if client.focus then client.focus:raise() end - end), - - -- Show Menu - awful.key({ modkey }, "w", - function () - mymainmenu:show({ keygrabber = true }) - end), - - -- Show/Hide Wibox - awful.key({ modkey }, "b", function () - mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible - end), - - -- On the fly useless gaps change - awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end), - awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), - - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - -- Dropdown terminal - awful.key({ modkey, }, "z", function () quakeconsole[mouse.screen]:toggle() end), - - -- Widgets popups - awful.key({ altkey, }, "c", function () lain.widgets.calendar.show(7) end), - awful.key({ altkey, }, "h", function () fshome.show(7) end), - awful.key({ altkey, }, "w", function () myweather.show(7) end), - - -- ALSA volume control - awful.key({ altkey }, "Up", - function () - os.execute(string.format("amixer set %s 1%%+", volumewidget.channel)) - volumewidget.update() - end), - awful.key({ altkey }, "Down", - function () - os.execute(string.format("amixer set %s 1%%-", volumewidget.channel)) - volumewidget.update() - end), - awful.key({ altkey }, "m", - function () - os.execute(string.format("amixer set %s toggle", volumewidget.channel)) - volumewidget.update() - end), - awful.key({ altkey, "Control" }, "m", - function () - os.execute(string.format("amixer set %s 100%%", volumewidget.channel)) - volumewidget.update() - end), - - -- MPD control - awful.key({ altkey, "Control" }, "Up", - function () - awful.util.spawn_with_shell("mpc toggle || ncmpc toggle || pms toggle") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Down", - function () - awful.util.spawn_with_shell("mpc stop || ncmpc stop || pms stop") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Left", - function () - awful.util.spawn_with_shell("mpc prev || ncmpc prev || pms prev") - mpdwidget.update() - end), - awful.key({ altkey, "Control" }, "Right", - function () - awful.util.spawn_with_shell("mpc next || ncmpc next || pms next") - mpdwidget.update() - end), - - -- Copy to clipboard - awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), - - -- User programs - awful.key({ modkey }, "q", function () awful.util.spawn(browser) end), - awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end), - - --[[ Default - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end), - -- Menubar - awful.key({ modkey }, "p", function() menubar.show() end) - --]] - - -- dmenu - awful.key({ modkey }, "x", function () - awful.util.spawn(string.format("dmenu_run -i -fn 'Tamsyn' -nb '%s' -nf '%s' -sb '%s' -sf '%s'", - beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) - end) -) - -clientkeys = awful.util.table.join( - awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), - awful.key({ modkey, }, "o", awful.client.movetoscreen ), - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), - awful.key({ modkey, }, "n", - function (c) - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - c.minimized = true - end), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - end) -) - --- 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 = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end - end), - -- Toggle tag. - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewtoggle(tag) - end - end), - -- Move client to tag. - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = awful.tag.gettags(client.focus.screen)[i] - if tag then - awful.client.movetotag(tag) - end - end - end), - -- Toggle tag. - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = awful.tag.gettags(client.focus.screen)[i] - if tag then - awful.client.toggletag(tag) - end - end - end)) -end - -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 -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 } }, - { rule = { class = "Firefox" }, - properties = { tag = tags[1][1] } }, - - { rule = { instance = "plugin-container" }, - properties = { tag = tags[1][1] } }, - - { rule = { class = "Gimp" }, - properties = { tag = tags[1][4] } }, - - { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, -} --- }}} - --- {{{ Signals --- signal function to execute when a new client appears. -local sloppyfocus_last = {c=nil} -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - client.connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - -- Skip focusing the client if the mouse wasn't moved. - if c ~= sloppyfocus_last.c then - client.focus = c - sloppyfocus_last.c = c - end - end - end) - - local titlebars_enabled = false - if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then - -- buttons for the titlebar - local buttons = awful.util.table.join( - awful.button({ }, 1, function() - client.focus = c - c:raise() - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - client.focus = c - c:raise() - awful.mouse.client.resize(c) - end) - ) - - -- widgets that are aligned to the right - local right_layout = wibox.layout.fixed.horizontal() - right_layout:add(awful.titlebar.widget.floatingbutton(c)) - right_layout:add(awful.titlebar.widget.maximizedbutton(c)) - right_layout:add(awful.titlebar.widget.stickybutton(c)) - right_layout:add(awful.titlebar.widget.ontopbutton(c)) - right_layout:add(awful.titlebar.widget.closebutton(c)) - - -- the title goes in the middle - local middle_layout = wibox.layout.flex.horizontal() - local title = awful.titlebar.widget.titlewidget(c) - title:set_align("center") - middle_layout:add(title) - middle_layout:buttons(buttons) - - -- now bring it all together - local layout = wibox.layout.align.horizontal() - layout:set_right(right_layout) - layout:set_middle(middle_layout) - - awful.titlebar(c,{size=16}):set_widget(layout) - end -end) - --- No border for maximized or single clients -client.connect_signal("focus", - function(c) - if c.maximized_horizontal == true and c.maximized_vertical == true then - c.border_width = 0 - elseif #awful.client.visible(mouse.screen) > 1 then - c.border_width = beautiful.border_width - c.border_color = beautiful.border_focus - end - end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} - --- {{{ Arrange signal handler -for s = 1, screen.count() do screen[s]:connect_signal("arrange", - function () - local clients = awful.client.visible(s) - local layout = awful.layout.getname(awful.layout.get(s)) - - if #clients > 0 then - for _, c in pairs(clients) do -- Floaters always have borders - if awful.client.floating.get(c) or layout == "floating" then - c.border_width = beautiful.border_width - end - end - end - end) -end --- }}} diff --git a/themes/95/theme.lua b/themes/95/theme.lua deleted file mode 100644 index f43a18a..0000000 --- a/themes/95/theme.lua +++ /dev/null @@ -1,50 +0,0 @@ - ---[[ - - 95 Awesome WM config - github.com/copycat-killer - ---]] - -theme = {} - -theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/95" -theme.wallpaper = theme.dir .. "/wall.png" -theme.bottombar_path = "png:" .. theme.dir .. "/icons/bottombar/" - -theme.font = "Tamsyn 10.5" -theme.fg_normal = "#000000" -theme.fg_focus = "#F6784F" -theme.bg_normal = "#060606" -theme.bg_focus = "#060606" -theme.fg_urgent = "#CC9393" -theme.bg_urgent = "#2A1F1E" -theme.border_width = "1" -theme.border_normal = "#0E0E0E" -theme.border_focus = "#F79372" - -theme.taglist_fg_focus = "#FFFFFF" -theme.taglist_bg_focus = "#0404FC" -theme.tasklist_fg_focus = "#000000" -theme.tasklist_fg_normal = "#000000" -theme.tasklist_bg_focus = "png:" .. theme.dir .. "/icons/bottombar/focus.png" -theme.tasklist_bg_normal = "png:" .. theme.dir .. "/icons/bottombar/normal.png" -theme.menu_height = "16" -theme.menu_width = "140" - -theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" - -theme.layout_tile = theme.dir .. "/icons/tile.png" -theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" -theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" -theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" -theme.layout_fairv = theme.dir .. "/icons/fairv.png" -theme.layout_fairh = theme.dir .. "/icons/fairh.png" -theme.layout_spiral = theme.dir .. "/icons/spiral.png" -theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" -theme.layout_max = theme.dir .. "/icons/max.png" -theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" -theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" -theme.layout_floating = theme.dir .. "/icons/floating.png" - -return theme diff --git a/themes/95/wall.png b/themes/95/wall.png deleted file mode 100644 index 6c31e49..0000000 Binary files a/themes/95/wall.png and /dev/null differ diff --git a/themes/copland/wall-old.png b/themes/copland/wall-old.png deleted file mode 100644 index ea9e4cc..0000000 Binary files a/themes/copland/wall-old.png and /dev/null differ diff --git a/themes/copland/wall.png b/themes/copland/wall.png old mode 100755 new mode 100644 index 7a8d2e8..ea9e4cc Binary files a/themes/copland/wall.png and b/themes/copland/wall.png differ