From 79b1e493fcbbfd66f9d0876093ebf0952a9d58b9 Mon Sep 17 00:00:00 2001 From: familyfriendlymikey Date: Fri, 2 Sep 2022 14:44:27 -0400 Subject: [PATCH] refactor --- app/api.imba | 1 - app/client.imba | 13 ++- app/components/app-bang.imba | 29 +++-- app/components/app-edit.imba | 74 ++++++------ app/components/app-links.imba | 191 ++++++++++++++++++------------- app/components/app-settings.imba | 39 ++++--- app/components/app-tips.imba | 18 +-- app/config.imba | 4 + scripts/config_move.sh | 1 + 9 files changed, 212 insertions(+), 158 deletions(-) create mode 100755 scripts/config_move.sh diff --git a/app/api.imba b/app/api.imba index 9d415ac..c2de245 100644 --- a/app/api.imba +++ b/app/api.imba @@ -5,7 +5,6 @@ import db from './db' import state from './state' import config from './config' -p config import { omit, orderBy } from 'lodash' import { nanoid } from 'nanoid' import fzi from 'fzi' diff --git a/app/client.imba b/app/client.imba index 118b95f..bbf26e0 100644 --- a/app/client.imba +++ b/app/client.imba @@ -1,15 +1,14 @@ let p = console.log +import pkg from '../package.json' +let version = pkg.version +p "fuzzyhome version {version}" # import sw from './sw.imba?serviceworker' # navigator..serviceWorker..register(sw).then! do |reg| reg.update! -import download from 'downloadjs' import { nanoid } from 'nanoid' import { err } from './utils' -import pkg from '../package.json' -let version = pkg.version -p "fuzzyhome version {version}" import db from './db' import state from './state' let refs = {} @@ -33,12 +32,14 @@ extend tag element api get config config - get p - console.log get refs refs get err err + get version + version + get p + console.log tag app diff --git a/app/components/app-bang.imba b/app/components/app-bang.imba index 51af646..58c81b7 100644 --- a/app/components/app-bang.imba +++ b/app/components/app-bang.imba @@ -1,20 +1,35 @@ tag app-bang get encoded_bang_query - "{active_bang.url}{window.encodeURIComponent(state.query)}" + "{bang.url}{window.encodeURIComponent(state.query)}" def handle_bang - await api.increment_link_frequency state.active_bang + await api.increment_link_frequency bang window.location.href = encoded_bang_query def render - + + css d:flex fld:row jc:space-between ai:center + px:16px py:11px rd:5px cursor:pointer c:#FAD4AB - css .bang-text - tt:none word-break:break-all + <.link-left> + css d:flex fl:1 - <.bang @click=handle_bang> + + css w:20px h:20px mr:10px rd:3px + + <.display-name> encoded_bang_query + css tt:capitalize fs:20px overflow-wrap:anywhere + css tt:none word-break:break-all + + <.link-right> css d:flex fld:row jc:space-between ai:center - px:16px py:11px rd:5px cursor:pointer c:blue3 + css .buttons-disabled .link-button visibility:hidden + css .selected .link-button visibility:visible + <.frequency> bang.frequency + css fs:15px ml:7px diff --git a/app/components/app-edit.imba b/app/components/app-edit.imba index 60a6825..d4c3bfd 100644 --- a/app/components/app-edit.imba +++ b/app/components/app-edit.imba @@ -18,7 +18,7 @@ tag app-edit def handle_click_set_default_bang if link.is_bang isnt true return err "setting default bang", "Link is not a bang." - config.default_bang = link + config.data.default_bang = link save_config! state.query = prior_query prior_query = '' @@ -56,42 +56,44 @@ tag app-edit css d:flex fld:column gap:20px w:100% - <.tips> - - <.tip - @click=close - @hotkey('esc').capture.if(!state.loading)=close - > - <.tip-hotkey> "Esc" - <.tip-content> "Cancel" - - <.tip - @click=handle_delete - @hotkey('shift+backspace').capture.if(!state.loading)=handle_delete - > - css fl:2 - <.tip-hotkey> "Shift + Backspace" - <.tip-content> "Delete Link" - - if link.is_bang - <.tip @click=handle_click_set_default_bang> + + + <.tip-row> + + <.tip + @click=close + @hotkey('esc').capture.if(!state.loading)=close + > + <.tip-hotkey> "Esc" + <.tip-content> "Cancel" + + <.tip + @click=handle_delete + @hotkey('shift+backspace').capture.if(!state.loading)=handle_delete + > + css fl:2 + <.tip-hotkey> "Shift + Backspace" + <.tip-content> "Delete Link" + + if link.is_bang + <.tip @click=handle_click_set_default_bang> + css fl:2 + <.tip-hotkey> "Click" + <.tip-content> "Set Default Bang" + + <.tip + @click=save + @hotkey('shift+return').capture.if(!state.loading)=save + > css fl:2 - <.tip-hotkey> "Click" - <.tip-content> "Set Default Bang" - - <.tip - @click=save - @hotkey('shift+return').capture.if(!state.loading)=save - > - css fl:2 - <.tip-hotkey> "Return" - <.tip-content> "Update Link" - - <.tip.noclick - @hotkey('tab').capture.if(!state.loading)=cycle_focus - > - <.tip-hotkey> "Tab" - <.tip-content> "Next" + <.tip-hotkey> "Return" + <.tip-content> "Update Link" + + <.tip.noclick + @hotkey('tab').capture.if(!state.loading)=cycle_focus + > + <.tip-hotkey> "Tab" + <.tip-content> "Next" <.inputs> css d:flex fld:column gap:20px diff --git a/app/components/app-links.imba b/app/components/app-links.imba index 9fc8c00..a1eecce 100644 --- a/app/components/app-links.imba +++ b/app/components/app-links.imba @@ -3,7 +3,6 @@ import { evaluate as eval_math } from 'mathjs' tag app-links def mount - p document $links-input.focus! def handle_paste e @@ -93,7 +92,8 @@ tag app-links def render - + + css w:100% d:flex fld:column gap:10px if $as.active @@ -132,10 +132,11 @@ tag app-links <.side.right @click.if(!state.loading)=toggle_settings> - if config.data.enable_tips - if state.active_bang + if state.active_bang or state.sorted_links.length < 1 - + + + <.tip-row> <.tip @click=(state.active_bang = no) @@ -144,93 +145,119 @@ tag app-links <.tip-hotkey> "Esc" <.tip-content> "Back" - else + <.tip + @click=handle_shift_return + @hotkey('shift+return').capture.if(!state.loading)=handle_shift_return + > + <.tip-hotkey> "Shift + Return" + <.tip-content.ellipsis> + "Create Link " + let sq = state.query.trim!.split /\s+/ + if sq.length >= 2 + let url = sq.pop! + '"' + sq.join " " + " {url}" + '"' + else + "\"{sq.join " "}\"" + + <.tip + @click=(state.active_bang = no) + @hotkey('esc').capture.if(!state.loading)=(state.active_bang = no) + > + <.tip-hotkey> "Return" + <.tip-content> "Search" + + else + + - - - <.tip-row> - - <.tip - @click=handle_click_link - @hotkey('return').force.if(!loading)=handle_click_link - > - <.tip-hotkey> "Return" - <.tip-content> "Navigate To Link" - - <.tip - @click=handle_shift_return - @hotkey('shift+return').capture.if(!state.loading)=handle_shift_return - > - <.tip-hotkey> "Shift + Return" - <.tip-content.ellipsis> - "Create Link " - let sq = state.query.trim!.split /\s+/ - if sq.length >= 2 - let url = sq.pop! - '"' - sq.join " " - " {url}" - '"' - else - "\"{sq.join " "}\"" - - <.tip - @click=handle_shift_backspace - @hotkey('shift+backspace').capture.if(!state.loading)=handle_shift_backspace - > - <.tip-hotkey> "Shift + Backspace" - <.tip-content> "Edit Link" - - - - <.tip-row> - - <.tip - @click.if(!state.loading)=api.toggle_effective_names - @hotkey('tab').capture.if(!state.loading)=api.toggle_effective_names - > - <.tip-hotkey> "Tab" - <.tip-content> "Toggle Effective Names" - - <.tip - @click.if(!state.loading)=api.toggle_settings - @hotkey('esc').capture.if(!state.loading)=toggle_settings - > - <.tip-hotkey> "Esc" - <.tip-content> "Toggle Settings" - - <.tip.noclick - @hotkey('down').capture.if(!state.loading)=api.increment_link_selection_index - @hotkey('up').capture.if(!state.loading)=api.decrement_link_selection_index - > - <.tip-hotkey> "Up/Down Arrow" - <.tip-content> "Move Selection" - - <.tip-row> - - <.tip - @click.if(!loading)=handle_cut - > - if math_result - <.tip-hotkey> "Cut (Math, If No Selection)" - <.tip-content> "Cut Math Result" + <.tip-row> + + <.tip + @click=handle_click_link + @hotkey('return').force.if(!loading)=handle_click_link + > + <.tip-hotkey> "Return" + <.tip-content> "Navigate To Link" + + <.tip + @click=handle_shift_return + @hotkey('shift+return').capture.if(!state.loading)=handle_shift_return + > + <.tip-hotkey> "Shift + Return" + <.tip-content.ellipsis> + "Create Link " + let sq = state.query.trim!.split /\s+/ + if sq.length >= 2 + let url = sq.pop! + '"' + sq.join " " + " {url}" + '"' else - <.tip-hotkey> "Cut (If No Selection)" - <.tip-content> "Cut All Text" + "\"{sq.join " "}\"" + + <.tip + @click=handle_shift_backspace + @hotkey('shift+backspace').capture.if(!state.loading)=handle_shift_backspace + > + <.tip-hotkey> "Shift + Backspace" + <.tip-content> "Edit Link" + + + + <.tip-row> + + <.tip + @click.if(!state.loading)=api.toggle_effective_names + @hotkey('tab').capture.if(!state.loading)=api.toggle_effective_names + > + <.tip-hotkey> "Tab" + <.tip-content> "Toggle Effective Names" + + <.tip + @click.if(!state.loading)=api.toggle_settings + @hotkey('esc').capture.if(!state.loading)=toggle_settings + > + <.tip-hotkey> "Esc" + <.tip-content> "Toggle Settings" + + <.tip.noclick + @hotkey('down').capture.if(!state.loading)=api.increment_link_selection_index + @hotkey('up').capture.if(!state.loading)=api.decrement_link_selection_index + > + <.tip-hotkey> "Up/Down Arrow" + <.tip-content> "Move Selection" + + <.tip-row> + + <.tip + @click.if(!loading)=handle_cut + > + if math_result + <.tip-hotkey> "Cut (Math, If No Selection)" + <.tip-content> "Cut Math Result" + else + <.tip-hotkey> "Cut (If No Selection)" + <.tip-content> "Cut All Text" - <.tip.noclick> - <.tip-hotkey> "Paste (If Input Empty)" - <.tip-content> "Instant Search" + <.tip.noclick> + <.tip-hotkey> "Paste (If Input Empty)" + <.tip-content> "Instant Search" - <.tip.placeholder> + <.tip.placeholder> unless $tips-more.active <.links> css d:flex fld:column jc:flex-start fl:1 w:100% ofy:auto - if not viewing_community_links and (state.active_bang or state.sorted_links.length < 1) - + if state.active_bang + + elif state.sorted_links.length < 1 + else for link, index in state.sorted_links diff --git a/app/components/app-settings.imba b/app/components/app-settings.imba index cca4b74..fdb4ccb 100644 --- a/app/components/app-settings.imba +++ b/app/components/app-settings.imba @@ -1,3 +1,5 @@ +import download from 'downloadjs' + tag app-settings active = no @@ -12,24 +14,24 @@ tag app-settings global.location.href = "https://github.com/familyfriendlymikey/fuzzyhome" def handle_click_toggle_tips - config.enable_tips = not config.enable_tips - save_config! - settings_active = no + config.data.enable_tips = not config.data.enable_tips + config.save! + active = no def handle_click_toggle_buttons - config.enable_buttons = not config.enable_buttons - save_config! - settings_active = no + config.data.enable_buttons = not config.data.enable_buttons + config.save! + active = no def handle_click_toggle_search_on_paste - config.enable_search_on_paste = not config.enable_search_on_paste - save_config! - settings_active = no + config.data.enable_search_on_paste = not config.data.enable_search_on_paste + config.save! + active = no def handle_toggle_light_theme - config.enable_dark_theme = not config.enable_dark_theme - save_config! - settings_active = no + config.data.enable_dark_theme = not config.data.enable_dark_theme + config.save! + active = no def handle_click_import e @@ -56,7 +58,7 @@ tag app-settings loading = yes await handle_import! - settings_active = no + active = no loading = no def handle_click_export @@ -69,7 +71,7 @@ tag app-settings let time = datetime[4].split(":").join("-") let filename = "fuzzyhome_v{version}_{date}_{time}.txt" download(links.join("\n"), filename, "text/plain") - settings_active = no + active = no loading = no def render @@ -87,6 +89,7 @@ tag app-settings bg:none c:purple4 bd:none cursor:pointer fs:14px bg:purple4/10 rd:5px h:100% + @hover bg:blue if refs.community-links.active @@ -124,18 +127,18 @@ tag app-settings <.settings-button @click=handle_click_toggle_tips > - config.enable_tips ? "DISABLE TIPS" : "ENABLE TIPS" + config.data.enable_tips ? "DISABLE TIPS" : "ENABLE TIPS" <.settings-button @click=handle_click_toggle_buttons > - config.enable_buttons ? "DISABLE BUTTONS" : "ENABLE BUTTONS" + config.data.enable_buttons ? "DISABLE BUTTONS" : "ENABLE BUTTONS" <.settings-container> <.settings-button @click=handle_click_toggle_search_on_paste > - config.enable_search_on_paste ? "DISABLE SEARCH ON PASTE" : "ENABLE SEARCH ON PASTE" + config.data.enable_search_on_paste ? "DISABLE SEARCH ON PASTE" : "ENABLE SEARCH ON PASTE" <.settings-button @click.if(!loading)=handle_toggle_light_theme > - config.enable_dark_theme ? "DISABLE DARK THEME" : "ENABLE DARK THEME" + config.data.enable_dark_theme ? "DISABLE DARK THEME" : "ENABLE DARK THEME" diff --git a/app/components/app-tips.imba b/app/components/app-tips.imba index 317abed..9d93938 100644 --- a/app/components/app-tips.imba +++ b/app/components/app-tips.imba @@ -3,7 +3,7 @@ tag app-tips css >>> .tip-row d:flex fld:row w:100% fl:1 fs:20px - fs:14px pt:15px + fs:14px jc:end ta:center bg:#20222f c:purple4 @@ -28,8 +28,8 @@ tag app-tips css >>> .tip-content pt:2px fs:14px c:purple3 - - + + tag app-tips-more < app-tips @@ -38,11 +38,12 @@ tag app-tips-more < app-tips def toggle active = !active - + + css d:flex fld:column gap:10px <@click=toggle> css w:100% d:flex ja:center c:purple3 rdb:4px cursor:pointer - my:7px py:2px transition:background 100ms + transition:background 100ms @hover bg:purple3/3 if active css rd:0 @@ -53,7 +54,8 @@ tag app-tips-more < app-tips else - css >>> .hide .tip-row d:none - css >>> .more .tip-row @first pt:0 - <.more .hide=hide> + <.more> + css d:flex fld:column gap:10px + if hide + css d:none diff --git a/app/config.imba b/app/config.imba index 3c4a078..c3373e6 100644 --- a/app/config.imba +++ b/app/config.imba @@ -1,3 +1,5 @@ +let p = console.log + export default new class config def constructor @@ -19,5 +21,7 @@ export default new class config this.data.default_bang.icon ??= "data:image/x-icon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///zD9/f2W/f392P39/fn9/f35/f391/39/ZT+/v4uAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+Cf39/Zn///////////////////////////////////////////39/ZX///8IAAAAAAAAAAAAAAAA/v7+Cf39/cH/////+v35/7TZp/92ul3/WKs6/1iqOv9yuFn/rNWd//j79v///////f39v////wgAAAAAAAAAAP39/Zn/////7PXp/3G3WP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP+Or1j//vDo///////9/f2VAAAAAP///zD/////+vz5/3G3V/9TqDT/WKo6/6LQkf/U6cz/1urO/6rUm/+Zo0r/8IZB//adZ////v7///////7+/i79/f2Y/////4nWzf9Lqkj/Vqo4/9Xqzv///////////////////////ebY//SHRv/0hUL//NjD///////9/f2U/f392v////8sxPH/Ebzt/43RsP/////////////////////////////////4roL/9IVC//i1jf///////f391/39/fr/////Cr37/wW8+/+16/7/////////////////9IVC//SFQv/0hUL/9IVC//SFQv/3pnX///////39/fn9/f36/////wu++/8FvPv/tuz+//////////////////SFQv/0hUL/9IVC//SFQv/0hUL/96p7///////9/f35/f392/////81yfz/CrL5/2uk9v///////////////////////////////////////////////////////f392P39/Zn/////ks/7/zdS7P84Rur/0NT6///////////////////////9/f////////////////////////39/Zb+/v4y//////n5/v9WYu3/NUPq/ztJ6/+VnPT/z9L6/9HU+v+WnfT/Ul7t/+Hj/P////////////////////8wAAAAAP39/Z3/////6Or9/1hj7v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v9sdvD////////////9/f2YAAAAAAAAAAD///8K/f39w//////5+f7/paz2/11p7v88Suv/Okfq/1pm7v+iqfX/+fn+///////9/f3B/v7+CQAAAAAAAAAAAAAAAP///wr9/f2d///////////////////////////////////////////9/f2Z/v7+CQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/jL9/f2Z/f392/39/fr9/f36/f392v39/Zj///8wAAAAAAAAAAAAAAAAAAAAAPAPAADAAwAAgAEAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAPAPAAAoAAAAIAAAAEAAAAABACAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/g3+/v5X/f39mf39/cj9/f3q/f39+f39/fn9/f3q/f39yP39/Zn+/v5W////DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/iT9/f2c/f399f/////////////////////////////////////////////////////9/f31/f39mv7+/iMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/gn9/f2K/f39+////////////////////////////////////////////////////////////////////////////f39+v39/Yf///8IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+/v4k/f390v////////////////////////////////////////////////////////////////////////////////////////////////39/dD///8iAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////MP39/er//////////////////////////+r05v+v16H/gsBs/2WxSf9Wqjj/Vqk3/2OwRv99vWX/pdKV/97u2P////////////////////////////39/ej+/v4vAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/iT9/f3q/////////////////////+v15/+Pxnv/VKk2/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/36+Z//d7tf///////////////////////39/ej///8iAAAAAAAAAAAAAAAAAAAAAAAAAAD///8K/f390//////////////////////E4bn/XKw+/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1apN/+x0pv///////////////////////39/dD///8IAAAAAAAAAAAAAAAAAAAAAP39/Yv/////////////////////sdij/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9TqDT/YKU1/8qOPv/5wZ////////////////////////39/YcAAAAAAAAAAAAAAAD+/v4l/f39+////////////////8Lgt/9TqDT/U6g0/1OoNP9TqDT/U6g0/1OoNP9utlT/n86N/7faqv+426v/pdKV/3u8ZP9UqDX/U6g0/3egN//jiUH/9IVC//SFQv/82MP//////////////////f39+v7+/iMAAAAAAAAAAP39/Z3////////////////q9Ob/W6w+/1OoNP9TqDT/U6g0/1OoNP9nskz/zOXC/////////////////////////////////+Dv2v+osWP/8YVC//SFQv/0hUL/9IVC//WQVP/++fb//////////////////f39mgAAAAD+/v4O/f399v///////////////4LHj/9TqDT/U6g0/1OoNP9TqDT/dblc//L58P/////////////////////////////////////////////8+v/3p3f/9IVC//SFQv/0hUL/9IVC//rIqf/////////////////9/f31////DP7+/ln////////////////f9v7/Cbz2/zOwhv9TqDT/U6g0/2KwRv/v9+z///////////////////////////////////////////////////////738//1kFT/9IVC//SFQv/0hUL/9plg///////////////////////+/v5W/f39nP///////////////4jf/f8FvPv/Bbz7/yG1s/9QqDz/vN2w//////////////////////////////////////////////////////////////////rHqP/0hUL/9IVC//SFQv/0hUL//vDn//////////////////39/Zn9/f3L////////////////R878/wW8+/8FvPv/Bbz7/y7C5P/7/fr//////////////////////////////////////////////////////////////////ere//SFQv/0hUL/9IVC//SFQv/718H//////////////////f39yP39/ez///////////////8cwvv/Bbz7/wW8+/8FvPv/WNL8///////////////////////////////////////0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//rIqv/////////////////9/f3q/f39+v///////////////we9+/8FvPv/Bbz7/wW8+/993P3///////////////////////////////////////SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/+cGf//////////////////39/fn9/f36////////////////B737/wW8+/8FvPv/Bbz7/33c/f//////////////////////////////////////9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/6xaX//////////////////f39+f39/e3///////////////8cwvv/Bbz7/wW8+/8FvPv/WdP8///////////////////////////////////////0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//vVv//////////////////9/f3q/f39y////////////////0bN/P8FvPv/Bbz7/wW8+/8hrvn/+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////39/cj9/f2c////////////////ht/9/wW8+/8FvPv/FZP1/zRJ6/+zuPf//////////////////////////////////////////////////////////////////////////////////////////////////////////////////f39mf7+/lr////////////////d9v7/B7n7/yB38f81Q+r/NUPq/0hV7P/u8P3////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v5X////D/39/ff///////////////9tkPT/NUPq/zVD6v81Q+r/NUPq/2Fs7//y8v7////////////////////////////////////////////09f7//////////////////////////////////////////////////f399f7+/g0AAAAA/f39n////////////////+Tm/P89Suv/NUPq/zVD6v81Q+r/NUPq/1Bc7f/IzPn/////////////////////////////////x8v5/0xY7P+MlPP////////////////////////////////////////////9/f2cAAAAAAAAAAD+/v4n/f39/P///////////////7W69/81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v9ZZe7/k5v0/6609/+vtff/lJv0/1pm7v81Q+r/NUPq/zVD6v+GjvL//v7//////////////////////////////f39+/7+/iQAAAAAAAAAAAAAAAD9/f2N/////////////////////6Cn9f81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v+BivL////////////////////////////9/f2KAAAAAAAAAAAAAAAAAAAAAP7+/gv9/f3V/////////////////////7W69/8+S+v/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/P0zr/7q/+P///////////////////////f390v7+/gkAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/ib9/f3r/////////////////////+Xn/P94gfH/NkTq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NUPq/zVD6v81Q+r/NkTq/3Z/8f/l5/z///////////////////////39/er+/v4kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/jL9/f3r///////////////////////////k5vz/nqX1/2p08P9IVez/OEbq/zdF6v9GU+z/aHLv/5qh9f/i5Pz////////////////////////////9/f3q////MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7+/ib9/f3V/////////////////////////////////////////////////////////////////////////////////////////////////f390v7+/iQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wr9/f2N/f39/P///////////////////////////////////////////////////////////////////////////f39+/39/Yv+/v4JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+/v4n/f39n/39/ff//////////////////////////////////////////////////////f399v39/Z3+/v4lAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+Dv7+/lr9/f2c/f39y/39/e39/f36/f39+v39/ez9/f3L/f39nP7+/ln+/v4OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/AA///AAD//AAAP/gAAB/wAAAP4AAAB8AAAAPAAAADgAAAAYAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAABgAAAAcAAAAPAAAAD4AAAB/AAAA/4AAAf/AAAP/8AAP//wAP/" this.data.default_bang.id ??= "FEJbsKLUMwHbazbqW3c4i" + p "config:", this.data + def save global.localStorage.fuzzyhome_config = JSON.stringify(this.data) diff --git a/scripts/config_move.sh b/scripts/config_move.sh new file mode 100755 index 0000000..b2356b3 --- /dev/null +++ b/scripts/config_move.sh @@ -0,0 +1 @@ +printf "\033c" && rg --pcre2 -g '!config.imba' 'config\.(?!data.)'"$1"