taffybar: add tiny jay-lenovo profile

This commit is contained in:
2026-06-01 00:13:23 -07:00
parent 4cc6bee526
commit 38a696cff2
3 changed files with 92 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ module TaffybarConfig.Config
) )
where where
import TaffybarConfig.Host (compactBarHosts, smallBarHosts) import TaffybarConfig.Host (compactBarHosts, smallBarHosts, tinyBarHosts)
import TaffybarConfig.Widgets (clockWidget, endWidgetsForHost, startWidgetsForHostAndBackend) import TaffybarConfig.Widgets (clockWidget, endWidgetsForHost, startWidgetsForHostAndBackend)
import System.Taffybar.Context (Backend) import System.Taffybar.Context (Backend)
import System.Taffybar.SimpleConfig import System.Taffybar.SimpleConfig
@@ -18,18 +18,24 @@ mkSimpleTaffyConfig hostName backend cssFiles =
barPosition = Top, barPosition = Top,
widgetSpacing = 0, widgetSpacing = 0,
barPadding = barPadding =
if hostName `elem` smallBarHosts if hostName `elem` tinyBarHosts
then 1 then 0
else else
if hostName `elem` compactBarHosts if hostName `elem` smallBarHosts
then 2 then 1
else 4, else
if hostName `elem` compactBarHosts
then 2
else 4,
barHeight = barHeight =
if hostName `elem` smallBarHosts if hostName `elem` tinyBarHosts
then ScreenRatio $ 1 / 48 then ScreenRatio $ 1 / 90
else else
if hostName `elem` compactBarHosts if hostName `elem` smallBarHosts
then ScreenRatio $ 1 / 40 then ScreenRatio $ 1 / 72
else ScreenRatio $ 1 / 33, else
if hostName `elem` compactBarHosts
then ScreenRatio $ 1 / 60
else ScreenRatio $ 2 / 99,
cssPaths = cssFiles cssPaths = cssFiles
} }

View File

@@ -3,6 +3,7 @@ module TaffybarConfig.Host
cssFilesForHost, cssFilesForHost,
laptopHosts, laptopHosts,
smallBarHosts, smallBarHosts,
tinyBarHosts,
) )
where where
@@ -16,7 +17,8 @@ defaultCssFiles = ["taffybar.css"]
cssFilesByHostname :: [(String, [FilePath])] cssFilesByHostname :: [(String, [FilePath])]
cssFilesByHostname = cssFilesByHostname =
[ ("ryzen-shine", ["ryzen-shine.css"]), [ ("jay-lenovo", ["jay-lenovo.css"]),
("ryzen-shine", ["ryzen-shine.css"]),
("strixi-minaj", ["strixi-minaj.css"]) ("strixi-minaj", ["strixi-minaj.css"])
] ]
@@ -28,6 +30,10 @@ smallBarHosts :: [String]
smallBarHosts = smallBarHosts =
["strixi-minaj"] ["strixi-minaj"]
tinyBarHosts :: [String]
tinyBarHosts =
["jay-lenovo"]
laptopHosts :: [String] laptopHosts :: [String]
laptopHosts = laptopHosts =
[ "adell", [ "adell",

View File

@@ -0,0 +1,68 @@
@import url("taffybar.css");
/* Host-specific density tweak for jay-lenovo. */
.taffy-box {
font-size: 8.5pt;
border-radius: 7px;
}
.outer-pad,
.workspaces .outer-pad {
border-radius: 7px;
margin: 2px 3px;
}
.inner-pad,
.workspaces .inner-pad {
border-radius: 6px;
padding-top: 0px;
padding-bottom: 0px;
}
.inner-pad {
padding-left: 8px;
padding-right: 8px;
}
.workspaces .inner-pad {
padding-left: 8px;
padding-right: 2px;
}
.workspaces .contents {
border-radius: 6px;
padding: 0px 2px;
}
.workspace-label {
font-size: 8pt;
}
.workspaces .overlay-box .workspace-label {
padding: 0px 3px 3px 9px;
}
.visible .contents,
.workspaces .window-icon-container,
.workspaces .window-icon-container.active {
padding-top: 0px;
padding-bottom: 0px;
}
.auto-size-image,
.sni-tray {
padding-top: 0px;
padding-bottom: 0px;
}
.icon-label > .icon,
.usage-section.icon-label > .icon,
.ram-swap .icon-label > .icon {
padding-right: 6px;
min-width: 18px;
}
.sun-lock .wlsunset,
.sun-lock .screen-lock {
padding: 0px 3px;
}