123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- # themes
- if $theme['name'] = '': $theme['name'] = 'Dynamic' & gs 'themes', 'set_dynamic'
- !! ------------------------------------------------------------------------------
- !! ---------------------------------- Helpers -----------------------------------
- !! ------------------------------------------------------------------------------
- !! picks an alternating color between table_bg and table_bg_alt
- ! use: $temp_bcolor = func('themes', 'alt_color', $temp_bcolor)
- ! when you pass blank $temp_bcolor ('') it will return table_bg
- ! when you pass $temp_bcolor again it will return table_bg_alt
- if $ARGS[0] = 'alt_color':
- $result = iif($ARGS[1] = $theme['table_bg'], $theme['table_bg_alt'], $theme['table_bg'])
- end
- !! wrapper for above func to use with wardrobe system
- !! does the same thing but it sets $temp_bcolor instead of returning a value
- ! use: gs 'themes', 'clothing'
- if $ARGS[0] = 'clothing':
- $temp_bcolor = func('themes', 'alt_color', $temp_bcolor)
- end
- !! ------------------------------------------------------------------------------
- !! ---------------------------------- Routing -----------------------------------
- !! ------------------------------------------------------------------------------
- if $ARGS[0] = 'outdoors':
- gs 'themes', 'apply', $ARGS[0]
- elseif $ARGS[0] = 'indoors':
- gs 'themes', 'apply', $ARGS[0]
- gs 'indoors'
- elseif $ARGS[0] = 'apply':
- if $theme['type'] = 'dynamic':
- theme['old_is_dark'] = theme['is_dark']
- gs 'themes', 'apply_dynamic', $ARGS[1]
- if theme['old_is_dark'] ! theme['is_dark']:
- theme['old_is_dark'] = theme['is_dark']
- clear
- $stat_msg = ''
- gs 'stat_display'
- end
- else
- gs 'themes', 'apply_static', $ARGS[1]
- end
- end
- !! ------------------------------------------------------------------------------
- !! ----------------------------------- Apply ------------------------------------
- !! ------------------------------------------------------------------------------
- if $ARGS[0] = 'apply_dynamic':
- if $ARGS[1] = 'indoors':
- theme['is_dark'] = 0
- theme['bcolor'] = rgb(255, 255, 255)
- theme['lcolor'] = rgb(106, 90, 205)
- $theme['bcolor'] = "#FFFFFF"
- $theme['lcolor'] = "#6A5ACD"
- elseif (DayStage = 6) or (DayStage = 1):
- ! sunrise or morning
- theme['is_dark'] = 0
- theme['bcolor'] = rgb(210, 210, 255)
- theme['lcolor'] = rgb(40, 40, 255)
- $theme['bcolor'] = "#D2D2FF"
- $theme['lcolor'] = "#2828FF"
- elseif (DayStage = 2):
- ! day
- theme['is_dark'] = 0
- theme['bcolor'] = rgb(255, 255, 255)
- theme['lcolor'] = rgb(106, 90, 205)
- $theme['bcolor'] = "#FFFFFF"
- $theme['lcolor'] = "#6A5ACD"
- elseif (DayStage = 3):
- ! evening
- theme['is_dark'] = 0
- theme['bcolor'] = rgb(226, 169, 169)
- theme['lcolor'] = rgb(56, 90, 205)
- $theme['bcolor'] = "#E2A9A9"
- $theme['lcolor'] = "#385ACD"
- elseif (DayStage = 4):
- ! sunset
- theme['is_dark'] = 1
- theme['bcolor'] = rgb(BColorBase, BColorBase - BColorBase / 4, BColorBase - BColorBase / 4)
- theme['lcolor'] = rgb(110, 200, 200)
- $theme['bcolor'] = func('shortgs', 'rgb_to_hex', bcolor)
- $theme['lcolor'] = "#6EC8C8"
- else
- ! Stage 5 - night
- theme['is_dark'] = 1
- theme['bcolor'] = rgb(0, 0, 0)
- theme['lcolor'] = rgb(106, 90, 205)
- $theme['bcolor'] = "#000000"
- $theme['lcolor'] = "#6A5ACD"
- end
- if theme['is_dark'] = 1:
- theme['fcolor'] = rgb(255, 255, 255)
- $theme['fcolor'] = "#FFFFFF"
- theme['table_bg'] = rgb(32, 32, 32)
- theme['table_bg_alt'] = rgb(48, 48, 48)
- $theme['table_bg'] = "#202020"
- $theme['table_bg_alt'] = "#303030"
- else
- theme['fcolor'] = rgb(0, 0, 0)
- $theme['fcolor'] = "#000000"
- theme['table_bg'] = rgb(255, 255, 255)
- theme['table_bg_alt'] = rgb(230, 242, 255)
- $theme['table_bg'] = "#FFFFFF"
- $theme['table_bg_alt'] = "#E6F2FF"
- end
- gs 'themes', 'apply_static'
- elseif $ARGS[0] = 'apply_static':
- bcolor = theme['bcolor']
- fcolor = theme['fcolor']
- lcolor = theme['lcolor']
- $bcolor = $theme['bcolor']
- $fcolor = $theme['fcolor']
- $lcolor = $theme['lcolor']
- fsize = theme['fsize']
- $fname = $theme['fname']
- elseif $ARGS[0] = 'reset':
- killvar 'theme'
- killvar '$theme'
- killvar 'bcolor'
- killvar 'fcolor'
- killvar 'lcolor'
- killvar '$bcolor'
- killvar '$fcolor'
- killvar '$lcolor'
- fsize = 12
- $fname = 'Tahoma'
- theme['is_dark'] = 0
- end
- !! ------------------------------------------------------------------------------
- !! ----------------------------------- Themes -----------------------------------
- !! ------------------------------------------------------------------------------
- if $ARGS[0] = 'set_dynamic':
- gs 'themes', 'reset'
- $theme['name'] = 'Dynamic'
- $theme['type'] = 'dynamic'
- gs 'themes', 'default_palette'
- theme['fsize'] = 12
- $theme['fname'] = 'Tahoma'
- elseif $ARGS[0] = 'set_white':
- gs 'themes', 'reset'
- $theme['name'] = 'White'
- $theme['type'] = 'static'
- theme['is_dark'] = 0
- gs 'themes', 'default_palette'
- theme['bcolor'] = rgb(255, 255, 255)
- theme['fcolor'] = rgb(0, 0, 0)
- theme['lcolor'] = rgb(106, 90, 205)
- $theme['bcolor'] = "#FFFFFF"
- $theme['fcolor'] = "#000000"
- $theme['lcolor'] = "#6A5ACD"
- theme['fsize'] = 12
- $theme['fname'] = 'Tahoma'
- theme['table_bg'] = rgb(255, 255, 255)
- theme['table_bg_alt'] = rgb(230, 242, 255)
- $theme['table_bg'] = "#FFFFFF"
- $theme['table_bg_alt'] = "#E6F2FF"
- elseif $ARGS[0] = 'set_black':
- gs 'themes', 'reset'
- $theme['name'] = 'Black'
- $theme['type'] = 'static'
- theme['is_dark'] = 1
- gs 'themes', 'default_palette'
- theme['bcolor'] = rgb(0, 0, 0)
- theme['fcolor'] = rgb(255, 255, 255)
- theme['lcolor'] = rgb(90, 180, 200)
- $theme['bcolor'] = "#000000"
- $theme['fcolor'] = "#FFFFFF"
- $theme['lcolor'] = "#5AB4C8"
- theme['fsize'] = 12
- $theme['fname'] = 'Tahoma'
- theme['table_bg'] = rgb(32, 32, 32)
- theme['table_bg_alt'] = rgb(48, 48, 48)
- $theme['table_bg'] = "#202020"
- $theme['table_bg_alt'] = "#303030"
- elseif $ARGS[0] = 'set_gray':
- gs 'themes', 'reset'
- $theme['name'] = 'Modern Grey'
- $theme['type'] = 'static'
- theme['is_dark'] = 1
- gs 'themes', 'default_palette'
- theme['bcolor'] = rgb(20, 20, 20)
- theme['fcolor'] = rgb(255, 255, 255)
- theme['lcolor'] = rgb(90, 180, 200)
- $theme['bcolor'] = "#141414"
- $theme['fcolor'] = "#FFFFFF"
- $theme['lcolor'] = "#5AB4C8"
- theme['fsize'] = 12
- $theme['fname'] = 'Tahoma'
- theme['table_bg'] = rgb(32, 32, 32)
- theme['table_bg_alt'] = rgb(48, 48, 48)
- $theme['table_bg'] = "#202020"
- $theme['table_bg_alt'] = "#303030"
- elseif $ARGS[0] = 'set_custom':
- gs 'themes', 'reset'
- gs 'themes', 'check_custom_vars'
- $theme['name'] = 'Custom'
- $theme['type'] = $custom_theme['type']
- theme['is_dark'] = custom_theme['is_dark']
- theme['bcolor'] = custom_theme['bcolor']
- theme['fcolor'] = custom_theme['fcolor']
- theme['lcolor'] = custom_theme['lcolor']
- $theme['bcolor'] = func('shortgs', 'rgb_to_hex', theme['bcolor'])
- $theme['fcolor'] = func('shortgs', 'rgb_to_hex', theme['fcolor'])
- $theme['lcolor'] = func('shortgs', 'rgb_to_hex', theme['lcolor'])
- theme['fsize'] = custom_theme['fsize']
- $theme['fname'] = $custom_theme['fname']
-
- theme['table_bg'] = custom_theme['table_bg']
- theme['table_bg_alt'] = custom_theme['table_bg_alt']
- $theme['table_bg'] = func('shortgs', 'rgb_to_hex', theme['table_bg'])
- $theme['table_bg_alt'] = func('shortgs', 'rgb_to_hex', theme['table_bg_alt'])
- end
- if $ARGS[0] = 'check_custom_vars':
- if $custom_theme['type'] = '': $custom_theme['type'] = 'static'
- if custom_theme['is_dark'] ! theme['is_dark']: custom_theme['is_dark'] = theme['is_dark']
- if custom_theme['bcolor'] = 0: custom_theme['bcolor'] = rgb(20, 20, 20)
- if custom_theme['fcolor'] = 0: custom_theme['fcolor'] = rgb(255, 255, 255)
- if custom_theme['lcolor'] = 0: custom_theme['lcolor'] = rgb(90, 180, 200)
- if custom_theme['fsize'] = 0: custom_theme['fsize'] = 12
- if $custom_theme['fname'] = '': $custom_theme['fname'] = 'Tahoma'
- if custom_theme['table_bg'] = 0: custom_theme['table_bg'] = rgb(32, 32, 32)
- if custom_theme['table_bg_alt'] = 0: custom_theme['table_bg_alt'] = rgb(48, 48, 48)
- end
- if $ARGS[0] = 'default_palette':
- exit
- theme['base03'] = rgb(0, 43, 54)
- theme['base02'] = rgb(7, 54, 66)
- theme['base01'] = rgb(88, 110, 117)
- theme['base00'] = rgb(101, 123, 131)
- theme['base0'] = rgb(131, 148, 150)
- theme['base1'] = rgb(147, 161, 161)
- theme['base2'] = rgb(238, 232, 213)
- theme['base3'] = rgb(253, 246, 227)
- theme['yellow'] = rgb(181, 137, 0)
- theme['orange'] = rgb(203, 75, 22)
- theme['red'] = rgb(220, 50, 47)
- theme['magenta'] = rgb(211, 54, 130)
- theme['violet'] = rgb(108, 113, 196)
- theme['blue'] = rgb(38, 139, 210)
- theme['cyan'] = rgb(42, 161, 152)
- theme['green'] = rgb(133, 153, 0)
- $theme['base03'] = "#002b36"
- $theme['base02'] = "#073642"
- $theme['base01'] = "#586e75"
- $theme['base00'] = "#657b83"
- $theme['base0'] = "#839496"
- $theme['base1'] = "#93a1a1"
- $theme['base2'] = "#eee8d5"
- $theme['base3'] = "#fdf6e3"
- $theme['yellow'] = "#b58900"
- $theme['orange'] = "#cb4b16"
- $theme['red'] = "#dc322f"
- $theme['magenta'] = "#d33682"
- $theme['violet'] = "#6c71c4"
- $theme['blue'] = "#268bd2"
- $theme['cyan'] = "#2aa198"
- $theme['green'] = "#859900"
- end
- --- themes ---------------------------------
|