summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
42bbf8e)
- fixed timezone issues
- added volume widget (with submodule)
- add textclock widget
--- /dev/null
+[submodule "volume-control"]
+ path = volume-control
+ url = https://github.com/deficient/volume-control.git
+-- read the timezone from /etc/timezone (this doesn't work, somehow)
+local function read_tz_file(path)
+ local file = io.open(path, "r") -- r read mode and b binary mode
+ if not file then return nil end
+ local content = file:read "*a" -- *a or *all reads the whole file
+ file:close()
+ content = content:gsub("^%s*", "")
+ content = content:gsub("%s*$", "")
+ return content
+end
+
+local tz_string = read_tz_file("/etc/timezone")
+
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget
+-- load the volume widget code and set settings
+local volume_control = require("volume-control")
+volumecfg = volume_control({})
+
-- Load Debian menu entries
require("debian.menu")
-- Load Debian menu entries
require("debian.menu")
-- {{{ Wibar
-- Create a textclock widget
-- {{{ Wibar
-- Create a textclock widget
-mytextclock = wibox.widget.textclock()
+mytextclock = wibox.widget.textclock("%a %m %d %H:%M", 60, tz_string)
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray(),
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray(),
mytextclock,
s.mylayoutbox,
},
mytextclock,
s.mylayoutbox,
},
+-- right_layout:add(volumecfg.widget)
+
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
- {description = "toggle focused client on tag #" .. i, group = "tag"})
+ {description = "toggle focused client on tag #" .. i, group = "tag"}),
+ awful.key({}, "XF86AudioRaiseVolume", function() volumecfg:up() end),
+ awful.key({}, "XF86AudioLowerVolume", function() volumecfg:down() end),
+ awful.key({}, "XF86AudioMute", function() volumecfg:toggle() end)
--- /dev/null
+Subproject commit 56dee54d7711a8be619d339bf66747db2e13cd17