*.swo
# fontconfig
-xorg/fonts/Dina/.uuid
+/fonts/**/.uuid
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
--- /dev/null
+" Modeliner
+"
+" Version: 0.3.0
+" Description:
+"
+" Generates a modeline from current settings.
+"
+" Last Change: 27-Jun-2008.
+" Maintainer: Shuhei Kubota <chimachima@gmail.com>
+"
+" 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 <SID>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 \<ESC>"
+ 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 :
-if v:progname =~? "evim"
- finish
-endif
source $VIMRUNTIME/defaults.vim
packadd matchit
+set modeline "!!!
+
set backup
set backupdir=$HOME/var/tmp/vim//
set undofile
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
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 :
--- /dev/null
+#!/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
--- /dev/null
+// 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");
--- /dev/null
+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.\r
+\r
+This Font Software is licensed under the SIL Open Font License, Version 1.1.\r
+\r
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL\r
+\r
+\r
+-----------------------------------------------------------\r
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\r
+-----------------------------------------------------------\r
+\r
+PREAMBLE\r
+The goals of the Open Font License (OFL) are to stimulate worldwide\r
+development of collaborative font projects, to support the font creation\r
+efforts of academic and linguistic communities, and to provide a free and\r
+open framework in which fonts may be shared and improved in partnership\r
+with others.\r
+\r
+The OFL allows the licensed fonts to be used, studied, modified and\r
+redistributed freely as long as they are not sold by themselves. The\r
+fonts, including any derivative works, can be bundled, embedded, \r
+redistributed and/or sold with any software provided that any reserved\r
+names are not used by derivative works. The fonts and derivatives,\r
+however, cannot be released under any other type of license. The\r
+requirement for fonts to remain under this license does not apply\r
+to any document created using the fonts or their derivatives.\r
+\r
+DEFINITIONS\r
+"Font Software" refers to the set of files released by the Copyright\r
+Holder(s) under this license and clearly marked as such. This may\r
+include source files, build scripts and documentation.\r
+\r
+"Reserved Font Name" refers to any names specified as such after the\r
+copyright statement(s).\r
+\r
+"Original Version" refers to the collection of Font Software components as\r
+distributed by the Copyright Holder(s).\r
+\r
+"Modified Version" refers to any derivative made by adding to, deleting,\r
+or substituting -- in part or in whole -- any of the components of the\r
+Original Version, by changing formats or by porting the Font Software to a\r
+new environment.\r
+\r
+"Author" refers to any designer, engineer, programmer, technical\r
+writer or other person who contributed to the Font Software.\r
+\r
+PERMISSION & CONDITIONS\r
+Permission is hereby granted, free of charge, to any person obtaining\r
+a copy of the Font Software, to use, study, copy, merge, embed, modify,\r
+redistribute, and sell modified and unmodified copies of the Font\r
+Software, subject to the following conditions:\r
+\r
+1) Neither the Font Software nor any of its individual components,\r
+in Original or Modified Versions, may be sold by itself.\r
+\r
+2) Original or Modified Versions of the Font Software may be bundled,\r
+redistributed and/or sold with any software, provided that each copy\r
+contains the above copyright notice and this license. These can be\r
+included either as stand-alone text files, human-readable headers or\r
+in the appropriate machine-readable metadata fields within text or\r
+binary files as long as those fields can be easily viewed by the user.\r
+\r
+3) No Modified Version of the Font Software may use the Reserved Font\r
+Name(s) unless explicit written permission is granted by the corresponding\r
+Copyright Holder. This restriction only applies to the primary font name as\r
+presented to the users.\r
+\r
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font\r
+Software shall not be used to promote, endorse or advertise any\r
+Modified Version, except to acknowledge the contribution(s) of the\r
+Copyright Holder(s) and the Author(s) or with their explicit written\r
+permission.\r
+\r
+5) The Font Software, modified or unmodified, in part or in whole,\r
+must be distributed entirely under this license, and must not be\r
+distributed under any other license. The requirement for fonts to\r
+remain under this license does not apply to any document created\r
+using the Font Software.\r
+\r
+TERMINATION\r
+This license becomes null and void if any of the above conditions are\r
+not met.\r
+\r
+DISCLAIMER\r
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\r
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\r
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE\r
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\r
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM\r
+OTHER DEALINGS IN THE FONT SOFTWARE.\r
--- /dev/null
+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.
#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
# 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
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+ <!-- fuck helvetica -->
+ <match>
+ <test name="family">
+ <string>Helvetica</string>
+ </test>
+ <edit binding="same" mode="assign" name="family">
+ <string>Source Sans Pro</string>
+ </edit>
+ </match>
+
+ <!-- set up preferred aliases -->
+ <alias><family>sans-serif</family>
+ <prefer>
+ <family>Source Sans Pro</family>
+ <family>Noto Sans Display</family>
+ <family>Noto Sans</family>
+ <family>DejaVu Sans</family>
+ </prefer>
+ </alias>
+ <alias><family>serif</family>
+ <prefer>
+ <family>Source Serif Pro</family>
+ <family>Noto Serif Display</family>
+ <family>Noto Serif</family>
+ <family>DejaVu Serif</family>
+ </prefer>
+ </alias>
+ <alias><family>monospace</family>
+ <prefer>
+ <family>Dina</family>
+ <family>Noto Sans Mono</family>
+ <family>DejaVu Mono</family>
+ <family>Ubuntu Mono</family>
+ </prefer>
+ </alias>
+</fontconfig>
+
+<!-- vim: set et fenc=utf-8 ft=xml sts=2 sw=2 ts=8 tw=0 :
+-->
-#---- Generated by tint2conf b99b ----
+#---- Generated by tint2conf cf0f ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
#-------------------------------------
# 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
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