Import xmobar, a minimalistic text based status bar for xmonad.

From MAINTAINER Jona Joachim, with modifications by me. Thanks!

OK kili@
This commit is contained in:
dcoppa 2010-05-10 08:07:06 +00:00
parent cb82cdc89e
commit 094ecb4e5e
6 changed files with 161 additions and 0 deletions

36
x11/xmobar/Makefile Normal file
View File

@ -0,0 +1,36 @@
# $OpenBSD: Makefile,v 1.1.1.1 2010/05/10 08:07:06 dcoppa Exp $
COMMENT = minimalistic text based status bar
DISTNAME = xmobar-0.9.2
CATEGORIES = x11
HOMEPAGE = http://code.haskell.org/~arossato/xmobar/
MAINTAINER = Jona Joachim <jaj@hcl-club.lu>
# BSD3
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = X11 Xext Xinerama c iconv m pthread util
MODULES = lang/ghc
MODGHC_BUILD = cabal hackage nort
LIB_DEPENDS = :hs-X11->=1.3.0:x11/hs-X11 \
::devel/hs-parsec \
::devel/hs-stm
USE_X11 = Yes
EXAMPLEDIR = ${PREFIX}/share/examples/xmobar
post-install:
${INSTALL_DATA_DIR} ${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/xmobar.config-sample ${EXAMPLEDIR}/xmobarrc
NO_REGRESS = Yes
.include <bsd.port.mk>

5
x11/xmobar/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (xmobar-0.9.2.tar.gz) = EXfu+fAyJWzPNwI5oHA+qw==
RMD160 (xmobar-0.9.2.tar.gz) = /+AAqTsY6fdjjgmgaSSzRkC6/Mo=
SHA1 (xmobar-0.9.2.tar.gz) = r1fCDSWxdHFXKd2blzvxkhPwB9c=
SHA256 (xmobar-0.9.2.tar.gz) = NhKV9dyRJRKi62ROzTMVYqJxJDGSvmIVywceRPUMfGY=
SIZE (xmobar-0.9.2.tar.gz) = 29334

View File

@ -0,0 +1,87 @@
$OpenBSD: patch-Plugins_Monitors_hs,v 1.1.1.1 2010/05/10 08:07:06 dcoppa Exp $
--- Plugins/Monitors.hs.orig Wed Apr 28 23:59:48 2010
+++ Plugins/Monitors.hs Thu Apr 29 00:00:33 2010
@@ -18,25 +18,25 @@ import Plugins
import Plugins.Monitors.Common ( runM )
import Plugins.Monitors.Weather
-import Plugins.Monitors.Net
-import Plugins.Monitors.Mem
-import Plugins.Monitors.Swap
-import Plugins.Monitors.Cpu
-import Plugins.Monitors.Batt
-import Plugins.Monitors.Thermal
-import Plugins.Monitors.CpuFreq
-import Plugins.Monitors.CoreTemp
+--import Plugins.Monitors.Net
+--import Plugins.Monitors.Mem
+--import Plugins.Monitors.Swap
+--import Plugins.Monitors.Cpu
+--import Plugins.Monitors.Batt
+--import Plugins.Monitors.Thermal
+--import Plugins.Monitors.CpuFreq
+--import Plugins.Monitors.CoreTemp
data Monitors = Weather Station Args Rate
- | Network Interface Args Rate
- | Memory Args Rate
- | Swap Args Rate
- | Cpu Args Rate
- | Battery Args Rate
- | BatteryP [String] Args Rate
- | Thermal Zone Args Rate
- | CpuFreq Args Rate
- | CoreTemp Args Rate
+-- | Network Interface Args Rate
+-- | Memory Args Rate
+-- | Swap Args Rate
+-- | Cpu Args Rate
+-- | Battery Args Rate
+-- | BatteryP [String] Args Rate
+-- | Thermal Zone Args Rate
+-- | CpuFreq Args Rate
+-- | CoreTemp Args Rate
deriving (Show,Read,Eq)
type Args = [String]
@@ -49,22 +49,22 @@ type Rate = Int
instance Exec Monitors where
alias (Weather s _ _) = s
- alias (Network i _ _) = i
- alias (Thermal z _ _) = z
- alias (Memory _ _) = "memory"
- alias (Swap _ _) = "swap"
- alias (Cpu _ _) = "cpu"
- alias (Battery _ _) = "battery"
- alias (BatteryP _ _ _)= "battery"
- alias (CpuFreq _ _) = "cpufreq"
- alias (CoreTemp _ _) = "coretemp"
+-- alias (Network i _ _) = i
+-- alias (Thermal z _ _) = z
+-- alias (Memory _ _) = "memory"
+-- alias (Swap _ _) = "swap"
+-- alias (Cpu _ _) = "cpu"
+-- alias (Battery _ _) = "battery"
+-- alias (BatteryP _ _ _)= "battery"
+-- alias (CpuFreq _ _) = "cpufreq"
+-- alias (CoreTemp _ _) = "coretemp"
start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
- start (Network i a r) = runM (a ++ [i]) netConfig runNet r
- start (Thermal z a r) = runM (a ++ [z]) thermalConfig runThermal r
- start (Memory a r) = runM a memConfig runMem r
- start (Swap a r) = runM a swapConfig runSwap r
- start (Cpu a r) = runM a cpuConfig runCpu r
- start (Battery a r) = runM a battConfig runBatt r
- start (BatteryP s a r) = runM a battConfig (runBatt' s) r
- start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
- start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r
+-- start (Network i a r) = runM (a ++ [i]) netConfig runNet r
+-- start (Thermal z a r) = runM (a ++ [z]) thermalConfig runThermal r
+-- start (Memory a r) = runM a memConfig runMem r
+-- start (Swap a r) = runM a swapConfig runSwap r
+-- start (Cpu a r) = runM a cpuConfig runCpu r
+-- start (Battery a r) = runM a battConfig runBatt r
+-- start (BatteryP s a r) = runM a battConfig (runBatt' s) r
+-- start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
+-- start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-xmobar_config-sample,v 1.1.1.1 2010/05/10 08:07:06 dcoppa Exp $
--- xmobar.config-sample.orig Wed Apr 28 23:53:28 2010
+++ xmobar.config-sample Wed Apr 28 23:57:36 2010
@@ -3,16 +3,11 @@ Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, fgColor = "grey"
, position = Top
, lowerOnStart = True
- , commands = [ Run Weather "EGPF" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
- , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
- , Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
- , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
- , Run Memory ["-t","Mem: <usedratio>%"] 10
- , Run Swap [] 10
+ , commands = [ Run Weather "ELLX" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
, Run Com "uname" ["-s","-r"] "" 36000
- , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
+ , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
]
, sepChar = "%"
, alignSep = "}{"
- , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% }{ <fc=#ee9a00>%date%</fc>| %EGPF% | %uname%"
+ , template = "%ELLX% }{ <fc=#ee9a00>%date%</fc> | %uname%"
}

4
x11/xmobar/pkg/DESCR Normal file
View File

@ -0,0 +1,4 @@
xmobar is a minimalistic, text based, status bar. It was designed
to work with the xmonad Window Manager. It was inspired by the Ion3
status bar, and supports similar features, like dynamic color
management, output templates, and extensibility through plugins.

6
x11/xmobar/pkg/PLIST Normal file
View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/05/10 08:07:06 dcoppa Exp $
@bin bin/xmobar
@comment share/doc/${DISTNAME}/
@comment share/doc/${DISTNAME}/LICENSE
share/examples/xmobar/
share/examples/xmobar/xmobarrc