From 57b0bab65cb103e551999c9ca1ab2c01f035993d Mon Sep 17 00:00:00 2001 From: Drauthius Date: Tue, 5 Jan 2016 20:39:08 +0100 Subject: [PATCH] Initial commit --- MIT-LICENSE.txt | 20 ++++ README.md | 115 ++++++++++++++++++ doc/index.html | 220 +++++++++++++++++++++++++++++++++++ doc/ldoc.css | 304 ++++++++++++++++++++++++++++++++++++++++++++++++ init.lua | 168 ++++++++++++++++++++++++++ rc.lua.patch | 96 +++++++++++++++ 6 files changed, 923 insertions(+) create mode 100644 MIT-LICENSE.txt create mode 100644 README.md create mode 100644 doc/index.html create mode 100644 doc/ldoc.css create mode 100644 init.lua create mode 100644 rc.lua.patch diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt new file mode 100644 index 0000000..dba5c27 --- /dev/null +++ b/MIT-LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2016 Albert Diserholt + + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d4cc9fe --- /dev/null +++ b/README.md @@ -0,0 +1,115 @@ +awesome-sharedtags +================== + +A simple implementation for creating tags shared on multiple screens for +[awesome window manager](http://awesome.naquadah.org/). + +It is designed to work with *awesome* version 3.5, but might work with older or +newer versions as well. + +Features +-------- + +* Define a list of tags to be usable on all screens. +* Move tags with all clients between screens. +* Everything else should be just as usual. + +Installation +------------ + +1. Clone or download a zip of the repository, and put the `sharedtags` + directory somewhere where you can easily include it, for example in the same + directory as your `rc.lua` file. +2. Modify your `rc.lua` file. A [patch](rc.lua.patch) against the default + configuration is included in the repository for easy comparison, but keep + reading for a textual description. + 1. Require the `sharedtags` library somewhere at the top of the file. + + ```lua + local sharedtags = require("sharedtags") + ``` + 2. Create the tags using the `sharedtags()` method, instead of the original + ones created with `awful.tag()`. + + ```lua + local tags = sharedtags( + { name = "main", layout = layouts[2] }, + { name = "www", layout = awful.layout.suit.max }, + { name = "chat", screen = 2, layout = layouts[1] }, + { layout = layouts[2] }, + { screen = 2, layout = layouts[2] } + ) + ``` + 3. The code for handling tags and clients needs to be changed to use the + library. + + ```lua + for i = 1, 9 do + globalkeys = awful.util.table.join(globalkeys, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local tag = tags[i] + if tag then + sharedtags.viewonly(tag) + end + end), + -- Toggle tag. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local tag = tags[i] + if tag then + sharedtags.viewtoggle(tag) + end + end), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = tags[i] + if tag then + awful.client.movetotag(tag) + end + end + end), + -- Toggle tag. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = tags[i] + if tag then + awful.client.toggletag(tag) + end + end + end)) + end + ``` + 4. Lastly, since the tag list is now a one-dimensional array, any references + to the `tags` array needs to be changed, for example in the rules section. + + ```lua + awful.rules.rules = { + -- Set Firefox to always map on tag number 2. + { rule = { class = "Firefox" }, + properties = { tag = tags[2] } }, + } + ``` +3. Restart or reload *awesome*. + +Notes +----- + +Because of constraints in the X server, *awesome* does not allow +toggling clients on tags allocated to other screens. Having a client on +multiple tags and moving one of the tags will cause the client to move as well. + +API +--- + +See [`doc/index.html`](doc/index.html) for API documentation. + +Credits +------- + +Idea originally from https://github.com/lammermann/awesome-configs, but I could +not get that implementation to work. diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..24fa941 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,220 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module sharedtags

+

Provides functionality to share tags across all screens in awesome WM.

+

+

Info:

+
    +
  • Copyright: 2016 Albert Diserholt
  • +
  • License: MIT
  • +
  • Author: Albert Diserholt
  • +
+ + +

Functions

+ + + + + + + + + + + + + + + + + +
new (def)Create new tag objects.
movetag (tag[, screen=capi.mouse.screen])Move the specified tag to a new screen, if necessary.
viewonly (tag[, screen=capi.mouse.screen])View the specified tag on the specified screen.
viewtoggle (tag[, screen=capi.mouse.screen])Toggle the specified tag on the specified screen.
+ +
+
+ + +

Functions

+ +
+
+ + new (def) +
+
+ Create new tag objects. + The first tag defined for each screen will be automatically selected. + + +

Parameters:

+
    +
  • def + table + A list of tables with the optional keys `name`, `layout` + and `screen`. The `name` value is used to name the tag and defaults to the + list index. The `layout` value sets the starting layout for the tag and + defaults to the first layout. The `screen` value sets the starting screen + for the tag and defaults to the first screen. The tags will be sorted in this + order in the default taglist. +
  • +
+ +

Returns:

+
    + + table + A list of all created tags. +
+ + + +

Usage:

+
    +
     local tags = sharedtags(
    +   -- "main" is the first tag starting on screen 2 with the tile layout.
    +   { name = "main", layout = awful.layout.suit.tile, screen = 2 },
    +   -- "www" is the second tag on screen 1 with the floating layout.
    +   { name = "www" },
    +   -- Third tag is named "3" on screen 1 with the floating layout.
    +   {})
    +
+ +
+
+ + movetag (tag[, screen=capi.mouse.screen]) +
+
+ Move the specified tag to a new screen, if necessary. + + +

Parameters:

+
    +
  • tag + The tag to move. +
  • +
  • screen + number + The screen to move the tag to. + (default capi.mouse.screen) +
  • +
+ +

Returns:

+
    + + bool + Whether the tag was moved. +
+ + + + +
+
+ + viewonly (tag[, screen=capi.mouse.screen]) +
+
+ View the specified tag on the specified screen. + + +

Parameters:

+
    +
  • tag + The only tag to view. +
  • +
  • screen + number + The screen to view the tag on. + (default capi.mouse.screen) +
  • +
+ + + + + +
+
+ + viewtoggle (tag[, screen=capi.mouse.screen]) +
+
+ Toggle the specified tag on the specified screen. + The tag will be selected if the screen changes, and toggled if it does not + change the screen. + + +

Parameters:

+
    +
  • tag + The tag to toggle. +
  • +
  • screen + number + The screen to toggle the tag on. + (default capi.mouse.screen) +
  • +
+ + + + + +
+
+ + +
+
+
+generated by LDoc 1.4.3 +Last updated 2016-01-03 19:41:48 +
+
+ + diff --git a/doc/ldoc.css b/doc/ldoc.css new file mode 100644 index 0000000..ce77ac8 --- /dev/null +++ b/doc/ldoc.css @@ -0,0 +1,304 @@ +/* BEGIN RESET + +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.2r1 +*/ +html { + color: #000; + background: #FFF; +} +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { + margin: 0; + padding: 0; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +fieldset,img { + border: 0; +} +address,caption,cite,code,dfn,em,strong,th,var,optgroup { + font-style: inherit; + font-weight: inherit; +} +del,ins { + text-decoration: none; +} +li { + list-style: disc; + margin-left: 20px; +} +caption,th { + text-align: left; +} +h1,h2,h3,h4,h5,h6 { + font-size: 100%; + font-weight: bold; +} +q:before,q:after { + content: ''; +} +abbr,acronym { + border: 0; + font-variant: normal; +} +sup { + vertical-align: baseline; +} +sub { + vertical-align: baseline; +} +legend { + color: #000; +} +input,button,textarea,select,optgroup,option { + font-family: inherit; + font-size: inherit; + font-style: inherit; + font-weight: inherit; +} +input,button,textarea,select {*font-size:100%; +} +/* END RESET */ + +body { + margin-left: 1em; + margin-right: 1em; + font-family: arial, helvetica, geneva, sans-serif; + background-color: #ffffff; margin: 0px; +} + +code, tt { font-family: monospace; font-size: 1.1em; } +span.parameter { font-family:monospace; } +span.parameter:after { content:":"; } +span.types:before { content:"("; } +span.types:after { content:")"; } +.type { font-weight: bold; font-style:italic } + +body, p, td, th { font-size: .95em; line-height: 1.2em;} + +p, ul { margin: 10px 0 0 0px;} + +strong { font-weight: bold;} + +em { font-style: italic;} + +h1 { + font-size: 1.5em; + margin: 0 0 20px 0; +} +h2, h3, h4 { margin: 15px 0 10px 0; } +h2 { font-size: 1.25em; } +h3 { font-size: 1.15em; } +h4 { font-size: 1.06em; } + +a:link { font-weight: bold; color: #004080; text-decoration: none; } +a:visited { font-weight: bold; color: #006699; text-decoration: none; } +a:link:hover { text-decoration: underline; } + +hr { + color:#cccccc; + background: #00007f; + height: 1px; +} + +blockquote { margin-left: 3em; } + +ul { list-style-type: disc; } + +p.name { + font-family: "Andale Mono", monospace; + padding-top: 1em; +} + +pre { + background-color: rgb(245, 245, 245); + border: 1px solid #C0C0C0; /* silver */ + padding: 10px; + margin: 10px 0 10px 0; + overflow: auto; + font-family: "Andale Mono", monospace; +} + +pre.example { + font-size: .85em; +} + +table.index { border: 1px #00007f; } +table.index td { text-align: left; vertical-align: top; } + +#container { + margin-left: 1em; + margin-right: 1em; + background-color: #f0f0f0; +} + +#product { + text-align: center; + border-bottom: 1px solid #cccccc; + background-color: #ffffff; +} + +#product big { + font-size: 2em; +} + +#main { + background-color: #f0f0f0; + border-left: 2px solid #cccccc; +} + +#navigation { + float: left; + width: 14em; + vertical-align: top; + background-color: #f0f0f0; + overflow: visible; +} + +#navigation h2 { + background-color:#e7e7e7; + font-size:1.1em; + color:#000000; + text-align: left; + padding:0.2em; + border-top:1px solid #dddddd; + border-bottom:1px solid #dddddd; +} + +#navigation ul +{ + font-size:1em; + list-style-type: none; + margin: 1px 1px 10px 1px; +} + +#navigation li { + text-indent: -1em; + display: block; + margin: 3px 0px 0px 22px; +} + +#navigation li li a { + margin: 0px 3px 0px -1em; +} + +#content { + margin-left: 14em; + padding: 1em; + width: 700px; + border-left: 2px solid #cccccc; + border-right: 2px solid #cccccc; + background-color: #ffffff; +} + +#about { + clear: both; + padding: 5px; + border-top: 2px solid #cccccc; + background-color: #ffffff; +} + +@media print { + body { + font: 12pt "Times New Roman", "TimeNR", Times, serif; + } + a { font-weight: bold; color: #004080; text-decoration: underline; } + + #main { + background-color: #ffffff; + border-left: 0px; + } + + #container { + margin-left: 2%; + margin-right: 2%; + background-color: #ffffff; + } + + #content { + padding: 1em; + background-color: #ffffff; + } + + #navigation { + display: none; + } + pre.example { + font-family: "Andale Mono", monospace; + font-size: 10pt; + page-break-inside: avoid; + } +} + +table.module_list { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.module_list td { + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.module_list td.name { background-color: #f0f0f0; min-width: 200px; } +table.module_list td.summary { width: 100%; } + + +table.function_list { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + border-collapse: collapse; +} +table.function_list td { + border-width: 1px; + padding: 3px; + border-style: solid; + border-color: #cccccc; +} +table.function_list td.name { background-color: #f0f0f0; min-width: 200px; } +table.function_list td.summary { width: 100%; } + +ul.nowrap { + overflow:auto; + white-space:nowrap; +} + +dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} +dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} +dl.table h3, dl.function h3 {font-size: .95em;} + +/* stop sublists from having initial vertical space */ +ul ul { margin-top: 0px; } +ol ul { margin-top: 0px; } +ol ol { margin-top: 0px; } +ul ol { margin-top: 0px; } + +/* make the target distinct; helps when we're navigating to a function */ +a:target + * { + background-color: #FF9; +} + + +/* styles for prettification of source */ +pre .comment { color: #558817; } +pre .constant { color: #a8660d; } +pre .escape { color: #844631; } +pre .keyword { color: #aa5050; font-weight: bold; } +pre .library { color: #0e7c6b; } +pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; } +pre .string { color: #8080ff; } +pre .number { color: #f8660d; } +pre .operator { color: #2239a8; font-weight: bold; } +pre .preprocessor, pre .prepro { color: #a33243; } +pre .global { color: #800080; } +pre .user-keyword { color: #800080; } +pre .prompt { color: #558817; } +pre .url { color: #272fc2; text-decoration: underline; } + diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..914be6d --- /dev/null +++ b/init.lua @@ -0,0 +1,168 @@ +--- Provides functionality to share tags across all screens in awesome WM. +-- @module sharedtags +-- @author Albert Diserholt +-- @copyright 2016 Albert Diserholt +-- @license MIT + +-- Grab environment we need +local awful = require("awful") +local capi = { + tag = tag, + screen = screen, + mouse = mouse +} + +local sharedtags = { + _VERSION = "sharedtags v1.0.0", + _DESCRIPTION = "Share tags for awesome window manager", + _URL = "https://github.com/Drauthius/awesome-sharedtags", + _LICENSE = [[ + MIT LICENSE + + Copyright (c) 2016 Albert Diserholt + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + ]] +} + +--- Create new tag objects. +-- The first tag defined for each screen will be automatically selected. +-- @tparam table def A list of tables with the optional keys `name`, `layout` +-- and `screen`. The `name` value is used to name the tag and defaults to the +-- list index. The `layout` value sets the starting layout for the tag and +-- defaults to the first layout. The `screen` value sets the starting screen +-- for the tag and defaults to the first screen. The tags will be sorted in this +-- order in the default taglist. +-- @treturn table A list of all created tags. +-- @usage local tags = sharedtags( +-- -- "main" is the first tag starting on screen 2 with the tile layout. +-- { name = "main", layout = awful.layout.suit.tile, screen = 2 }, +-- -- "www" is the second tag on screen 1 with the floating layout. +-- { name = "www" }, +-- -- Third tag is named "3" on screen 1 with the floating layout. +-- {}) +function sharedtags.new(def) + local tags = {} + + for i,t in ipairs(def) do + tags[i] = awful.tag.add(t.name or i, { + screen = math.min(capi.screen.count(), t.screen or 1), + layout = t.layout, + sharedtagindex = i + }) + + -- If no tag is selected for this screen, then select this one. + if not awful.tag.selected(awful.tag.getscreen(tags[i])) then + awful.tag.viewonly(tags[i]) -- Updates the history as well. + end + end + + return tags +end + +--- Move the specified tag to a new screen, if necessary. +-- @param tag The tag to move. +-- @tparam[opt=capi.mouse.screen] number screen The screen to move the tag to. +-- @treturn bool Whether the tag was moved. +function sharedtags.movetag(tag, screen) + screen = screen or capi.mouse.screen + local oldscreen = awful.tag.getscreen(tag) + + -- If the specified tag is allocated to another screen, we need to move it. + if oldscreen ~= screen then + local oldsel = awful.tag.selected(oldscreen) + + -- This works around a bug in the taglist module. It only receives + -- signals for when a tag or client changes something. Moving a tag + -- with no clients doesn't trigger a signal, and can thus leave the + -- taglist outdated. The work around is to hide the tag prior to the + -- move, and then restore its hidden status. + local hide = awful.tag.getproperty(tag, "hide") + awful.tag.setproperty(tag, "hide", true) + + awful.tag.setscreen(tag, screen) + + awful.tag.setproperty(tag, "hide", hide) + + if oldsel == tag then + -- The tag has been moved away. In most cases the tag history + -- function will find the best match, but if we really want we can + -- try to find a fallback tag as well. + if not awful.tag.selected(oldscreen) then + local newtag = awful.tag.find_fallback(oldscreen) + if newtag then + awful.tag.viewonly(newtag) + else + end + end + else + -- A bit of a weird one. Moving a previously selected tag + -- deselects the current tag, probably because the history is + -- restored to the first entry. Restoring it to the previous entry + -- seems to work well enough. + awful.tag.history.restore(oldscreen, "previous") + end + + -- Also sort the tag in the taglist, by reapplying the index. This is just a nicety. + for _,screen in ipairs({ screen, oldscreen }) do + for _,t in ipairs(awful.tag.gettags(screen)) do + awful.tag.setproperty(t, "index", awful.tag.getproperty(t, "sharedtagindex")) + end + end + + return true + end + + return false +end + +--- View the specified tag on the specified screen. +-- @param tag The only tag to view. +-- @tparam[opt=capi.mouse.screen] number screen The screen to view the tag on. +function sharedtags.viewonly(tag, screen) + sharedtags.movetag(tag, screen) + awful.tag.viewonly(tag) +end + +--- Toggle the specified tag on the specified screen. +-- The tag will be selected if the screen changes, and toggled if it does not +-- change the screen. +-- @param tag The tag to toggle. +-- @tparam[opt=capi.mouse.screen] number screen The screen to toggle the tag on. +function sharedtags.viewtoggle(tag, screen) + local oldscreen = awful.tag.getscreen(tag) + + if sharedtags.movetag(tag, screen) then + -- Always mark the tag selected if the screen moved. Just feels a lot + -- more natural. + tag.selected = true + -- Update the history on the old and new screens. + capi.screen[oldscreen]:emit_signal("tag::history::update") + capi.screen[awful.tag.getscreen(tag)]:emit_signal("tag::history::update") + else + -- Only toggle the tag unless the screen moved. + awful.tag.viewtoggle(tag) + end +end + +capi.tag.add_signal("property::sharedtagindex") + +return setmetatable(sharedtags, { __call = function(...) return sharedtags.new(select(2, ...)) end }) + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/rc.lua.patch b/rc.lua.patch new file mode 100644 index 0000000..0174e8c --- /dev/null +++ b/rc.lua.patch @@ -0,0 +1,96 @@ +This patch adds the necessary changes to create and manage tags shareable on +all screens when using the awesome window manager. + +The library and all relevant documentation can be found at +https://github.com/Drauthius/awesome-sharedtags + +--- orig/rc.lua 2016-01-01 13:45:26.000000000 +0100 ++++ sharedtags/rc.lua 2016-01-05 20:09:21.428836239 +0100 +@@ -36,6 +36,11 @@ + end + -- }}} + ++-- {{{ Local extensions ++local sharedtags = require("sharedtags") ++-- }}} ++ ++ + -- {{{ Variable definitions + -- Themes define colours, icons, font and wallpapers. + beautiful.init("/usr/share/awesome/themes/default/theme.lua") +@@ -79,12 +84,16 @@ + -- }}} + + -- {{{ Tags +--- Define a tag table which hold all screen tags. +-tags = {} +-for s = 1, screen.count() do +- -- Each screen has its own tag table. +- tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) +-end ++-- Define a tag table shared among all screens. ++local tags = sharedtags({ ++ { name = "main", layout = layouts[2] }, ++ { name = "www", layout = layouts[10] }, ++ { name = "chat", screen = 2, layout = layouts[1] }, ++ { name = "game", layout = layouts[1] }, ++ { layout = layouts[2] }, ++ { layout = layouts[2] }, ++ { screen = 2, layout = layouts[2] } ++}) + -- }}} + + -- {{{ Menu +@@ -302,26 +311,24 @@ + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () +- local screen = mouse.screen +- local tag = awful.tag.gettags(screen)[i] ++ local tag = tags[i] + if tag then +- awful.tag.viewonly(tag) ++ sharedtags.viewonly(tag) + end + end), + -- Toggle tag. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () +- local screen = mouse.screen +- local tag = awful.tag.gettags(screen)[i] ++ local tag = tags[i] + if tag then +- awful.tag.viewtoggle(tag) ++ sharedtags.viewtoggle(tag) + end + end), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then +- local tag = awful.tag.gettags(client.focus.screen)[i] ++ local tag = tags[i] + if tag then + awful.client.movetotag(tag) + end +@@ -331,7 +338,7 @@ + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then +- local tag = awful.tag.gettags(client.focus.screen)[i] ++ local tag = tags[i] + if tag then + awful.client.toggletag(tag) + end +@@ -365,9 +372,9 @@ + properties = { floating = true } }, + { rule = { class = "gimp" }, + properties = { floating = true } }, +- -- Set Firefox to always map on tags number 2 of screen 1. ++ -- Set Firefox to always map on tag number 2. + -- { rule = { class = "Firefox" }, +- -- properties = { tag = tags[1][2] } }, ++ -- properties = { tag = tags[2] } }, + } + -- }}} +