summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-02 02:33:12 +0100
committerjao <jao@gnu.org>2022-09-02 02:33:12 +0100
commit07c093c9b351466e60b93692c7d05b949bd71b0c (patch)
treef858cf4878642ee16271a25d2a0639d430bb3410 /src
parent46c04a480907a2a4a88c8f8a935b7a2b06f774b4 (diff)
downloadxmobar-config-07c093c9b351466e60b93692c7d05b949bd71b0c.tar.gz
xmobar-config-07c093c9b351466e60b93692c7d05b949bd71b0c.tar.bz2
sway tweaks
Diffstat (limited to 'src')
-rw-r--r--src/Emacs.hs11
-rw-r--r--src/Sway.hs42
2 files changed, 32 insertions, 21 deletions
diff --git a/src/Emacs.hs b/src/Emacs.hs
index d432c97..adbe13c 100644
--- a/src/Emacs.hs
+++ b/src/Emacs.hs
@@ -27,13 +27,17 @@ batt0 p =
, "-S", "Off", "-d", "0" -- , "-m", "2"
, "-L", "10", "-H", "90" -- , "-p", "2"
, "--low", pHigh p, "--normal", pNormal p, "--high", pLow p
+ , "-W", "0"
+ , "-f", "\129707\129707\129707๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹๐Ÿ”‹โœณ๏ธ"
, "--"
, "-P"
, "-a", "notify-send -u critical 'Battery running out!!!!!!'"
, "-A", "7"
- , "-i", "โœณ๏ธ"
+ , "-i", "๏ผŠ" -- "โœณ๏ธ"
, "-o", "\129707 <left> <timeleft> <watts>"
, "-O", "๐Ÿ”‹" ++ " <left> <timeleft> <watts>"
+ -- , "-o", "<leftbar> <left> <timeleft> <watts>"
+ --, "-O", "<leftbar> <left> <timeleft> <watts>"
, "-H", "10", "-L", "7"
, "-h", pHigh p, "-l", pLow p] 50 "batt0"
@@ -90,12 +94,13 @@ config p = (baseConfig p) {
, Run (weath "EGPH" p)
]
, template = " |batt0| "
- ++ " ๐Ÿ–ง |wg-mullvad||tun0||wlp164s0wi|"
+ -- ++ " ๐Ÿ–ง |wg-mullvad||tun0||wlp164s0wi|"
+ ++ " |wg-mullvad||tun0||wlp164s0wi|"
++ " |dynnetwork| "
++ " |default:Master| ๐ŸŽ™๏ธ |default:Capture|"
++ " |EGPH|"
++ "{*}"
- ++ "|kbd|"
+ -- ++ "|kbd|"
++ " |cpufreq|"
++ " |multicpu|"
++ " |multicoretemp|"
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 ()