forked from colonelpanic/dotfiles
[taffybar] Adapt to rewrites, renames and module moves
This commit is contained in:
parent
abbbe8721c
commit
b22a79ecb1
@ -1 +1 @@
|
||||
Subproject commit 1e0b575e6b8ca58ff5f3ecf44f6d9951761520ea
|
||||
Subproject commit b1ad055db7f224a23994485fd91d47c451a49a10
|
@ -2,7 +2,7 @@
|
||||
@define-color bg-tone #1E1E20;
|
||||
@define-color active-window-color #374140;
|
||||
@define-color urgent-window-color #D9CB9E;
|
||||
@define-color font-color #D9CB9E;
|
||||
@define-color font-color #FFFFFF;
|
||||
|
||||
.Contents {
|
||||
border-radius: 5px;
|
||||
@ -10,7 +10,8 @@
|
||||
}
|
||||
|
||||
.Active .Contents, .Visible .Contents {
|
||||
background-color: @bg-tone;
|
||||
background-color: #000000;
|
||||
transition: background-color 1s;
|
||||
}
|
||||
|
||||
.InnerPad {
|
||||
@ -49,8 +50,9 @@
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.WindowSwitcher * {
|
||||
background-color: @bg-color;
|
||||
.Windows * {
|
||||
color: @bg-color;
|
||||
border-color: @bg-color;
|
||||
}
|
||||
|
||||
.TrayContainer {
|
||||
@ -68,13 +70,8 @@
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.Taffybar {
|
||||
background-color: @bg-color;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.Taffybar * {
|
||||
font-family: "Fira Sans", sans-serif;
|
||||
font-size: 10pt;
|
||||
font-size: 12pt;
|
||||
color: @font-color;
|
||||
}
|
||||
|
@ -26,26 +26,20 @@ import System.Environment
|
||||
import System.FilePath.Posix
|
||||
import System.Glib.GObject
|
||||
import System.IO
|
||||
import System.Information.CPU
|
||||
import System.Information.EWMHDesktopInfo
|
||||
import System.Information.Memory
|
||||
import System.Information.X11DesktopInfo
|
||||
import System.Log.Handler.Simple
|
||||
import System.Log.Logger
|
||||
import System.Process
|
||||
import System.Taffybar
|
||||
import System.Taffybar.Battery
|
||||
import System.Taffybar.IconImages
|
||||
import System.Taffybar.LayoutSwitcher
|
||||
import System.Taffybar.MPRIS2
|
||||
import System.Taffybar.NetMonitor
|
||||
import System.Taffybar.SNITray
|
||||
import System.Taffybar.SimpleClock
|
||||
import System.Taffybar.SimpleConfig
|
||||
import System.Taffybar.DBus.Toggle
|
||||
import System.Taffybar.Widgets.PollingGraph
|
||||
import System.Taffybar.WindowSwitcher
|
||||
import System.Taffybar.Workspaces
|
||||
import System.Taffybar.IconImages
|
||||
import System.Taffybar.Information.CPU
|
||||
import System.Taffybar.Information.EWMHDesktopInfo
|
||||
import System.Taffybar.Information.Memory
|
||||
import System.Taffybar.Information.X11DesktopInfo
|
||||
import System.Taffybar.SimpleConfig
|
||||
import System.Taffybar.Widgets
|
||||
import System.Taffybar.Widgets.Generic.PollingGraph
|
||||
import System.Taffybar.Widgets.Workspaces
|
||||
import Text.Printf
|
||||
import Text.Read hiding (lift)
|
||||
import Unsafe.Coerce
|
||||
@ -218,23 +212,19 @@ main = do
|
||||
-- ]
|
||||
, showWorkspaceFn = hideEmpty
|
||||
, updateRateLimitMicroseconds = 100000
|
||||
, debugMode = False
|
||||
, labelSetter = workspaceNamesLabelSetter
|
||||
}
|
||||
netMonitor = netMonitorMultiNew 1.5 interfaceNames
|
||||
-- pgr <- pagerNew pagerConfig
|
||||
-- tray2 <- movableWidget tray
|
||||
let workspaces = workspacesNew myWorkspacesConfig
|
||||
los = layoutSwitcherNew defaultLayoutSwitcherConfig
|
||||
wnd = windowSwitcherNew defaultWindowSwitcherConfig
|
||||
simpleTaffyConfig =
|
||||
defaultSimpleTaffyConfig
|
||||
{ startWidgets = [workspaces, los, addClass "WindowSwitcher" wnd]
|
||||
baseConfig = defaultSimpleTaffyConfig
|
||||
{ startWidgets =
|
||||
[ workspaces
|
||||
, makeContents los "Layout"
|
||||
, makeContents wnd "Windows"
|
||||
]
|
||||
, endWidgets =
|
||||
[ batteryBarNewWithFormat defaultBatteryConfig "$percentage$% ($time$) - $status$" 1.0
|
||||
, makeContents buildSNITray "Cpu"
|
||||
, makeContents sniTrayNew "Cpu"
|
||||
, makeContents clock "Cpu"
|
||||
-- , makeContents systrayNew "Cpu"
|
||||
, makeContents cpu "Cpu"
|
||||
, makeContents mem "Cpu"
|
||||
, makeContents netMonitor "Cpu"
|
||||
@ -245,6 +235,15 @@ main = do
|
||||
, barHeight = (underlineHeight myWorkspacesConfig + windowIconSize myWorkspacesConfig + 15)
|
||||
, widgetSpacing = 0
|
||||
}
|
||||
workspaces = workspacesNew myWorkspacesConfig
|
||||
los = layoutNew defaultLayoutConfig
|
||||
wnd = windowsNew defaultWindowsConfig
|
||||
simpleTaffyConfig =
|
||||
baseConfig
|
||||
-- { startWidgets = [workspaces]
|
||||
-- , centerWidgets = [makeContents (addClass "Window" wnd) "Cpu"]
|
||||
-- , endWidgets = [makeContents los "Cpu"]
|
||||
-- }
|
||||
dyreTaffybar $ handleDBusToggles $ toTaffyConfig simpleTaffyConfig
|
||||
|
||||
-- Local Variables:
|
||||
|
Loading…
Reference in New Issue
Block a user