Drop icons from sofi

This commit is contained in:
Sage Vaillancourt 2023-12-13 12:20:47 -05:00
parent 4f2cd94b35
commit fbed79f63f
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,6 @@
FIREFOX_PROFILE="$HOME/.mozilla/firefox/qzw6ae3r.default-beta" #!/bin/bash
FIREFOX_PROFILE="$HOME/.mozilla/firefox/7sxxu758.dev-edition-default"
PLACES_FILE="$FIREFOX_PROFILE/places.sqlite" PLACES_FILE="$FIREFOX_PROFILE/places.sqlite"
WORKING_PLACES="$FIREFOX_PROFILE/places2.sqlite" WORKING_PLACES="$FIREFOX_PROFILE/places2.sqlite"
CACHE_FILE="$HOME/.rofi-history-cache" CACHE_FILE="$HOME/.rofi-history-cache"

View File

@ -6,9 +6,9 @@ import sys
home = os.environ['HOME'] home = os.environ['HOME']
git_dirs = [ git_dirs = [
home + "/work",
home + "/projects", home + "/projects",
home + "/git", home + "/git",
home + "/git/worktrees",
home + "/WebStormProjects", home + "/WebStormProjects",
home + "/RiderProjects" home + "/RiderProjects"
] ]
@ -58,6 +58,7 @@ def get_icon(project: str) -> str | None:
def open_project(project: str) -> (): def open_project(project: str) -> ():
project = project.replace("~", home)
(project_type, file) = get_project_type(project) (project_type, file) = get_project_type(project)
if project_type is None: if project_type is None:
return return
@ -73,7 +74,8 @@ def print_project_message(project: str) -> ():
if icon is None: if icon is None:
return return
print(f'{project}\0icon\x1f{icon}') project = project.replace(home, "~")
print(f'git {project}')
if __name__ == '__main__': if __name__ == '__main__':
@ -86,4 +88,4 @@ if __name__ == '__main__':
if os.path.isdir(project): if os.path.isdir(project):
print_project_message(project) print_project_message(project)
else: else:
open_project(sys.argv[1]) open_project(sys.argv[1][4:])