Skip to content

Commit

Permalink
Merge branch 'refactor-no-click-lib'
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniosarosi committed Feb 15, 2022
2 parents 9518067 + 9a92790 commit c321e30
Show file tree
Hide file tree
Showing 58 changed files with 511 additions and 1,169 deletions.
54 changes: 40 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ yay -S pycritty
Change your current config:

```bash
pycritty --font UbuntuMono --size 14 --opacity 0.95
pycritty --font UbuntuMono --font-size 14 --opacity 0.95 --padding 3 3
```

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

Install themes and configs from URLs:
```bash
pycritty install -t https://raw.githubusercontent.com/antoniosarosi/pycritty/master/config/themes/breeze.yaml
pycritty -t breeze
pycritty install -c -n SomeCoolConfig https://raw.githubusercontent.com/antoniosarosi/dotfiles/master/.config/alacritty/config.yaml
pycritty load SomeCoolConfig
pycritty install --theme https://raw.githubusercontent.com/antoniosarosi/pycritty/master/config/themes/breeze.yaml
pycritty --theme breeze # Apply downloaded theme
pycritty install --config --name SomeCoolConfig https://raw.githubusercontent.com/antoniosarosi/dotfiles/master/.config/alacritty/config.yaml
pycritty load SomeCoolConfig # Apply downloaded config
```

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

## Fonts Config

Fonts are configured in ```~/.config/alacritty/fonts.yaml``` with this format:
Fonts are configured at ```~/.config/alacritty/fonts.yaml``` with this format:
```yaml
fonts:
Alias: Font Name
Expand Down Expand Up @@ -154,18 +154,17 @@ the CLI in a shell script or use ```pycritty``` as a python module:
# Dummy script that changes the theme every 5 minutes
from time import sleep
from pycritty.commands import Pycritty, ListResource
import time
import pycritty
def main():
ls = ListResource()
conf = Pycritty()
config = pycritty.Config()
while True:
for theme in ls.list_themes():
conf.change_theme(theme) # or conf.set(theme=theme)
conf.apply()
sleep(300)
for theme in pycritty.list_themes():
config.change_theme(theme) # or config.set(theme=theme)
config.apply()
time.sleep(300)
if __name__ == '__main__':
Expand All @@ -185,3 +184,30 @@ while :; do
done
done
```

## Development

Clone the repository and run it as a module.

```bash
git clone git@github.com:antoniosarosi/pycritty
cd pycritty
python -m pycritty.main
```

## Publishing

### PyPi

```bash
# First make sure you have these packages installed
pip install --user --upgrade setuptools wheel twine
# Generate distribution files
python setup.py sdist bdist_wheel
# Test upload
python -m twine upload --repository testpypi dist/*
# Test download
pip install -i https://test.pypi.org/simple/ --no-deps pycritty
# Upload to PyPi
python -m twine upload --repository pypi dist/*
```
48 changes: 0 additions & 48 deletions config/themes/afterglow.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions config/themes/argonaut.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions config/themes/base16-default-dark.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions config/themes/blood-moon.yaml

This file was deleted.

36 changes: 18 additions & 18 deletions config/themes/bluescreen.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
colors:
# Default colors
primary:
background: '0x011627'
foreground: '0x4fb3ff'
background: '#011627'
foreground: '#4fb3ff'

# Normal colors
normal:
black: '0x181a29'
red: '0x336dff'
green: '0x0091ff'
yellow: '0x47ffd4'
blue: '0x6378ff'
magenta: '0x7a7dff'
cyan: '0x8ffff2'
white: '0xbdfff7'
black: '#181a29'
red: '#336dff'
green: '#0091ff'
yellow: '#47ffd4'
blue: '#6378ff'
magenta: '#7a7dff'
cyan: '#8ffff2'
white: '#bdfff7'

# Bright colors
bright:
black: '0x282a40'
red: '0x336dff'
green: '0x0091ff'
yellow: '0x47ffd4'
blue: '0x6378ff'
magenta: '0x7a7dff'
cyan: '0x8ffff2'
white: '0xbce6e0'
black: '#282a40'
red: '#336dff'
green: '#0091ff'
yellow: '#47ffd4'
blue: '#6378ff'
magenta: '#7a7dff'
cyan: '#8ffff2'
white: '#bce6e0'
44 changes: 0 additions & 44 deletions config/themes/breeze.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions config/themes/campbell.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions config/themes/cobalt-2.yaml

This file was deleted.

Loading

0 comments on commit c321e30

Please sign in to comment.