From 0c2327295c7f4509e7505d4be1bfab0354f13463 Mon Sep 17 00:00:00 2001 From: anakha Date: Tue, 13 Jul 2021 14:44:01 -0400 Subject: [PATCH] tag client.focus --- README.md | 1 + geoms.lua | 1 + helpers.lua | 4 ---- init.lua | 9 +++++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3db17f..7ffa465 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ We now have tabs for tiled clients :) ### Next? - [ ] Better keybindings (possibly emacs style, or vim style): an xcape key can be used to to initiate awm layer and enter can exit from it. +- [X] Tags must always have a focused window. Added tag.selected signal. - [X] Clickable tabs - [X] Close tabs. (right click) - [X] Allow detaching from floating tabs. (double click) diff --git a/geoms.lua b/geoms.lua index 6b58d03..1f8a108 100644 --- a/geoms.lua +++ b/geoms.lua @@ -72,6 +72,7 @@ end geoms.clients = {} geoms.clients["Subl"] = geoms.p1280 +geoms.clients["Cudatext"] = geoms.crt43 geoms.clients["Byobu"] = geoms.p720 geoms.clients["Krom"] = geoms.crt43 geoms.clients["Google-chrome"] = geoms.crt43 diff --git a/helpers.lua b/helpers.lua index 759be8b..72a849c 100644 --- a/helpers.lua +++ b/helpers.lua @@ -33,7 +33,6 @@ end --| --|global_client_index. keeping it here for historical --|reasons in case we need this again. - local function clear_tabbar(c, position) if not c then return end local position = position or "bottom" @@ -43,7 +42,6 @@ local function clear_tabbar(c, position) } end --|clears bottom tabbar - local function reload(m) if package.loaded[m] then local attrs = {} @@ -61,7 +59,6 @@ local function reload(m) return temp_module end - local function getlowest(table) local low = math.huge local index @@ -74,7 +71,6 @@ local function getlowest(table) return index end - local function compare(a,b) return a.v < b.v end diff --git a/init.lua b/init.lua index b748ba7..05f3826 100644 --- a/init.lua +++ b/init.lua @@ -126,6 +126,15 @@ local bindings = { --------------------------------------------------------------- signals -- ; +tag.connect_signal("property::selected", function(t) + if client.focus == nil then + local s = awful.screen.focused() + client.focus = awful.client.focus.history.get(s, 0) + end +end) --|ensure there is always a selected client during tag + --|switching or logins + + client.connect_signal("manage", function(c) c.maximized = false c.maximized_horizontal = false