forked from colonelpanic/dotfiles
[taffybar] Add battery widget
This commit is contained in:
parent
473d6efdf9
commit
a25d555bd0
@ -7,22 +7,40 @@
|
|||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.IconContainer {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.IconContainer.Active {
|
.IconContainer.Active {
|
||||||
background-color: @taffybar_highlight_color;
|
background-color: @taffybar_highlight_color;
|
||||||
border-radius: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.IconContainer.Minimized {
|
.IconContainer.Minimized {
|
||||||
opacity: .3;
|
opacity: .3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Active.Container {
|
.IconContainer.Urgent {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Active.Container, .Visible.Container {
|
||||||
background-color: @taffybar_bg_tone;
|
background-color: @taffybar_bg_tone;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Taffybar {
|
.Taffybar {
|
||||||
background-color: @taffybar_bg_color;
|
background-color: @taffybar_bg_color;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Taffybar * {
|
||||||
|
font-family: "Fira Sans", sans-serif;
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Taffybar .Container * {
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-size: 16pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#WindowSwitcher {
|
#WindowSwitcher {
|
||||||
|
@ -20,6 +20,7 @@ import System.Information.Memory
|
|||||||
import System.Information.X11DesktopInfo
|
import System.Information.X11DesktopInfo
|
||||||
import System.Process
|
import System.Process
|
||||||
import System.Taffybar
|
import System.Taffybar
|
||||||
|
import System.Taffybar.Battery
|
||||||
import System.Taffybar.IconImages
|
import System.Taffybar.IconImages
|
||||||
import System.Taffybar.LayoutSwitcher
|
import System.Taffybar.LayoutSwitcher
|
||||||
import System.Taffybar.MPRIS2
|
import System.Taffybar.MPRIS2
|
||||||
@ -136,10 +137,10 @@ main = do
|
|||||||
getWorkspacePixBuf size Workspace {workspaceIdx = WSIdx wsId} =
|
getWorkspacePixBuf size Workspace {workspaceIdx = WSIdx wsId} =
|
||||||
pixBufFromFile size . inHighContrastDirectory <$>
|
pixBufFromFile size . inHighContrastDirectory <$>
|
||||||
case wsId + 1 of
|
case wsId + 1 of
|
||||||
1 -> Just $ "apps" </> "utilities-terminal.png"
|
-- 1 -> Just $ "apps" </> "utilities-terminal.png"
|
||||||
2 -> Just $ "emblems" </> "emblem-documents.png"
|
-- 2 -> Just $ "emblems" </> "emblem-documents.png"
|
||||||
3 -> Just $ "actions" </> "bookmark-add.png"
|
-- 3 -> Just $ "actions" </> "bookmark-add.png"
|
||||||
4 -> Just $ "devices" </> "video-display.png"
|
-- 4 -> Just $ "devices" </> "video-display.png"
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
buildConstantIconController :: ControllerConstructor
|
buildConstantIconController :: ControllerConstructor
|
||||||
buildConstantIconController ws = do
|
buildConstantIconController ws = do
|
||||||
@ -210,9 +211,10 @@ main = do
|
|||||||
wnd = makeUnderline (windowSwitcherNew pgr) "teal"
|
wnd = makeUnderline (windowSwitcherNew pgr) "teal"
|
||||||
taffyConfig =
|
taffyConfig =
|
||||||
defaultTaffybarConfig
|
defaultTaffybarConfig
|
||||||
{ startWidgets = [hud, los, wnd]
|
{ startWidgets = [los, hud, wnd]
|
||||||
, endWidgets =
|
, endWidgets =
|
||||||
[ makeUnderline clock "teal"
|
[ batteryBarNew defaultBatteryConfig 1.0
|
||||||
|
, makeUnderline clock "teal"
|
||||||
, makeUnderline systrayNew "yellow"
|
, makeUnderline systrayNew "yellow"
|
||||||
, makeUnderline mem "blue"
|
, makeUnderline mem "blue"
|
||||||
, makeUnderline cpu "green"
|
, makeUnderline cpu "green"
|
||||||
|
Loading…
Reference in New Issue
Block a user