XMonad

~/config/xmobar/xmobarrc

Rina Kawakita 2019. 12. 30. 21:29

~/config/xmobar/xmobarrc

-- vim: ft=haskell
-- xmobar - a minimalistic status bar (version 2.24.3)
-- http://projects.haskell.org/xmobar/
-- http://fontawesome.io/cheatsheet/
-- https://wiki.archlinux.org/index.php/Xmobar
-- by nietz

Config {
       --- appearance
         font             = "xft:Noto Sans CJK KR-8:antialias=true:hinting=true:bold,xft:Hack:size=8:bold:antialias=true"
       , additionalFonts  = [ "xft:FontAwesome-8" ]
       , bgColor          = "#312e39"
       , fgColor          = "#c0a79a"
       , alpha            = 0                   -- 0 is transparent, 255 is opaque.
       , position         = Static { xpos = 0 , ypos = 1064, width = 1920, height = 16 }     -- 88, in 1080p resoulition, ypos = 1064  --> bottom
       --, position         = TopSize C 35 16   -- 35%, 16 height, Centerd
       --, position         = TopP 20 20        -- left padding 20, right padding 20
       , textOffset       = -1                  -- he vertical offset, in pixels, for the text baseline. If negative or not given, xmobar will try to center text verticallly
       , iconOffset       = -1                  -- The vertical offset, in pixels, for icons bottom line. If negative or not given, xmobar will try to center icons vertically.

       --- general behavior
       , lowerOnStart     = True                -- When True the window is sent the bottom of the window stack initially.
       , hideOnStart      = False               -- When set to True the window is initially not mapped, i.e. hidden. It then can be toggled manually (for example using thedbus interface) or automatically (by a plugin) to make it reappear.
       , allDesktops      = True                -- When set to True (the default), xmobar will tell the window manager explicitly to be shown in all desktops, by setting _NET_WM_DESKTOP to 0xffffffff.
       , overrideRedirect = False               -- If you're running xmobar in a tiling window manager, you might need to set this option to False so that it behaves as adocked application. Defaults to True.
       , pickBroadest     = False               -- When multiple displays are available, xmobar will choose by default the first one to place itself. With this flag set toTrue (the default is False) it will choose the broadest one instead.
       , persistent       = True                -- When True the window status is fixed i.e. hiding or revealing is not possible. This option can be toggled at runtime. Defaults to False.

       -- borders
       , border           = NoBorder            -- TopB, TopBM, BottomB, BottomBM, FullB, FullBM or NoBorder (default). TopBM=TopBorderMargin
       , borderColor      = "black"
       , borderWidth      = 1
       , iconRoot         = "."                 -- Root folder where icons are stored. For if path start with "/", "./" or "../" it is interpreted as it is. Otherwise it w     ↪ill have iconRoot ++ "/" prepended to it. Default is ".".

       -- plugins
       --   Numbers can be automatically colored according to their value. xmobar
       --   decides color based on a three-tier/two-cutoff system, controlled by
       --   command options:
       --     --Low sets the low cutoff
       --     --High sets the high cutoff
       --
       --     --low sets the color below --Low cutoff
       --     --normal sets the color between --Low and --High cutoffs
       --     --High sets the color above --High cutoff
       --
       --   The --template option controls how the plugin is displayed. Text
       --   color can be set by enclosing in <fc></fc> tags. For more details
       --   see http://projects.haskell.org/xmobar/#system-monitor-plugins.
       , commands         = 

            [ Run Weather "RKPK"    [
                                      "-t", "<fn=1>\xf285</fn> Pusan:  <skyCondition>  <fn=1>\xf043</fn><tempC>°C  <fn=1>\xf110</fn> rh: <rh>% (<hour>)  <fn=1>\xf042</fn> pressure: <pressure> hPa"        -- \xf185
                                    , "-L"          , "10"
                                    , "-H"          , "30"
                                    , "--low"       , "#e0cc8f"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#e38aa2"
                                    ] 36000

            --, Run Network "enp0s25" ["-t", "<dev>: ↓<rx>, ↑<tx>"]
            , Run Network "enp0s25" [
                                      "-t"          , "<fn=1>\xf1d8</fn> Net: ↓<rx>, ↑<tx>"
                                    , "-S"          , "True"
                                    , "-L"          , "1000"
                                    , "-H"          , "1001"
                                    , "--low"       , "#c0a79a"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run Network "enp5s0"  [
                                      "-t"          , "<fn=1>\xf1d8</fn> Net: ↓<rx>, ↑<tx>"
                                    , "-S"          , "True"
                                    , "-L"          , "1000"
                                    , "-H"          , "1001"
                                    , "--low"       , "#c0a79a"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run Cpu               [
                                      "-t"          , "<fn=1>\xf167</fn> Cpu: <total>"      -- \xf108
                                    , "-L"          , "5"
                                    , "-H"          , "50"
                                    , "--low"       , "#cccccc"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run MultiCpu          [
                                      "-t"          , " (core# <total0>-<total1>-<total2>-<total3>-<total4>-<total5>-<total6>-<total7>%)"
                                    , "-L"          , "5"
                                    , "-H"          , "50"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#eaeaea"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run CpuFreq           [
                                      "-t"          , "(<cpu0>_<cpu1>_<cpu2>_<cpu3>_<cpu4>_<cpu5>_<cpu6>_<cpu7> GHz)"
                                    , "-L"          , "1"
                                    , "-H"          , "3"
                                    , "--low"       , "#c0a79a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#eaeaea"
                                    , "--maxwidth"  , "4"
                                    ] 50

            , Run Memory            [
                                      "-t"          , "<fn=1>\xf1e3</fn> Mem: <usedratio>% (used: <used>M / cache: <cache>M)"
                                    , "-L"          , "2000"
                                    , "-H"          , "10000"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#bf4040"
                                    ] 10

            , Run Swap              [] 10

            , Run CoreTemp          [
                                      "-t"          , "<fn=1>\xf166</fn> CoreTemp: <core0>-<core1>-<core2>-<core3>°C"      -- \xf26a
                                    , "-L"          , "40"
                                    , "-H"          , "70"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#bf4040"
                                    ] 50

            , Run DiskU             [ ("/"          , "<fn=1>\xf1f0</fn> Disk:  [/: <used>/<size>]")
                                    , ("/home"      , ", [/home: <used>/<size>]"                   )
                                    ]
                                    [
                                      "-L"          , "50"
                                    , "-H"          , "95"
                                    , "-m"          , "1"
                                    , "-p"          , "3"
                                    , "--low"       , "#c0a39a"
                                    , "--normal"    , "#a3a3a3"
                                    , "--high"      , "#bf4040"
                                    ] 20

            , Run MPD               [
                                      "-t"          , "<composer> <title> (<album>) <track>/<plength> <statei> [<flags>]"
                                    , "--"
                                    , "-P"          , ">>"
                                    , "-Z"          , "|"
                                    , "-S"          , "><"
                                    ] 10

            , Run Kbd               [ ("us(dvorak)", "DV"), ("us", "US")]

            , Run Date              "<fn=1>\xf073</fn> %a %b %_d %Y " "date1" 10
            , Run Date              "<fn=1>\xf017</fn> %H:%M:%S"      "date2" 10

            , Run Com "/home/nietz/.xmonad/mpd_info.sh" [] "mpc"              10

            , Run Com "uname"       [ "-s" ,"-r" ,"-m"   ] ""                  0

            , Run Com "xmonad"      [ "--version"        ] "myxmonad"          0

            , Run Com "lsb_release" [ "-i", "-s"         ] "mydistro"          0

            , Run Com "lsb_release" [ "-c", "-s"         ] "mydistro_codename" 0
            ]

       , sepChar          = "%"
       , alignSep         = "}{"
       , template         = " %cpu% %multicpu% - %cpufreq% | %coretemp% | %memory% | %disku% | %enp0s25%%enp5s0% | %RKPK% }{ <fc=#98adeb><fn=1></fn> %mydistro% %uname%</fc>  <fc=#bf4040><fn=1></fn> %myxmonad% </fc><fc=#a3a3a3> <action=`orage --toggle`>%date1%</action> <action=`oclock-toggle.sh`>%date2%</action></fc> "
       }

 

~/config/xmobar/xmobarrc-workspace

-- vim: ft=haskell
-- xmobar - a minimalistic status bar (version 2.24.3)
-- http://projects.haskell.org/xmobar/
-- http://fontawesome.io/cheatsheet/
-- https://wiki.archlinux.org/index.php/Xmobar
-- https://github.com/bchurchill/xmonad-pulsevolume
-- by nietz

Config {
       --- appearance
         font             = "xft:Noto Sans CJK KR-8:antialias=true:hinting=true:bold,xft:Hack:size=8:bold:antialias=true"
       , additionalFonts  = [ "xft:FontAwesome-8" ]
       , bgColor          = "#312e39"
       , fgColor          = "#c0a79a"
       , alpha            = 0                   -- 0 is transparent, 255 is opaque. 255 -> xmobar bgcolor, xmonad.hs xmobarPP bgcolor on
       , position         = Static { xpos = 0, ypos = 0, width = 1920, height = 16 }
       --, position         = S0tatic { xpos = 620 , ypos = 0, width = 700, height = 16 }
       --, position         = TopSize C 35 16   -- 35%, 16 height, Centerd
       --, position         = TopW C 50         -- width x%, Centerd
       --, position         = TopP 20 20        -- left padding 20, right padding 20
       , textOffset       = -1                  -- he vertical offset, in pixels, for the text baseline. If negative or not given, xmobar will try to center text verticallly
       , iconOffset       = -1                  -- The vertical offset, in pixels, for icons bottom line. If negative or not given, xmobar will try to center icons vertically.

       --- general behavior
       , lowerOnStart     = True                -- When True the window is sent the bottom of the window stack initially.
       , hideOnStart      = False               -- When set to True the window is initially not mapped, i.e. hidden. It then can be toggled manually (for example using thedbus interface) or automatically (by a plugin) to make it reappear.
       , allDesktops      = True                -- When set to True (the default), xmobar will tell the window manager explicitly to be shown in all desktops, by setting _NET_WM_DESKTOP to 0xffffffff.
       , overrideRedirect = False               -- If you're running xmobar in a tiling window manager, you might need to set this option to False so that it behaves as adocked application. Defaults to True.
       , pickBroadest     = False               -- When multiple displays are available, xmobar will choose by default the first one to place itself. With this flag set toTrue (the default is False) it will choose the broadest one instead.
       , persistent       = True                -- When True the window status is fixed i.e. hiding or revealing is not possible. This option can be toggled at runtime. Defaults to False.

       -- borders
       , border           = NoBorder            -- TopB, TopBM, BottomB, BottomBM, FullB, FullBM or NoBorder (default). TopBM=TopBorderMargin
       , borderColor      = "black"
       , borderWidth      = 1
       , iconRoot         = "."                 -- Root folder where icons are stored. For if path start with "/", "./" or "../" it is interpreted as it is. Otherwise it w     ↪ill have iconRoot ++ "/" prepended to it. Default is ".".

       , commands         = [ Run MPD                        [ "-t"   ,       "<fn=1>\xf025</fn> <title> - <artist> (<album>) <statei> <state> <vbar> [<flags>] <fn=1>\xf0cb</fn> <ppos>/<plength>  <fn=1>\xf028</fn> <volume>%"
                                                               , "--" , "-P", "<fn=1>\xf144</fn>"
                                                               , "-Z" ,       "<fn=1>\xf28b</fn>"
                                                               , "-S" ,       "<fn=1>\xf28d</fn>"
                                                             ] 10
                            , Run Kbd                        [ ("kr(kr104)" , "<fc=#a3a3a3>KR104</fc>")
                                                               , ("kr"      , "<fc=#a3a3a3>KR104</fc>")
                                                               , ("us"      , "<fc=#8B0000>US</fc>"   )
                                                             ]
                            , Run Mail                       [ ("Ub: "      , "~/Mail/Personal/INBOX")
                                                               , (",  Fr: " , "~/Mail/Work/INBOX"    )
                                                             ] "mail"
                            , Run Volume "default" "Master"  [ "-t"         , "Master: <volume>% <status> <volumeipat>"
                                                               , "--"       , "--on"                    , "●"   --"[on]"
                                                                            , "--off"                   , "●"   --"○"   --"[off]"
                                                                            , "--onc"                   , "#783e57"
                                                                            , "--offc"                  , "#615772"
                                                                            , "--highd"                 , "-5.0"
                                                                            , "--lowd"                  , "-30.0"
                                                                            , "--volume-icon-pattern"   , "<icon=bitmapvolumeicon_%%.xpm/>"                                                            --, "
                                                             ] 10
                            , Run Volume "default" "Capture" [ "-t"         , ",  Capture: <volume>% <status> <volumeipat>"
                                                               , "--"       , "--on"                    , "●"   --"[on]"
                                                                            , "--off"                   , "●"   --"○"   --"[off]"
                                                                            , "--onc"                   , "#783e57"
                                                                            , "--offc"                  , "#615772"
                                                                            , "--highd"                 , "-5.0"
                                                                            , "--lowd"                  , "-30.0"
                                                                            , "--volume-icon-pattern"   , "<icon=bitmapvolumeicon_%%.xpm/>"                                                            --, "
                                                             ] 10
                            , Run StdinReader   -- xmonad workspace : layout : title
                            ]
       , sepChar         = "%"
       , alignSep        = "}{"
       , template        = " Mopidy:  <fc=#a3a3a3>%mpd%</fc> }   %StdinReader%   { Kbd: %kbd%  <fn=1>   </fn>Vol: <fc=#a3a3a3>%default:Master% %default:Capture%</fc>  <fn=1> </fn> Gmail: <fc=#a3a3a3>%mail%</fc>  "
       }

 

~/config/xmobar/xmobarrc-topleft

-- vim: ft=haskell
-- xmobar - a minimalistic status bar (version 0.24.3)
-- http://projects.haskell.org/xmobar/
-- http://fontawesome.io/cheatsheet/
-- https://wiki.archlinux.org/index.php/Xmobar
-- by nietz

Config { 
       --- appearance
         font             = "xft:Noto Sans CJK KR-8:antialias=true:hinting=true:bold,xft:Hack:size=8:bold:antialias=true"
       , additionalFonts  = [ "xft:FontAwesome-8" ]
       , bgColor          = "#312e39"
       , fgColor          = "#c0a79a"
       , alpha            = 255                 -- 0 is transparent, 255 is opaque.  255 -> xmobar bgcolor
       , position         = Static { xpos = 0 , ypos = 0, width = 600, height = 16 }
       --, position         = TopSize C 35 16   -- 35%, 16 height, Centerd
       --, position         = TopP 20 20        -- left padding 20, right padding 20
       , textOffset       = -1                  -- he vertical offset, in pixels, for the text baseline. If negative or not given, xmobar will try to center text vertically
       , iconOffset       = -1                  -- The vertical offset, in pixels, for icons bottom line. If negative or not given, xmobar will try to center icons vertically.

       --- general behavior
       , lowerOnStart     = True                -- When True the window is sent the bottom of the window stack initially.
       , hideOnStart      = False               -- When set to True the window is initially not mapped, i.e. hidden. It then can be toggled manually (for example using the dbus interface) or automatically (by a plugin) to make it reappear.
       , allDesktops      = True                -- When set to True (the default), xmobar will tell the window manager explicitly to be shown in all desktops, by setting _NET_WM_DESKTOP to 0xffffffff.
       , overrideRedirect = False               -- If you're running xmobar in a tiling window manager, you might need to set this option to False so that it behaves as a docked application. Defaults to True.
       , pickBroadest     = False               -- When multiple displays are available, xmobar will choose by default the first one to place itself. With this flag set to True (the default is False) it will choose the broadest one instead.
       , persistent       = True                -- When True the window status is fixed i.e. hiding or revealing is not possible. This option can be toggled at runtime. Defaults to False.

       -- borders
       , border           = NoBorder            -- TopB, TopBM, BottomB, BottomBM, FullB, FullBM or NoBorder (default). TopBM=TopBorderMargin
       , borderColor      = "black"
       , borderWidth      = 1
       , iconRoot         = "."                 -- Root folder where icons are stored. For if path start with "/", "./" or "../" it is interpreted as it is. Otherwise it will have iconRoot ++ "/" prepended to it. Default is ".".

       -- plugins
       --   Numbers can be automatically colored according to their value. xmobar
       --   decides color based on a three-tier/two-cutoff system, controlled by
       --   command options:
       --     --Low sets the low cutoff
       --     --High sets the high cutoff
       --
       --     --low sets the color below --Low cutoff
       --     --normal sets the color between --Low and --High cutoffs
       --     --High sets the color above --High cutoff
       --
       --   The --template option controls how the plugin is displayed. Text
       --   color can be set by enclosing in <fc></fc> tags. For more details
       --   see http://projects.haskell.org/xmobar/#system-monitor-plugins.
       , commands = [ Run MPD [ "-t", "<fn=1>\xf025</fn> <title> - <artist> (<album>) <statei> <state> <vbar> [<flags>] <fn=1>\xf0cb</fn> <ppos>/<plength>  <fn=1>\xf028</fn> <volume>%"
                              , "--", "-P", "<fn=1>\xf144</fn>"
                              , "-Z", "<fn=1>\xf28b</fn>"
                              , "-S", "<fn=1>\xf28d</fn>"
                              ] 10
                    , Run Kbd [ ("kr" , "<fc=#a3a3a3>KR104</fc>")
                              , ("us" , "<fc=#8B0000>US</fc>"   )
                              ]
                    ]

       --- layout
       , sepChar          = "%"                 -- The character to be used for indicating commands in the output template (default '%').
       , alignSep         = "}{"                -- a 2 character string for aligning text in the output template. The text before the first character will be align to left, the text in between the 2 characters will be centered, and the text after the second character will be align to the right.
       -- The output template.
       --, template       = "Mopidy: <fc=#a3a3a3>%mpd%</fc> }{%kbd%"
       , template         = "Mopidy: <fc=#a3a3a3>%mpd%</fc> }{"
       }