fix up truncation
This commit is contained in:
parent
509aec191a
commit
a378428744
1 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
import std/[
|
import std/[
|
||||||
os, osproc, strformat, strutils,
|
os, osproc, strformat, strutils,
|
||||||
streams, tables, net, sugar, times
|
streams, tables, net, sugar, times, unicode
|
||||||
]
|
]
|
||||||
import ./[lib, swww]
|
import ./[lib, swww]
|
||||||
import yaml, jsony
|
import yaml, jsony
|
||||||
|
@ -102,9 +102,11 @@ proc writeEwwClasses*() =
|
||||||
for id in openWorkspaces(monitors):
|
for id in openWorkspaces(monitors):
|
||||||
workspaces[id - 1].class.add " ws-button-open"
|
workspaces[id - 1].class.add " ws-button-open"
|
||||||
|
|
||||||
|
# truncate icons at 3 windows
|
||||||
for ws in workspaces.mitems:
|
for ws in workspaces.mitems:
|
||||||
if ws.icon.len > 10:
|
if ws.icon.runeLen > 3:
|
||||||
ws.icon = ws.icon[0..7] & "..."
|
ws.icon =
|
||||||
|
($(ws.icon.toRunes()[0..2]) & "+")
|
||||||
|
|
||||||
var ewwClasses =
|
var ewwClasses =
|
||||||
collect:
|
collect:
|
||||||
|
|
Loading…
Reference in a new issue