From 0aa70b4b80029467059117fad792775482c40580 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Fri, 17 May 2013 01:21:04 -0400 Subject: [PATCH] Address issue #13: Add 'selected' option --- README.md | 4 +++- example.rc.lua | 1 + init.lua | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36d3ead..d5676aa 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ Then edit this section to fit your needs. That available tag properties are: * clone_on * class * exec_once +* selected The available client properties are: * floating @@ -154,4 +155,5 @@ The available client properties are: * maximized_vertical * sticky * focusable -* skip_taskbar \ No newline at end of file +* skip_taskbar + diff --git a/example.rc.lua b/example.rc.lua index 8c909d9..88e4549 100644 --- a/example.rc.lua +++ b/example.rc.lua @@ -84,6 +84,7 @@ tyrannical.tags = { exclusive = true, -- Refuse any other type of clients (by classes) screen = {1,2}, -- Create this tag on screen 1 and screen 2 layout = awful.layout.suit.tile, -- Use the tile layout + selected = true, class = { --Accept the following classes, refuse everything else (because of "exclusive=true") "xterm" , "urxvt" , "aterm","URxvt","XTerm","konsole","terminator","gnome-terminal" } diff --git a/init.lua b/init.lua index 8343fd7..da2a537 100644 --- a/init.lua +++ b/init.lua @@ -197,6 +197,7 @@ awful.tag.add,awful.tag._setscreen = function(tag,props) local t3 = awful.tag._add(tag,{screen = awful.tag.getproperty(t,"clone_on"), clone_of = t,icon=awful.tag.geticon(t)}) --TODO prevent clients from being added to the clone end + t.selected = props.selected or false t:connect_signal("property::selected", function(t) on_selected_change(t,props or {}) end) return t end,awful.tag.setscreen