From c7985df86a5d9cc053ff37bc1aff962365a84a68 Mon Sep 17 00:00:00 2001 From: crater2150 Date: Sat, 4 Sep 2010 01:09:24 +0200 Subject: [PATCH] some things --- aweswt.lua | 50 +++++++++++++++++++++++++++++++++++++++++++++++ rc.lua | 6 ++---- tags.lua | 6 +++--- zenburn/theme.lua | 20 +++++++++---------- 4 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 aweswt.lua diff --git a/aweswt.lua b/aweswt.lua new file mode 100644 index 0000000..2ccf363 --- /dev/null +++ b/aweswt.lua @@ -0,0 +1,50 @@ + -- aweswt.lua + local io=io + local table=table + local pairs=pairs + local awful=awful + local client=client + local string=string + local USE_T=true + module("aweswt") + function get_out (a) + local f=io.popen (a) + t={} + for line in f:lines() do + table.insert(t, line ) + end + return t + end + function get_input (a) + s1='echo -e "'..a..'"|dmenu' + return get_out(s1) + end + + function switch() + local clients = client.get() + if table.getn(clients) == 0 then + return + end + local m1="" + local t2={} + local tmp + for i, c in pairs(clients) do + if USE_T then do + tmp=i..':'..string.sub(c['name'], 1, 20) + end + else do + tmp=i..':'..c['instance']..'.'..c['class'] + end + end + m1=m1..tmp..'\n' + t2[tmp]=c + end + local t6=t2[get_input(m1)[1]] + if t6 then + local ctags = t6:tags() + awful.tag.viewonly(ctags[1]) + client.focus = t6 + t6:raise() + end + end + diff --git a/rc.lua b/rc.lua index 7ae56bc..1fd564b 100644 --- a/rc.lua +++ b/rc.lua @@ -25,12 +25,10 @@ beautiful.init("/home/crater2150/.config/awesome/zenburn/theme.lua") -- Table of layouts to cover with awful.layout.inc, order matters. layouts = { - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top, awful.layout.suit.fair, awful.layout.suit.fair.horizontal, + awful.layout.suit.tile, + awful.layout.suit.tile.bottom, awful.layout.suit.max, awful.layout.suit.max.fullscreen, awful.layout.suit.floating diff --git a/tags.lua b/tags.lua index 1af42e9..4bc1ef9 100644 --- a/tags.lua +++ b/tags.lua @@ -3,10 +3,10 @@ tags={} tags.setup = { { name = "1:⚙", layout = layouts[1] }, - { name = "2:⌘", layout = layouts[7] }, + { name = "2:⌘", layout = layouts[5] }, { name = "3:☻", layout = layouts[2], mwfact = 0.20 }, - { name = "4:✉", layout = layouts[7] }, - { name = "5:☑", layout = layouts[7] }, + { name = "4:✉", layout = layouts[5] }, + { name = "5:☑", layout = layouts[1] }, { name = "6:♫", layout = layouts[1] }, { name = "7:☣", layout = layouts[1] }, { name = "8:☕", layout = layouts[1] }, diff --git a/zenburn/theme.lua b/zenburn/theme.lua index dae417f..346a717 100644 --- a/zenburn/theme.lua +++ b/zenburn/theme.lua @@ -15,12 +15,12 @@ theme.wallpaper_cmd = { "nitrogen --restore" } theme.font = "sans 8" -- {{{ Colors -theme.fg_normal = "#DCDCCC" +theme.fg_normal = "#DCDCDC" theme.fg_focus = "#F0DFAF" theme.fg_urgent = "#CC9393" -theme.bg_normal = "#3F3F3F" -theme.bg_focus = "#1E2320" -theme.bg_urgent = "#3F3F3F" +theme.bg_normal = "#121212" +theme.bg_focus = "#3F3F3F" +theme.bg_urgent = "#DA4E4E" -- }}} -- {{{ Borders @@ -83,12 +83,12 @@ theme.tasklist_floating_icon = "/usr/share/awesome/themes/default/tasklist/float -- }}} -- {{{ Layout -theme.layout_tile = "/usr/share/awesome/themes/zenburn/layouts/tile.png" -theme.layout_tileleft = "/usr/share/awesome/themes/zenburn/layouts/tileleft.png" -theme.layout_tilebottom = "/usr/share/awesome/themes/zenburn/layouts/tilebottom.png" -theme.layout_tiletop = "/usr/share/awesome/themes/zenburn/layouts/tiletop.png" -theme.layout_fairv = "/usr/share/awesome/themes/zenburn/layouts/fairv.png" -theme.layout_fairh = "/usr/share/awesome/themes/zenburn/layouts/fairh.png" +theme.layout_tiletop = "/usr/share/awesome/themes/zenburn/layouts/tile.png" +theme.layout_tilebottom = "/usr/share/awesome/themes/zenburn/layouts/tileleft.png" +theme.layout_tile = "/usr/share/awesome/themes/zenburn/layouts/tilebottom.png" +theme.layout_tileleft = "/usr/share/awesome/themes/zenburn/layouts/tiletop.png" +theme.layout_fairh = "/usr/share/awesome/themes/zenburn/layouts/fairv.png" +theme.layout_fairv = "/usr/share/awesome/themes/zenburn/layouts/fairh.png" theme.layout_spiral = "/usr/share/awesome/themes/zenburn/layouts/spiral.png" theme.layout_dwindle = "/usr/share/awesome/themes/zenburn/layouts/dwindle.png" theme.layout_max = "/usr/share/awesome/themes/zenburn/layouts/max.png"