mirror of
https://github.com/Paul-Houser/StartTree.git
synced 2024-11-25 00:33:25 +01:00
added theme selection
This commit is contained in:
parent
a2fd07f2df
commit
0da73d49ed
@ -1,4 +1,5 @@
|
|||||||
font_size: 22
|
font_size: 22
|
||||||
|
theme: void
|
||||||
tree_1:
|
tree_1:
|
||||||
general:
|
general:
|
||||||
github: "https://www.github.com/"
|
github: "https://www.github.com/"
|
||||||
|
8
init.py
8
init.py
@ -21,11 +21,6 @@ config_path = home + '/.config/StartTree/config.yaml'
|
|||||||
# get cache path
|
# get cache path
|
||||||
cache_dir = home + '/.cache/StartTree'
|
cache_dir = home + '/.cache/StartTree'
|
||||||
|
|
||||||
def prettifyHTML(html):
|
|
||||||
soup = BeautifulSoup(html, 'html.parser')
|
|
||||||
prettyHTML = soup.prettify()
|
|
||||||
return prettyHTML
|
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
# check if .config path exists
|
# check if .config path exists
|
||||||
if not os.path.isdir(home + '/.config'):
|
if not os.path.isdir(home + '/.config'):
|
||||||
@ -57,6 +52,9 @@ def setup():
|
|||||||
print("Creating '" + cache_dir + "'...")
|
print("Creating '" + cache_dir + "'...")
|
||||||
os.mkdir(cache_dir)
|
os.mkdir(cache_dir)
|
||||||
|
|
||||||
|
print("symlinking themes")
|
||||||
|
os.symlink(os.getcwd() + '/themes', home + '/.cache/StartTree/themes')
|
||||||
|
|
||||||
print("Creating '" + cache_dir + "/styles'")
|
print("Creating '" + cache_dir + "/styles'")
|
||||||
os.mkdir(cache_dir + '/styles')
|
os.mkdir(cache_dir + '/styles')
|
||||||
|
|
||||||
|
12
install.py
12
install.py
@ -103,11 +103,21 @@ def gen_style(file_dict):
|
|||||||
skeleton_style = open('./skeletons/style.css', 'r')
|
skeleton_style = open('./skeletons/style.css', 'r')
|
||||||
cache_style = open(cache_dir + '/styles/style.css', 'w')
|
cache_style = open(cache_dir + '/styles/style.css', 'w')
|
||||||
|
|
||||||
|
# find style attributes in file_dict
|
||||||
font_size = 20
|
font_size = 20
|
||||||
|
theme = "void"
|
||||||
for key in file_dict:
|
for key in file_dict:
|
||||||
if key == "font_size":
|
if key == "font_size":
|
||||||
font_size = file_dict[key]
|
font_size = file_dict[key]
|
||||||
break
|
if key == "theme":
|
||||||
|
theme = file_dict[key]
|
||||||
|
|
||||||
|
if theme == "pywal":
|
||||||
|
theme = home + '/.cache/wal/colors.css'
|
||||||
|
else:
|
||||||
|
theme = '../themes/' + theme + '.css'
|
||||||
|
|
||||||
|
cache_style.write("@import url('" + theme + "');\n")
|
||||||
|
|
||||||
lines = skeleton_style.readlines()
|
lines = skeleton_style.readlines()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
@import url('/home/paul/.cache/wal/colors.css');
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Roboto Mono";
|
font-family: "Roboto Mono";
|
||||||
src: url("./Hack.ttf");
|
src: url("./Hack.ttf");
|
||||||
|
24
themes/black-ice.css
Normal file
24
themes/black-ice.css
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
:root {
|
||||||
|
/* Special */
|
||||||
|
--background: #000000;
|
||||||
|
--foreground: #9a9c9f;
|
||||||
|
--cursor: #9a9c9f;
|
||||||
|
|
||||||
|
/* Colors */
|
||||||
|
--color0: #000000;
|
||||||
|
--color1: #04294d;
|
||||||
|
--color2: #2d2d2d;
|
||||||
|
--color3: #094c57;
|
||||||
|
--color4: #176485;
|
||||||
|
--color5: #585a5a;
|
||||||
|
--color6: #62909b;
|
||||||
|
--color7: #9a9c9f;
|
||||||
|
--color8: #36393f;
|
||||||
|
--color9: #04294d;
|
||||||
|
--color10: #2d2d2d;
|
||||||
|
--color11: #094c57;
|
||||||
|
--color12: #176485;
|
||||||
|
--color13: #585a5a;
|
||||||
|
--color14: #62909b;
|
||||||
|
--color15: #9a9c9f;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user