From: ds6 Date: Thu, 30 Aug 2018 09:55:14 +0000 (-0500) Subject: firefox/user.js, new fonts, fontconfig, modeliner X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/fef7b7c4499adc75aaa6fc077c68b216f2e250cb firefox/user.js, new fonts, fontconfig, modeliner updated install.sh, better test mode and changed some semantics added support for Firefox via ghacks user.js changed xdg-open to just firefox in .Xresources moved fonts dir out of xorg changed .gitignore to look for moved font .uuids added Adobe Source fonts and license added Dina license added fontconfig conf added vim modeliner plugin enabled vim modelines (!!!), a more secure option is desired --- diff --git a/.gitignore b/.gitignore index 6560e7a..5e6dcc9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ base/.vim/.netrwhist *.swo # fontconfig -xorg/fonts/Dina/.uuid +/fonts/**/.uuid diff --git a/base/.Xresources b/base/.Xresources index d1db23f..12aab42 100644 --- a/base/.Xresources +++ b/base/.Xresources @@ -82,7 +82,7 @@ URxvt.scrollBar_right: true URxvt.urgentOnBell: true URxvt.visualBell: true -URxvt.url-launcher: xdg-open +URxvt.url-launcher: firefox URxvt.matcher.button: 2 URxvt.matcher.pattern.0: [a-zA-Z\d]+:/\/[\\w-](?:\\.?[\\w-]+)*(?::\\d{1,5})?(?:/(?:[\\w\\d\\.!#$&\\-;=?~[\\]/]|%[\\da-fA-F]{2})*)? URxvt.matcher.rend.0: Uline Bold fg6 diff --git a/base/.vim/plugin/modeliner.vim b/base/.vim/plugin/modeliner.vim new file mode 100644 index 0000000..41b710c --- /dev/null +++ b/base/.vim/plugin/modeliner.vim @@ -0,0 +1,226 @@ +" Modeliner +" +" Version: 0.3.0 +" Description: +" +" Generates a modeline from current settings. +" +" Last Change: 27-Jun-2008. +" Maintainer: Shuhei Kubota +" +" Usage: +" execute ':Modeliner'. +" Then a modeline is generated. +" +" The modeline will either be appended next to the current line or replace +" the existing one. +" +" If you want to customize option, modify g:Modeliner_format. + +if !exists('g:Modeliner_format') + let g:Modeliner_format = 'et ff= fenc= sts= sw= ts=' + " /[ ,:]/ delimited. + " + " if the type of a option is NOT 'boolean' (see :help 'option-name'), + " append '=' to the end of each option. +endif + + +"[text] vi: tw=80 noai +"[text] vim:tw=80 noai +" ex:tw=80 : noai: +" +"[text] vim: set tw=80 noai:[text] +"[text] vim: se tw=80 noai:[text] +"[text] vim:set tw=80 noai:[text] +" vim: set tw=80 noai: [text] +" vim:se tw=80 noai: + + +command! Modeliner call Modeliner_execute() + + +" to retrieve the position +let s:Modeline_SEARCH_PATTERN = '\svi:\|vim:\|ex:' +" to extract options from existing modeline +let s:Modeline_EXTRACT_PATTERN = '\v(.*)\s+(vi|vim|ex):\s*(set?\s+)?(.+)' " very magic +" first form +"let s:Modeline_EXTRACT_OPTPATTERN1 = '\v(.+)' " very magic +" second form +let s:Modeline_EXTRACT_OPTPATTERN2 = '\v(.+):(.*)' " very magic + + +function! s:Modeliner_execute() + let options = [] + + " find existing modeline, and determine the insert position + let info = s:SearchExistingModeline() + + " parse g:Modeliner_format and join options with them + let extractedOptStr = g:Modeliner_format . ' ' . info.optStr + let extractedOptStr = substitute(extractedOptStr, '[ ,:]\+', ' ', 'g') + let extractedOptStr = substitute(extractedOptStr, '=\S*', '=', 'g') + let extractedOptStr = substitute(extractedOptStr, 'no\(.\+\)', '\1', 'g') + let opts = sort(split(extractedOptStr)) + "echom 'opt(list): ' . join(opts, ', ') + + let optStr = '' + let prevO = '' + for o in opts + if o == prevO | continue | endif + let prevO = o + + if stridx(o, '=') != -1 + " let optExpr = 'ts=' . &ts + execute 'let optExpr = "' . o . '" . &' . strpart(o, 0, strlen(o) - 1) + else + " let optExpr = (&et ? '' : 'no') . 'et' + execute 'let optExpr = (&' . o . '? "" : "no") . "' . o . '"' + endif + + let optStr = optStr . ' ' . optExpr + endfor + + if info.lineNum == 0 + let modeline = s:Commentify(optStr) + else + let modeline = info.firstText . ' vim: set' . optStr . ' :' . info.lastText + endif + + + " insert new modeline + if info.lineNum != 0 + "modeline FOUND -> replace the modeline + + "show the existing modeline + let orgLine = line('.') + let orgCol = col('.') + call cursor(info.lineNum, 1) + normal V + redraw + + "confirm + "if confirm('Are you sure to overwrite this existing modeline?', "&Yes\n&No", 1) == 1 + echo 'Are you sure to overwrite this existing modeline? [y/N]' + if char2nr(tolower(nr2char(getchar()))) == char2nr('y') + call setline(info.lineNum, modeline) + + "show the modeline being changed + if (info.lineNum != line('.')) && (info.lineNum != line('.') + 1) + redraw + sleep 1 + endif + endif + + "back to the previous position + echo + execute "normal \" + call cursor(orgLine, orgCol) + else + "modeline NOT found -> append new modeline + call append('.', modeline) + endif + +endfunction + + +function! s:Commentify(s) + if exists('g:NERDMapleader') " NERDCommenter + let result = b:left . ' vim: set' . a:s . ' : ' . b:right + else + let result = substitute(&commentstring, '%s', ' vim: set' . a:s . ' : ', '') + endif + + return result +endfunction + + +function! s:SearchExistingModeline() + let info = {'lineNum':0, 'text':'', 'firstText':'', 'lastText':'', 'optStr':''} + + let candidates = [] + + " cursor position? + call add(candidates, line('.')) + " user may position the cursor to previous line... + call add(candidates, line('.') + 1) + let cnt = 0 + while cnt < &modelines + " header? + call add(candidates, cnt + 1) + " footer? + call add(candidates, line('$') - cnt) + let cnt = cnt + 1 + endwhile + + " search + for i in candidates + let lineNum = i + let text = getline(lineNum) + + if match(text, s:Modeline_SEARCH_PATTERN) != -1 + let info.lineNum = lineNum + let info.text = text + break + endif + endfor + + " extract texts + if info.lineNum != 0 + "echom 'modeline: ' info.lineNum . ' ' . info.text + + let info.firstText = substitute(info.text, s:Modeline_EXTRACT_PATTERN, '\1', '') + + let isSecondForm = (strlen(substitute(info.text, s:Modeline_EXTRACT_PATTERN, '\3', '')) != 0) + "echom 'form : ' . string(isSecondForm + 1) + if isSecondForm == 0 + let info.lastText = '' + let info.optStr = substitute(info.text, s:Modeline_EXTRACT_PATTERN, '\4', '') + else + let info.lastText = substitute( + \ substitute(info.text, s:Modeline_EXTRACT_PATTERN, '\4', ''), + \ s:Modeline_EXTRACT_OPTPATTERN2, + \ '\2', + \ '') + let info.optStr = substitute( + \ substitute(info.text, s:Modeline_EXTRACT_PATTERN, '\4', ''), + \ s:Modeline_EXTRACT_OPTPATTERN2, + \ '\1', + \ '') + endif + endif + + "echom 'firstText: ' . info.firstText + "echom 'lastText: ' . info.lastText + "echom 'optStr: ' . info.optStr + + return info +endfunction + + +function! s:ExtractOptionStringFromModeline(text) + let info = {} + + let info.firstText = substitute(a:text, s:Modeline_EXTRACT_PATTERN, '\1', '') + + let isSecondForm = (strlen(substitute(a:text, s:Modeline_EXTRACT_PATTERN, '\3', '') != 0) + if isSecondForm == 0 + let info.lastText = '' + let info.optStr = substitute(a:text, s:Modeline_EXTRACT_PATTERN, '\2', '') + else + let info.lastText = substitute( + \ substitute(a:text, s:Modeline_EXTRACT_PATTERN, '\4', ''), + \ s:Modeline_EXTRACT_OPTPATTERN2, + \ '\2', + \ '') + let info.optStr = substitute( + \ substitute(a:text, s:Modeline_EXTRACT_PATTERN, '\4', ''), + \ s:Modeline_EXTRACT_OPTPATTERN2, + \ '\1', + \ '') + endif + + return info +endfunction + +" vim: set et fenc=utf-8 ff=unix sts=4 sw=4 ts=4 : diff --git a/base/.vimrc b/base/.vimrc index c3cff3f..fb3c4d4 100644 --- a/base/.vimrc +++ b/base/.vimrc @@ -1,10 +1,9 @@ -if v:progname =~? "evim" - finish -endif source $VIMRUNTIME/defaults.vim packadd matchit +set modeline "!!! + set backup set backupdir=$HOME/var/tmp/vim// set undofile @@ -13,6 +12,7 @@ set undodir=$HOME/var/tmp/vim// set autoindent set colorcolumn=80 highlight ColorColumn term=NONE ctermbg=0 +" filetype should be on from defaults.vim autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab @@ -31,4 +31,6 @@ autocmd InsertLeave * setlocal relativenumber autocmd FocusLost * setlocal norelativenumber autocmd FocusGained * setlocal relativenumber -" vim:sts=4:sw=4:et:tw=79 +let g:Modeliner_format='ft= fenc= et ts= sts= sw= tw=' + +" vim: set et fenc=utf-8 ft=vim sts=4 sw=4 ts=8 tw=79 : diff --git a/firefox/user-js-updater.sh b/firefox/user-js-updater.sh new file mode 100755 index 0000000..6e17577 --- /dev/null +++ b/firefox/user-js-updater.sh @@ -0,0 +1,11 @@ +#!/bin/sh +mv user.js user.js.bak >/dev/null 2>&1 +ghacksjs="https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js" +if ! command -v curl; then + # Based on busybox-compatible wget + wget -q "$ghacksjs" +else + curl -sSO "$ghacksjs" +fi +echo >> user.js +cat user-overrides.js >> user.js diff --git a/firefox/user-overrides.js b/firefox/user-overrides.js new file mode 100644 index 0000000..3f138d0 --- /dev/null +++ b/firefox/user-overrides.js @@ -0,0 +1,180 @@ +// Custom user.js overrides +user_pref("_user.js.parrot", "overrides section syntax error"); + +// 0001 +user_pref("browser.privatebrowsing.autostart", false); + +// 0102 +user_pref("browser.startup.page", 3); + +// 0514b [CUSTOM] +user_pref("browser.newtabpage.activity-stream.default.sites", ""); +user_pref("browser.newtabpage.activity-stream.disableSnippets", true); +user_pref("browser.newtabpage.activity-stream.feeds.aboutpreferences", false); +user_pref("browser.newtabpage.activity-stream.feeds.asrouterfeed", false); +user_pref("browser.newtabpage.activity-stream.feeds.favicon", false); +user_pref("browser.newtabpage.activity-stream.feeds.migration", false); +user_pref("browser.newtabpage.activity-stream.feeds.newtabinit", false); +user_pref("browser.newtabpage.activity-stream.feeds.places", false); +user_pref("browser.newtabpage.activity-stream.feeds.prefs", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories.options", "{}"); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories.rec.impressions", "{}"); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories.spoc.impressions", "{}"); +user_pref("browser.newtabpage.activity-stream.feeds.sections", false); +user_pref("browser.newtabpage.activity-stream.feeds.snippets", false); +user_pref("browser.newtabpage.activity-stream.feeds.systemtick", false); +user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false); +user_pref("browser.newtabpage.activity-stream.feeds.theme", false); +user_pref("browser.newtabpage.activity-stream.feeds.topsites", false); +user_pref("browser.newtabpage.activity-stream.migrationExpired", true); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); +user_pref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false); +user_pref("browser.newtabpage.activity-stream.section.topstories.showDisclaimer", false); +user_pref("browser.newtabpage.activity-stream.showSearch", false); +user_pref("browser.newtabpage.activity-stream.showSponsored", false); +user_pref("browser.newtabpage.activity-stream.telemetry", false); +user_pref("browser.newtabpage.activity-stream.telemetry.ping.endpoint", "data:,"); +user_pref("browser.newtabpage.activity-stream.tippyTop.service.endpoint", "data:,"); +// 0515 +user_pref("extensions.screenshots.disabled", true); + +// 0701 +user_pref("network.dns.disableIPv6", false); +// 0707 +user_pref("network.trr.mode", 0); +user_pref("network.trr.bootstrapAddress", ""); +user_pref("network.trr.uri", ""); + +// 0850a +user_pref("browser.urlbar.autocomplete.enabled", true); +user_pref("browser.urlbar.suggest.history", true); +user_pref("browser.urlbar.suggest.bookmark", true); +user_pref("browser.urlbar.suggest.openpage", true); + +// 0901 +user_pref("signon.rememberSignons", false); +// 0903 +user_pref("security.ask_for_password", 1); + +// 1001 +user_pref("browser.cache.disk.enable", true); +user_pref("browser.cache.disk.capacity", 358400); +// 1020 +user_pref("browser.sessionstore.max_tabs_undo", 50); +user_pref("browser.sessionstore.max_windows_undo", 3); +// 1021 +user_pref("browser.sessionstore.privacy_level", 0); +// 1022 +user_pref("browser.sessionstore.resume_from_crash", true); +// 1030 +user_pref("browser.shell.shortcutFavicons", true); + +// 1241: uMatrix +user_pref("security.mixed_content.block_display_content", false); +// 1261 +user_pref("security.ssl3.rsa_des_ede3_sha", false); +// 1262 +user_pref("security.ssl3.ecdhe_ecdsa_aes_128_sha", false); +user_pref("security.ssl3.ecdhe_rsa_aes_128_sha", false); +// 1263 +user_pref("security.ssl3.dhe_rsa_aes_128_sha", false); +user_pref("security.ssl3.dhe_rsa_aes_256_sha", false); + +// 1401 +//user_pref("browser.display.use_document_fonts", 1); +user_pref("font.name.serif.x-unicode", "Noto Serif Display"); +user_pref("font.name.serif.x-western", "Noto Serif Display"); +user_pref("font.name.sans-serif.x-unicode", "Source Sans Pro"); +user_pref("font.name.sans-serif.x-western", "Source Sans pro"); +user_pref("font.name.monospace.x-unicode", "Dina"); +user_pref("font.name.monospace.x-western", "Dina"); +// 1406 +//user_pref("layout.css.font-loading-api.enabled", true); + +// 1603: uMatrix +user_pref("network.http.referer.XOriginPolicy", 0); +// 1606: uMatrix +user_pref("network.http.referer.spoofSource", true); + +// 2024 +user_pref("permissions.default.camera", 2); +user_pref("permissions.default.microphone", 2); +// 2212 +user_pref("dom.popup_allowed_events", "click dblclick notificationclick"); +// 2304 +user_pref("dom.webnotifications.enabled", true); +// 2305 +user_pref("permissions.default.desktop-notification", 2); + +// 2401 +//user_pref("dom.event.contextmenu.enabled", false); +// 2402 +user_pref("dom.event.clipboardevents.enabled", true); + +// 2508 +user_pref("layers.acceleration.disabled", false); +// 2609 +user_pref("mathml.disabled", false); +// 2610 +user_pref("middlemouse.contentLoadURL", true); +// 2618 +user_pref("ui.use_standins_for_native_colors", false); + +// 2662 +user_pref("extensions.webextensions.restrictedDomains", ""); + +// 2701 +user_pref("network.cookie.cookieBehavior", 3); + +// 2703: use extensions for cookies + +// 2803 +user_pref("privacy.clearOnShutdown.history", false); +user_pref("privacy.clearOnShutdown.downloads", false); + +// 0420: uMatrix +user_pref("privacy.trackingprotection.pbmode.enabled", false); +user_pref("privacy.trackingprotection.enabled", false); +// 0421: uMatrix +user_pref("privacy.trackingprotection.ui.enabled", false); +// 0422: uMatrix +user_pref("urlclassifier.trackingTable", ""); + +// 5000 +/* WELCOME & WHAT's NEW NOTICES ***/ +user_pref("browser.startup.homepage_override.mstone", "ignore"); +user_pref("startup.homepage_welcome_url", ""); +user_pref("startup.homepage_welcome_url.additional", ""); +user_pref("startup.homepage_override_url", ""); +/* APPEARANCE ***/ +user_pref("toolkit.cosmeticAnimations.enabled", false); +/* CONTENT BEHAVIOR ***/ +user_pref("layout.spellcheckDefault", 2); +/* UX BEHAVIOR ***/ +user_pref("browser.backspace_action", 2); +user_pref("browser.ctrlTab.previews", true); +user_pref("browser.tabs.closeWindowWithLastTab", false); +user_pref("browser.tabs.loadBookmarksInTabs", true); +/* OTHER ***/ +user_pref("browser.bookmarks.max_backups", 2); +user_pref("identity.fxaccounts.enabled", false); +user_pref("network.manage-offline-status", false); +user_pref("reader.parse-on-load.enabled", false); + +// 10000 +user_pref("browser.altClickSave", true); +user_pref("browser.preferences.instantApply", false); +user_pref("devtools.onboarding.telemetry.logged", false); +user_pref("extensions.ui.experiment.hidden", false); +user_pref("reader.errors.includeURLs", false); +user_pref("ui.key.menuAccessKeyFocuses", true); //default +user_pref("font.default.x-unicode", "sans-serif"); +user_pref("font.default.x-western", "sans-serif"); +user_pref("zoom.maxPercent", 500); +user_pref("zoom.minPercent", 10); + +user_pref("_user.js.parrot", "SUCCESS"); diff --git a/fonts/Adobe/LICENSE.md b/fonts/Adobe/LICENSE.md new file mode 100644 index 0000000..87ec82c --- /dev/null +++ b/fonts/Adobe/LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf new file mode 100644 index 0000000..0c25f3d Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf new file mode 100644 index 0000000..da3504c Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf new file mode 100644 index 0000000..98dbee7 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf new file mode 100644 index 0000000..6600c86 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf new file mode 100644 index 0000000..f885ce7 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf new file mode 100644 index 0000000..f932024 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-It.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-It.otf new file mode 100644 index 0000000..2d627d9 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-It.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf new file mode 100644 index 0000000..159979f Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf new file mode 100644 index 0000000..e3d49b5 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf new file mode 100644 index 0000000..bdcfb27 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf new file mode 100644 index 0000000..fffdbaf Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf b/fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf new file mode 100644 index 0000000..e90515b Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf b/fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf new file mode 100644 index 0000000..ac99d67 Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf differ diff --git a/fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf b/fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf new file mode 100644 index 0000000..ab1442f Binary files /dev/null and b/fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf new file mode 100644 index 0000000..11bb8ea Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf new file mode 100644 index 0000000..a5cee34 Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf new file mode 100644 index 0000000..034d9d4 Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf new file mode 100644 index 0000000..8127399 Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf new file mode 100644 index 0000000..213a3cd Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf new file mode 100644 index 0000000..4da4cbb Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf new file mode 100644 index 0000000..a0dec7e Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf new file mode 100644 index 0000000..9ac9950 Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf new file mode 100644 index 0000000..d7aaa1f Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf new file mode 100644 index 0000000..dde2fd4 Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf new file mode 100644 index 0000000..8bb0390 Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf differ diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf b/fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf new file mode 100644 index 0000000..0586ddd Binary files /dev/null and b/fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf differ diff --git a/xorg/fonts/Dina/Dina_i400-10.pcf.gz b/fonts/Dina/Dina_i400-10.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_i400-10.pcf.gz rename to fonts/Dina/Dina_i400-10.pcf.gz diff --git a/xorg/fonts/Dina/Dina_i400-8.pcf.gz b/fonts/Dina/Dina_i400-8.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_i400-8.pcf.gz rename to fonts/Dina/Dina_i400-8.pcf.gz diff --git a/xorg/fonts/Dina/Dina_i400-9.pcf.gz b/fonts/Dina/Dina_i400-9.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_i400-9.pcf.gz rename to fonts/Dina/Dina_i400-9.pcf.gz diff --git a/xorg/fonts/Dina/Dina_i700-10.pcf.gz b/fonts/Dina/Dina_i700-10.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_i700-10.pcf.gz rename to fonts/Dina/Dina_i700-10.pcf.gz diff --git a/xorg/fonts/Dina/Dina_i700-8.pcf.gz b/fonts/Dina/Dina_i700-8.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_i700-8.pcf.gz rename to fonts/Dina/Dina_i700-8.pcf.gz diff --git a/xorg/fonts/Dina/Dina_i700-9.pcf.gz b/fonts/Dina/Dina_i700-9.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_i700-9.pcf.gz rename to fonts/Dina/Dina_i700-9.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r400-10.pcf.gz b/fonts/Dina/Dina_r400-10.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r400-10.pcf.gz rename to fonts/Dina/Dina_r400-10.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r400-6.pcf.gz b/fonts/Dina/Dina_r400-6.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r400-6.pcf.gz rename to fonts/Dina/Dina_r400-6.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r400-8.pcf.gz b/fonts/Dina/Dina_r400-8.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r400-8.pcf.gz rename to fonts/Dina/Dina_r400-8.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r400-9.pcf.gz b/fonts/Dina/Dina_r400-9.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r400-9.pcf.gz rename to fonts/Dina/Dina_r400-9.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r700-10.pcf.gz b/fonts/Dina/Dina_r700-10.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r700-10.pcf.gz rename to fonts/Dina/Dina_r700-10.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r700-8.pcf.gz b/fonts/Dina/Dina_r700-8.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r700-8.pcf.gz rename to fonts/Dina/Dina_r700-8.pcf.gz diff --git a/xorg/fonts/Dina/Dina_r700-9.pcf.gz b/fonts/Dina/Dina_r700-9.pcf.gz similarity index 100% rename from xorg/fonts/Dina/Dina_r700-9.pcf.gz rename to fonts/Dina/Dina_r700-9.pcf.gz diff --git a/fonts/Dina/LICENSE b/fonts/Dina/LICENSE new file mode 100644 index 0000000..4e247ec --- /dev/null +++ b/fonts/Dina/LICENSE @@ -0,0 +1,5 @@ +https://www.dcmembers.com/jibsen/download/61/ + +The Dina font is free. You are welcome to use, distribute and modify it however you want, just don't use it for anything illegal or claim that you made it. + +The Dina font is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this font. diff --git a/xorg/fonts/Dina/fonts.dir b/fonts/Dina/fonts.dir similarity index 100% rename from xorg/fonts/Dina/fonts.dir rename to fonts/Dina/fonts.dir diff --git a/xorg/fonts/Dina/fonts.scale b/fonts/Dina/fonts.scale similarity index 100% rename from xorg/fonts/Dina/fonts.scale rename to fonts/Dina/fonts.scale diff --git a/install.sh b/install.sh index 81ba565..15b9f19 100755 --- a/install.sh +++ b/install.sh @@ -3,19 +3,27 @@ #NOTE: .zshenv XDG paths are hardcoded to allow non-zsh install # test +devnull=/dev/null if [ "$1" = "test" ]; then - mkdir() { echo -- "$@"; } + echo "Running test -- no changes will be applied" + devnull=/dev/stdout + _cd() { + cd $*; + echo " cd $*"; + echo "\$PWD=$PWD"; + } + alias cd="_cd" + alias mkdir="echo mkdir" alias ln="echo ln" alias rm="echo rm" - alias cap_mkdb="echo cap_mkdb" - alias unlink="echo unlink" + alias sh="echo sh" fi # create preferred folder structure cd ~ -mkdir -p bin etc share share/fonts .urxvt/ext .icons .themes > /dev/null 2>&1 -mkdir -pm 700 var/tmp var/tmp/vim > /dev/null 2>&1 -cd - +mkdir -p bin etc share share/fonts .urxvt/ext .icons .themes >$devnull 2>&1 +mkdir -pm 700 var/tmp var/tmp/vim >$devnull 2>&1 +cd - >$devnull # ensure ostype if [ -z "$OSTYPE" ]; then @@ -25,40 +33,52 @@ fi # accomodate multiple userlands lnargs=-sfnv case "$OSTYPE" in - # TODO: make links safer for systems without -Fw - freebsd*) lnargs=-sFhvw;; + freebsd*) lnargs=-sFhv;; netbsd|openbsd*) lnargs=-sfhv;; esac l() { # TODO: use install? - [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$x}" "$1" + [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$PWD/$x}" "$1" || \ + echo "!!! File exists and is not a link: $1" } # link files -find "$PWD/base" -mindepth 1 -maxdepth 1 | while read -r x; do +find base -mindepth 1 -maxdepth 1 | while read -r x; do l "$HOME/`basename "$x"`" done find bin share -mindepth 1 -maxdepth 1 | while read -r x; do - l "$HOME/$x" "$PWD/$x" + l "$HOME/$x" done -find "$PWD/xdg" -mindepth 1 -maxdepth 1 | while read -r x; do +find xdg -mindepth 1 -maxdepth 1 | while read -r x; do l "$HOME/etc/`basename "$x"`" done -find "$PWD/urxvt-ext" -type f -perm -111 -mindepth 1 -maxdepth 2 | while read -r x; do +find urxvt-ext -type f -perm -111 -mindepth 1 -maxdepth 2 | while read -r x; do l "$HOME/.urxvt/ext/`basename $x`" done -find "$PWD/xorg/icons" -type d -mindepth 1 -maxdepth 2 | while read -r x; do +find xorg/icons -type d -mindepth 1 -maxdepth 2 | while read -r x; do if [ -e "$x/index.theme" ]; then l "$HOME/.icons/`basename "$x"`" fi done -find "$PWD/xorg/themes" -type d -mindepth 1 -maxdepth 1 | while read -r x; do +find xorg/themes -type d -mindepth 1 -maxdepth 1 | while read -r x; do l "$HOME/.themes/`basename "$x"`" done -find "$PWD/xorg/fonts" -type d -mindepth 1 -maxdepth 1 | while read -r x; do +find fonts -type d -mindepth 1 -maxdepth 1 | while read -r x; do l "$HOME/share/fonts/`basename "$x"`" done +#XXX: potential bug with newlines in profile name (if ff even takes it) +#XXX: breaks on multiple profiles +ffdir="`find "$HOME/.mozilla/firefox" -type d -mindepth 1 -maxdepth 1 | head -1 2>$devnull`" +if [ -d "$ffdir" ]; then + find firefox -mindepth 1 -maxdepth 1 | while read -r x; do + l "$ffdir/`basename "$x"`" + done + cd "$ffdir" + echo "Updating user.js" + sh ./user-js-updater.sh + cd - >$devnull +fi # run .zprofile to set up tmp zsh ~/.zprofile diff --git a/xdg/fontconfig/fonts.conf b/xdg/fontconfig/fonts.conf new file mode 100644 index 0000000..fd68bb1 --- /dev/null +++ b/xdg/fontconfig/fonts.conf @@ -0,0 +1,42 @@ + + + + + + + Helvetica + + + Source Sans Pro + + + + + sans-serif + + Source Sans Pro + Noto Sans Display + Noto Sans + DejaVu Sans + + + serif + + Source Serif Pro + Noto Serif Display + Noto Serif + DejaVu Serif + + + monospace + + Dina + Noto Sans Mono + DejaVu Mono + Ubuntu Mono + + + + + diff --git a/xdg/tint2/tint2rc b/xdg/tint2/tint2rc index 3aa9e08..7b580b9 100644 --- a/xdg/tint2/tint2rc +++ b/xdg/tint2/tint2rc @@ -1,4 +1,4 @@ -#---- Generated by tint2conf b99b ---- +#---- Generated by tint2conf cf0f ---- # See https://gitlab.com/o9000/tint2/wikis/Configure for # full documentation of the configuration options. #------------------------------------- @@ -190,14 +190,15 @@ clock_dwheel_command = #------------------------------------- # Battery battery_tooltip = 1 -battery_low_status = 0 -battery_low_cmd = -battery_full_cmd = +battery_low_status = 5 +battery_low_cmd = notify-send -u critical -t 0 -a system -i battery-low 'Battery critical' + +battery_full_cmd = notify-send -t 10000 -a system -i battery-full 'Battery full' bat1_font = Dina 8 bat2_font = Dina 6 battery_font_color = #93a1a1 100 -bat1_format = %p -bat2_format = %t +bat1_format = %p %h:%m +bat2_format = %s battery_padding = 0 0 battery_background_id = 0 battery_hide = 101 @@ -206,8 +207,8 @@ battery_rclick_command = battery_mclick_command = battery_uwheel_command = battery_dwheel_command = -ac_connected_cmd = -ac_disconnected_cmd = +ac_connected_cmd = compton +ac_disconnected_cmd = killall compton #------------------------------------- # Separator 1