summaryrefslogtreecommitdiff
path: root/scripts/focus.py
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-28 05:00:39 +0000
committerDana Jansens <danakj@orodu.net>2003-01-28 05:00:39 +0000
commit5e24320bca4a0e9af721096f0bfa68ee08969bf0 (patch)
tree45bc0863ac4014bc6c201e6b4391454c7ee2beec /scripts/focus.py
parentff0f2bd335a9c4b5c3c7a30f8c183fb20b1bb247 (diff)
add margins, and limit title lengths
Diffstat (limited to 'scripts/focus.py')
-rw-r--r--scripts/focus.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/focus.py b/scripts/focus.py
index 7bbee7e6..dcbf29e4 100644
--- a/scripts/focus.py
+++ b/scripts/focus.py
@@ -176,9 +176,11 @@ def focus_next_stacked(data, forward=1):
if client and (client.desktop() == desktop and \
client.normal()):
t = client.title()
+ if len(t) > 50: # limit the length of titles
+ t = t[:24] + "..." + t[-24:]
titles.append(t)
_list_windows.append(c)
- l = font.measureString(t)
+ l = font.measureString(t) + 10 # add margin
if l > longest: longest = l
if len(titles):
for t in titles: