Skip to content

Commit c321e30

Browse files
committed
Merge branch 'refactor-no-click-lib'
2 parents 9518067 + 9a92790 commit c321e30

58 files changed

Lines changed: 511 additions & 1169 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ yay -S pycritty
4646
Change your current config:
4747

4848
```bash
49-
pycritty --font UbuntuMono --size 14 --opacity 0.95
49+
pycritty --font UbuntuMono --font-size 14 --opacity 0.95 --padding 3 3
5050
```
5151

5252
Save multiple configs and reuse them later:
@@ -58,10 +58,10 @@ pycritty load AnotherConfig
5858

5959
Install themes and configs from URLs:
6060
```bash
61-
pycritty install -t https://raw.githubusercontent.com/antoniosarosi/pycritty/master/config/themes/breeze.yaml
62-
pycritty -t breeze
63-
pycritty install -c -n SomeCoolConfig https://raw.githubusercontent.com/antoniosarosi/dotfiles/master/.config/alacritty/config.yaml
64-
pycritty load SomeCoolConfig
61+
pycritty install --theme https://raw.githubusercontent.com/antoniosarosi/pycritty/master/config/themes/breeze.yaml
62+
pycritty --theme breeze # Apply downloaded theme
63+
pycritty install --config --name SomeCoolConfig https://raw.githubusercontent.com/antoniosarosi/dotfiles/master/.config/alacritty/config.yaml
64+
pycritty load SomeCoolConfig # Apply downloaded config
6565
```
6666

6767
Check help for all available options:
@@ -73,7 +73,7 @@ pycritty save -h
7373

7474
## Fonts Config
7575

76-
Fonts are configured in ```~/.config/alacritty/fonts.yaml``` with this format:
76+
Fonts are configured at ```~/.config/alacritty/fonts.yaml``` with this format:
7777
```yaml
7878
fonts:
7979
Alias: Font Name
@@ -154,18 +154,17 @@ the CLI in a shell script or use ```pycritty``` as a python module:
154154
155155
# Dummy script that changes the theme every 5 minutes
156156
157-
from time import sleep
158-
from pycritty.commands import Pycritty, ListResource
157+
import time
158+
import pycritty
159159
160160
161161
def main():
162-
ls = ListResource()
163-
conf = Pycritty()
162+
config = pycritty.Config()
164163
while True:
165-
for theme in ls.list_themes():
166-
conf.change_theme(theme) # or conf.set(theme=theme)
167-
conf.apply()
168-
sleep(300)
164+
for theme in pycritty.list_themes():
165+
config.change_theme(theme) # or config.set(theme=theme)
166+
config.apply()
167+
time.sleep(300)
169168
170169
171170
if __name__ == '__main__':
@@ -185,3 +184,30 @@ while :; do
185184
done
186185
done
187186
```
187+
188+
## Development
189+
190+
Clone the repository and run it as a module.
191+
192+
```bash
193+
git clone git@github.com:antoniosarosi/pycritty
194+
cd pycritty
195+
python -m pycritty.main
196+
```
197+
198+
## Publishing
199+
200+
### PyPi
201+
202+
```bash
203+
# First make sure you have these packages installed
204+
pip install --user --upgrade setuptools wheel twine
205+
# Generate distribution files
206+
python setup.py sdist bdist_wheel
207+
# Test upload
208+
python -m twine upload --repository testpypi dist/*
209+
# Test download
210+
pip install -i https://test.pypi.org/simple/ --no-deps pycritty
211+
# Upload to PyPi
212+
python -m twine upload --repository pypi dist/*
213+
```

config/themes/afterglow.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

config/themes/argonaut.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

config/themes/base16-default-dark.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

config/themes/blood-moon.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

config/themes/bluescreen.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
colors:
22
# Default colors
33
primary:
4-
background: '0x011627'
5-
foreground: '0x4fb3ff'
4+
background: '#011627'
5+
foreground: '#4fb3ff'
66

77
# Normal colors
88
normal:
9-
black: '0x181a29'
10-
red: '0x336dff'
11-
green: '0x0091ff'
12-
yellow: '0x47ffd4'
13-
blue: '0x6378ff'
14-
magenta: '0x7a7dff'
15-
cyan: '0x8ffff2'
16-
white: '0xbdfff7'
9+
black: '#181a29'
10+
red: '#336dff'
11+
green: '#0091ff'
12+
yellow: '#47ffd4'
13+
blue: '#6378ff'
14+
magenta: '#7a7dff'
15+
cyan: '#8ffff2'
16+
white: '#bdfff7'
1717

1818
# Bright colors
1919
bright:
20-
black: '0x282a40'
21-
red: '0x336dff'
22-
green: '0x0091ff'
23-
yellow: '0x47ffd4'
24-
blue: '0x6378ff'
25-
magenta: '0x7a7dff'
26-
cyan: '0x8ffff2'
27-
white: '0xbce6e0'
20+
black: '#282a40'
21+
red: '#336dff'
22+
green: '#0091ff'
23+
yellow: '#47ffd4'
24+
blue: '#6378ff'
25+
magenta: '#7a7dff'
26+
cyan: '#8ffff2'
27+
white: '#bce6e0'

config/themes/breeze.yaml

Lines changed: 0 additions & 44 deletions
This file was deleted.

config/themes/campbell.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

config/themes/cobalt-2.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)