Created
          January 31, 2017 00:08 
        
      - 
      
- 
        Save Ram-Z/dd00cfb7bacaa270c42367e3ab1ee6a8 to your computer and use it in GitHub Desktop. 
    awesome_declarative.lua
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | local battery = wibox.widget.base.make_widget() | |
| if utils.has_battery() then | |
| table.insert(battery, separator) | |
| table.insert(battery, require("widgets/battery_widget")) | |
| end | |
| awful.screen.connect_for_each_screen(function(s) | |
| [..snip..] | |
| s.mywibox:setup { | |
| layout = wibox.layout.align.horizontal, | |
| { -- Left widgets | |
| layout = wibox.layout.fixed.horizontal, | |
| -- mylauncher, | |
| s.mytaglist, | |
| s.mypromptbox, | |
| }, | |
| s.mytasklist, -- Middle widget | |
| { -- Right widgets | |
| layout = wibox.layout.fixed.horizontal, | |
| mykeyboardlayout, | |
| wibox.widget.systray(), | |
| separator, | |
| require("widgets/pomodoro"), | |
| separator, | |
| require("widgets/awesompd"), | |
| require("widgets/volume_widget"), | |
| battery, | |
| separator, | |
| require("widgets/network_widget"), | |
| separator, | |
| require("widgets/calendar"), | |
| s.mylayoutbox, | |
| }, | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | awful.screen.connect_for_each_screen(function(s) | |
| [..snip..] | |
| -- Widgets that are aligned to the left | |
| local left_layout = wibox.layout.fixed.horizontal() | |
| -- left_layout:add(mylauncher) | |
| left_layout:add(s.mytaglist) | |
| left_layout:add(s.mypromptbox) | |
| -- Widgets that are aligned to the right | |
| local right_layout = wibox.layout.fixed.horizontal() | |
| right_layout:add(wibox.widget.systray()) | |
| right_layout:add(separator) | |
| right_layout:add(require("widgets/pomodoro")) | |
| right_layout:add(separator) | |
| right_layout:add(require("widgets/awesompd")) | |
| right_layout:add(require("widgets/volume_widget")) | |
| if utils.has_battery() then | |
| right_layout:add(separator) | |
| right_layout:add(require("widgets/battery_widget")) | |
| end | |
| right_layout:add(separator) | |
| right_layout:add(require("widgets/network_widget")) | |
| right_layout:add(separator) | |
| right_layout:add(require("widgets/calendar")) | |
| right_layout:add(s.mylayoutbox) | |
| -- 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(s.mytasklist) | |
| layout:set_right(right_layout) | |
| s.mywibox:set_widget(layout) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment