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 bg-tone #1E1E20;
|
||||||
@define-color active-window-color #374140;
|
@define-color active-window-color #374140;
|
||||||
@define-color urgent-window-color #D9CB9E;
|
@define-color urgent-window-color #D9CB9E;
|
||||||
@define-color font-color #D9CB9E;
|
@define-color font-color #FFFFFF;
|
||||||
|
|
||||||
.Contents {
|
.Contents {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@ -10,7 +10,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.Active .Contents, .Visible .Contents {
|
.Active .Contents, .Visible .Contents {
|
||||||
background-color: @bg-tone;
|
background-color: #000000;
|
||||||
|
transition: background-color 1s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.InnerPad {
|
.InnerPad {
|
||||||
@ -49,8 +50,9 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.WindowSwitcher * {
|
.Windows * {
|
||||||
background-color: @bg-color;
|
color: @bg-color;
|
||||||
|
border-color: @bg-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.TrayContainer {
|
.TrayContainer {
|
||||||
@ -68,13 +70,8 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Taffybar {
|
|
||||||
background-color: @bg-color;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Taffybar * {
|
.Taffybar * {
|
||||||
font-family: "Fira Sans", sans-serif;
|
font-family: "Fira Sans", sans-serif;
|
||||||
font-size: 10pt;
|
font-size: 12pt;
|
||||||
color: @font-color;
|
color: @font-color;
|
||||||
}
|
}
|
||||||
|
@ -26,26 +26,20 @@ import System.Environment
|
|||||||
import System.FilePath.Posix
|
import System.FilePath.Posix
|
||||||
import System.Glib.GObject
|
import System.Glib.GObject
|
||||||
import System.IO
|
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.Handler.Simple
|
||||||
import System.Log.Logger
|
import System.Log.Logger
|
||||||
import System.Process
|
import System.Process
|
||||||
import System.Taffybar
|
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.DBus.Toggle
|
||||||
import System.Taffybar.Widgets.PollingGraph
|
import System.Taffybar.IconImages
|
||||||
import System.Taffybar.WindowSwitcher
|
import System.Taffybar.Information.CPU
|
||||||
import System.Taffybar.Workspaces
|
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.Printf
|
||||||
import Text.Read hiding (lift)
|
import Text.Read hiding (lift)
|
||||||
import Unsafe.Coerce
|
import Unsafe.Coerce
|
||||||
@ -218,23 +212,19 @@ main = do
|
|||||||
-- ]
|
-- ]
|
||||||
, showWorkspaceFn = hideEmpty
|
, showWorkspaceFn = hideEmpty
|
||||||
, updateRateLimitMicroseconds = 100000
|
, updateRateLimitMicroseconds = 100000
|
||||||
, debugMode = False
|
|
||||||
, labelSetter = workspaceNamesLabelSetter
|
, labelSetter = workspaceNamesLabelSetter
|
||||||
}
|
}
|
||||||
netMonitor = netMonitorMultiNew 1.5 interfaceNames
|
netMonitor = netMonitorMultiNew 1.5 interfaceNames
|
||||||
-- pgr <- pagerNew pagerConfig
|
baseConfig = defaultSimpleTaffyConfig
|
||||||
-- tray2 <- movableWidget tray
|
{ startWidgets =
|
||||||
let workspaces = workspacesNew myWorkspacesConfig
|
[ workspaces
|
||||||
los = layoutSwitcherNew defaultLayoutSwitcherConfig
|
, makeContents los "Layout"
|
||||||
wnd = windowSwitcherNew defaultWindowSwitcherConfig
|
, makeContents wnd "Windows"
|
||||||
simpleTaffyConfig =
|
]
|
||||||
defaultSimpleTaffyConfig
|
|
||||||
{ startWidgets = [workspaces, los, addClass "WindowSwitcher" wnd]
|
|
||||||
, endWidgets =
|
, endWidgets =
|
||||||
[ batteryBarNewWithFormat defaultBatteryConfig "$percentage$% ($time$) - $status$" 1.0
|
[ batteryBarNewWithFormat defaultBatteryConfig "$percentage$% ($time$) - $status$" 1.0
|
||||||
, makeContents buildSNITray "Cpu"
|
, makeContents sniTrayNew "Cpu"
|
||||||
, makeContents clock "Cpu"
|
, makeContents clock "Cpu"
|
||||||
-- , makeContents systrayNew "Cpu"
|
|
||||||
, makeContents cpu "Cpu"
|
, makeContents cpu "Cpu"
|
||||||
, makeContents mem "Cpu"
|
, makeContents mem "Cpu"
|
||||||
, makeContents netMonitor "Cpu"
|
, makeContents netMonitor "Cpu"
|
||||||
@ -245,6 +235,15 @@ main = do
|
|||||||
, barHeight = (underlineHeight myWorkspacesConfig + windowIconSize myWorkspacesConfig + 15)
|
, barHeight = (underlineHeight myWorkspacesConfig + windowIconSize myWorkspacesConfig + 15)
|
||||||
, widgetSpacing = 0
|
, 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
|
dyreTaffybar $ handleDBusToggles $ toTaffyConfig simpleTaffyConfig
|
||||||
|
|
||||||
-- Local Variables:
|
-- Local Variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user