mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-16 08:04:37 -04:00
⚡ CursorBuilder with tempdir
This commit is contained in:
parent
4aaf89ef08
commit
4d82790f80
1 changed files with 8 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import tempfile
|
||||
from .bundler import Bundler
|
||||
from .config import ConfigProvider, hotspots, sizes, delay
|
||||
from clickgen import build_x11_cursor_theme, build_cursor_theme, build_win_cursor_theme
|
||||
|
@ -18,6 +19,7 @@ class CursorBuilder():
|
|||
self.__name = name
|
||||
self.__config = config
|
||||
self.__bundler = Bundler(name, config)
|
||||
self.tmpdir = tempfile.mkdtemp()
|
||||
|
||||
def build_x11_cursors(self) -> None:
|
||||
"""
|
||||
|
@ -29,12 +31,12 @@ class CursorBuilder():
|
|||
image_dir=self.__config.bitmaps_dir,
|
||||
cursor_sizes=sizes,
|
||||
hotspots=hotspots,
|
||||
out_path=self.__config.temp_out_dir,
|
||||
out_path=self.tmpdir,
|
||||
archive=False,
|
||||
delay=delay
|
||||
)
|
||||
|
||||
self.__bundler.x11_bundle()
|
||||
self.__bundler.x11_bundle(self.tmpdir)
|
||||
|
||||
def build_win_cursors(self) -> None:
|
||||
"""
|
||||
|
@ -46,27 +48,26 @@ class CursorBuilder():
|
|||
image_dir=self.__config.bitmaps_dir,
|
||||
cursor_sizes=sizes,
|
||||
hotspots=hotspots,
|
||||
out_path=self.__config.temp_out_dir,
|
||||
out_path=self.tmpdir,
|
||||
archive=False,
|
||||
delay=delay
|
||||
)
|
||||
|
||||
self.__bundler.win_bundle()
|
||||
self.__bundler.win_bundle(self.tmpdir)
|
||||
|
||||
def build_cursors(self) -> None:
|
||||
"""
|
||||
docstring
|
||||
"""
|
||||
|
||||
print('🌈 Building %s Theme ...' % self.__name)
|
||||
build_cursor_theme(
|
||||
name=self.__name,
|
||||
image_dir=self.__config.bitmaps_dir,
|
||||
cursor_sizes=sizes,
|
||||
hotspots=hotspots,
|
||||
out_path=self.__config.temp_out_dir,
|
||||
out_path=self.tmpdir,
|
||||
archive=False,
|
||||
delay=delay
|
||||
)
|
||||
|
||||
self.__bundler.bundle()
|
||||
self.__bundler.bundle(self.tmpdir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue