xmobar-config
This commit is contained in:
		
							parent
							
								
									061583c342
								
							
						
					
					
						commit
						d8e21e872a
					
				
					 6 changed files with 55 additions and 48 deletions
				
			
		|  | @ -1,27 +0,0 @@ | |||
| cabal-version:      3.0 | ||||
| name:               candybar | ||||
| version:            0.1.0.0 | ||||
| -- synopsis: | ||||
| -- description: | ||||
| license:            BSD-3-Clause | ||||
| -- license-file:       LICENSE | ||||
| author:             sajenim | ||||
| maintainer:         its.jassy@pm.me | ||||
| -- copyright: | ||||
| build-type:         Simple | ||||
| -- extra-doc-files:    CHANGELOG.md | ||||
| -- extra-source-files: | ||||
| 
 | ||||
| common warnings | ||||
|     ghc-options: -Wall | ||||
|                  -threaded | ||||
| 
 | ||||
| executable candybar | ||||
|     import:           warnings | ||||
|     main-is:          candybar.hs | ||||
|     -- other-modules: | ||||
|     -- other-extensions: | ||||
|     build-depends:    base, | ||||
|                       xmobar | ||||
|     hs-source-dirs:   . | ||||
|     default-language: Haskell2010 | ||||
|  | @ -1,20 +0,0 @@ | |||
| import Xmobar | ||||
| 
 | ||||
| config :: Config | ||||
| config = | ||||
|   defaultConfig | ||||
|     { font = "DejaVu Sans Mono 9", | ||||
|       allDesktops = True, | ||||
|       alpha = 200, | ||||
|       commands = | ||||
|         [ Run XMonadLog, | ||||
|           Run $ Memory ["t", "Mem: <usedratio>%"] 10, | ||||
|           Run $ Kbd [], | ||||
|           Run $ Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10 | ||||
|         ], | ||||
|       template = "%XMonadLog% }{ %kbd% | %date% | %memory%", | ||||
|       alignSep = "}{" | ||||
|     } | ||||
| 
 | ||||
| main :: IO () | ||||
| main = xmobar config  -- or: configFromArgs config >>= xmobar | ||||
|  | @ -3,5 +3,5 @@ | |||
| 
 | ||||
| { pkgs ? (import ../nixpkgs.nix) { } }: { | ||||
|   # example = pkgs.callPackage ./example { }; | ||||
|   candybar = pkgs.callPackage ./candybar { }; | ||||
|   xmobar = pkgs.callPackage ./xmobar-config { }; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										30
									
								
								pkgs/xmobar-config/src/xmobar-top.hs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								pkgs/xmobar-config/src/xmobar-top.hs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| import Xmobar | ||||
| import System.Environment (getEnv) | ||||
| import System.IO.Unsafe   (unsafeDupablePerformIO) | ||||
| 
 | ||||
| -- | Candybar | ||||
| config :: Config | ||||
| config = defaultConfig | ||||
|   -- general settings | ||||
|   { font            = "Fira Code Semi Bold 9" | ||||
|   , additionalFonts = [ ] | ||||
|   , bgColor         = "#282828" | ||||
|   , fgColor         = "#d4be98" | ||||
|   , position        = Static { xpos = 1920, ypos = 0, width = 2560, height = 24 } | ||||
|   , iconRoot        = homeDir <> "/.config/xmonad/icons" | ||||
|   -- commands to run | ||||
|   , commands =  | ||||
|       [ Run $ XMonadLog | ||||
|       ] | ||||
|   -- format our bar | ||||
|   , sepChar  = "%" | ||||
|   , alignSep = "}{" | ||||
|   , template = "\59255 %XMonadLog%" | ||||
|   } | ||||
| 
 | ||||
| -- | Get home directory | ||||
| homeDir :: String | ||||
| homeDir = unsafeDupablePerformIO (getEnv "HOME") | ||||
| 
 | ||||
| main :: IO () | ||||
| main = configFromArgs config >>= xmobar | ||||
							
								
								
									
										24
									
								
								pkgs/xmobar-config/xmobar-config.cabal
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								pkgs/xmobar-config/xmobar-config.cabal
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| cabal-version:      3.0 | ||||
| name:               xmobar-config | ||||
| version:            0.1.0.0 | ||||
| description:        xmobar configs | ||||
| author:             sajenim | ||||
| maintainer:         its.jassy@pm.me | ||||
| license:            BSD-3-Clause | ||||
| build-type:         Simple | ||||
| 
 | ||||
| executable xmobar-top | ||||
|     main-is:          xmobar-top.hs | ||||
|     hs-source-dirs:   src | ||||
|     ghc-options:      -Wall -threaded | ||||
|     build-depends:    base, | ||||
|                       xmobar | ||||
|     default-language: Haskell2010 | ||||
| 
 | ||||
| -- executable xmobar-bottom | ||||
| --     main-is:          xmobar-bottom.hs | ||||
| --     hs-source-dirs:   src | ||||
| --     ghc-options:      -Wall -threaded | ||||
| --     build-depends:    base, | ||||
| --                       xmobar | ||||
| --     default-language: Haskell2010 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue