forked from colonelpanic/dotfiles
[taffybar] Update CSS for workspace auto size image
This commit is contained in:
parent
4d9ea9acbe
commit
8d8120fbda
@ -4,40 +4,26 @@
|
|||||||
@define-color urgent-window-color #D9CB9E;
|
@define-color urgent-window-color #D9CB9E;
|
||||||
@define-color font-color #FFFFFF;
|
@define-color font-color #FFFFFF;
|
||||||
|
|
||||||
.Contents {
|
|
||||||
padding-bottom: 2px;
|
|
||||||
padding-top: 2px;
|
|
||||||
padding-right: 2px;
|
|
||||||
padding-left: 2px;
|
|
||||||
transition: border-color .5s, background-color .5s;
|
|
||||||
border-radius: 5px;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
border-color: rgba(1.0, 1.0, 1.0, 0.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Active .Contents, .Visible .Contents {
|
|
||||||
background-color: rgba(0.0, 0.0, 0.0, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.Contents {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.InnerPad {
|
.InnerPad {
|
||||||
padding-bottom: 12px;
|
|
||||||
padding-top: 12px;
|
|
||||||
padding-left: 4px;
|
|
||||||
padding-right: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Workspaces .InnerPad {
|
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Contents {
|
||||||
|
padding-bottom: 4px;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-right: 2px;
|
||||||
|
padding-left: 2px;
|
||||||
|
transition: background-color .5s;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Active .Contents, .Visible .Contents {
|
||||||
|
background-color: rgba(0.0, 0.0, 0.0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
.WorkspaceLabel {
|
.WorkspaceLabel {
|
||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
@ -98,6 +84,8 @@
|
|||||||
.IconImage {
|
.IconImage {
|
||||||
transition: opacity .5s, background-color .5s;
|
transition: opacity .5s, background-color .5s;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
padding-bottom: 1px;
|
||||||
|
padding-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.IconContainer {
|
.IconContainer {
|
||||||
@ -112,7 +100,7 @@
|
|||||||
/* background-color: rgba(255, 255, 255, 0.3); */
|
/* background-color: rgba(255, 255, 255, 0.3); */
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
box-shadow: inset 0 -2px #FFFFFF;
|
box-shadow: inset 0 -1px #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.IconContainer.Urgent {
|
.IconContainer.Urgent {
|
||||||
|
@ -53,6 +53,13 @@ import Text.Printf
|
|||||||
import Text.Read hiding (lift)
|
import Text.Read hiding (lift)
|
||||||
import Unsafe.Coerce
|
import Unsafe.Coerce
|
||||||
|
|
||||||
|
buildContentsBox widget = liftIO $ do
|
||||||
|
contents <- Gtk.hBoxNew False 0
|
||||||
|
Gtk.containerAdd contents widget
|
||||||
|
_ <- widgetSetClass contents "Contents"
|
||||||
|
Gtk.widgetShowAll contents
|
||||||
|
buildPadBox contents
|
||||||
|
|
||||||
setMinWidth width widget = liftIO $ do
|
setMinWidth width widget = liftIO $ do
|
||||||
Gtk.widgetSetSizeRequest widget width (-1)
|
Gtk.widgetSetSizeRequest widget width (-1)
|
||||||
return widget
|
return widget
|
||||||
@ -157,11 +164,8 @@ main = do
|
|||||||
workspaces = workspacesNew myWorkspacesConfig
|
workspaces = workspacesNew myWorkspacesConfig
|
||||||
baseConfig = defaultSimpleTaffyConfig
|
baseConfig = defaultSimpleTaffyConfig
|
||||||
{ startWidgets =
|
{ startWidgets =
|
||||||
[ flip widgetSetClass "Workspaces" =<< workspaces
|
workspaces : map (>>= buildContentsBox) [ layout, windows ]
|
||||||
, layout >>= buildPadBox
|
, endWidgets = map (>>= buildContentsBox)
|
||||||
, windows >>= buildPadBox
|
|
||||||
]
|
|
||||||
, endWidgets = map (>>= buildPadBox)
|
|
||||||
[ textClockNew Nothing "%a %b %_d %r" 1
|
[ textClockNew Nothing "%a %b %_d %r" 1
|
||||||
, textBatteryNew "$percentage$% ($time$)"
|
, textBatteryNew "$percentage$% ($time$)"
|
||||||
, batteryIconNew
|
, batteryIconNew
|
||||||
|
Loading…
Reference in New Issue
Block a user