From 73c4743a123c2c26f54fafe395bd36bcf9412a4a Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 2 Feb 2016 07:40:52 +0100 Subject: added xmobar --- .gitmodules | 3 +++ bin/a5999026fc2abcac4cec | 1 + bin/wireless-status | 1 + system/xmobarrc.symlink | 22 ++++++++++++++++++++++ xmonad.symlink/xmonad.hs | 12 +++++++++++- 5 files changed, 38 insertions(+), 1 deletion(-) create mode 160000 bin/a5999026fc2abcac4cec create mode 120000 bin/wireless-status create mode 100644 system/xmobarrc.symlink diff --git a/.gitmodules b/.gitmodules index bf071fc..25808e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vim/vim.symlink/bundle/Vundle.vim"] path = vim/vim.symlink/bundle/Vundle.vim url = https://github.com/VundleVim/Vundle.vim +[submodule "bin/a5999026fc2abcac4cec"] + path = bin/a5999026fc2abcac4cec + url = https://gist.github.com/a5999026fc2abcac4cec.git diff --git a/bin/a5999026fc2abcac4cec b/bin/a5999026fc2abcac4cec new file mode 160000 index 0000000..d0478d1 --- /dev/null +++ b/bin/a5999026fc2abcac4cec @@ -0,0 +1 @@ +Subproject commit d0478d191943cb559e54d3fa20df128b32e3dead diff --git a/bin/wireless-status b/bin/wireless-status new file mode 120000 index 0000000..f779ee2 --- /dev/null +++ b/bin/wireless-status @@ -0,0 +1 @@ +./a5999026fc2abcac4cec/wireless.sh \ No newline at end of file diff --git a/system/xmobarrc.symlink b/system/xmobarrc.symlink new file mode 100644 index 0000000..974e567 --- /dev/null +++ b/system/xmobarrc.symlink @@ -0,0 +1,22 @@ +Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*" + , borderColor = "black" + , border = TopB + , bgColor = "black" + , fgColor = "grey" + , position = BottomW L 100 + , commands = + [ Run Weather "EHSB" ["-t","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 "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 10 + , Run Com "wireless-status" ["wlan0"] "wlan0stat" 10 + , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 + , Run Memory ["-t","Mem: %"] 10 + , Run Swap [] 10 + , Run Com "uname" ["-s","-r"] "" 36000 + , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 + , Run StdinReader + ] + , sepChar = "%" + , alignSep = "}{" + , template = "%StdinReader% | %cpu% | %memory% * %swap% | %eth0% - %wlan0% %wlan0stat% }{%date% | %uname% | %EHSB% " + } diff --git a/xmonad.symlink/xmonad.hs b/xmonad.symlink/xmonad.hs index 1681ce8..31be130 100644 --- a/xmonad.symlink/xmonad.hs +++ b/xmonad.symlink/xmonad.hs @@ -1,17 +1,27 @@ +import System.IO import System.Posix.Env (putEnv) import XMonad import XMonad.Actions.CycleWS import XMonad.Actions.CycleWindows import XMonad.Hooks.SetWMName +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.ManageDocks import XMonad.Layout.MultiColumns import XMonad.Util.EZConfig +import XMonad.Util.Run(spawnPipe) main = do putEnv "_JAVA_AWT_WM_NONREPARENTING=1" -- java GUIs; see https://code.google.com/p/xmonad/issues/detail?id=559#c11 + xmproc <- spawnPipe "xmobar" xmonad $ defaultConfig { modMask = mod4Mask , focusFollowsMouse = False - , layoutHook = myLayouts + , layoutHook = avoidStruts $ myLayouts + , logHook = dynamicLogWithPP xmobarPP + { ppOutput = hPutStrLn xmproc + , ppTitle = xmobarColor "green" "" . shorten 50 + } + , manageHook = manageDocks <+> manageHook defaultConfig , terminal = "uxterm" , borderWidth = 1 } -- cgit v1.2.3