Hello community,
here is the log from the commit of package awesome-branding-openSUSE for
openSUSE:Factory checked in at 2015-11-12 19:41:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/awesome-branding-openSUSE (Old)
and /work/SRC/openSUSE:Factory/.awesome-branding-openSUSE.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "awesome-branding-openSUSE"
Changes:
--------
---
/work/SRC/openSUSE:Factory/awesome-branding-openSUSE/awesome-branding-openSUSE.changes
2014-05-23 07:27:33.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.awesome-branding-openSUSE.new/awesome-branding-openSUSE.changes
2015-11-12 19:41:12.000000000 +0100
@@ -1,0 +2,9 @@
+Tue Nov 10 14:07:23 UTC 2015 - [email protected]
+
+- Update to 3.5-v0.3:
+ * awesome 3.5 compatibility (boo#953503).
+ * Use Adwaita icon theme instead of GNOME icon theme.
+ * Use light-locker instead of xscreensaver.
+- Remove awesome-branding-openSUSE-systemctl.patch.
+
+-------------------------------------------------------------------
@@ -27 +35,0 @@
-
@@ -36 +43,0 @@
-
Old:
----
awesome-branding-openSUSE-3.4.15-v0.1.tar.xz
awesome-branding-openSUSE-systemctl.patch
New:
----
awesome-branding-openSUSE-3.5-v0.3.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ awesome-branding-openSUSE.spec ++++++
--- /var/tmp/diff_new_pack.nRBRN4/_old 2015-11-12 19:41:14.000000000 +0100
+++ /var/tmp/diff_new_pack.nRBRN4/_new 2015-11-12 19:41:14.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package awesome-branding-openSUSE
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Togan Muftuoglu <[email protected]>
#
# All modifications and additions to the file contributed by third parties
@@ -17,59 +17,52 @@
#
-%define git_version 3.4.15-v0.1
-%define main_pack awesome
+%define _version 3.5-v0.3
+%define _name awesome
Name: awesome-branding-openSUSE
-Version: 3.4.15
+Version: 3.5
Release: 0
-Url: https://github.com/madanyang/awesome-branding-opensuse.git
Summary: openSUSE Branding for awesome
License: GPL-2.0+
Group: System/GUI/Other
-Supplements: packageand(%{main_pack}:branding-openSUSE)
-Provides: %{main_pack}-branding = %{version}
-Conflicts: otherproviders(%main_pack-branding)
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: %name-%git_version.tar.xz
-# PATCH-FIX-UPSTREAM awesome-branding-openSUSE-systemctl.patch [email protected]
-- Use systemctl to allow the local user to reboot and shutdown the system
without typing the password
-Patch0: awesome-branding-openSUSE-systemctl.patch
+Url: https://github.com/madanyang/awesome-branding-opensuse
+Source: %{name}-%{_version}.tar.xz
+Requires: adwaita-icon-theme
Requires: awesome-freedesktop
Requires: awesome-vicious
-Requires: gnome-icon-theme
-Requires: nitrogen
+Requires: light-locker
Requires: wallpaper-branding-openSUSE
-Requires: xscreensaver
Recommends: awesome-shifty
+Supplements: packageand(%{_name}:branding-openSUSE)
+Conflicts: otherproviders(%{_name}-branding)
+Provides: %{_name}-branding = %{version}
+BuildArch: noarch
%description
-This package provides the openSUSE specific additions both for functions and
-look and feel for awesome window manager.
-
+This package provides the openSUSE specific additions both for
+functions and look and feel for awesome window manager.
%prep
-%setup -q -n %name-%git_version
-%patch0 -p1
+%setup -q -n %{name}-%{_version}
%build
+# Nothing to build.
%install
-install -d %{buildroot}%{_sysconfdir}/xdg/awesome
-install -d %{buildroot}%{_datadir}/awesome/lib
-install -d %{buildroot}%{_datadir}/awesome/themes
-
-install -m 644 calendar2.lua %{buildroot}%{_datadir}/awesome/lib/.
-install -m 644 keydoc.lua %{buildroot}%{_datadir}/awesome/lib/.
-cp -ar themes/ %{buildroot}%{_datadir}/awesome/
-install -m 644 rc.lua %{buildroot}%{_sysconfdir}/xdg/awesome/rc.lua
+install -Dm 0644 rc.lua %{buildroot}%{_sysconfdir}/xdg/awesome/rc.lua
+install -Dm 0644 calendar2.lua
%{buildroot}%{_datadir}/awesome/lib/calendar2.lua
+install -Dm 0644 keydoc.lua %{buildroot}%{_datadir}/awesome/lib/keydoc.lua
+
+mkdir -p %{buildroot}%{_datadir}/awesome/
+cp -a themes/ %{buildroot}%{_datadir}/awesome/
%files
-%defattr(-,root,root,-)
+%defattr(-,root,root)
%doc README.openSUSE
-%dir %{_sysconfdir}/xdg/awesome
+%dir %{_sysconfdir}/xdg/awesome/
%config(noreplace) %{_sysconfdir}/xdg/awesome/rc.lua
-%dir %{_datadir}/awesome
-%{_datadir}/awesome/lib
-%{_datadir}/awesome/themes
+%dir %{_datadir}/awesome/
+%{_datadir}/awesome/lib/
+%{_datadir}/awesome/themes/
%changelog
++++++ awesome-branding-openSUSE-3.4.15-v0.1.tar.xz ->
awesome-branding-openSUSE-3.5-v0.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/awesome-branding-openSUSE-3.4.15-v0.1/rc.lua
new/awesome-branding-openSUSE-3.5-v0.3/rc.lua
--- old/awesome-branding-openSUSE-3.4.15-v0.1/rc.lua 2013-07-07
11:33:19.000000000 +0200
+++ new/awesome-branding-openSUSE-3.5-v0.3/rc.lua 2015-11-10
23:06:31.000000000 +0100
@@ -1,7 +1,8 @@
-- rc.lua
--- custom initialization for awesome windowmanager 3.4.13
+-- custom initialization for awesome windowmanager 3.5.x
--
- -- Copyright (C) 2012, 2013 by Togan Muftuoglu [email protected]
+ -- Copyright (C) 2012, 2013 by Togan Muftuoglu <[email protected]>
+ -- Copyright (C) 2015 by Sorokin Alexei <[email protected]>
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation; either version 2, or (at
@@ -19,25 +20,28 @@
-- Standard awesome library
-require("awful")
+local gears = require("gears")
+local awful = require("awful")
+awful.rules = require("awful.rules")
require("awful.autofocus")
-require("awful.rules")
+-- Widget and layout library
+local wibox = require("wibox")
-- Theme handling library
-require("beautiful")
+local beautiful = require("beautiful")
-- Notification library
-require("naughty")
+local naughty = require("naughty")
+local menubar = require("menubar")
+
-- Freedesktop integration
--- FIXME for 3,5 since freedesktop is not compatabible
-require("freedesktop.utils")
require("freedesktop.menu")
require("freedesktop.desktop")
--- use local keyword for awesome 3.5 compatability
-- calendar functions
local calendar2 = require("calendar2")
-- Extra widgets
local vicious = require("vicious")
-- to create shortcuts help screen
local keydoc = require("keydoc")
+
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
@@ -50,7 +54,7 @@
-- Handle runtime errors after startup
do
local in_error = false
- awesome.add_signal("debug::error", function (err)
+ awesome.connect_signal("debug::error", function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
@@ -64,7 +68,7 @@
-- }}}
-- {{{ Variable definitions
--- Themes define colours, icons, and wallpapers
+-- Themes define colours, icons, font and wallpapers.
-- Use personal theme if existing else goto default
do
local user_theme, ut
@@ -79,14 +83,13 @@
end
end
-
-- This is used later as the default terminal and editor to run.
terminal = "xterm"
editor = os.getenv("EDITOR") or os.getenv("VISUAL") or "vi"
editor_cmd = terminal .. " -e " .. editor
-freedesktop.utils.terminal = terminal
-freedesktop.utils.icon_theme = 'gnome'
+menubar.utils.terminal = terminal
+theme.icon_theme = 'Adwaita'
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
@@ -96,7 +99,7 @@
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
-layouts =
+local layouts =
{
awful.layout.suit.floating,
awful.layout.suit.tile,
@@ -113,6 +116,14 @@
}
-- }}}
+-- {{{ Wallpaper
+if beautiful.wallpaper then
+ for s = 1, screen.count() do
+ gears.wallpaper.maximized(beautiful.wallpaper, s, true)
+ end
+end
+-- }}}
+
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
@@ -122,74 +133,72 @@
end
-- }}}
-
-- {{{ Menu
-- Create a laucher widget and a main menu
-
mysystem_menu = {
- { 'Lock Screen', 'xscreensaver-command -lock',
freedesktop.utils.lookup_icon({ icon = 'system-lock-screen' }) },
- { 'Logout', awesome.quit,
freedesktop.utils.lookup_icon({ icon = 'system-log-out' }) },
- { 'Reboot System', 'xdg-su -c "shutdown -r now"',
freedesktop.utils.lookup_icon({ icon = 'reboot-notifier' }) },
- { 'Shutdown System', 'xdg-su -c "shutdown -h now"',
freedesktop.utils.lookup_icon({ icon = 'system-shutdown' }) }
+ { 'Lock Screen', 'light-locker-command --lock',
menubar.utils.lookup_icon('system-lock-screen') },
+ { 'Logout', awesome.quit,
menubar.utils.lookup_icon('system-log-out') },
+ { 'Reboot System', 'systemctl reboot',
menubar.utils.lookup_icon('reboot-notifier') },
+ { 'Shutdown System', 'systemctl poweroff',
menubar.utils.lookup_icon('system-shutdown') }
}
myawesome_menu = {
- { 'Restart Awesome', awesome.restart,
freedesktop.utils.lookup_icon({ icon = 'gtk-refresh' }) },
- { "Edit config", editor_cmd .. " " .. awful.util.getdir("config") ..
"/rc.lua", freedesktop.utils.lookup_icon({ icon = 'package_settings' }) },
+ { 'Restart Awesome', awesome.restart,
menubar.utils.lookup_icon('gtk-refresh') },
+ { "Edit config", editor_cmd .. " " .. awful.util.getdir("config") ..
"/rc.lua", menubar.utils.lookup_icon('package_settings') },
{ "manual", terminal .. " -e man awesome" }
}
-top_menu = {
- { 'Applications', freedesktop.menu.new(),
freedesktop.utils.lookup_icon({ icon = 'start-here' }) },
- { 'Awesome', myawesome_menu,
beautiful.awesome_icon },
- { 'System', mysystem_menu,
freedesktop.utils.lookup_icon({ icon = 'system' }) },
- { 'Terminal', freedesktop.utils.terminal,
freedesktop.utils.lookup_icon({ icon = 'terminal' }) }
- }
+ top_menu = {
+ { 'Applications', freedesktop.menu.new(),
menubar.utils.lookup_icon('start-here') },
+ { 'Awesome', myawesome_menu, beautiful.awesome_icon
},
+ { 'System', mysystem_menu,
menubar.utils.lookup_icon('system') },
+ { 'Terminal', menubar.utils.terminal,
menubar.utils.lookup_icon('terminal') }
+ }
mymainmenu = awful.menu.new({ items = top_menu, width = 150 })
+mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
+ menu = mymainmenu })
-mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
--- }}}
-
- -- desktop icons
- for s = 1, screen.count() do
- freedesktop.desktop.add_applications_icons({screen = s, showlabels =
true})
- freedesktop.desktop.add_dirs_and_files_icons({screen = s, showlabels =
true})
- end
-
+-- Desktop icons
+for s = 1, screen.count() do
+ freedesktop.desktop.add_applications_icons({screen = s, showlabels = true})
+ freedesktop.desktop.add_dirs_and_files_icons({screen = s, showlabels =
true})
+end
+-- Menubar configuration
+menubar.utils.terminal = terminal -- Set the terminal for applications that
require it
+-- }}}
-- {{{ Wibox
-- We need spacer and separator between the widgets
-spacer = widget({type = "textbox"})
-separator = widget({type = "textbox"})
-spacer.text = " "
-separator.text = "|"
-
+spacer = wibox.widget.textbox()
+separator = wibox.widget.textbox()
+spacer:set_text(" ")
+separator:set_text("|")
-- Create a textclock widget
-mytextclock = awful.widget.textclock({ align = "right" })
+mytextclock = awful.widget.textclock()
calendar2.addCalendarToWidget(mytextclock, "<span color='green'>%s</span>")
-mycpuwidget = widget({ type = "textbox" })
+mycpuwidget = wibox.widget.textbox()
vicious.register(mycpuwidget, vicious.widgets.cpu, "$1%")
-mybattery = widget({ type = "textbox"})
+mybattery = wibox.widget.textbox()
vicious.register(mybattery, function(format, warg)
- local args = vicious.widgets.bat(format, warg)
- if args[2] < 50 then
- args['{color}'] = 'red'
- else
- args['{color}'] = 'green'
- end
- return args
+ local args = vicious.widgets.bat(format, warg)
+ if args[2] < 50 then
+ args['{color}'] = 'red'
+ else
+ args['{color}'] = 'green'
+ end
+ return args
end, '<span foreground="${color}">bat: $2% $3h</span>', 10, 'BAT0')
--- Initialize widget
-mynetwidget = widget({ type = "textbox" })
+-- Initialise widget
+mynetwidget = wibox.widget.textbox()
-- Register widget
vicious.register(mynetwidget, vicious.widgets.net, "${eth0 down_kb} / ${eth0
up_kb}", 1)
@@ -203,7 +212,7 @@
-- Weather widget
-myweatherwidget = widget({ type = "textbox" })
+myweatherwidget = wibox.widget.textbox()
weather_t = awful.tooltip({ objects = { myweatherwidget },})
vicious.register(myweatherwidget, vicious.widgets.weather,
function (widget, args)
@@ -219,26 +228,24 @@
-- default keyboard is us, second is german adapt to your needs
--
- kbdcfg = {}
- kbdcfg.cmd = "setxkbmap"
- kbdcfg.layout = { { "us", "" }, { "de", "" } }
- kbdcfg.current = 1 -- us is our default layout
- kbdcfg.widget = widget({ type = "textbox", align = "right" })
- kbdcfg.widget.text = " " .. kbdcfg.layout[kbdcfg.current][1] .. " "
- kbdcfg.switch = function ()
- kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
- local t = kbdcfg.layout[kbdcfg.current]
- kbdcfg.widget.text = " " .. t[1] .. " "
- os.execute( kbdcfg.cmd .. " " .. t[1] .. " " .. t[2] )
- end
-
- -- Mouse bindings
- kbdcfg.widget:buttons(awful.util.table.join(
- awful.button({ }, 1, function () kbdcfg.switch() end)
- ))
+kbdcfg = {}
+kbdcfg.cmd = "setxkbmap"
+kbdcfg.layout = { { "us", "" } }
+kbdcfg.current = 1 -- us is our default layout
+kbdcfg.widget = wibox.widget.textbox()
+kbdcfg.widget.set_align = "right"
+kbdcfg.widget:set_text(" " .. kbdcfg.layout[kbdcfg.current][1] .. " ")
+kbdcfg.switch = function ()
+ kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
+ local t = kbdcfg.layout[kbdcfg.current]
+ kbdcfg.widget.text = " " .. t[1] .. " "
+ os.execute( kbdcfg.cmd .. " " .. t[1] .. " " .. t[2] )
+end
--- Create a systray
-mysystray = widget({ type = "systray" })
+-- Mouse bindings
+kbdcfg.widget:buttons(awful.util.table.join(
+ awful.button({ }, 1, function () kbdcfg.switch() end)
+))
-- Create a wibox for each screen and add it
mywibox = {}
@@ -250,8 +257,8 @@
awful.button({ modkey }, 1, awful.client.movetotag),
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, function(t)
awful.tag.viewnext(awful.tag.getscreen(t)) end),
+ awful.button({ }, 5, function(t)
awful.tag.viewprev(awful.tag.getscreen(t)) end)
)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
@@ -259,6 +266,9 @@
if c == client.focus then
c.minimized = true
else
+ -- Without this, the
following
+ -- :isvisible() makes no
sense
+ c.minimized = false
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
@@ -273,7 +283,9 @@
instance:hide()
instance = nil
else
- instance =
awful.menu.clients({ width=250 })
+ instance =
awful.menu.clients({
+ theme = { width = 250 }
+ })
end
end),
awful.button({ }, 4, function ()
@@ -287,7 +299,7 @@
for s = 1, screen.count() do
-- Create a promptbox for each screen
- mypromptbox[s] = awful.widget.prompt({ layout =
awful.widget.layout.horizontal.leftright })
+ mypromptbox[s] = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which
layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
@@ -297,74 +309,76 @@
awful.button({ }, 4, function ()
awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function ()
awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
- mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all,
mytaglist.buttons)
+ mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all,
mytaglist.buttons)
-- Create a tasklist widget
- mytasklist[s] = awful.widget.tasklist(function(c)
- return
awful.widget.tasklist.label.currenttags(c, s)
- end, mytasklist.buttons)
+ mytasklist[s] = awful.widget.tasklist(s,
awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
- -- Add widgets to the wibox - order matters
- mywibox[s].widgets = {
- {
- mylauncher,
- mytaglist[s],
- mypromptbox[s],
- layout = awful.widget.layout.horizontal.leftright
- },
- mylayoutbox[s],
-
- mytextclock,
- separator,
- spacer,
-
- kbdcfg.widget,
- spacer,
- separator,
- spacer,
-
- mycpuwidget,
- spacer,
- separator,
- spacer,
-
- mybattery,
- spacer,
- separator,
- spacer,
-
- mynetwidget,
- spacer,
- separator,
- spacer,
-
- -- wifi,
- -- spacer,
- -- separator,
- -- spacer,
-
- myweatherwidget,
- spacer,
- separator,
- spacer,
- s == 1 and mysystray or nil,
- mytasklist[s],
- layout = awful.widget.layout.horizontal.rightleft
- }
+
+ -- Widgets that are aligned to the left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(mylauncher)
+ left_layout:add(mytaglist[s])
+ left_layout:add(mypromptbox[s])
+
+ -- Widgets that are aligned to the right
+ local right_layout = wibox.layout.fixed.horizontal()
+ if s == 1 then right_layout:add(wibox.widget.systray()) end
+ right_layout:add(mytextclock)
+ right_layout:add(separator)
+ right_layout:add(spacer)
+
+ right_layout:add(kbdcfg.widget)
+ right_layout:add(spacer)
+ right_layout:add(separator)
+ right_layout:add(spacer)
+
+ right_layout:add(mycpuwidget)
+ right_layout:add(spacer)
+ right_layout:add(separator)
+ right_layout:add(spacer)
+
+ right_layout:add(mybattery)
+ right_layout:add(spacer)
+ right_layout:add(separator)
+ right_layout:add(spacer)
+
+ right_layout:add(mynetwidget)
+ right_layout:add(spacer)
+ right_layout:add(separator)
+ right_layout:add(spacer)
+
+ -- right_layout:add(wifi)
+ -- right_layout:add(spacer)
+ -- right_layout:add(separator)
+ -- right_layout:add(spacer)
+
+ right_layout:add(myweatherwidget)
+ right_layout:add(spacer)
+ right_layout:add(separator)
+ right_layout:add(spacer)
+ right_layout:add(mylayoutbox[s])
+
+ -- 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(mytasklist[s])
+ layout:set_right(right_layout)
+
+ mywibox[s]:set_widget(layout)
end
-- }}}
-- these are needed by the keydoc a better solution would be to place them in
theme.lua
--- but leaving them here also provides a mean to change the colors here ;)
+-- but leaving them here also provides a mean to change the colours here ;)
beautiful.fg_widget_value="green"
beautiful.fg_widget_clock="gold"
beautiful.fg_widget_value_important="red"
-
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
@@ -385,13 +399,13 @@
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
- end,"Raise focus"),
+ end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
- end,"Lower focus"),
- awful.key({ modkey, }, "w", function ()
mymainmenu:show({keygrabber=true}) end,"Show menu"),
+ end,"Raise focus"),
+ awful.key({ modkey, }, "w", function () mymainmenu:show()
end,"Show menu"),
-- Layout manipulation
keydoc.group("Layout manipulation"),
@@ -473,7 +487,9 @@
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
- end,"Run lua command")
+ end,"Run lua command"),
+ -- Menubar
+ awful.key({ modkey }, "p", function() menubar.show() end)
)
clientkeys = awful.util.table.join(
@@ -483,7 +499,6 @@
awful.key({ modkey, "Control" }, "space",
awful.client.floating.toggle,"Toggle floating" ),
awful.key({ modkey, "Control" }, "Return", function (c)
c:swap(awful.client.getmaster()) end,"Swap to master"),
awful.key({ modkey, }, "o", awful.client.movetoscreen,"Move
to screen" ),
- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw()
end,"redraw window"),
awful.key({ modkey, }, "t", function (c) c.ontop = not
c.ontop end),
awful.key({ modkey, }, "n",
function (c)
@@ -498,41 +513,47 @@
end,"Maximize client")
)
--- Compute the maximum number of digit we need, limited to 9
-keynumber = 0
-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
+for i = 1, 9 do
globalkeys = awful.util.table.join(globalkeys,
+ -- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
- if tags[screen][i] then
- awful.tag.viewonly(tags[screen][i])
+ local tag = awful.tag.gettags(screen)[i]
+ if tag then
+ awful.tag.viewonly(tag)
end
end),
+ -- Toggle tag.
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
- if tags[screen][i] then
- awful.tag.viewtoggle(tags[screen][i])
+ local tag = awful.tag.gettags(screen)[i]
+ if tag then
+ awful.tag.viewtoggle(tag)
end
end),
+ -- Move client to tag.
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])
- end
+ if client.focus then
+ local tag = awful.tag.gettags(client.focus.screen)[i]
+ if tag then
+ awful.client.movetotag(tag)
+ end
+ end
end),
+ -- Toggle tag.
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])
+ if client.focus then
+ local tag = awful.tag.gettags(client.focus.screen)[i]
+ if tag then
+ awful.client.toggletag(tag)
+ end
end
end))
end
@@ -546,14 +567,15 @@
root.keys(globalkeys)
-- }}}
-
-- {{{ Rules
+-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
- focus = true,
+ focus = awful.client.focus.filter,
+ raise = true,
keys = clientkeys,
buttons = clientbuttons } },
-- to fix youtube fullscreen problems if still seeing bottom bar
@@ -575,12 +597,9 @@
-- {{{ 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 })
-
+client.connect_signal("manage", function (c, startup)
-- Enable sloppy focus
- c:add_signal("mouse::enter", function(c)
+ c:connect_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
@@ -598,8 +617,53 @@
awful.placement.no_offscreen(c)
end
end
+
+ local titlebars_enabled = false
+ if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
+ -- buttons for the titlebar
+ local buttons = awful.util.table.join(
+ awful.button({ }, 1, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.move(c)
+ end),
+ awful.button({ }, 3, function()
+ client.focus = c
+ c:raise()
+ awful.mouse.client.resize(c)
+ end)
+ )
+
+ -- Widgets that are aligned to the left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(awful.titlebar.widget.iconwidget(c))
+ left_layout:buttons(buttons)
+
+ -- Widgets that are aligned to the right
+ local right_layout = wibox.layout.fixed.horizontal()
+ right_layout:add(awful.titlebar.widget.floatingbutton(c))
+ right_layout:add(awful.titlebar.widget.maximizedbutton(c))
+ right_layout:add(awful.titlebar.widget.stickybutton(c))
+ right_layout:add(awful.titlebar.widget.ontopbutton(c))
+ right_layout:add(awful.titlebar.widget.closebutton(c))
+
+ -- The title goes in the middle
+ local middle_layout = wibox.layout.flex.horizontal()
+ local title = awful.titlebar.widget.titlewidget(c)
+ title:set_align("center")
+ middle_layout:add(title)
+ middle_layout:buttons(buttons)
+
+ -- Now bring it all together
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_right(right_layout)
+ layout:set_middle(middle_layout)
+
+ awful.titlebar(c):set_widget(layout)
+ end
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)
+client.connect_signal("focus", function(c) c.border_color =
beautiful.border_focus end)
+client.connect_signal("unfocus", function(c) c.border_color =
beautiful.border_normal end)
-- }}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/awesome-branding-openSUSE-3.4.15-v0.1/themes/openSUSE/theme.lua
new/awesome-branding-openSUSE-3.5-v0.3/themes/openSUSE/theme.lua
--- old/awesome-branding-openSUSE-3.4.15-v0.1/themes/openSUSE/theme.lua
2013-07-07 11:33:19.000000000 +0200
+++ new/awesome-branding-openSUSE-3.5-v0.3/themes/openSUSE/theme.lua
2015-11-10 23:33:44.000000000 +0100
@@ -10,13 +10,14 @@
theme.bg_focus = "#62a541"
theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444"
+theme.bg_systray = theme.bg_normal
theme.fg_normal = "#aaaaaa"
theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
-theme.border_width = "1"
+theme.border_width = 1
theme.border_normal = "#000000"
theme.border_focus = "#535d6c"
theme.border_marked = "#91231c"
@@ -24,7 +25,8 @@
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
--- [taglist|tasklist]_[bg|fg]_[focus|urgent]
+-- taglist_[bg|fg]_[focus|urgent|occupied|empty]
+-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
@@ -35,14 +37,12 @@
theme.taglist_squares_sel =
"/usr/share/awesome/themes/openSUSE/taglist/squarefw.png"
theme.taglist_squares_unsel =
"/usr/share/awesome/themes/openSUSE/taglist/squarew.png"
-theme.tasklist_floating_icon =
"/usr/share/awesome/themes/openSUSE/tasklist/floatingw.png"
-
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = "/usr/share/awesome/themes/openSUSE/submenu.png"
-theme.menu_height = "15"
-theme.menu_width = "100"
+theme.menu_height = 15
+theme.menu_width = 100
-- You can add as many variables as
-- you wish and access them by using
@@ -73,8 +73,7 @@
theme.titlebar_maximized_button_normal_active =
"/usr/share/awesome/themes/openSUSE/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active =
"/usr/share/awesome/themes/openSUSE/titlebar/maximized_focus_active.png"
--- You can use your own command to set your wallpaper
-theme.wallpaper_cmd = { "nitrogen --set-scaled
/usr/share/wallpapers/openSUSEdefault/contents/images/1920x1080.jpg" }
+theme.wallpaper =
"/usr/share/wallpapers/openSUSEdefault/contents/images/1920x1080.jpg"
-- You can use your own layout icons like this:
theme.layout_fairh = "/usr/share/awesome/themes/openSUSE/layouts/fairhw.png"
@@ -92,5 +91,10 @@
theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png"
theme.opensuse_icon = "/usr/share/awesome/themes/openSUSE/opensusegeeko.png"
+
+-- Define the icon theme for application icons. If not set then the icons
+-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
+theme.icon_theme = nil
+
return theme
-- vim:
filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80