-
Notifications
You must be signed in to change notification settings - Fork 4
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
67 changed files
with
1,382 additions
and
170 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,17 @@ | ||
{ | ||
"name": "Theme Name", | ||
"colors": { | ||
"--color-long-round": "", | ||
"--color-short-round": "", | ||
"--color-focus-round": "", | ||
"--color-focus-round-middle": "", | ||
"--color-focus-round-end": "", | ||
"--color-background": "", | ||
"--color-background-light": "", | ||
"--color-background-lightest": "", | ||
"--color-foreground": "", | ||
"--color-foreground-darker": "", | ||
"--color-foreground-darkest": "", | ||
"--color-accent": "" | ||
} | ||
} |
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,67 @@ | ||
# Pomotroid Themes | ||
|
||
Pomotroid comes with many officially supported themes. You can also add any number of custom themes. | ||
|
||
- [Pomotroid Themes](#pomotroid-themes) | ||
- [Available Themes](#available-themes) | ||
- [Creating a Custom Theme](#creating-a-custom-theme) | ||
|
||
## Available Themes | ||
|
||
These themes are available by default. | ||
|
||
| Theme | Main App | Timer Colors | | ||
| ------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | ||
| Andromeda | ![Andromeda theme preview](images/andromeda_01.png) | ![Andromeda theme preview](images/andromeda_02.png) | | ||
| Ayu Mirage | ![Ayu Mirage theme preview](images/ayu_01.png) | ![Ayu Mirage theme preview](images/ayu_02.png) | | ||
| City Lights | ![City Lights theme preview](images/city-lights_01.png) | ![City Lights theme preview](images/city-lights_02.png) | | ||
| Dracula | ![Dracula theme preview](images/dracula_01.png) | ![Dracula theme preview](images/dracula_02.png) | | ||
| D.Va | ![D.Va theme preview](images/dva_01.png) | ![D.Va theme preview](images/dva_02.png) | | ||
| GitHub | ![GitHub theme preview](images/github_01.png) | ![GitHub theme preview](images/github_02.png) | | ||
| Graphite | ![Graphite theme preview](images/graphite_01.png) | ![Graphite theme preview](images/graphite_02.png) | | ||
| Gruvbox | ![Gruvbox theme preview](images/gruvbox_01.png) | ![Gruvbox theme preview](images/gruvbox_02.png) | | ||
| Monokai | ![Monokai theme preview](images/monokai_01.png) | ![Monokai theme preview](images/monokai_02.png) | | ||
| Nord | ![Nord theme preview](images/nord_01.png) | ![Nord theme preview](images/nord_02.png) | | ||
| One Dark Pro | ![One Dark Pro theme preview](images/one-dark-pro_01.png) | ![One Dark Pro theme preview](images/one-dark-pro_02.png) | | ||
| Pomotroid (default) | ![Pomotroid theme preview](images/pomotroid_01.png) | ![Pomotroid theme preview](images/pomotroid_02.png) | | ||
| Popping and Locking | ![Popping and Locking theme preview](images/popping-and-locking_01.png) | ![Popping and Locking theme preview](images/popping-and-locking_02.png) | | ||
| Solarized Light | ![Solarized Light theme preview](images/solarized-light_01.png) | ![Solarized Light theme preview](images/solarized-light_02.png) | | ||
| Spandex | ![Spandex theme preview](images/spandex_01.png) | ![Spandex theme preview](images/spandex_02.png) | | ||
| Sythwave | ![Sythwave theme preview](images/synthwave_01.png) | ![Sythwave theme preview](images/synthwave_02.png) | | ||
| Tokyo Night Storm | ![Tokyo Night Storm theme preview](images/tokyo-night-storm_01.png) | ![Tokyo Night Storm theme preview](images/tokyo-night-storm_02.png) | | ||
|
||
## Creating a Custom Theme | ||
|
||
Creating custom themes is simple. Themes are defined by a `json` file containing a **theme name** and several color values. Use the [theme template file](./theme-template.json) as a starting point. | ||
|
||
```json | ||
{ | ||
"name": "Theme Name", | ||
"colors": { | ||
"--color-long-round": "", | ||
"--color-short-round": "", | ||
"--color-focus-round": "", | ||
"--color-focus-round-middle": "", | ||
"--color-focus-round-end": "", | ||
"--color-background": "", | ||
"--color-background-light": "", | ||
"--color-background-lightest": "", | ||
"--color-foreground": "", | ||
"--color-foreground-darker": "", | ||
"--color-foreground-darkest": "", | ||
"--color-accent": "" | ||
} | ||
} | ||
``` | ||
|
||
`--color-focus-round-middle` and `--color-focus-round-end` are optional. You can use theme to customize the color of the gradiant during the focus round. If none are provided, a gradiant will be automatically computed from the `--color-focus-round` color to the `--color-short-round` color. | ||
|
||
To add your custom theme, copy your theme definition to the `pomodorolm/themes` directory in the `appData` directory. The location of the `appData` depends on the operating system. | ||
|
||
- `%APPDATA%` on **Windows** | ||
- `$XDG_CONFIG_HOME` or `~/.config` on **Linux** | ||
- `~/Library/Application Support` on **macOS** | ||
|
||
For example, add the theme file to the following directory on Windows: `C:\Users\{User}\AppData\Roaming\pomodorolm\themes` | ||
|
||
Restart the application to see your new theme available as an option. |
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
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,99 @@ | ||
-- Initial code is courtesy of to https://package.elm-lang.org/packages/juliusl/elm-ui-hexcolor/latest/Element-HexColor | ||
|
||
|
||
module ColorHelper exposing (RGB(..), fromCSSHexToRGB, fromRGBToCSSHex) | ||
|
||
import Bitwise | ||
import Dict exposing (Dict) | ||
import Hex | ||
import List | ||
|
||
|
||
type RGB | ||
= RGB Int Int Int | ||
|
||
|
||
toStringWithZeroPadding : Int -> String | ||
toStringWithZeroPadding num = | ||
let | ||
stringValue = | ||
Hex.toString num | ||
in | ||
if String.length stringValue < 2 then | ||
"0" ++ stringValue | ||
|
||
else | ||
stringValue | ||
|
||
|
||
fromCSSHexToRGB : String -> RGB | ||
fromCSSHexToRGB hexcode = | ||
RGB (getRed hexcode) (getGreen hexcode) (getBlue hexcode) | ||
|
||
|
||
fromRGBToCSSHex : RGB -> String | ||
fromRGBToCSSHex (RGB r g b) = | ||
"#" ++ toStringWithZeroPadding r ++ toStringWithZeroPadding g ++ toStringWithZeroPadding b | ||
|
||
|
||
getRed : String -> Int | ||
getRed hexcode = | ||
fromList (List.take 2 (fromCSSString hexcode)) | ||
|
||
|
||
getGreen : String -> Int | ||
getGreen hexcode = | ||
fromList (List.take 2 (List.drop 2 (fromCSSString hexcode))) | ||
|
||
|
||
getBlue : String -> Int | ||
getBlue hexcode = | ||
fromList (List.take 2 (List.drop 4 (fromCSSString hexcode))) | ||
|
||
|
||
fromCSSString : String -> List Char | ||
fromCSSString hexcode = | ||
List.drop 1 (String.toList hexcode) | ||
|
||
|
||
fromList : List Char -> Int | ||
fromList chars = | ||
List.sum (List.indexedMap (\i v -> Bitwise.shiftLeftBy (i * 4) v) (List.reverse (List.map fromChar chars))) | ||
|
||
|
||
fromChar : Char -> Int | ||
fromChar ch = | ||
case Dict.get ch hexmap of | ||
Just v -> | ||
v | ||
|
||
Nothing -> | ||
0 | ||
|
||
|
||
hexmap : Dict Char Int | ||
hexmap = | ||
Dict.fromList | ||
[ ( '0', 0 ) | ||
, ( '1', 1 ) | ||
, ( '2', 2 ) | ||
, ( '3', 3 ) | ||
, ( '4', 4 ) | ||
, ( '5', 5 ) | ||
, ( '6', 6 ) | ||
, ( '7', 7 ) | ||
, ( '8', 8 ) | ||
, ( '9', 9 ) | ||
, ( 'A', 10 ) | ||
, ( 'B', 11 ) | ||
, ( 'C', 12 ) | ||
, ( 'D', 13 ) | ||
, ( 'E', 14 ) | ||
, ( 'F', 15 ) | ||
, ( 'a', 10 ) | ||
, ( 'b', 11 ) | ||
, ( 'c', 12 ) | ||
, ( 'd', 13 ) | ||
, ( 'e', 14 ) | ||
, ( 'f', 15 ) | ||
] |
Oops, something went wrong.