diff options
author | noa@gaiwan.org | 2024-06-12 23:18:28 +0000 |
---|---|---|
committer | noa@gaiwan.org | 2024-06-12 23:18:28 +0000 |
commit | be42799b084e8fb936eb973dceadf6966dd71cba (patch) | |
tree | 0f1cd58c7ec169940fc617dc960e2c719c79ecfe | |
parent | 7314c974b8b7b723ef7f22708777af3e00fb403d (diff) |
Update completion at point configuration
-rw-r--r-- | emacs/init.el | 13 | ||||
-rw-r--r-- | firefox/chrome/userChrome.css | 5 | ||||
-rw-r--r-- | firefox/user.js | 240 | ||||
-rw-r--r-- | fish/fish_variables | 1 | ||||
-rw-r--r-- | mbsyncrc | 14 | ||||
-rwxr-xr-x | setup.sh | 15 |
6 files changed, 156 insertions, 132 deletions
diff --git a/emacs/init.el b/emacs/init.el index 4c8ec2a..db6d576 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -14,7 +14,6 @@ (setopt user-mail-address "noa@gaiwan.org") ;; properly distinguish these chords from their ascii legacy -(define-key input-decode-map [?\C-i] [C-i]) (define-key input-decode-map [?\C-m] [C-m]) (use-package tubthumping-theme @@ -169,8 +168,6 @@ and when JID is not in `jabber-activity-banned'." ([remap switch-to-buffer] . consult-buffer) ([remap yank-pop] . consult-yank-pop) ([remap goto-line] . consult-goto-line)) - :custom - (completion-in-region-function 'consult-completion-in-region) ) (use-package marginalia @@ -181,10 +178,14 @@ and when JID is not in `jabber-activity-banned'." (marginalia-max-relative-age most-positive-fixnum) (marginalia-align 'right)) - +;; My keyboard has a tab key and an i key. For legacy reasons, by default emacs converts C-i to mean the same thing as the tab key, but i don't really want that. +;; The tab key is called <tab> and it gets translated to TAB. C-i is TAB, but i'd rather it by C-i. That's what this decode line does. +(define-key input-decode-map [?\C-i] [C-i]) +;; Now that tab and C-i are properly distinguished, i can bind C-i to completion at point. (global-set-key (kbd "<C-i>") 'completion-at-point) +;; I also want to make the completion at point function a bit more friendly than the default, so i ask consult to provide the completion functionality. +(setopt completion-in-region-function 'consult-completion-in-region) -: ;; (use-package org-contacts ;; :ensure t ;; :pin gnu @@ -666,7 +667,7 @@ and when JID is not in `jabber-activity-banned'." ) ;; We are on a unix system, so it makes sense to end files in the unix system way. I'm surprised this isn't the default. -(setopt require-final-newline t +(setopt require-final-newline t) (setopt window-min-height 1 diff --git a/firefox/chrome/userChrome.css b/firefox/chrome/userChrome.css index 9dba66e..8674958 100644 --- a/firefox/chrome/userChrome.css +++ b/firefox/chrome/userChrome.css @@ -5,6 +5,7 @@ /* ffffe8 */ /*#navigator-toolbox-background {*/ +/* #nav-bar { background: #e5e5d0 !important; } @@ -14,7 +15,11 @@ #urlbar-background { background: inherit !important; } +*/ +/* + * Replace navigation icons with text + */ #back-button image, #forward-button image, #stop-reload-button image { diff --git a/firefox/user.js b/firefox/user.js index 645b7ce..850d732 100644 --- a/firefox/user.js +++ b/firefox/user.js @@ -1,63 +1,18 @@ // settings to make firefox a little more comfy for me // many tips taken from https://www.reddit.com/r/firefox/comments/17hlkhp/what_are_your_must_have_changes_in_aboutconfig/ -/* misc stuff */ -//user_pref("browser.fixup.dns_first_for_single_words", true); -//user_pref("browser.reader.detectedFirstArticle", true); -//user_pref("browser.search.suggest.enabled", false); -//user_pref("browser.search.update", false); -//user_pref("browser.sessionstore.restore_on_demand", false); -//user_pref("browser.sessionstore.resume_from_crash", false); - -//user_pref("browser.tabs.animate", false); -// -//user_pref("browser.tabs.warnOnClose", false); -//user_pref("browser.warnOnQuit", false); -//user_pref("browser.warnOnQuitShortcut", false); -// -//user_pref("datareporting.healthreport.service.enabled", false); -//user_pref("datareporting.healthreport.uploadEnabled", false); -//user_pref("datareporting.policy.dataSubmissionPolicyAcceptedVersion", 2); -//user_pref("datareporting.policy.dataSubmissionPolicyNotifiedTime", "1450604664862"); -//user_pref("datareporting.policy.firstRunTime", "1450604654097"); -// -//user_pref("experiments.enabled", false); -//user_pref("experiments.supported", false); -//user_pref("general.smoothScroll", false); -//user_pref("identity.fxaccounts.enabled", false); -//user_pref("keyword.enabled", false); -//user_pref("layout.spellcheckDefault", 0); -//user_pref("media.videocontrols.picture-in-picture.video-toggle.enabled", false); -//user_pref("mousewheel.system_scroll_override.enabled", false); -//user_pref("network.allow-experiments", false); -//user_pref("network.captive-portal-service.enabled", false); -//user_pref("pdfjs.disabled", true); -//user_pref("security.webauth.u2f", true); -//user_pref("signon.rememberSignons", false); - -/* backspace to go back */ -user_pref("browser.backspace_action", 0); - -// -// -// keep data on the device - -// disable safe browsing -user_pref("browser.safebrowsing.downloads.remote.enabled", false); -user_pref("browser.safebrowsing.enabled", false); -user_pref("browser.safebrowsing.malware.enabled", false); -user_pref("browser.safebrowsing.phishing.enabled", false); - // // // better ui -// big square scrollbar in lieu of native them +// use system titlebar +user_pref("browser.tabs.inTitlebar", 0); + +// big square scrollbar that doesn't disappear, in lieu of native them user_pref("widget.non-native-theme.scrollbar.style", 4); -// make it wider user_pref("widget.non-native-theme.scrollbar.size.orverride", 24); -// never try and hide it user_pref("widget.gtk.overlay-scrollbars.enabled", false); + // make the buttons smaller user_pref("browser.uidensity", 1); @@ -70,69 +25,39 @@ user_pref("browser.display.background_color", "#ffffe8"); user_pref("browser.display.use_document_fonts", 0); // always enable cursor key navigation -user_pref("accessibility.browsewithcaret", true); +// user_pref("accessibility.browsewithcaret", true); -// -// -// disable pocket +// nicer settings in view source +user_pref("view_source.wrap_long_lines", true); +user_pref("view_source.syntax_highlight", false); +user_pref("view_source.tab_size", 8); +//user_pref("view_source.editor.external", true); +//user_pref("view_source.editor.path", "emacs"); +//user_pref("view_source.tab", false); // open source view in new window -user_pref("extensions.pocket.enabled", false); -user_pref("extensions.pocket.showHome", false); -user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); -user_pref("browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled", false); -user_pref("browser.newtabpage.activity-stream.discoverystream.saveToPocketCard.enabled", false); +// disable user interface elements +user_pref("browser.toolbars.bookmarks.visibility", "never"); -// -// // clean new tab page - user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); user_pref("browser.newtabpage.activity-stream.feeds.section.topsites", false); user_pref("browser.newtabpage.activity-stream.showSearch", false); user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); user_pref("browser.newtabpage.enabled", false); +// TODO: still shows top sites. Unsure how to get rid. -// -// -// boring url bar - -// don't grey out parts of the url +// boring url bar: show protocol, don't grey bits out, don't "pop it out" user_pref("browser.urlbar.formatting.enabled", false); -// always show the protocol user_pref("browser.urlbar.trimURLs", false); -// disable suggestions -user_pref("browser.urlbar.maxRichResults", -1); -// don't "pop out" the url bar user_pref("browser.urlbar.openViewOnFocus", false); -/* disable telemetry */ -user_pref("app.shield.optoutstudies.enabled", false); +// disable url bar suggestions +// user_pref("browser.urlbar.maxRichResults", -1); -/* enable userchrome again */ -user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); +// use text in the toolbar, not icons +//user_pref("browser.chrome.toolbar_style", 1); -// always prompt me for download location -user_pref("browser.download.useDownloadDir", false); - -// window-oriented behaviour. each window has one tab -user_pref("browser.tabs.closeWindowWithLastTab", false); // close tab, close browser -user_pref("browser.tabs.opentabfor.middleclick", false); // middle click opens in new window -user_pref("middlemouse.openNewWindow", true); // for some reason this is two settings - -/* open links in the current tab (1), even if the website says otherwise (0) */ -user_pref("browser.link.open_newwindow", 1); -user_pref("browser.link.open_newwindow.restriction", 0); - -/* disable new firefox view tab */ -user_pref("browser.tabs.firefox-view", false); - -/* disable bookmarks toolbar */ -user_pref("browser.toolbars.bookmarks.visibility", "never"); - -/* use text in the toolbar, not icons */ -/*user_pref("browser.chrome.toolbar_style", 1);*/ - -/* don't pop up menu on alt */ +// don't pop up menu on alt user_pref("ui.key.menuAccessKeyFocuses", false); // default to empty headers when printing @@ -141,31 +66,95 @@ user_pref("print.print_footerright", ""); user_pref("print.print_headerleft", ""); user_pref("print.print_headerright", ""); -// speed related things -user_pref("nglayout.initialpaint.delay", 0); +// don't show a disclaimer for about:config +user_pref("browser.aboutConfig.showWarning", false); -// view source -user_pref("view_source.editor.external", false); -user_pref("view_source.editor.path", "emacs"); -user_pref("view_source.syntax_highlight", false); -user_pref("view_source.tab", false); -user_pref("view_source.tab_size", 8); -user_pref("view_source.wrap_long_lines", false); +// backspace to go back +user_pref("browser.backspace_action", 0); + +// +// +// Disable unused features -// reader view +// disable firefox view +user_pref("browser.tabs.firefox-view", false); + +// disable pocket +user_pref("extensions.pocket.enabled", false); +user_pref("extensions.pocket.showHome", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); +user_pref("browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled", false); +user_pref("browser.newtabpage.activity-stream.discoverystream.saveToPocketCard.enabled", false); + +// disable reader view user_pref("reader.parse-on-load.enabled", false); -// don't show a disclaimer -user_pref("browser.aboutConfig.showWarning", false); +// disable telemetry +user_pref("app.shield.optoutstudies.enabled", false); +user_pref("datareporting.healthreport.service.enabled", false); +user_pref("datareporting.healthreport.uploadEnabled", false); +user_pref("datareporting.policy.dataSubmissionPolicyAcceptedVersion", 2); +user_pref("datareporting.policy.dataSubmissionPolicyNotifiedTime", "1450604664862"); +user_pref("datareporting.policy.firstRunTime", "1450604654097"); // disable https only. user_pref("dom.security.https_only_mode_ever_enabled", false); user_pref("dom.security.https_only_mode", false); +// disable experiments +user_pref("experiments.enabled", false); +user_pref("experiments.supported", false); + +// don't save passwords +user_pref("signon.rememberSignons", false); + +// disable firefox accounts +user_pref("identity.fxaccounts.enabled", false); + +// disable picture-in-picture video +user_pref("media.videocontrols.picture-in-picture.video-toggle.enabled", false); + +// disable safe browsing +user_pref("browser.safebrowsing.downloads.remote.enabled", false); +user_pref("browser.safebrowsing.enabled", false); +user_pref("browser.safebrowsing.malware.enabled", false); +user_pref("browser.safebrowsing.phishing.enabled", false); + // // -// dont save browsing session to disk so often +// Enable used features + +// enable userchrome +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); + +// always prompt me for download location +user_pref("browser.download.useDownloadDir", false); +// +// +// Window oriented behaviour + +// Middle clock opens in a new window +user_pref("browser.tabs.opentabfor.middleclick", false); +user_pref("middlemouse.openNewWindow", true); + +// open links in the current tab (1), even if the website says otherwise (0) +user_pref("browser.link.open_newwindow", 1); +user_pref("browser.link.open_newwindow.restriction", 0); + +// Closing the last tab closes the browser +// user_pref("browser.tabs.closeWindowWithLastTab", false); + +// +// +// speed related things +user_pref("nglayout.initialpaint.delay", 0); + +// +// +// Settings to increase caches etc, which ostensibly speed firefox up but that many people recommend against + +// dont save browsing session to disk so often user_pref("browser.cache.disk.enable", false); user_pref("browser.cache.memory.enable", true); @@ -179,10 +168,7 @@ user_pref("browser.sessionstore.interval", 86400000); // Don't store recently parsed recent pages in memory user_pref("browser.sessionhistory.max_total_viewers", 0); -// -// -// Increase the defaults for a bunch of settings related to http requests - +// Increase the defaults for a bunch of settings related to http requests. user_pref("network.buffer.cache.size", 524288); user_pref("network.buffer.cache.count", 128); user_pref("network.http.max-connections", 1800); @@ -194,3 +180,29 @@ user_pref("network.ssl_tokens_cache_capacity", 32768); // also see "security.pki.crlite_mode" and "browser.cache.memory.capacity" + +/* misc stuff */ +//user_pref("browser.fixup.dns_first_for_single_words", true); +//user_pref("browser.reader.detectedFirstArticle", true); +//user_pref("browser.search.suggest.enabled", false); +//user_pref("browser.search.update", false); +//user_pref("browser.sessionstore.restore_on_demand", false); +//user_pref("browser.sessionstore.resume_from_crash", false); + +//user_pref("browser.tabs.animate", false); +// +//user_pref("browser.tabs.warnOnClose", false); +//user_pref("browser.warnOnQuit", false); +//user_pref("browser.warnOnQuitShortcut", false); +// + +// + +//user_pref("general.smoothScroll", false); +//user_pref("keyword.enabled", false); +//user_pref("layout.spellcheckDefault", 0); +//user_pref("mousewheel.system_scroll_override.enabled", false); +//user_pref("network.allow-experiments", false); +//user_pref("network.captive-portal-service.enabled", false); +//user_pref("pdfjs.disabled", true); +//user_pref("security.webauth.u2f", true); diff --git a/fish/fish_variables b/fish/fish_variables index b2f82ae..fc92707 100644 --- a/fish/fish_variables +++ b/fish/fish_variables @@ -4,3 +4,4 @@ SETUVAR --export MOZ_ENABLE_WAYLAND:1 SETUVAR --export NO_COLOR:\x1d SETUVAR __fish_initialized:3400 SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_user_paths:/usr/local/go/bin\x1e/home/noa/\x2econfig/Scripts\x1e/home/noa/binaries\x1e/home/noa/\x2elocal/bin diff --git a/mbsyncrc b/mbsyncrc index e4f7094..3239039 100644 --- a/mbsyncrc +++ b/mbsyncrc @@ -1,21 +1,23 @@ IMAPAccount fastmail Host imap.fastmail.com User noa@gaiwan.org -Pass !!REDACTED!! +#Pass 2y995b3s9j9m7c28 +PassCmd "cat ~/.config/mbsync-pass" SSLType IMAPS IMAPStore fastmail-remote Account fastmail MaildirStore fastmail-local -SuBFolders Verbatim -Path "~/40-49 Words/49 Emails/" -Inbox "~/40-49 Words/49 Emails/Inbox" +SubFolders Verbatim +Path "~/mail/" +Inbox "~/mail/Inbox" Channel fastmail Far :fastmail-remote: Near :fastmail-local: Patterns * -Create Both -Expunge None +Create Near +Expunge Near SyncState * +CopyArrivalDate yes diff --git a/setup.sh b/setup.sh index 2e35611..14caacf 100755 --- a/setup.sh +++ b/setup.sh @@ -37,7 +37,7 @@ kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta " #sudo apt install fonts-noto-core echo "=== SET UP CHINESE INPUT ===" -sudo apt install -y --install-recommends --install suggests fcitx5 +sudo apt install -y --install-recommends --install-suggests fcitx5 sudo apt remove -y im-config echo @@ -80,11 +80,11 @@ rclone config create fastmail webdav \ --obscure echo -rclone copy fastmail:noa.gaiwan.org/files/Documents ~/Documents -P -rclone copy fastmail:noa.gaiwan.org/files/Music ~/Music -P -rclone copy fastmail:noa.gaiwan.org/files/Videos ~/Videos -P -rclone copy fastmail:noa.gaiwan.org/files/Pictures ~/Pictures -P -rclone copy fastmail:noa.gaiwan.org/files/Scripts ~/Scripts -P +rclone copy "fastmail:noa.gaiwan.org/files/10-19 Personal" "$HOME/10-19 Personal" -P +rclone copy "fastmail:noa.gaiwan.org/files/20-29 Study" "$HOME/20-29 Study" -P +rclone copy "fastmail:noa.gaiwan.org/files/30-39 Media" "$HOME/30-39 Media" -P +rclone copy "fastmail:noa.gaiwan.org/files/40-49 Words" "$HOME/40-49 Words" -P +rclone copy "fastmail:noa.gaiwan.org/files/50-59 Code" "$HOME/50-59 Code" -P echo echo "=== CONFIGURE MAIL ===" @@ -94,6 +94,9 @@ echo # Read with -s appears not to properly newline sed -i "s/!!REDACTED!!/$fastmailpassword/" ~/.config/mbsyncrc sed -i "s/!!REDACTED!!/$fastmailpassword/" ~/.config/msmtp/config +# mu init --maildir=~/mail '--my-address=/.*@gaiwan\.org/' +# mu index + #echo #echo "=== DOWNLOAD WIKIPEDIA MIRROR ===" #echo "Go to https://ftp.halifax.rwth-aachen.de/aarddict/zhwiki/ and download the latest slob file to ~/Documents/Dictionaries." |