mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-15 15:44:35 -04:00
⚡ Logs and hotspots in builder
This commit is contained in:
parent
b0454304a9
commit
f1fbce7510
7 changed files with 123 additions and 9 deletions
|
@ -1 +1,2 @@
|
||||||
recursive-include builder/windows.inf
|
recursive-include builder/windows.inf
|
||||||
|
recursive-include builder/hotspots.json
|
|
@ -2,6 +2,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from .cursor import CursorBuilder
|
from .cursor import CursorBuilder
|
||||||
from .provider import ConfigProvider
|
from .provider import ConfigsProvider
|
||||||
|
|
||||||
__version__: str = "1.0.1"
|
__version__: str = "1.0.1"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import builder
|
import builder
|
||||||
from .provider import ConfigProvider
|
from .provider import ConfigsProvider
|
||||||
|
|
||||||
|
|
||||||
class CursorBuilder():
|
class CursorBuilder():
|
||||||
|
@ -10,7 +10,7 @@ class CursorBuilder():
|
||||||
docstring
|
docstring
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, config: ConfigProvider):
|
def __init__(self, configs: ConfigsProvider):
|
||||||
|
|
||||||
print("⚡ Bibata Builder Version %s" % builder.__version__)
|
print("⚡ Bibata Builder Version %s" % builder.__version__)
|
||||||
self.__config = config
|
self.__configs = configs
|
||||||
|
|
99
builder/hotspots.json
Normal file
99
builder/hotspots.json
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
{
|
||||||
|
"all_scroll": { "xhot": 100, "yhot": 100 },
|
||||||
|
"dotbox": { "xhot": 100, "yhot": 100 },
|
||||||
|
"move": { "xhot": 100, "yhot": 100 },
|
||||||
|
"plus": { "xhot": 100, "yhot": 100 },
|
||||||
|
"vertical_text": { "xhot": 100, "yhot": 100 },
|
||||||
|
"wait": { "xhot": 100, "yhot": 100 },
|
||||||
|
"wayland_cursor": { "xhot": 100, "yhot": 100 },
|
||||||
|
"x_cursor": { "xhot": 100, "yhot": 100 },
|
||||||
|
"xterm": { "xhot": 100, "yhot": 100 },
|
||||||
|
|
||||||
|
"bd_double_arrow": { "xhot": 98, "yhot": 100 },
|
||||||
|
"fd_double_arrow": { "xhot": 98, "yhot": 100 },
|
||||||
|
|
||||||
|
"bottom_left_corner": { "xhot": 31, "yhot": 172 },
|
||||||
|
"bottom_right_corner": { "xhot": 170, "yhot": 172 },
|
||||||
|
|
||||||
|
"bottom_side": { "xhot": 100, "yhot": 164 },
|
||||||
|
"bottom_tee": { "xhot": 100, "yhot": 164 },
|
||||||
|
|
||||||
|
"center_ptr": { "xhot": 98, "yhot": 131 },
|
||||||
|
|
||||||
|
"circle": { "xhot": 48, "yhot": 25 },
|
||||||
|
"context_menu": { "xhot": 48, "yhot": 25 },
|
||||||
|
"copy": { "xhot": 48, "yhot": 25 },
|
||||||
|
"link": { "xhot": 48, "yhot": 25 },
|
||||||
|
"pointer_move": { "xhot": 48, "yhot": 25 },
|
||||||
|
|
||||||
|
"cross": { "xhot": 98, "yhot": 96 },
|
||||||
|
|
||||||
|
"crossed_circle": { "xhot": 100, "yhot": 100 },
|
||||||
|
|
||||||
|
"crosshair": { "xhot": 99, "yhot": 99 },
|
||||||
|
|
||||||
|
"dnd_ask": { "xhot": 86, "yhot": 79 },
|
||||||
|
"dnd_copy": { "xhot": 86, "yhot": 79 },
|
||||||
|
"dnd_link": { "xhot": 86, "yhot": 79 },
|
||||||
|
"dnd_move": { "xhot": 86, "yhot": 79 },
|
||||||
|
"dnd_no_drop": { "xhot": 86, "yhot": 79 },
|
||||||
|
|
||||||
|
"dnd_none": { "xhot": 99, "yhot": 98 },
|
||||||
|
|
||||||
|
"grabbing": { "xhot": 106, "yhot": 79 },
|
||||||
|
|
||||||
|
"hand1": { "xhot": 113, "yhot": 95 },
|
||||||
|
|
||||||
|
"hand2": { "xhot": 88, "yhot": 32 },
|
||||||
|
|
||||||
|
"left_ptr_watch": { "xhot": 50, "yhot": 28 },
|
||||||
|
|
||||||
|
"left_ptr": { "xhot": 53, "yhot": 36 },
|
||||||
|
|
||||||
|
"left_side": { "xhot": 35, "yhot": 100 },
|
||||||
|
|
||||||
|
"left_tee": { "xhot": 165, "yhot": 95 },
|
||||||
|
|
||||||
|
"ll_angle": { "xhot": 34, "yhot": 165 },
|
||||||
|
|
||||||
|
"lr_angle": { "xhot": 167, "yhot": 164 },
|
||||||
|
|
||||||
|
"pencil": { "xhot": 37, "yhot": 161 },
|
||||||
|
|
||||||
|
"question_arrow": { "xhot": 102, "yhot": 102 },
|
||||||
|
|
||||||
|
"right_ptr": { "xhot": 150, "yhot": 29 },
|
||||||
|
|
||||||
|
"right_side": { "xhot": 163, "yhot": 98 },
|
||||||
|
|
||||||
|
"right_tee": { "xhot": 30, "yhot": 96 },
|
||||||
|
|
||||||
|
"sb_down_arrow": { "xhot": 100, "yhot": 126 },
|
||||||
|
|
||||||
|
"sb_h_double_arrow": { "xhot": 100, "yhot": 100 },
|
||||||
|
"sb_v_double_arrow": { "xhot": 100, "yhot": 100 },
|
||||||
|
|
||||||
|
"sb_left_arrow": { "xhot": 86, "yhot": 100 },
|
||||||
|
|
||||||
|
"sb_right_arrow": { "xhot": 113, "yhot": 100 },
|
||||||
|
|
||||||
|
"sb_up_arrow": { "xhot": 99, "yhot": 86 },
|
||||||
|
|
||||||
|
"tcross": { "xhot": 98, "yhot": 100 },
|
||||||
|
|
||||||
|
"top_left_corner": { "xhot": 29, "yhot": 27 },
|
||||||
|
|
||||||
|
"top_right_corner": { "xhot": 170, "yhot": 28 },
|
||||||
|
|
||||||
|
"top_side": { "xhot": 98, "yhot": 34 },
|
||||||
|
|
||||||
|
"top_tee": { "xhot": 98, "yhot": 29 },
|
||||||
|
|
||||||
|
"ul_angle": { "xhot": 34, "yhot": 35 },
|
||||||
|
|
||||||
|
"ur_angle": { "xhot": 164, "yhot": 34 },
|
||||||
|
|
||||||
|
"zoom_in": { "xhot": 90, "yhot": 89 },
|
||||||
|
|
||||||
|
"zoom_out": { "xhot": 93, "yhot": 90 }
|
||||||
|
}
|
8
builder/log.py
Normal file
8
builder/log.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
|
logging.basicConfig(filename='%s/build.log' % os.getcwd(), filemode='w',
|
||||||
|
format='%(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from .provider import ConfigProvider
|
from .provider import ConfigsProvider
|
||||||
|
|
||||||
|
|
||||||
class Packager():
|
class Packager():
|
||||||
|
@ -9,5 +9,5 @@ class Packager():
|
||||||
Create Crisp 📦 Packages for Windows & X11 Cursor Theme.
|
Create Crisp 📦 Packages for Windows & X11 Cursor Theme.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, config: ConfigProvider):
|
def __init__(self, configs: ConfigsProvider):
|
||||||
self.__config = config
|
self.__configs = configs
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import log
|
||||||
import sys
|
import sys
|
||||||
|
import json
|
||||||
import builder
|
import builder
|
||||||
from os import path, listdir
|
from os import path, listdir
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
class ConfigProvider():
|
class ConfigsProvider():
|
||||||
"""
|
"""
|
||||||
Configure `Bibata` building process.
|
Configure `Bibata` building process.
|
||||||
"""
|
"""
|
||||||
|
@ -53,6 +55,10 @@ class ConfigProvider():
|
||||||
self.__bitmaps_dir: str = bitmaps_dir
|
self.__bitmaps_dir: str = bitmaps_dir
|
||||||
self.__out_dir: str = out_dir
|
self.__out_dir: str = out_dir
|
||||||
|
|
||||||
|
# read hotspots file
|
||||||
|
with open(path.join(builder.__path__[0], "hotspots.json")) as hotspot_file:
|
||||||
|
self.hotspots = json.loads(hotspot_file.read())
|
||||||
|
|
||||||
def get_windows_script(self, theme_name: str, author: str) -> str:
|
def get_windows_script(self, theme_name: str, author: str) -> str:
|
||||||
|
|
||||||
with open(path.join(builder.__path__[0], "windows.inf")) as f:
|
with open(path.join(builder.__path__[0], "windows.inf")) as f:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue