Skip to content

Commit

Permalink
feat: Right hand cursor SVG init
Browse files Browse the repository at this point in the history
Related to #112
  • Loading branch information
ful1e5 committed Jan 19, 2024
1 parent 62e20e8 commit e7c526f
Show file tree
Hide file tree
Showing 223 changed files with 1,246 additions and 3 deletions.
21 changes: 18 additions & 3 deletions svg/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import contextlib
import os
from pathlib import Path
from typing import List


@contextlib.contextmanager
Expand Down Expand Up @@ -57,11 +58,23 @@ def cwd(dir):
"zoom-out",
]

right_files = files + [
"bd_double_arrow",
"fd_double_arrow",
"move",
"sb_down_arrow",
"sb_h_double_arrow",
"sb_left_arrow",
"sb_right_arrow",
"sb_up_arrow",
"sb_v_double_arrow",
]


def link_missing_svgs(src_dir, dst_dir) -> None:
def gen_symlinks(fnames: List[str], src_dir: str, dst_dir: str) -> None:
dst = Path(dst_dir)
for file in Path(src_dir).glob("*"):
if file.stem in files:
if file.stem in fnames:
link = dst / file.name
if os.path.exists(link):
os.remove(link)
Expand All @@ -76,4 +89,6 @@ def link_missing_svgs(src_dir, dst_dir) -> None:
print(f"Ignoring {file.name}")


link_missing_svgs("original", "modern")
gen_symlinks(files, "original", "modern")
gen_symlinks(right_files, "modern", "modern-right")
gen_symlinks(right_files, "original", "original-right")
1 change: 1 addition & 0 deletions svg/modern-right/X_cursor.svg
1 change: 1 addition & 0 deletions svg/modern-right/bd_double_arrow.svg
1 change: 1 addition & 0 deletions svg/modern-right/bottom_left_corner.svg
1 change: 1 addition & 0 deletions svg/modern-right/bottom_right_corner.svg
1 change: 1 addition & 0 deletions svg/modern-right/bottom_side.svg
1 change: 1 addition & 0 deletions svg/modern-right/bottom_tee.svg
3 changes: 3 additions & 0 deletions svg/modern-right/center_ptr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions svg/modern-right/circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions svg/modern-right/context-menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions svg/modern-right/copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions svg/modern-right/cross.svg
1 change: 1 addition & 0 deletions svg/modern-right/crossed_circle.svg
1 change: 1 addition & 0 deletions svg/modern-right/crosshair.svg
1 change: 1 addition & 0 deletions svg/modern-right/dnd-ask.svg
1 change: 1 addition & 0 deletions svg/modern-right/dnd-copy.svg
1 change: 1 addition & 0 deletions svg/modern-right/dnd-link.svg
1 change: 1 addition & 0 deletions svg/modern-right/dnd_no_drop.svg
1 change: 1 addition & 0 deletions svg/modern-right/dotbox.svg
1 change: 1 addition & 0 deletions svg/modern-right/fd_double_arrow.svg
1 change: 1 addition & 0 deletions svg/modern-right/grabbing.svg
1 change: 1 addition & 0 deletions svg/modern-right/hand1.svg
1 change: 1 addition & 0 deletions svg/modern-right/hand2.svg
3 changes: 3 additions & 0 deletions svg/modern-right/left_ptr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions svg/modern-right/left_ptr_watch/left_ptr_watch-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions svg/modern-right/left_ptr_watch/left_ptr_watch-02.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions svg/modern-right/left_ptr_watch/left_ptr_watch-03.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions svg/modern-right/left_ptr_watch/left_ptr_watch-04.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions svg/modern-right/left_ptr_watch/left_ptr_watch-05.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e7c526f

Please sign in to comment.