From 3bbfc213b53dd28b22598ba6039d0c1e56cc850d Mon Sep 17 00:00:00 2001 From: cinan Date: Sat, 24 Oct 2009 15:00:11 +0200 Subject: [PATCH] awesome 3.3 --> 3.4 --- .config/awesome/rc.lua | 560 +++++++++++++++------------------------------- .config/awesome/theme.lua | 93 ++++++++ 2 files changed, 275 insertions(+), 378 deletions(-) create mode 100644 .config/awesome/theme.lua diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index eaa48ee..b4c4517 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -1,11 +1,13 @@ ---- Standard awesome library +-- Standard awesome library require("awful") +require("awful.autofocus") +require("awful.rules") -- Theme handling library require("beautiful") -- Notification library --- require("naughty") -require("wicked") --- +--require("naughty") +require ("vicious") + cardid = 0 channel = "Master" function volume (mode, widget) @@ -36,24 +38,18 @@ function volume (mode, widget) volume("update", widget) end end --- -- {{{ Variable definitions -- Themes define colours, icons, and wallpapers --- The default is a dark theme -theme_path = "/usr/share/awesome/themes/default/theme.lua" --- Uncommment this for a lighter theme --- theme_path = "/usr/share/awesome/themes/sky/theme" - --- Actually load theme -beautiful.init(theme_path) +beautiful.init("/home/cinan/.config/awesome/theme.lua") -- This is used later as the default terminal and editor to run. terminal = "terminal" editor = os.getenv("EDITOR") or "vim" 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, @@ -70,106 +66,32 @@ layouts = --awful.layout.suit.tile.top, -- --awful.layout.suit.fair, -- awful.layout.suit.fair.horizontal, --2 + --awful.layout.suit.spiral, + --awful.layout.suit.spiral.dwindle, --awful.layout.suit.max, -- --awful.layout.suit.max.fullscreen, -- awful.layout.suit.magnifier, --3 awful.layout.suit.floating --4 } --- Table of clients that should be set floating. The index may be either --- the application class or instance. The instance is useful when running --- a console app in a terminal like (Music on Console) --- xterm -name mocp -e mocp -floatapps = -{ - -- by class or role - ["Smplayer"] = true, - ["MPlayer"] = true, - ["gimp"] = true, - ["File-roller"] = true, - --["Pidgin"] = true, - ["VirtualBox"] = true, - ["buddy_list"] = true, - ["conversation"] = true, - ["shutdown.rb"] = true, - ["Wine"] = true, - --["Download"] = true, --FF download window - ["Extension"] = true, --FF ext. window - ["Browser"] = true, --FF settings window - ["Places"] = true, --FF bookmarks window - ["Toplevel"] = true, --FF other pop-up window - -- by instance - ["mocp"] = true -} - --- Applications to be moved to a pre-defined tag by class or instance. --- Use the screen and tags indices. -apptags = -{ - ["Gran Paradiso"] = { screen = 1, tag = 1 }, - ["Firefox"] = { screen = 1, tag = 1 }, - ["Shiretoko"] = { screen = 1, tag = 1 }, --- ["Terminal"] = { screen = 1, tag = 2 }, - ["XTerm"] = { screen = 1, tag = 1 }, - ["Shredder"] = { screen = 1, tag = 3 }, - --["Krusader"] = { screen = 1, tag = 3 }, - --["Dolphin"] = { screen = 1, tag = 3 }, - ["Pidgin"] = { screen = 1, tag = 4 }, - -- ["Gajim.py"] = { screen = 1, tag = 4 }, - -- ["mocp"] = { screen = 2, tag = 4 }, - ["Terminator"] = {screen = 1, tag = 3} -} - --- Define if we want to use titlebar on all applications. -use_titlebar = false -- }}} -- {{{ Tags --- Define tags table. -mytags = {} -mytags[1] = { name = "www"} -mytags[2] = { name = "term"} -mytags[3] = { name = "mail"} -mytags[4] = { name = "chat"} -mytags[5] = { name = "code"} -mytags[6] = { name = "6"} - +-- Define a tag table which hold all screen tags. tags = {} -for s = 1, screen.count() do +--for s = 1, screen.count() do -- Each screen has its own tag table. - tags[s] = {} - -- Create 9 tags per screen. - for tagnumber = 1, 6 do - -- tags[s][tagnumber] = tag(tagnumber) - tags[s][tagnumber] = tag(mytags[tagnumber].name) - -- Add tags to screen one by one - tags[s][tagnumber].screen = s - awful.layout.set(layouts[1], tags[s][tagnumber]) + tags[1] = awful.tag({ "www", "term", "mail", "chat", "code", 6}, 1) + awful.tag.setmwfact (0.75, tags[1][1]) + awful.tag.setmwfact (0.65, tags[1][3]) + for b = 1, 6 do + awful.layout.set(layouts[1], tags[1][b]) end - awful.tag.setmwfact (0.70, tags[s][1]) - awful.tag.setmwfact (0.60, tags[s][3]) - awful.layout.set(layouts[1], tags[s][1]) - awful.layout.set(layouts[1], tags[s][2]) - awful.layout.set(layouts[1], tags[s][3]) - -- I'm sure you want to see at least one tag. - tags[s][1].selected = true -end + awful.layout.set(layouts[4], tags[1][4]) +--end -- }}} - --- {{{ Wibox --- Create a textbox widget -mytextbox = widget({ type = "textbox", align = "right" }) --- Set the default text in textbox ---mytextbox.text = " " .. AWESOME_RELEASE .. " " - +-- {{{ Menu -- Create a laucher widget and a main menu -myawesomemenu = { - { "manual", terminal .. " -e man awesome" }, - { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" }, - { "restart", awesome.restart }, - { "quit", awesome.quit } -} - mymainmenu = awful.menu.new({ items = { --{ "awesome", myawesomemenu, beautiful.awesome_icon }, --{ "Smplayer", "smplayer" }, --{ "Gajim", "gajim" }, @@ -182,55 +104,29 @@ mymainmenu = awful.menu.new({ items = { --{ "awesome", myawesomemenu, beautiful. --{ "Lxappearance", "lxappearance" }, } }) -mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), - menu = mymainmenu }) + +-- }}} + +-- {{{ Wibox +-- Create a textclock widget +--mytextclock = awful.widget.textclock({ align = "right" }) -- Create a systray --- mysystray = widget({ type = "systray", align = "right" }) +--mysystray = widget({ type = "systray" }) -- Create a wibox for each screen and add it mywibox = {} mypromptbox = {} -mylayoutbox = {} +--mylayoutbox = {} mytaglist = {} mytaglist.buttons = awful.util.table.join( awful.button({ }, 1, awful.tag.viewonly), awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, function (tag) tag.selected = not tag.selected end), + awful.button({ }, 3, awful.tag.viewtoggle), awful.button({ modkey }, 3, awful.client.toggletag), awful.button({ }, 4, awful.tag.viewnext), awful.button({ }, 5, awful.tag.viewprev) ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - client.focus = c - c:raise() - 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] = widget({ type = "textbox", align = "left" }) - -- tb_volume = widget({ type = "textbox", name = "tb_volume", align = "right" }) tb_volume:buttons(awful.util.table.join( @@ -242,116 +138,82 @@ for s = 1, screen.count() do )) volume("update", tb_volume) +-- + memwidget = widget({type = 'textbox',name = 'memwidget',align = "left"}) + vicious.register(memwidget, vicious.widgets.mem, ' \tMemory: [ $2 MB / $3 MB ]', 2) -- - memwidget = widget({ - type = 'textbox', - name = 'memwidget', - align = "left" - }) - wicked.register(memwidget, wicked.widgets.mem, ' \tMemory: [ $2 MB / $3 MB ]', 2) - awful.hooks.timer.register(2, mywidget_timer) - -- - cpuwidget = widget({ - type = 'textbox', - name = 'cpuwidget', - align = 'left' - }) + cpuwidget = widget({ type = 'textbox', name = 'cpuwidget', align = 'left' }) - wicked.register(cpuwidget, wicked.widgets.cpu, ' \tCPU: [ $2 % | $3 % ]', 2) + vicious.register(cpuwidget, vicious.widgets.cpu, ' \tCPU: [ $2 % | $3 % ]', 2) -- -- - mpdwidget = widget({ - type = 'textbox', - name = 'mpdwidget', - align = 'right' - }) + mpdwidget = widget({ type = 'textbox', name = 'mpdwidget',align = 'right'}) - wicked.register(mpdwidget, wicked.widgets.mpd, + vicious.register(mpdwidget, vicious.widgets.mpd, ' Now Playing: [ $1 ]', 5) -- -- - fswidget = widget({ - type = 'textbox', - name = 'fswidget', - align = 'left' - }) + fswidget = widget({ type = 'textbox', name = 'fswidget', align = 'left' }) - wicked.register(fswidget, wicked.widgets.fs, + vicious.register(fswidget, vicious.widgets.fs, ' \tFS: [ ${/ avail} / ${/ size} | ${/home avail} / ${/home size} | ${/media/data avail} / ${/media/data size} | ${/media/data2 avail} / ${/media/data2 size} ]' , 120) -- - netwidget = widget({ - type = 'textbox', - name = 'netwidget', - align = 'left' - }) + netwidget = widget({type = 'textbox', name = 'netwidget', align = 'left' }) - wicked.register(netwidget, wicked.widgets.net, + vicious.register(netwidget, vicious.widgets.net, ' \tNET: [ ${eth0 down_kb} KB/s / ${eth0 up_kb} KB/s ]', 3) -- -- - datewidget = widget({ - type = 'textbox', - name = 'datewidget', - align = 'right' - }) - - wicked.register(datewidget, wicked.widgets.date, + datewidget = widget({ type = 'textbox', name = 'datewidget', align = 'right' }) + vicious.register(datewidget, vicious.widgets.date, --' \tClock: [ %H:%M ]', 10) '\t[ %H:%M %d.%m.%y]', 10) -- - - -- Create an imagebox widget which will contains an icon indicating which layout we're using. - -- We need one layoutbox per screen. - mylayoutbox[s] = widget({ type = "imagebox", align = "right" }) - 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))) +for s = 1, screen.count() do + -- Create a promptbox for each screen + mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright }) -- Create a taglist widget - mytaglist[s] = awful.widget.taglist.new(s, awful.widget.taglist.label.all, mytaglist.buttons) + mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons) -- Create a tasklist widget - mytasklist[s] = awful.widget.tasklist.new(function(c) - return awful.widget.tasklist.label.currenttags(c, s) - end, mytasklist.buttons) + --mytasklist[s] = awful.widget.tasklist(function(c) + --return awful.widget.tasklist.label.currenttags(c, s) + --end, mytasklist.buttons) -- Create the wibox - mywibox[s] = wibox({ position = "top", fg = beautiful.fg_normal, bg = beautiful.bg_normal }) + mywibox[s] = awful.wibox({ position = "top", screen = s }) -- Add widgets to the wibox - order matters - mywibox[s].widgets = { -- mylauncher, - mytaglist[s], - -- mytasklist[s], - mypromptbox[s], - cpuwidget, - memwidget, - fswidget, - netwidget, - --mytextbox, - mpdwidget, - tb_volume, - datewidget - -- mylayoutbox[s], - -- s == 1 and mysystray or nil - } - mywibox[s].screen = s + mywibox[s].widgets = { + {mytaglist[s], + mypromptbox[s], + cpuwidget, + memwidget, + fswidget, + netwidget, + layout = awful.widget.layout.horizontal.leftright}, + datewidget, + tb_volume, + mpdwidget, + layout = awful.widget.layout.horizontal.rightleft + } end -- }}} -- {{{ Mouse bindings root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), awful.button({ }, 2, function () awful.menu.clients(mymainmenu) end), + awful.button({ }, 3, function () mymainmenu:toggle() end), awful.button({ }, 4, awful.tag.viewnext), awful.button({ }, 5, awful.tag.viewprev) )) -- }}} + -- {{{ Key bindings globalkeys = awful.util.table.join( awful.key({ modkey, }, "Left", awful.tag.viewprev ), @@ -402,7 +264,6 @@ globalkeys = awful.util.table.join( --awful.key({ modkey, }, "F2", function () awful.util.spawn("thunderbird") end), awful.key({ modkey, }, "F3", function () awful.util.spawn("pidgin") end), awful.key({ modkey, }, "F4", function () awful.util.spawn("smplayer") end), --- awful.key({ modkey, }, "F5", function () awful.util.spawn("ruby /home/cinan/skripty/shutdown.rb") end), awful.key({ modkey, }, "z", function () awful.util.spawn("mpc prev") end), awful.key({ modkey, }, "x", function () awful.util.spawn("mpc play") end), awful.key({ modkey, }, "c", function () awful.util.spawn("mpc toggle") end), @@ -415,21 +276,8 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "XF86Standby", function () awful.util.spawn("sudo pm-suspend") end), -- Prompt - awful.key({ "Mod1" }, "F2", - function () - awful.prompt.run({ prompt = "Run: " }, - mypromptbox[mouse.screen], - awful.util.spawn, awful.completion.shell, - awful.util.getdir("cache") .. "/history") - end), + awful.key({ "Mod1" }, "F2", function () mypromptbox[mouse.screen]:run() end), awful.key({ "Mod1", }, "F3", function () awful.util.spawn("gnome-terminal") end) - --awful.key({ modkey }, "x", - -- function () - -- awful.prompt.run({ prompt = "Run Lua code: " }, - -- mypromptbox[mouse.screen], - -- awful.util.eval, nil, - -- awful.util.getdir("cache") .. "/history_eval") - -- end) ) -- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them @@ -454,192 +302,148 @@ for s = 1, screen.count() do keynumber = math.min(9, math.max(#tags[s], keynumber)); 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, keynumber do - table.foreach(awful.key({ modkey }, i, + globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey }, "#" .. i + 9, function () local screen = mouse.screen if tags[screen][i] then awful.tag.viewonly(tags[screen][i]) end - end), function(_, k) table.insert(globalkeys, k) end) - table.foreach(awful.key({ modkey, "Control" }, i, + end), + awful.key({ modkey, "Control" }, "#" .. i + 9, function () local screen = mouse.screen if tags[screen][i] then - tags[screen][i].selected = not tags[screen][i].selected + awful.tag.viewtoggle(tags[screen][i]) end - end), function(_, k) table.insert(globalkeys, k) end) - table.foreach(awful.key({ modkey, "Shift" }, i, + end), + awful.key({ modkey, "Shift" }, "#" .. i + 9, function () if client.focus and tags[client.focus.screen][i] then awful.client.movetotag(tags[client.focus.screen][i]) - awful.tag.viewonly(tags[client.focus.screen][i]) end - end), function(_, k) table.insert(globalkeys, k) end) - table.foreach(awful.key({ modkey, "Control", "Shift" }, i, + end), + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, function () if client.focus and tags[client.focus.screen][i] then awful.client.toggletag(tags[client.focus.screen][i]) end - end), function(_, k) table.insert(globalkeys, k) end) - table.foreach(awful.key({ modkey, "Shift" }, "F" .. i, - function () - local screen = mouse.screen - if tags[screen][i] then - for k, c in pairs(awful.client.getmarked()) do - awful.client.movetotag(tags[screen][i], c) - end - awful.tag.viewonly(tags[screen][i]) - end - end), function(_, k) table.insert(globalkeys, k) 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) -- }}} --- {{{ Hooks --- Hook function to execute when focusing a client. -awful.hooks.focus.register(function (c) - if not awful.client.ismarked(c) then - c.border_color = beautiful.border_focus - end -end) - --- Hook function to execute when unfocusing a client. -awful.hooks.unfocus.register(function (c) - if not awful.client.ismarked(c) then - c.border_color = beautiful.border_normal - end -end) - --- Hook function to execute when marking a client -awful.hooks.marked.register(function (c) - c.border_color = beautiful.border_marked -end) - --- Hook function to execute when unmarking a client. -awful.hooks.unmarked.register(function (c) - c.border_color = beautiful.border_focus -end) - --- Hook function to execute when the mouse enters a client. -awful.hooks.mouse_enter.register(function (c) - -- Sloppy focus, but disabled for magnifier layout - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end -end) - --- Hook function to execute when a new client appears. -awful.hooks.manage.register(function (c, startup) - -- If we are not managing this application at startup, - -- move it to the screen where the mouse is. - -- We only do it for filtered windows (i.e. no dock, etc). - if not startup and awful.client.focus.filter(c) then - c.screen = mouse.screen - end - - if use_titlebar then - -- Add a titlebar - awful.titlebar.add(c, { modkey = modkey }) - end - -- Add mouse bindings - c:buttons(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) - )) - -- New client may not receive focus - -- if they're not focusable, so set border anyway. - c.border_width = beautiful.border_width - c.border_color = beautiful.border_normal - - -- Check if the application should be floating. - local cls = c.class - local inst = c.instance - local role = c.role - if floatapps[cls] then - awful.client.floating.set(c, floatapps[cls]) - elseif floatapps[inst] then - awful.client.floating.set(c, floatapps[inst]) - elseif floatapps[role] then - awful.client.floating.set(c, floatapps[role]) - end - - -- Check application->screen/tag mappings. - local target - if apptags[cls] then - target = apptags[cls] - elseif apptags[inst] then - target = apptags[inst] - end - if target then - c.screen = target.screen - awful.client.movetotag(tags[target.screen][target.tag], c) - end - - -- Do this after tag mapping, so you don't see it on the wrong tag for a split second. - client.focus = c - - -- Set key bindings - c:keys(clientkeys) - - -- Set the windows at the slave, - -- i.e. put it at the end of others instead of setting it master. - --awful.client.setslave(c) - - -- Honor size hints: if you want to drop the gaps between windows, set this to false. - c.size_hints_honor = false - -- 'smart' placement for floating apps - -- open openoffice shit windows under mouse - if c.class == "OpenOffice.org 3.1" then - awful.placement.under_mouse(c) - else - awful.placement.centered(c) - end - --if c.class == "Gran Paradiso" or c.class == "Shredder" or c.class == "Firefox" then - --if c.class == "Firefox" and c.role == "browser" then --firefox main window - if c.class == "Shiretoko" and c.role == "browser" then --firefox main window - awful.client.setmaster(c) - else - awful.client.setslave(c) - end - if c.role == "buddy_list" then --pidgin buddy list - c:geometry({ x = 0, y = 15, width = 177, height = 1035 }) - end - --if c.class == "conversation" then --pidgin conversation - -- urgent.add (c, prop) - -- c.urgent = true - --end - - -end) +-- {{{ Rules +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = true, + keys = clientkeys, + buttons = clientbuttons } }, + { rule = { class = "MPlayer" }, + properties = { floating = true } }, + { rule = { class = "gimp" }, + properties = { floating = true } }, + { rule = { class = "Smplayer" }, + properties = { floating = true } }, + { rule = { class = "File-roller" }, + properties = { floating = true } }, + { rule = { role = "buddy_list" }, + properties = { floating = true } }, + { rule = { role = "conversation" }, + properties = { floating = true } }, + { rule = { class = "Wine" }, + properties = { floating = true } }, + { rule = { instance = "Extension" }, + properties = { floating = true } }, + { rule = { instance = "Browser" }, + properties = { floating = true } }, + { rule = { instance = "Places" }, + properties = { floating = true } }, + { rule = { instance = "Toplevel" }, + properties = { floating = true } }, + { rule = { class = "VirtualBox" }, + properties = { floating = true } }, + + + { rule = { class = "Firefox" }, + properties = { tag = tags[1][1] } }, + { rule = { class = "Gran Paradiso" }, + properties = { tag = tags[1][1] } }, + { rule = { class = "Shiretoko" }, + properties = { tag = tags[1][1] } }, + { rule = { class = "XTerm" }, + properties = { tag = tags[1][1] } }, + { rule = { class = "Terminator" }, + properties = { tag = tags[1][3] } }, + { rule = { class = "Pidgin" }, + properties = { tag = tags[1][4] } }, +} +-- }}} --- Hook function to execute when arranging the screen. --- (tag switch, new client, etc) -awful.hooks.arrange.register(function (screen) - --local layout = awful.layout.getname(awful.layout.get(screen)) - --if layout and beautiful["layout_" ..layout] then - -- mylayoutbox[screen].image = image(beautiful["layout_" .. layout]) - --else - -- mylayoutbox[screen].image = nil - --end - - -- Give focus to the latest client in history if no window has focus - -- or if the current window is a desktop or a dock one. - if not client.focus then - local c = awful.client.focus.history.get(screen, 0) - if c then client.focus = c end +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.add_signal("manage", function (c, startup) + -- Add a titlebar + -- awful.titlebar.add(c, { modkey = modkey }) + + -- Enable sloppy focus + c:add_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c + end + end) + + if not startup then + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- awful.client.setslave(c) + if c.class == "OpenOffice.org 3.1" then + awful.placement.under_mouse(c) + else + awful.placement.centered(c) + end + --if c.class == "Gran Paradiso" or c.class == "Shredder" or c.class == "Firefox" then + --if c.class == "Firefox" and c.role == "browser" then --firefox main window + if c.class == "Shiretoko" and c.role == "browser" then --firefox main window + awful.client.setmaster(c) + else + awful.client.setslave(c) + end + if c.role == "buddy_list" then --pidgin buddy list + c:geometry({ x = 0, y = 15, width = 177, height = 1035 }) + end + + -- Put windows in a smart way, only if they does not set an initial position. + if not c.size_hints.user_position and not c.size_hints.program_position then + awful.placement.no_overlap(c) + awful.placement.no_offscreen(c) + end end end) --- Hook called every minute ---awful.hooks.timer.register(60, function () --- mytextbox.text = os.date(" %a %b %d, %H:%M ") ---end) +client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) -- }}} --- autostart -os.execute("/home/cinan/skripty/autostart.sh &") --- + +awful.util.spawn("/home/cinan/skripty/autostart.sh") +awful.util.spawn("run_once pidgin") +awful.util.spawn("run_once parcellite -n") +awful.util.spawn("run_once hudba &>/dev/null") +awful.util.spawn("run_once terminator -x newsbeuter") +awful.util.spawn("run_once terminator -x mutt") diff --git a/.config/awesome/theme.lua b/.config/awesome/theme.lua new file mode 100644 index 0000000..2c780d2 --- /dev/null +++ b/.config/awesome/theme.lua @@ -0,0 +1,93 @@ +--------------------------- +-- Default awesome theme -- +--------------------------- + +theme = {} + +theme.font = "snap 8" + +theme.bg_normal = "#191919" +theme.bg_focus = "#535d6c" +theme.bg_urgent = "#ff0000" +theme.bg_minimize = "#444444" + +theme.fg_normal = "#aaaaaa" +theme.fg_focus = "#ffffff" +theme.fg_urgent = "#ffffff" +theme.fg_minimize = "#ffffff" + +theme.border_width = "1" +theme.border_normal = "#000000" +theme.border_focus = "#535d6c" +theme.border_marked = "#91231c" + +-- There are another variables sets +-- overriding the default one when +-- defined, the sets are: +-- [taglist|tasklist]_[bg|fg]_[focus|urgent] +-- titlebar_[bg|fg]_[normal|focus] +-- Example: +--taglist_bg_focus = #ff0000 + +-- Display the taglist squares +theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png" +theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png" + +--theme.tasklist_floating_icon = "/usr/share/awesome/themes/default/tasklist/floatingw.png" + +-- Variables set for theming menu +-- menu_[bg|fg]_[normal|focus] +-- menu_[border_color|border_width] +theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png" +theme.menu_height = "15" +theme.menu_width = "150" + +-- You can add as many variables as +-- you wish and access them by using +-- beautiful.variable in your rc.lua +--bg_widget = #cc0000 + +-- Define the image to load +--theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png" +--theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png" + +--theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png" +--theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png" +--theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png" +--theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png" + +--theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png" +--theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png" +--theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png" +--theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png" + +--theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png" +--theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png" +--theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png" +--theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png" + +--theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png" +--theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png" +--theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png" +--theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png" + +-- You can use your own command to set your wallpaper +-- theme.wallpaper_cmd = { "awsetbg /usr/share/awesome/themes/default/background.png" } + +-- You can use your own layout icons like this: +--theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png" +--theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png" +--theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png" +--theme.layout_magnifier = "/usr/share/awesome/themes/default/layouts/magnifierw.png" +--theme.layout_max = "/usr/share/awesome/themes/default/layouts/maxw.png" +--theme.layout_fullscreen = "/usr/share/awesome/themes/default/layouts/fullscreenw.png" +--theme.layout_tilebottom = "/usr/share/awesome/themes/default/layouts/tilebottomw.png" +--theme.layout_tileleft = "/usr/share/awesome/themes/default/layouts/tileleftw.png" +--theme.layout_tile = "/usr/share/awesome/themes/default/layouts/tilew.png" +--theme.layout_tiletop = "/usr/share/awesome/themes/default/layouts/tiletopw.png" + +theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png" + +return theme +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 + -- 2.11.4.GIT