Skip to content

Commit

Permalink
Updating the the very latest config
Browse files Browse the repository at this point in the history
  • Loading branch information
setkeh committed Jun 11, 2018
1 parent 5f1fd9f commit fe02bab
Show file tree
Hide file tree
Showing 9 changed files with 381 additions and 209 deletions.
8 changes: 2 additions & 6 deletions README.md
@@ -1,10 +1,6 @@
Awesome-3.5
Awesome Window Manager Configs
==================

[![Gratipay](http://img.shields.io/gratipay/setkeh.svg)](https://gratipay.com/setkeh/)

Awesome Configs updated to 3.5

I have Finally cleaned up the Config slightly

All the Extra widgets that were custom written have now been moved to ./widgets
Expand All @@ -19,7 +15,7 @@ Though you will still need to add these to wi.lua yourself if you intend on usin

To use this config it needs to be placed in $HOME/.config/awesome the easiest way to do this is:

git clone --recursive https://github.com/setkeh/Awesome-3.5.git $HOME/.config/awesome
git clone --recursive https://github.com/setkeh/Awesome.git $HOME/.config/awesome

The --recursive is required due to the configs reliance on vicious which i have added as a submodule. (If you have cloned the repo and the vicious directory is empty you can re clone the repo or update the submodule to ull the full repo)

Expand Down
55 changes: 55 additions & 0 deletions cpu-widget/cpu-widget.lua
@@ -0,0 +1,55 @@
-------------------------------------------------
-- CPU Widget for Awesome Window Manager
-- Shows the current CPU utilization
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/cpu-widget

-- @author Pavel Makhov
-- @copyright 2017 Pavel Makhov
-------------------------------------------------

local watch = require("awful.widget.watch")
local wibox = require("wibox")

local cpugraph_widget = wibox.widget {
max_value = 100,
color = '#74aeab',
background_color = "#00000000",
forced_width = 50,
step_width = 2,
step_spacing = 1,
widget = wibox.widget.graph
}

-- mirros and pushs up a bit
local cpu_widget = wibox.container.margin(wibox.container.mirror(cpugraph_widget, { horizontal = true }), 0, 0, 0, 2)

local total_prev = 0
local idle_prev = 0

watch("cat /proc/stat | grep '^cpu '", 1,
function(widget, stdout, stderr, exitreason, exitcode)
local user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice =
stdout:match('(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s')

local total = user + nice + system + idle + iowait + irq + softirq + steal

local diff_idle = idle - idle_prev
local diff_total = total - total_prev
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10

if diff_usage > 80 then
widget:set_color('#ff4136')
else
widget:set_color('#74aeab')
end

widget:add_value(diff_usage)

total_prev = total
idle_prev = idle
end,
cpugraph_widget
)

return cpu_widget
67 changes: 17 additions & 50 deletions rc.lua
Expand Up @@ -22,6 +22,7 @@ freedesktop.utils.icon_theme = 'gnome'
--Vicious + Widgets
vicious = require("vicious")
local wi = require("wi")
require("cpu-widget.cpu-widget")

-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
Expand Down Expand Up @@ -49,7 +50,7 @@ end
-- }}}

-- This is used later as the default terminal and editor to run.
terminal = "urxvt -fg green -bg black"
terminal = "st"
editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor

Expand Down Expand Up @@ -107,26 +108,20 @@ end
-- Define a tag table which hold all screen tags.
tags = {
names = {
'☭:IRC',
'⚡:Luakit',
'♨:Chrome',
'☠:Vim',
'☃:Vbox',
'⌥:Multimedia',
'⌘:Conky',
'✇:IDE',
'☭:Web',
'☭:Terminal',
'♨:IRC',
'⌥:Social',
'✣:Facepalm',
},
layout = {
layouts[5], -- 1:irc
layouts[10], -- 2:luakit
layouts[10], -- 3:chrome
layouts[12], -- 4:vim
layouts[2], -- 5:vbox
layouts[10], -- 6:multimedia
layouts[10], -- 7:conky
layouts[2], -- 8:ide
layouts[10], -- 9:facepalm
layouts[5], -- 1:IDE
layouts[10], -- 2:Web
layouts[10], -- 3:Terminal
layouts[12], -- 4:IRC
layouts[1], -- 5:Social
layouts[2], -- 6:Facepalm
}
}
for s = 1, screen.count() do
Expand All @@ -152,20 +147,6 @@ local item = { l, function () wall_load(l) end }
end
wall_menu()

-- Widgets

spacer = wibox.widget.textbox()
spacer:set_text(' | ')

--Weather Widget
weather = wibox.widget.textbox()
vicious.register(weather, vicious.widgets.weather, "Weather: ${city}. Sky: ${sky}. Temp: ${tempc}c Humid: ${humid}%. Wind: ${windkmh} KM/h", 1200, "YMML")

--Battery Widget
batt = wibox.widget.textbox()
vicious.register(batt, vicious.widgets.bat, "Batt: $2% Rem: $3", 61, "BAT1")


-- {{{ Menu
-- Create a laucher widget and a main menu

Expand Down Expand Up @@ -272,18 +253,9 @@ for s = 1, screen.count() do
local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(spacer)
right_layout:add(mailicon)
right_layout:add(mailwidget)
right_layout:add(volumearc_widget)
right_layout:add(spacer)
right_layout:add(baticon)
right_layout:add(batpct)
right_layout:add(spacer)
right_layout:add(pacicon)
right_layout:add(pacwidget)
right_layout:add(spacer)
right_layout:add(volicon)
right_layout:add(volpct)
right_layout:add(volspace)
right_layout:add(spotify_widget)
right_layout:add(spacer)
right_layout:add(mytextclock)
right_layout:add(mylayoutbox[s])
Expand All @@ -301,16 +273,11 @@ for s = 1, screen.count() do
-- Widgets that are aligned to the bottom
local bottom_layout = wibox.layout.fixed.horizontal()
bottom_layout:add(cpuicon)
bottom_layout:add(cpu)
bottom_layout:add(cpu_widget)
bottom_layout:add(spacer)
bottom_layout:add(memicon)
bottom_layout:add(mem)
bottom_layout:add(spacer)
bottom_layout:add(wifiicon)
bottom_layout:add(wifi)
bottom_layout:add(spacer)
bottom_layout:add(weather)
bottom_layout:add(spacer)

-- Now bring it all together
--local layout = wibox.layout.align.horizontal()
Expand All @@ -330,7 +297,7 @@ root.buttons(awful.util.table.join(
-- }}}

-- {{{ Key bindings
globalkeys = awful.util.table.join(
globalkeys = gears.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
Expand Down Expand Up @@ -392,7 +359,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey }, "p", function() menubar.show() end)
)

clientkeys = awful.util.table.join(
clientkeys = gears.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
Expand Down
1 change: 1 addition & 0 deletions themes/default/bg.png
1 change: 0 additions & 1 deletion vicious
Submodule vicious deleted from 02e114
Binary file added wallpapers/sexy-warrior_125225239.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fe02bab

Please sign in to comment.