From 6f7bdaa310a5239c68d4363e0dd8e3083fa0a46e Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sat, 28 Jan 2017 14:45:44 +0100 Subject: [PATCH] powerarrow-darker modular, closes #147 --- lain | 2 +- rc.lua.template | 71 +++++++++++++-- themes/multicolor/theme.lua | 62 +------------ themes/powerarrow-darker/icons/centerfair.png | Bin 0 -> 179 bytes themes/powerarrow-darker/icons/centerwork.png | Bin 0 -> 195 bytes .../powerarrow-darker/icons/centerworkh.png | Bin 0 -> 195 bytes themes/powerarrow-darker/icons/termfair.png | Bin 0 -> 972 bytes themes/powerarrow-darker/theme.lua | 82 ++++-------------- 8 files changed, 86 insertions(+), 131 deletions(-) create mode 100644 themes/powerarrow-darker/icons/centerfair.png create mode 100644 themes/powerarrow-darker/icons/centerwork.png create mode 100644 themes/powerarrow-darker/icons/centerworkh.png create mode 100644 themes/powerarrow-darker/icons/termfair.png diff --git a/lain b/lain index 83b96b3..555b872 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 83b96b3c3ada021e47d6ef1ad48c03710f0dc24a +Subproject commit 555b872d16393774089df3b3453000571a73a3dd diff --git a/rc.lua.template b/rc.lua.template index 9d6ceac..752a125 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -7,6 +7,9 @@ --]] -- {{{ Required libraries +local awesome, client, screen = awesome, client, screen +local string, os, tostring, tonumber, type = string, os, tostring, tonumber, type + local gears = require("gears") local awful = require("awful") require("awful.autofocus") @@ -40,7 +43,7 @@ do end -- }}} --- {{{ Autostart applications +-- {{{ Autostart windowless processes local function run_once(cmd) findme = cmd firstspace = cmd:find(" ") @@ -58,10 +61,10 @@ run_once("unclutter -root") local chosen_theme = "multicolor" local modkey = "Mod4" local altkey = "Mod1" -local editor = os.getenv("EDITOR") or "nano" or "vi" local terminal = "urxvtc" or "xterm" -local browser = "firefox" +local editor = os.getenv("EDITOR") or "nano" or "vi" local gui_editor = "gvim" +local browser = "firefox" local graphics = "gimp" awful.util.terminal = terminal @@ -83,7 +86,64 @@ awful.layout.layouts = { -- awful.layout.suit.corner.ne, -- awful.layout.suit.corner.sw, -- awful.layout.suit.corner.se, + -- lain.layout.cascade, + -- lain.layout.cascade.tile, + -- lain.layout.centerwork, + -- lain.layout.centerwork.horizontal, + -- lain.layout.termfair, + -- lain.layout.termfair.center, } +awful.util.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) + ) +awful.util.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, function() + 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), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + end)) lain.layout.termfair.nmaster = 3 lain.layout.termfair.ncol = 1 @@ -114,7 +174,7 @@ local mymainmenu = freedesktop.menu.build({ --menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it -- }}} --- {{{ Wibox +-- {{{ Screen -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) screen.connect_signal("property::geometry", function(s) -- Wallpaper @@ -488,8 +548,7 @@ awful.rules.rules = { properties = { screen = 1, tag = screen[1].tags[1] } }, { rule = { class = "Gimp", role = "gimp-image-window" }, - properties = { maximized_horizontal = true, - maximized_vertical = true } }, + properties = { maximized = true } }, } -- }}} diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index 8bdffd2..711541b 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -11,8 +11,7 @@ local gears = require("gears") local lain = require("lain") local awful = require("awful") local wibox = require("wibox") -local os = { getenv = os.getenv, - setlocale = os.setlocale } +local os = { getenv = os.getenv, setlocale = os.setlocale } local theme = {} theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor" @@ -92,8 +91,6 @@ theme.titlebar_maximized_button_focus_inactive = theme.confdir .. "/icons/title theme.titlebar_maximized_button_normal_active = theme.confdir .. "/icons/titlebar/maximized_normal_active.png" theme.titlebar_maximized_button_focus_active = theme.confdir .. "/icons/titlebar/maximized_focus_active.png" ---{{{ Widgets and wibar - local markup = lain.util.markup -- Textclock @@ -251,59 +248,6 @@ theme.mpd = lain.widgets.mpd({ }) -- 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, function() - 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), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - end)) - awful.screen.connect_for_each_screen(function(s) -- Quake application s.quake = lain.util.quake({ app = awful.util.terminal }) @@ -334,7 +278,7 @@ awful.screen.connect_for_each_screen(function(s) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons) -- Create the wibox - s.mywibox = awful.wibar({ position = "top", screen = s, height = 20 }) + s.mywibox = awful.wibar({ position = "top", screen = s, height = 20, bg = theme.bg_normal, fg = theme.fg_normal }) -- Add widgets to the wibox s.mywibox:setup { @@ -378,7 +322,7 @@ awful.screen.connect_for_each_screen(function(s) } -- Create the bottom wibox - s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = 20 }) + s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = 20, bg = theme.bg_normal, fg = theme.fg_normal }) -- Add widgets to the bottom wibox s.mybottomwibox:setup { diff --git a/themes/powerarrow-darker/icons/centerfair.png b/themes/powerarrow-darker/icons/centerfair.png new file mode 100644 index 0000000000000000000000000000000000000000..c4f64b0f1d746c6fbf9fa586b7de90d66496d020 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|wj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&pI+QHFz4juLthcm7$NK6zcdZpUN&)jp^{Cn_O1qS&FIeGR^ SJiI`&7(8A5T-G@yGywpGh%+Dn literal 0 HcmV?d00001 diff --git a/themes/powerarrow-darker/icons/centerwork.png b/themes/powerarrow-darker/icons/centerwork.png new file mode 100644 index 0000000000000000000000000000000000000000..90715169a2159b60c24d5ed69a2349abbbd2de5d GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|wj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&pI+QHF=jY}w3=Y@kqpr;B5V#p&cf|Nq-Fn=%M9Pd)I! zxPx_O@%ML;6%Cr&(#ArM9+wL4VsiSUD01V(!v@|5lhPHB{XcTzaj$93Iz`KC9aH6- jHoA52Gxr?cF2Ts~^M$^6?siTcpxF$bu6{1-oD!M<>&pI+QHF!D-0hq?K(iSe$!DYV9+=3vs$o zF~NdhKmtY>*w_&RtYrYP6(;@ykXTrd$~lcw27+b#e(1gTefNFu9yIDVrl)47IF6gP zR*WVa&!yklGwgr!_|sle`PO5YkT#UySL+( zJic-rloOQ+1c*8y33fxGCK^A~RoOh<7I`p)&>f9GPO5D;fR1AXWTBXMB?y6{2yj7G z6gUqG5-f-kdzCy~P-R6eEP~O)vuLrmr8W(76pO7izDsGOiekUt7y3m3$J-(-l}f2b zp^#^YJQ;-4N%A3?%M=Vm+}Mw(k3*0uIvw1j8qYF4K0*+UWkWJ56DydQIFSeiDLqmK zwC(>xgJ6s%w24mg{iiT#4I(5q5y8FKWsTdKOG8Df9wUe1xP|dejaQ%t%z0{WT) zuB`i^hx_E}5O3S66%y)%F0u@bX9|Mvd#bT0$+a3ZtBP5LuvT1FV9_v_uR&cenX;*8 zTm!qk0EIN;dSh-un#fJ95JW7pfnxs-^2`_qV0dKJpPY*^QE$ZcCguWb6S*QwMob&~ zSEI8n=ALvqwk=zXjgLa+_L$lF`J=m^*p*najA|?S+WCESRLRNQ`P`HD--`E7KO?`s zZ@kE@ZhUz<^QwAyVKa9)?_D-$;Qr%VpDVNGOJ|`>DogvPxPza