diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-07-23 09:45:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-07-23 09:45:24 -0300 |
commit | 86a473aef87cb545bd2581b22c97cd274a88cad3 (patch) | |
tree | 798c289363987c7cad14458c47388aee6271501d | |
parent | 684b1ad41a03d9357839f2bf3e61c410ee38678a (diff) | |
download | awesome-86a473aef87cb545bd2581b22c97cd274a88cad3.tar.gz awesome-86a473aef87cb545bd2581b22c97cd274a88cad3.tar.bz2 |
Move stuff to widgets.lua
-rw-r--r-- | config.dot/awesome.link/menu.lua | 17 | ||||
-rw-r--r-- | config.dot/awesome.link/rc.lua | 45 | ||||
-rw-r--r-- | config.dot/awesome.link/widgets.lua | 46 |
3 files changed, 57 insertions, 51 deletions
diff --git a/config.dot/awesome.link/menu.lua b/config.dot/awesome.link/menu.lua new file mode 100644 index 0000000..2fa3c60 --- /dev/null +++ b/config.dot/awesome.link/menu.lua @@ -0,0 +1,17 @@ +-- {{{ Menu +-- Create a laucher widget and a main menu +myawesomemenu = { + { "quit", awesome.quit }, + { "restart", awesome.restart }, + { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" } +} + +mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, + { "debian", debian.menu.Debian_menu.Debian }, + { "terminal", terminal } + } + }) + +mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), + menu = mymainmenu }) +-- }}} diff --git a/config.dot/awesome.link/rc.lua b/config.dot/awesome.link/rc.lua index 84e8dc8..c968519 100644 --- a/config.dot/awesome.link/rc.lua +++ b/config.dot/awesome.link/rc.lua @@ -79,45 +79,26 @@ for s = 1, screen.count() do end -- }}} --- {{{ Menu --- Create a laucher widget and a main menu -myawesomemenu = { - { "quit", awesome.quit }, - { "restart", awesome.restart }, - { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" } -} - -mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "debian", debian.menu.Debian_menu.Debian }, - { "terminal", terminal } - } - }) - -mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), - menu = mymainmenu }) --- }}} +-- Menu +dofile(configdir .. "/menu.lua") -- {{{ Wibox --- Create a textclock widget -mytextclock = awful.widget.textclock({ align = "right" }) - --- Create a systray -mysystray = widget({ type = "systray" }) -- Create a wibox for each screen and add it -mywibox = {} -mypromptbox = {} -mylayoutbox = {} -mytaglist = {} +mywibox = {} +mypromptbox = {} +mylayoutbox = {} +mytaglist = {} mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), + awful.button({ }, 1, awful.tag.viewonly), awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), + 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) + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) ) -mytasklist = {} + +mytasklist = {} mytasklist.buttons = awful.util.table.join( awful.button({ }, 1, function (c) if not c:isvisible() then @@ -431,7 +412,7 @@ client.add_signal("manage", function (c, startup) end end) -client.add_signal("focus", function(c) c.border_color = beautiful.border_focus 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) -- }}} diff --git a/config.dot/awesome.link/widgets.lua b/config.dot/awesome.link/widgets.lua index 5f7a9c1..6117328 100644 --- a/config.dot/awesome.link/widgets.lua +++ b/config.dot/awesome.link/widgets.lua @@ -1,6 +1,14 @@ +--{{---| Text clock widget |------------------------------------------------------------------------------ + +mytextclock = awful.widget.textclock({ align = "right" }) + +--{{---| Systray widget |------------------------------------------------------------------------------ + +mysystray = widget({ type = "systray" }) + --{{---| Chat widget |------------------------------------------------------------------------------ -chaticon = widget ({type = "imagebox" }) +chaticon = widget ({type = "imagebox" }) chaticon.image = image(beautiful.widget_chat) chaticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(chat) end))) @@ -14,7 +22,7 @@ function () awful.util.spawn_with_shell(mailmutt) end))) --{{---| Music widget |----------------------------------------------------------------------------- -music = widget ({type = "imagebox" }) +music = widget ({type = "imagebox" }) music.image = image(beautiful.widget_music) music:buttons(awful.util.table.join( awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end), @@ -72,7 +80,7 @@ memicon.image = image(beautiful.widget_mem) --{{---| Battery widget |--------------------------------------------------------------------------- -baticon = widget ({type = "imagebox" }) +baticon = widget ({type = "imagebox" }) baticon.image = image(beautiful.widget_battery) batwidget = widget({ type = "textbox" }) vicious.register( batwidget, vicious.widgets.bat, '<span background="#92B0A0" font="Terminus 12"> <span font="Terminus 9" color="#FFFFFF" background="#92B0A0">$1$2% </span></span>', 1, "BAT0" ) @@ -90,7 +98,7 @@ function () awful.util.spawn_with_shell(iptraf) end))) --{{---| Binary Clock |----------------------------------------------------------------------------- -binaryclock = {} +binaryclock = {} binaryclock.widget = widget({type = "imagebox"}) binaryclock.w = 42 binaryclock.h = 16 @@ -184,29 +192,29 @@ binarytimer:start() --{{---| Separators widgets |----------------------------------------------------------------------- -spr = widget({ type = "textbox" }) -spr.text = ' ' -sprd = widget({ type = "textbox" }) -sprd.text = '<span background="#313131" font="Terminus 12"> </span>' -spr3f = widget({ type = "textbox" }) +spr = widget({ type = "textbox" }) +spr.text = ' ' +sprd = widget({ type = "textbox" }) +sprd.text = '<span background="#313131" font="Terminus 12"> </span>' +spr3f = widget({ type = "textbox" }) spr3f.text = '<span background="#777e76" font="Terminus 12"> </span>' -arr1 = widget ({type = "imagebox" }) +arr1 = widget ({type = "imagebox" }) arr1.image = image(beautiful.arr1) -arr2 = widget ({type = "imagebox" }) +arr2 = widget ({type = "imagebox" }) arr2.image = image(beautiful.arr2) -arr3 = widget ({type = "imagebox" }) +arr3 = widget ({type = "imagebox" }) arr3.image = image(beautiful.arr3) -arr4 = widget ({type = "imagebox" }) +arr4 = widget ({type = "imagebox" }) arr4.image = image(beautiful.arr4) -arr5 = widget ({type = "imagebox" }) +arr5 = widget ({type = "imagebox" }) arr5.image = image(beautiful.arr5) -arr6 = widget ({type = "imagebox" }) +arr6 = widget ({type = "imagebox" }) arr6.image = image(beautiful.arr6) -arr7 = widget ({type = "imagebox" }) +arr7 = widget ({type = "imagebox" }) arr7.image = image(beautiful.arr7) -arr8 = widget ({type = "imagebox" }) +arr8 = widget ({type = "imagebox" }) arr8.image = image(beautiful.arr8) -arr9 = widget ({type = "imagebox" }) +arr9 = widget ({type = "imagebox" }) arr9.image = image(beautiful.arr9) -arr0 = widget ({type = "imagebox" }) +arr0 = widget ({type = "imagebox" }) arr0.image = image(beautiful.arr0) |