-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
177 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Waffle theme | ||
# | ||
# Please see: | ||
# https://hackage.haskell.org/package/brick-0.55/docs/Brick-Themes.html | ||
# | ||
# COLOR SPECIFICATION | ||
# | ||
# A color specification can be any of the strings black, red, green, yellow, | ||
# blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, | ||
# brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, or default. | ||
# | ||
# We also support color specifications in the common hex format #RRGGBB, but | ||
# note that this specification is lossy: terminals can only display 256 colors, | ||
# but hex codes can specify 256^3 = 16777216 colors. | ||
# | ||
# STYLE SPECIFICATION | ||
# | ||
# A style specification can be either one of the following values (without | ||
# quotes) or a comma-delimited list of one or more of the following values | ||
# (e.g. "[bold,underline]") indicating that all of the specified styles be | ||
# used. Valid styles are standout, underline, reverseVideo, blink, dim, italic, | ||
# and bold. | ||
|
||
[default] | ||
# A color spec | ||
default.fg = white | ||
# another color spec | ||
default.bg = black | ||
# a style spec | ||
#default.style="" | ||
|
||
# The other section specifies for each attribute name in the theme the same fg, | ||
# bg, and style settings as for the default attribute. Furthermore, if an | ||
# attribute name has multiple components, the fields in the INI file should use | ||
# periods as delimiters. For example, if a theme has an attribute name ("foo" | ||
# <> "bar"), then the file may specify three fields: | ||
# | ||
# foo.bar.fg - a color specification | ||
# foo.bar.bg - a color specification | ||
# foo.bar.style - a style specification | ||
# | ||
# Any color or style specifications omitted from the file mean that those | ||
# attribute or style settings will use the theme's default value instead. | ||
# | ||
# Attribute names with multiple components (e.g. attr1 <> attr2) can be | ||
# referenced in customization files by separating the names with a dot. For | ||
# example, the attribute name "list" <> "selected" can be referenced by using | ||
# the string "list.selected". | ||
[other] | ||
# for the input dialog popup i guess? FIXME | ||
inputDialogAttr.fg=#FFFF00 | ||
inputDialogAttr.bg=#000000 | ||
# For the directory line descriptor in menu mode | ||
directoryAttr.fg=#FF0000 | ||
# for the file line descriptor in menu mode | ||
fileAttr.fg=cyan | ||
# for the index search line descriptor in menu mode | ||
indexSearchServerAttr.fg=magenta | ||
# for uh... i forgot honestly FIXME | ||
linkAttr.fg=#1C98FF | ||
# for info lines in menu mode, i think | ||
textAttr.fg=#FFFF00 | ||
# for all other line descriptors (catchall) | ||
genericTypeAttr.fg=green | ||
# for the numbers that prefix links you can follow in menu mode | ||
numberPrefixAttr.fg=#FC28FE | ||
# i have no idea, what a horrible name FIXME | ||
customAttr.style=bold | ||
customAttr.fg=white | ||
# i have no idea FIXME | ||
custom2Attr.fg=yellow | ||
# The title bar label | ||
titleAttr.style=[reverseVideo,bold] | ||
titleAttr.fg=white | ||
# the input dialog... title label? FIXME | ||
inputDialogLabelAttr.style=[reverseVideo,bold] | ||
inputDialogLabelAttr.fg=yellow | ||
# i have no idea FIXME | ||
asteriskAttr.fg=white | ||
# For uh... regular list... items? in menu mode? FIXME | ||
listAttr.fg=yellow | ||
listAttr.bg=#000000 | ||
# for the selected item in menu mode | ||
listSelectedAttr.style=bold | ||
listSelectedAttr.fg=white | ||
# for... editor field default style? FIXME | ||
editAttr.fg=white | ||
editAttr.bg=brightBlack | ||
# for an editor field selected focus maybe? FIXME | ||
editFocusedAttr.fg=white | ||
editFocusedAttr.bg=brightBlack | ||
# for the file browser's current directory | ||
fileBrowserCurrentDirectoryAttr.fg=white | ||
fileBrowserCurrentDirectoryAttr.bg=blue | ||
# for the uh... selection... info...? FIXME | ||
fileBrowserSelectionInfoAttr.fg=white | ||
fileBrowserSelectionInfoAttr.bg=blue | ||
# File browser directory style | ||
fileBrowserDirectoryAttr.fg=blue | ||
# File browser... block device? FIXME | ||
fileBrowserBlockDeviceAttr.fg=magenta | ||
# file browser character device ??? FIXME | ||
fileBrowserCharacterDeviceAttr.fg=green | ||
# file browser named pipe attr??? FIXME | ||
fileBrowserNamedPipeAttr.fg=yellow | ||
# symbolic link in file browser FIXME | ||
fileBrowserSymbolicLinkAttr.fg=cyan | ||
# unix socket? FIXME in file browser | ||
fileBrowserUnixSocketAttr.fg=red | ||
# selected item in file browser | ||
fileBrowserSelectedAttr.fg=white | ||
fileBrowserSelectedAttr.bg=magenta | ||
# idk FIXME | ||
errorAttr.fg=red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
|
||
-- | Configuration for themes, namely handling theme.ini. | ||
|
||
module Config.Theme ( setupDefaultTheme, getUserThemePath ) where | ||
|
||
import System.FilePath | ||
import qualified Data.ByteString.Lazy as BL | ||
|
||
import Data.FileEmbed | ||
|
||
import Config ( getConfigDirectory, doIfPathDoesntExist ) | ||
|
||
-- | The standard theme.ini which ships with waffle; before it gets copied | ||
-- to the user's config directory. | ||
defaultThemeContents :: BL.ByteString | ||
defaultThemeContents = BL.fromStrict $(embedFile "data/theme.ini") | ||
|
||
-- | Writes a theme.ini to the user's config directory if they don't have one already. | ||
setupDefaultTheme :: IO () | ||
setupDefaultTheme = do | ||
userThemePath <- getUserThemePath | ||
doIfPathDoesntExist userThemePath (BL.writeFile userThemePath defaultThemeContents) | ||
|
||
-- | Get the `FilePath` to the user's open/associations configuration file. | ||
getUserThemePath :: IO FilePath | ||
getUserThemePath = do | ||
configDir <- getConfigDirectory | ||
pure $ joinPath [configDir, "theme.ini"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,6 +120,7 @@ library | |
Config | ||
Config.ConfigOpen | ||
Config.Bookmarks | ||
Config.Theme | ||
|
||
BrickApp | ||
|
||
|