summaryrefslogtreecommitdiffhomepage
path: root/src/Sway.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Sway.hs')
-rw-r--r--src/Sway.hs42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/Sway.hs b/src/Sway.hs
index 44be8b5..4c197ab 100644
--- a/src/Sway.hs
+++ b/src/Sway.hs
@@ -4,18 +4,15 @@ import Monitors
memoratio = Memory ["-t","<usedratio>%", "-p", "2", "-W", "3"] 20
-topProcL p = TopProc (p <~> ["-t"
- , memTemp
- ++ " · <mboth1> <mboth2> <mboth3> <mboth4>"
- , "-w", "12", "-L" , "10", "-H", "80"]) 15
- where memTemp = if pIsLight p
- then "<both1> <both2> <both3> <both4>"
- else "<both1> <both2> <both3>"
+topProcL p = TopProc (p <~> args) 15
+ where template = "<both1> <both2> <both3> <both4> "
+ ++ "· <mboth1> <mboth2> <mboth3> <mboth4>"
+ args = ["-t", template, "-w", "12", "-L" , "10", "-H", "80"]
diskIOS p = DiskIO [("/", "<total>"), ("/home", "<total>")] (diskArgs p) 10
mpd a p i = MPDX [ "-W", "12", "-t", "<statei> <remaining>"
- , "--", "-p", p, "-P", "\xf144", "-Z",fni i, "-S", fni i] 20 a
+ , "--", "-p", p, "-P", "\xf144", "-Z", fni i, "-S", fni i] 20 a
mpdMon = mpd "mpd" "6600" "🎶"
@@ -25,19 +22,27 @@ mprisx client width =
, "-E", "…", "-M", "100", "-x", ""] 40
+nmmail = NotmuchMail "mail" [MailItem "" "" "tag:new"] 100
+
config p = (baseConfig p) {
position = TopSize C 100 (defaultHeight - 1)
, textOutput = True
, textOutputFormat = Swaybar
, font = "Source Code Pro Medium 9"
- , additionalFonts = []
+ , additionalFonts = [ "xft:Symbola 9"
+ , "xft:Symbola 10"
+ , "xft:Symbola 11"
+ , "xft:Symbola 11"
+ , "xft:DejaVu Sans Mono 9"
+ , "xft:FontAwesome 10"
+ , "xft:FontAwesome 9"]
, bgColor = "#ffffffc0"
, fgColor = "#000000"
, border = FullB
, commands = [ Run (topProcL p)
, Run (iconBatt p)
, Run mpdMon
- , if pIsLight p then Run (cpu p) else Run (cpuBars p)
+ , Run (cpu p)
, Run memoratio
, Run (diskU p)
, Run (diskIOS p)
@@ -53,29 +58,30 @@ config p = (baseConfig p) {
, Run laTime
, Run localTime
, Run w -- LEGE, LEBL, KCV0
--- , Run (mprisx "playerctld" 20)
+ , Run (PipeReader ":/tmp/emacs.status" "estat")
+ , Run nmmail
]
- , template = "" -- " |mpris2| "
+ , template = fc "#a0522d" "|mail| |estat|"
++ " |batt0| "
- ++ dimi "\xf26c" ++ " |bright| "
++ "<action=`toggle-app.sh nm-applet --indicator`>"
++ " |wg-mullvad||tun0||wlp164s0wi|"
++ "</action>"
++ " |dynnetwork| "
++ "<action=`toggle-app.sh pavucontrol`>"
- ++ " |default:Master| " ++ dimi "\xf130" ++ " |default:Capture|"
+ ++ " |default:Master| "
+ ++ fn 7 "\xf130" ++ " |default:Capture|"
++ "</action> "
++ "|mpd|"
- ++ " |EGPH| "
+ ++ " |EGPH| "
++ " {} <hspace=3/>"
++ "|multicpu| "
++ "|multicoretemp| "
- ++ " |top| "
- ++ " " ++ "☸" ++ " |memory| "
+ ++ " |top| "
+ ++ fni "☸" ++ " |memory| "
++ " |diskio| |disku| "
++ " |datetime| "
++ " |laTime| "
- } where dimi = fc (pDim p) . fni
+ } where dimi = fc (pDim p)
w = weather' "<skyConditionS> <tempC>° <weather>" "EGPH" p
main :: IO ()