Compare commits

...

247 Commits

Author SHA1 Message Date
xfnw e6a3ee18d7 git: add alias for fetching git-notes
the `#` is a hack to prevent the shell from adding arguments to the end,
`$2` is for inserting a `+` in front of the refspec to allow overwriting
2023-11-17 20:39:14 -05:00
xfnw b62236e8d9 c: add a decompile mode 2023-10-19 19:07:38 -04:00
xfnw 117f128435 vimrc: increase textwidth 2023-09-16 12:25:49 -04:00
xfnw ed467cddae vimrc: populate mandoc cross references 2023-09-08 16:08:28 -04:00
xfnw 235e32d534 emacs: setup slime
swap around key combinations as with inferior-lisp
2023-08-26 22:23:12 -04:00
xfnw 6b75c0888c emacs: setup inferior-lisp
swap lisp-eval-defun and lisp-compile-defun key combinations, to be
easier to type
2023-08-26 16:34:55 -04:00
xfnw b179416661 i3: add some missing codes to emoji picker 2023-08-25 12:50:25 -04:00
xfnw bb435ffa31 ranger: change wording 2023-08-22 11:42:38 -04:00
xfnw 5fa4604e17 Revert "indent small sections too" and delete unneeded file
This reverts commit 6acf06648e.
2023-08-16 14:40:18 -04:00
xfnw 8ebe037855 vim mdoc template: fix heading order and remove OPTIONS
to be compliant with mdoc(7)'s recommended headings
2023-08-16 14:19:15 -04:00
xfnw 82c5d62db4 irssi: add alias 2023-08-14 15:58:20 -04:00
xfnw a74abe29b2 ranger: show size and cleaned up cidr 2023-08-14 15:54:35 -04:00
xfnw 409d26da5b glances: slow down refresh rate 2023-08-05 16:16:08 -04:00
xfnw 173b8e13f7 emacs: enable xml autocompletion
it seems emacs also decided to automatically convert the newlines in
my initial-scratch-message to octal for some reason
2023-08-04 14:21:32 -04:00
xfnw 4ac881aeb7 bb: remove weird ./ in guid 2023-08-03 12:32:41 -04:00
xfnw 884aa2faeb badwolf: newtab page 2023-08-02 14:19:14 -04:00
xfnw 1642e1c6e3 zshrc: add function 2023-07-30 16:17:45 -04:00
xfnw 9f5fb530d3 qrscan: pass through arguments 2023-07-30 13:52:11 -04:00
xfnw 33bb02ef6d zsh: clean up comments, set WORDCHARS 2023-07-28 11:54:09 -04:00
xfnw 0c40887004 update bin 2023-07-24 15:06:03 -04:00
xfnw 805fd2147b XCompose: add greek letter SIGMA 2023-07-22 16:50:30 -04:00
xfnw d0bb925bac zshrc: add ahex alias 2023-07-20 15:25:58 -04:00
xfnw f24afcfec3 irssi: add more -line aliases 2023-07-19 21:01:25 -04:00
xfnw af55322500 gimp: add palette 2023-07-16 11:32:46 -04:00
xfnw 75c79b4df9 irssi: remove chghost script
chghost is now natively supported in irssi
2023-07-15 11:33:52 -04:00
xfnw 84a5aa05f4 irssi: add chghost to theme 2023-07-15 11:19:37 -04:00
xfnw 557c4ed29d zshrc: add colorspace-corrected dither function 2023-07-11 10:34:27 -04:00
xfnw 57aeec27b1 emacs: update theme hash 2023-07-01 09:58:01 -04:00
xfnw 0448d9fa3f add a default clang-format 2023-06-25 10:43:34 -04:00
xfnw 20ed59bd28 zshrc: add rot13 function 2023-06-23 22:52:09 -04:00
xfnw ef18b43f4c json2xml: handle names starting with numbers
tag names starting with a number is not valid xml,
prefix them with 'n'
2023-06-23 13:31:22 -04:00
xfnw 4031bc5161 json2xml: handle null 2023-06-23 13:15:33 -04:00
xfnw 89cb037efa json2xml: support numbers and booleans 2023-06-23 11:41:17 -04:00
xfnw 804a818615 its xslt time 2023-06-22 16:08:18 -04:00
xfnw cde35ec492 script for sorting domains 2023-06-20 11:26:34 -04:00
xfnw 399dfae756 default ctags options 2023-06-14 16:44:34 -04:00
xfnw d8db9914c8 vimrc: add LaTeX multicols key 2023-06-11 22:35:23 -04:00
xfnw feccf0e623 add kline copypasta 2023-06-11 10:44:46 -04:00
xfnw 1bb507d63a vimrc: add key for inserting LaTeX bmatrix block
also rearrange lines a bit to look nicer
2023-06-09 13:17:52 -04:00
xfnw 07d666cfb0 tex2svg: add command for matrix transpose operator 2023-06-09 13:16:01 -04:00
xfnw 6b01bf22c7 modified version of tainty script 2023-06-07 20:40:39 -04:00
xfnw f2f24410c9 increase newsboat reload time 2023-06-02 22:49:01 -04:00
xfnw f3965832a1 vimrc: add keybind for LaTeX enumerate block 2023-05-31 08:34:41 -04:00
xfnw 6553a21f83 vim Artist: change keybinds
makes keys more commonly used together closer
2023-05-28 20:04:22 -04:00
xfnw 7e9b5c2c52 meilid: accept optional output field 2023-05-27 14:37:19 -04:00
xfnw e548e5fdc2 tex2svg: add command for nicer looking overline 2023-05-26 20:26:47 -04:00
xfnw 01448ba064 add utilities for converting IPs to/from decimal 2023-05-21 13:03:46 -04:00
xfnw e78567d02d mpv eee profile: do not hardcode vo 2023-05-20 08:47:09 -04:00
xfnw c5ef35781e add mpv config 2023-05-18 17:40:10 -04:00
xfnw 0057a20d5d vim: update year in license template 2023-05-17 18:41:56 -04:00
xfnw bbca027ed6 vim tex template: hide links
without this, links get silly colored boxes when viewed in some browsers
2023-05-14 23:05:23 -04:00
xfnw ff8fbdbb89 tex2svg: switch to standalone+varwidth
this allows multi-line output and headings, since the \hbox hacks messed
with newlines
2023-05-10 19:22:25 -04:00
xfnw b38f39d26f tex2svg: still clean up tempdir on failure 2023-05-10 18:26:54 -04:00
xfnw ac03711c77 add script for generating svgs from tex math 2023-05-10 18:25:43 -04:00
xfnw b9a851e53c vimrc: add keybinds for inserting common LaTeX blocks 2023-05-07 22:58:53 -04:00
xfnw 909e8f2d6c add asciimath convenience script 2023-05-07 13:26:19 -04:00
xfnw 9510915ae4 zshrc: add ffdiff alias
shows the difference between frames of video
2023-05-06 22:03:39 -04:00
xfnw e926fa92df add PILE OF POO to XCompose 2023-05-06 13:16:33 -04:00
xfnw ba7820ff5c zshrc: add function for showing unicode chars 2023-04-30 23:55:38 -04:00
xfnw 00c9c5215c git: clean up gitconfig formatting 2023-04-30 15:12:40 -04:00
xfnw 2fd4b2feb8 git: add git alias for brief log
stolen from
https://warmedal.se/~bjorn/posts/2023-03-13-note-to-self-git-aliases.html
2023-04-30 15:08:39 -04:00
xfnw 536c281e77 vim: clean up templates list 2023-04-28 22:29:01 -04:00
xfnw 817ee691a1 ranal: add missing O and o, remove stray combining chars 2023-04-07 18:55:55 -04:00
xfnw 880a0fa461 zshrc: add 9serve function
ad-hoc serving of 9p using https://git.sr.ht/~ft/9pro
2023-04-05 23:29:32 -04:00
xfnw 362d05f6db ranal: add more homoglyphs and add option for normal spaces
adds -s option, to not use homoglyphs for spaces
2023-04-05 16:49:35 -04:00
xfnw 42a4efbd13 zshrc: add dither function
squishes images real small, crunches the color palette to 8 or less
colors, and runs it through some ordered dithering

as this wrecks havoc on jpg's compression and webp does not like color
palettes, png and gif are the only formats this makes sense to output to

note that dithering assumes a linear colorspace, which sRGB is not,
adding a nice color distortion effect. if you want to avoid this,
convert it to a linear colorspace like RGB with imagemagick's
-colorspace option, then convert it back after dithering.
2023-04-04 14:09:14 -04:00
xfnw 111a526de3 irssi: fix config 2023-03-27 16:13:20 -04:00
xfnw f2e036d85a irssi: rename first window
this makes hilightwin go in the correct place
2023-03-27 16:05:24 -04:00
xfnw 977f371abd irssi: add more aliases 2023-03-26 20:02:33 -04:00
xfnw d698e300bd cov: do not set LLVM_PROFILE_FILE
forcing a file name seems to make multi-binary tests overwrite each
other's profraw file

note old profraw files now need to be deleted before running, for
accurate representation of coverage regression
2023-03-23 19:55:08 -04:00
xfnw 001cffd700 add script for generating rust test coverage page 2023-03-17 16:41:25 -04:00
xfnw 8a79dc613b gimp: another palette 2023-03-10 23:01:45 -05:00
xfnw 24361ec1bc subtitleeditor config 2023-03-10 18:10:19 -05:00
xfnw 5a45518f67 meilid: swap _ and - around
this makes the output consistant with base64url
2023-03-04 13:55:04 -05:00
xfnw 31f09d159a c: add -g option
enables debug symbols and address sanitizer
2023-02-25 13:16:48 -05:00
xfnw 54647ecce7 update htoprc template and remove some already-default options 2023-02-23 21:10:00 -05:00
xfnw d9de51517f add script for rough syncing of time 2023-02-22 16:18:22 -05:00
xfnw 1889159aec muttrc: iconv with UTF-8 rather than UTF8
UTF-8 is more portable, UTF8 seems to be a gnu-ism
2023-02-19 00:08:44 -05:00
xfnw 77c892ab9f gnuplot fix white lines of pixels at top and left 2023-02-18 23:55:12 -05:00
xfnw 103a07a930 org setupfile: add text alignment 2023-02-18 18:44:48 -05:00
xfnw 0ca93cc667 script for making id values meilisearch-friendly 2023-02-13 18:05:47 -05:00
xfnw 7f9d1b4665 script for turning mp3 metadata into a json object 2023-02-13 17:38:26 -05:00
xfnw d293da345b zshrc: add convenience aliases for meilisearch 2023-02-11 13:51:55 -05:00
xfnw e599b334e7 zshrc: add calcbd function 2023-02-05 18:04:52 -05:00
xfnw 865c411f53 emacs org: add alternate C-M-RET binding for org-meta-return
M-RET interferes with my window manager config
2023-02-04 18:26:10 -05:00
xfnw 13081b9fba emacs org: enable conditional shift-select 2023-02-04 18:20:20 -05:00
xfnw 24a04800fc vim mandoc output: more robust head replacement
some manpages cause mandoc to stick comments in the head, breaking using
just the line number
2023-01-31 17:04:17 -05:00
xfnw 800cfce6e7 emacs: add package repos before initialize
this fixes caching of package lists
2023-01-13 18:14:47 -05:00
xfnw f70c98acef mutt: add account line 2023-01-08 12:45:34 -05:00
xfnw 05c6d25d05 as in -> is in 2023-01-08 12:42:49 -05:00
xfnw 3876f7a220 emacs: add ob-nix package
org-babel support for nix expressions!
2022-12-27 11:23:07 -05:00
xfnw 9fa31d79d7 typog: do not treat punctuation as word endings 2022-12-11 15:19:12 -05:00
xfnw 84312f332e fix weird urxvt spacing issues
no idea why it does not like certain sizes
2022-12-10 16:24:35 -05:00
xfnw 438b4ea648 create script for making typos 2022-12-09 21:11:10 -05:00
xfnw 76e75f3266 emacs: package-install graphviz-dot-mode 2022-12-08 18:49:50 -05:00
xfnw 3b3aa22fef add keybind for taking non-uploaded screenshots 2022-12-04 21:21:22 -05:00
xfnw cd862aff9f prioritize things that do not require packages
more stuff will work if a package cannot be installed for some reason
2022-11-27 15:41:45 -05:00
xfnw 0e05992651 consistant copy-page-url keybind between elpher and eww 2022-11-27 15:37:52 -05:00
xfnw e987593339 open custom gophermap files in text-mode 2022-11-27 13:57:20 -05:00
xfnw 4723b14fa3 emacs: add nix-mode
use nixpkgs-fmt instead of nixfmt

nix repl is started including nixpkgs, using --file, instead of --expr
with an import like the helptext suggests, because it consistently is
slightly faster
2022-11-23 01:25:57 -05:00
xfnw df6b586ae7 makeglines: contact -> email 2022-11-22 23:29:22 -05:00
xfnw 8d2da54282 configure nix for non-nixos 2022-11-22 20:22:33 -05:00
xfnw 9bef732380 revert evil's new shift-left and right keybinds
these new keybinds were introduced in
d43fe06381
and took precedence over org-mode's todo state changing keybinds

this uses the old []-style key names because it must be identical to
the ones already in evil-insert-state-map to counteract them
2022-11-19 15:03:53 -05:00
xfnw 7fd024c7a4 emacs evil: use undo-redo undo system
this requires emacs >= 28!
2022-11-19 15:02:23 -05:00
xfnw 655747fde1 lock keepass in the background
it tries to start in the foreground if not already running
2022-11-19 10:49:31 -05:00
xfnw 8365504731 newsboat: do not refresh feeds on load 2022-11-13 12:07:04 -05:00
xfnw b4384b6b6a add systat to menu 2022-11-13 12:06:59 -05:00
xfnw 3a830b3faa setupfile: word wrap 2022-11-12 15:58:53 -05:00
xfnw 5fb264b5b6 sync setupfile from orgwiki 2022-11-12 15:56:25 -05:00
xfnw c6e2be036c switch nullpointers again 2022-11-07 19:20:36 -05:00
xfnw a25a23e6e4 create xrc
random [xess](https://github.com/Xe/Xess) theme!
2022-11-07 18:16:04 -05:00
xfnw c349b02c40 fvwm: add Maximize-Func button and update to latest obsd defaults 2022-11-06 00:19:45 -04:00
xfnw 05af7353b1 make mkbusyroot not archlinux-dependant
does require busybox to be installed though
2022-11-05 14:15:55 -04:00
xfnw 69478c5e9a add mutt alias for viewing html
sadly no idea how to prevent remote content being requested (which is a
privacy/tracker concern)
2022-11-02 20:40:41 -04:00
xfnw 349c8b153e add ddiff alias 2022-10-30 16:58:17 -04:00
xfnw 09197f39ba move around some of Artist's keybinds 2022-10-29 14:04:23 -04:00
xfnw 2e0c002469 more circe options 2022-10-24 18:42:25 -04:00
xfnw 7922b59642 circe config 2022-10-23 18:51:12 -04:00
xfnw 5496b9639b org setupfile: indicate anchor targets with css 2022-10-22 19:32:39 -04:00
xfnw 85a46f5484 gnuplot histograms 2022-10-19 17:56:57 -04:00
xfnw e6211d1040 mmm pasta 2022-10-16 13:23:31 -04:00
xfnw d10d897e3b swap rest.ogg and work.ogg 2022-10-16 12:22:10 -04:00
xfnw a85fc4966c emacs redtick: fix end of work interval sound 2022-10-15 23:40:25 -04:00
xfnw 7523810b73 emacs redtick sounds 2022-10-15 22:55:33 -04:00
xfnw 12deff93d9 emacs redtick shorten work interval 2022-10-15 22:11:51 -04:00
xfnw 65307f797a fix path 2022-10-15 17:42:58 -04:00
xfnw 572ee5d9f4 emacs: add redtick with modifications
nice pomodoro timer
2022-10-15 14:45:40 -04:00
xfnw 82be34037d custom load path 2022-10-15 13:28:14 -04:00
xfnw 6aadb7582c add pdfa to hyperref options for org latex export 2022-10-09 18:29:57 -04:00
xfnw 5719f6e42e vim latex template: add pdfa option to hyperref
it fails pdfa validation when using in-page references otherwise
2022-10-09 18:16:24 -04:00
xfnw 6640d016d2 emacs org: make weeks start on sunday 2022-10-08 22:27:17 -04:00
xfnw cf0f962785 update gruvbox hash 2022-10-08 21:32:48 -04:00
xfnw 7c76115bcd set org-src-preserve-indention
org automatically removing indention to be "smart" breaks indention if
you tangle multiple codeblocks into one file
2022-10-05 19:16:19 -04:00
xfnw d8d3792a05 bind C-c C-c to eval in the lisp modes 2022-10-02 14:18:12 -04:00
xfnw 411e1526f3 add more org keybinds 2022-10-02 13:13:15 -04:00
xfnw ee2b28a2cd emacs move server-start to end 2022-09-28 16:16:34 -04:00
xfnw d1f5d26939 emacs use short answers 2022-09-28 16:02:30 -04:00
xfnw 8b03c8994e emacs: add move-file function 2022-09-27 22:24:12 -04:00
xfnw 1408181617 improve expdays busybox detection
also fixes busybox's output being off-by-one compaired to the other date backends
2022-09-27 12:03:31 -04:00
xfnw 1480d16ff0 emacs: do not confirm babel evaluate 2022-09-26 18:33:52 -04:00
xfnw d8063654a8 add buffer-menu keybind
borrowed from yeti's config
2022-09-26 12:52:02 -04:00
xfnw 195da3cb4c add alias for running tesseract-ocr on latest screenshot 2022-09-24 16:42:16 -04:00
xfnw b17e5f54e5 fix bar breaking after a day 2022-09-23 23:56:35 -04:00
xfnw 0396901174 irssi log colors 2022-09-23 19:58:25 -04:00
xfnw a4cc747e9a berry: remove switching after sending a window 2022-09-22 22:17:21 -04:00
xfnw 04494f5798 disable ncdu's colors
its hard to read on the colorscheme i am using
2022-09-21 23:46:45 -04:00
xfnw 9fabbe62e9 add biber references template 2022-09-18 16:00:29 -04:00
xfnw b41b0ac9e2 artist: change a redundant keybind to set bg color 2022-09-18 12:01:19 -04:00
xfnw 755e4bbfb0 rename touch7 to tuch and make it open editor 2022-09-17 20:44:15 -04:00
xfnw f99fb7a3ad add alias for getting mouse position 2022-09-17 20:37:27 -04:00
launchd 1be58984af steal examknow/launchd's cidr calculator script
>:3
2022-09-17 20:31:11 -04:00
xfnw e8ea2b80f2 add touch7 zsh function
touches file and then makes it executable because im too lazy to do it
myself
2022-09-17 14:54:25 -04:00
xfnw 5ed7612009 emacs: disable auto zone 2022-09-10 12:36:54 -04:00
xfnw 7dcdc7967f rotate irssi logs by date 2022-09-08 16:37:10 -04:00
xfnw 0842af58ad use a prompt without colors for dumb terminals
for example using a terminal in the acme text editor.

this depends on the prompt theme "redhat" already existing, but it seems
to be bundled with zsh
2022-09-07 21:26:26 -04:00
xfnw b2eb081a15 add Sepero's better thermal throttling script 2022-09-07 21:26:24 -04:00
xfnw 200816eaed change default sounded speed 2022-09-05 18:00:55 -04:00
xfnw 16856bbece irssi: add more scripts 2022-09-01 19:35:17 -04:00
xfnw 0a956eca18 add some unicode emotes to emoji file 2022-08-30 16:21:05 -04:00
xfnw b655eea0d5 it was upsidown 2022-08-27 23:53:14 -04:00
xfnw e6b6d026d3 add mpv avectorscope alias with less burnin 2022-08-27 20:23:04 -04:00
xfnw 8365645862 reenable export-with-author
this was disabled because it was interfering with shared org file
exports, in those cases it is better to set with #+OPTIONS, so that it
will not mess with global exporting of LaTeX documents
2022-08-27 17:10:13 -04:00
xfnw aaaaed4735 steal audio visualizer from ferret on libera dot chat >:3 2022-08-27 17:01:11 -04:00
xfnw d1d3a4d972 org setupfile: include LaTeX export options 2022-08-27 17:00:53 -04:00
xfnw cafe740578 more pasta. MMMMMMM 2022-08-24 22:33:49 -04:00
xfnw 9fc60d65e0 emacs: auto-reload files in DocView 2022-08-24 21:43:49 -04:00
xfnw 50ddb08cf6 prefer rhythmbox for media keys 2022-08-24 21:43:22 -04:00
xfnw 448da39e52 emacs relative line numbers 2022-08-22 20:06:07 -04:00
xfnw aaa5247333 vim run LaTeX multiple times when using Bib
this also makes :Tex and :Bib not require you to press enter when done
2022-08-22 01:01:08 -04:00
xfnw 23f90be447 latex export to PDF/A
PDF/A is a PDF sub-format for long term archiving, which disallows
fragile content like remote stuff and javascript

consider also creating a filename.xmpdata file with various metadata.
an example of such a file can be found at
https://www.mathstat.dal.ca/~selinger/pdfa/sample.xmpdata
2022-08-20 23:54:18 -04:00
xfnw aca9d0557c makeglines: also hash
ngircd is dumb and does not let glines see through cloaks, so we have to
ban both ourselves.

ngirchash is a wrapper for
https://github.com/xfnw/ngirctable/blob/main/ngirchash.c that passes it
the secret salt (although the safety of ngircd's hash function is quite
questionable, so keeping it secret is probably unnessesary)
2022-08-20 23:37:36 -04:00
xfnw 6969bbe4d8 fix rofi warnings 2022-08-19 14:54:31 -04:00
xfnw 32b8289a20 Merge remote-tracking branch 'sparrow/main' 2022-08-07 14:36:13 -04:00
xfnw f4b6582b53 disable meta author field 2022-08-07 14:33:57 -04:00
xfnw be982c2d83 zstd's max compression is 19 not 22 2022-08-06 20:22:10 -04:00
xfnw 496cf6d837 set ZSTD_CLEVEL environment variable
tar, among other things, seems to use this when compressing with zstd
2022-08-05 18:16:55 -04:00
xfnw 9fe8c2750f add fixme to the org structure templates 2022-08-05 12:58:13 -04:00
xfnw 08debd194e make org export references deterministic 2022-08-03 20:58:01 -04:00
xfnw dcc3334c50 fix fixme color, remove unused functions 2022-08-03 20:20:23 -04:00
xfnw 71be975c85 org setup disable toc
most pages will only have a few headings, larger pages where the toc is
nessesary can override this
2022-08-02 22:05:46 -04:00
xfnw bfbe89f108 org setupfiles display footnote paragraphs inline
no idea why org export decides to make that a p tag, but whatever
2022-08-02 21:45:15 -04:00
xfnw c3154427a5 org: be friendly to mobile 2022-08-02 19:59:12 -04:00
xfnw 844fa8a5d0 org setupfiles
mostly stolen from yeti <3
https://yeti.tilde.institute
2022-08-02 19:55:00 -04:00
xfnw 6948150ace vim add ansi color keybinds to Artist
the keybinds are gc{0..7} to insert a color, gb{0..7} to insert a
color's bright variant, gc8 or gb8 to insert framework for 256color code
and go into insert mode, and gc9 or gb9 to reset color
2022-07-29 16:37:12 -04:00
xfnw 9dee2d630f vim add ansi color parsing plugin 2022-07-29 16:37:30 -04:00
xfnw b21988d5fc fox jumps 2022-07-26 10:52:29 -04:00
xfnw 08e0c968aa enable all the codecs that are installed by default 2022-07-25 17:53:46 -04:00
xfnw 6215071734 enable opus 2022-07-25 14:35:47 -04:00
xfnw 69420d2d9b play/pause media keys
for some reason this was automatically worked without this before, but
then broke after a recent update
2022-07-24 20:51:28 -04:00
xfnw 27912cb99d ghci show types automatically 2022-07-24 13:24:50 -04:00
xfnw 4a62338471 ghci: import Control.Monad
yay ap and stuff
2022-07-23 12:53:03 -04:00
xfnw 72d88f65f9 add server purge alias
thanks peng on libera dot chat
2022-07-20 18:22:24 -04:00
xfnw 90e698eda5 git pretty log alias 2022-07-18 23:39:51 -04:00
xfnw 762c6f7aa2 set git gpg signing key 2022-07-18 23:38:40 -04:00
xfnw d30f2e365a gimp color palettes!
storing them in gimp's format, since krita supports importing it, and
almost nothing supports krita's format
2022-07-18 18:08:15 -04:00
xfnw 092a830fa4 fix bb-org css 2022-07-17 23:26:18 -04:00
xfnw f2f70ac5b3 bb-org: change helptext references to org from markdown 2022-07-17 23:13:55 -04:00
xfnw 5bf6e384a7 allow inserting special chars in insert too 2022-07-16 13:12:23 -04:00
xfnw 52ab86c3c8 make artist mode for vim 2022-07-16 13:00:43 -04:00
xfnw eeeddfaeee emacs org latex export: make images wider 2022-07-14 12:29:41 -04:00
xfnw ca7929f822 kitty: disable confirm_os_window_close prompt 2022-07-14 12:25:01 -04:00
xfnw fec1e5f177 make vim latex template somewhat accessible
requires the package texlive-latexextra for accessibility.sty

it is broken and semi-unmaintained, but it is better than nothing i
guess
2022-07-13 13:46:27 -04:00
xfnw d1dd1e74a1 add glances config 2022-07-09 20:30:19 -04:00
xfnw e37ae37fc9 emacs: enable sudo-edit indicator mode 2022-07-08 09:49:29 -04:00
xfnw 5283281c8e emacs eww: swap g and G keybinds 2022-07-08 09:44:49 -04:00
vulpine 24b476a8b1 create .ghci 2022-07-03 19:54:25 -04:00
vulpine 963ba28e8f emacs allow inserting literal tabs in the middle of lines 2022-07-02 22:50:44 -04:00
xfnw 83f01dca35 change i3 colors 2022-07-02 20:26:45 -04:00
xfnw bc0efed4c1 remove extra arguments from deshake function 2022-07-01 22:57:07 -04:00
xfnw ec92aafba8 add cch zsh alias for common cppcheck options 2022-07-01 08:04:32 -04:00
xfnw eeb8da595e add newline at the end of .emacs
whoops
2022-06-28 14:06:17 -04:00
vulpine 09865802d8 irssi: normalize alias case 2022-06-28 11:25:42 -04:00
vulpine 1b3a0993f4 indent with tabs in C mode 2022-06-28 11:15:51 -04:00
xfnw ebcf59d00f increace company-minimum-prefix-length 2022-06-27 12:40:56 -04:00
xfnw 6ea89a8fd3 emacs eww bind u to back
also switch emacs company to super for quick access
2022-06-27 12:31:16 -04:00
vulpine 222160fc9e turn off company on term mode 2022-06-27 10:35:22 -04:00
vulpine f50ea243d7 emacs add company mode 2022-06-27 10:13:49 -04:00
vulpine e60182e483 emacs: make scratch message cat themed 2022-06-24 14:48:43 -04:00
vulpine f8d7e3b277 emacs enable auto-fill-mode on text too 2022-06-24 14:22:00 -04:00
vulpine 70cce3dfde emacs: add 'gj' keybinding for justifying text
the original `gw` binding left-aligns text
2022-06-23 22:20:38 -04:00
vulpine 8735350c93 rotate: use args instead of stdin 2022-06-23 13:44:51 -04:00
xfnw f72658f639 git: do not always rebase 2022-06-23 12:55:14 -04:00
vulpine 708e7c791f add little log rotating script 2022-06-23 12:51:21 -04:00
xfnw 1e4bb65549 fix shell functions and add after alias 2022-06-21 23:32:59 -04:00
xfnw 909c74c838 org todo set keywords globally
having to reload a new org file after setting the setupfile to get the
todo keywords was getting annoying
2022-06-16 19:37:47 -04:00
xfnw b80b983420 orgmode define footnotes inline 2022-06-16 19:12:43 -04:00
xfnw ce6cc46409 irssi logresume: use tmux instead of screen 2022-06-16 16:56:50 -04:00
xfnw 94ea7d269e irssi: add ferret's logresume script 2022-06-16 16:38:08 -04:00
xfnw b36d663f21 irssi: do not respond to ctcp queries
setting max_ctcp_queue to 0 seems to disable ctcp responses whilst still
allowing you to see them, which is nicer than just doing
/ignore * CTCPS DCC
2022-06-16 16:32:05 -04:00
xfnw 509c078475 irssi: set go_matched_anchored 2022-06-12 16:59:27 -04:00
xfnw 6b649441bf irssi: rename go command to b
annoyingly, seems aliases to not carry over the completion stuff
2022-06-12 16:43:13 -04:00
xfnw 89d4839d74 irssi: add some more scripts 2022-06-12 13:55:27 -04:00
xfnw 48fd25551d irssi: hide modes from activity too 2022-06-11 22:49:15 -04:00
xfnw f8966743f2 irssi: do not show channel name on notices
its already in the channel's window
2022-06-11 19:05:53 -04:00
xfnw aa4a79305e irssi: display reason fields in parenthesis
this makes the realname extended-join field distinguishable from
accountname
2022-06-11 17:24:35 -04:00
xfnw 6aed247b02 irssi: better extended join formatting 2022-06-11 16:31:55 -04:00
xfnw c2b43edeb6 irssi: hide noisy messages from activity 2022-06-11 16:12:03 -04:00
xfnw 6a1550f243 update irssi config with new features 2022-06-11 15:58:51 -04:00
xfnw f1d5175f3d stick some ffmpeg stuff in pasta 2022-06-07 22:42:09 -04:00
xfnw bf98a10ba3 rtramp: attempt starting emacs daemon if no socket 2022-06-05 16:02:14 -04:00
vulpine ae1ed10e3c emacs: open urls in eww 2022-06-05 09:27:27 -04:00
xfnw 842f966658 add zsh alias for reverse-tunneling emacs daemon socket 2022-06-04 22:57:23 -04:00
vulpine 65826ac3c6 fallback to standard emacsclient if rtramp cannot find tunneled emacs
this also checks to make sure you are in an ssh session, since it
needs the ssh connection information to form the tramp line anyways

for this to properly detect the tunnel being severed, you must set
StreamLocalBindUnlink to yes in your sshd_config, which will delete
("unlink") the unix socket after the ssh session closes
2022-06-04 22:40:50 -04:00
vulpine 0c0470ec49 create script for reversing tramp over ssh
this script allows opening files via tramp while using ssh, if you
reverse-tunnel .sshemacs to your local emacs daemon socket

note that access to your emacs daemon socket is roughly equivalent to
shell access. only tunnel it to machines you trust.
2022-06-04 22:24:34 -04:00
vulpine 94417bca6e emacs: display time on status bar 2022-06-04 14:36:41 -04:00
vulpine c251d5a183 emacs: change search engine
duckduckgo has useless search results because "privacy" but were
allegedly still caught spying on people
2022-06-04 13:49:40 -04:00
vulpine 732a19ffd3 expdays: ignore timezone on busybox
busybox date (and/or musl?)'s strptime %z and %Z timezone detection
seem to not work

openssl seems to always output the date as utc anyways
2022-06-04 12:48:45 -04:00
91 changed files with 7018 additions and 498 deletions

View File

@ -1,6 +1,8 @@
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<Multi_key> <period> <backslash> : "λ" U03BB # GREEK SMALL LETTER LAMBDA
<Multi_key> <S> <i> : "Σ" U03A3 # GREEK CAPITAL LETTER SIGMA
<Multi_key> <s> <i> : "σ" U03C3 # GREEK SMALL LETTER SIGMA
<Multi_key> <o> <1> : "①" U2460 # CIRCLED DIGIT ONE
<Multi_key> <o> <KP_1> : "①" U2460 # CIRCLED DIGIT ONE
<Multi_key> <o> <2> : "②" U2461 # CIRCLED DIGIT TWO
@ -22,3 +24,4 @@ include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<Multi_key> <o> <KP_9> : "⑨" U2468 # CIRCLED DIGIT NINE
<Multi_key> <o> <0> : "⓪" U24EA # CIRCLED DIGIT ZERO
<Multi_key> <o> <KP_0> : "⓪" U24EA # CIRCLED DIGIT ZERO
<Multi_key> <p> <o> <o> : "💩" U1F4A9 # PILE OF POO

View File

@ -32,7 +32,7 @@ URxvt.perl-ext-common: clipboard,default,fullscreen
XTerm.vt100.faceName: Fira Code:size=11:antialias=true
XTerm.vt100.font: 7x13
URxvt.font: xft:Fira Code:size=12,xft:Noto Color Emoji:size=9,xft:Unifont:pixelsize=12,-*-unifont-*-*-*-*-*-*-*-*-*-*-*-*
URxvt.font: xft:Fira Code:size=10:antialias=true,xft:Noto Color Emoji:size=9,xft:Unifont:pixelsize=12,-*-unifont-*-*-*-*-*-*-*-*-*-*-*-*
!!! Enable copy/paste.
! http://www.davidsimmons.com/soft/xtermhacks/

View File

@ -68,16 +68,16 @@ module stdio.so
#module httpd.so
# Audio codec Modules (in order)
#module opus.so
#module amr.so
#module g7221.so
#module g722.so
#module g726.so
module opus.so
module amr.so
module g7221.so
module g722.so
module g726.so
module g711.so
#module gsm.so
#module l16.so
#module mpa.so
#module codec2.so
module gsm.so
module l16.so
module mpa.so
module codec2.so
#module ilbc.so
#module isac.so

5
.clang-format Normal file
View File

@ -0,0 +1,5 @@
---
BasedOnStyle: LLVM
UseTab: Always
IndentWidth: 8
AllowShortCaseLabelsOnASingleLine: true

View File

@ -0,0 +1,10 @@
GIMP Palette
Name: libera
Columns: 3
#
255 85 221 Mountain
85 85 255 Rays
198 201 207 Text
17 24 39 Bars
31 41 55 Background
31 41 55 Btext

View File

@ -0,0 +1,22 @@
GIMP Palette
Name: propaganda
Columns: 4
#
0 0 0 Black
20 12 28 Haiti
68 36 52 Castro
48 52 109 Torea bay
78 74 78 Salt box
89 125 206 Cornflower
133 149 161 Pigeon post
109 194 202 Fountain blue
52 101 36 San felix
133 76 48 Cinnamon
117 113 97 Flint
208 70 72 Valencia
210 125 44 California
109 170 44 Christi
210 170 153 Quicksand
218 212 94 Witch haze
222 238 214 Peppermint
215 215 215 Milk

View File

@ -0,0 +1,10 @@
GIMP Palette
Name: vulpine
Columns: 3
#
255 77 0 fox
255 119 17 awoo
255 234 0 eyes
0 0 0 boop
255 255 255 face
254 139 104 maw

View File

@ -0,0 +1,8 @@
GIMP Palette
Name: wave
Columns: 2
#
0 255 255 cyan
255 0 255 pink
255 255 255 white
0 0 0 black

25
.config/badwolf/newtab Normal file
View File

@ -0,0 +1,25 @@
<html>
<head>
<style>
html {
color-scheme: dark;
}
input {
width: 100%;
font-size: 17px;
}
h1 {
margin-top: 2em;
text-align: center;
font-size: 64px;
}
</style>
<title>new tab</title>
</head>
<body>
<h1>woof</h1>
<form action="https://google.com/search">
<input name="q" placeholder="search with google" onfocus="this.select()" autofocus>
</form>
</body>
</html>

View File

@ -73,9 +73,7 @@ then
pkill -x lemonbar || true
while sleep 1
do
echo ' %{c}'`date -R`' %{r}'`batterysec`' '`uptime | cut -d' ' -f12 | cut -b-4`' '
echo ' %{c}'`date -R`' %{r}'`batterysec`' '`uptime | cut -d'g' -f2 | cut -b4-7`' '
done | lemonbar -g x26 -B '#292D3E' -F '#CCCCCC' -f 'Fira Code:size=9:antialias=true' &
fi

View File

@ -31,7 +31,7 @@ super + {1-9}
berryc switch_workspace {0-9}
super + shift + {1-9}
IN={0-9} && berryc send_to_workspace "$IN" && berryc switch_workspace "$IN"
IN={0-9} && berryc send_to_workspace "$IN"
super + m
berryc window_monocle

View File

@ -0,0 +1,7 @@
--recurse
--exclude=.git
--exclude=target
--exclude=build
--exclude=d
--exclude=\*.swp
--exclude=\*.bak

View File

@ -0,0 +1,698 @@
##############################################################################
# Globals Glances parameters
##############################################################################
[global]
# Stats refresh rate (default is a minimum of 2 seconds)
# Can be overwrite by the -t <sec> option
# It is also possible to overwrite it in each plugin sections
refresh=4
# Does Glances should check if a newer version is available on PyPI ?
check_update=false
# History size (maximum number of values)
# Default is 3600 seconds (1 hour)
history_size=3600
##############################################################################
# User interface
##############################################################################
[outputs]
# Theme name for the Curses interface: black or white
curse_theme=black
# Limit the number of processes to display in the WebUI
max_processes_display=30
##############################################################################
# plugins
##############################################################################
[quicklook]
# Set to true to disable a plugin
# Note: you can also disable it from the command line (see --disable-plugin <plugin_name>)
disable=False
# Graphical percentage char used in the terminal user interface (default is |)
percentage_char=|
# Define CPU, MEM and SWAP thresholds in %
cpu_careful=50
cpu_warning=70
cpu_critical=90
mem_careful=50
mem_warning=70
mem_critical=90
swap_careful=50
swap_warning=70
swap_critical=90
[system]
# This plugin display the first line in the Glances UI with:
# Hostname / Operating system name / Architecture information
# Set to true to disable a plugin
disable=False
# Default refresh rate is 60 seconds
#refresh=60
[cpu]
disable=False
# See https://scoutapm.com/blog/slow_server_flow_chart
#
# I/O wait percentage should be lower than 1/# (# = Logical CPU cores)
# Leave commented to just use the default config:
# Careful=1/#*100-20% / Warning=1/#*100-10% / Critical=1/#*100
#iowait_careful=30
#iowait_warning=40
#iowait_critical=50
#
# Total % is 100 - idle
total_careful=65
total_warning=75
total_critical=85
total_log=True
#
# Default values if not defined: 50/70/90 (except for iowait)
user_careful=50
user_warning=70
user_critical=90
user_log=False
#user_critical_action=echo {{user}} {{value}} {{max}} > /tmp/cpu.alert
#
system_careful=50
system_warning=70
system_critical=90
system_log=False
#
steal_careful=50
steal_warning=70
steal_critical=90
#steal_log=True
#
# Context switch limit (core / second)
# Leave commented to just use the default config (critical is 50000*# (Logical CPU cores)
#ctx_switches_careful=10000
#ctx_switches_warning=12000
#ctx_switches_critical=14000
[percpu]
disable=False
# Define CPU thresholds in %
# Default values if not defined: 50/70/90
user_careful=50
user_warning=70
user_critical=90
iowait_careful=50
iowait_warning=70
iowait_critical=90
system_careful=50
system_warning=70
system_critical=90
[gpu]
disable=False
# Default processor values if not defined: 50/70/90
proc_careful=50
proc_warning=70
proc_critical=90
# Default memory values if not defined: 50/70/90
mem_careful=50
mem_warning=70
mem_critical=90
[mem]
disable=False
# Define RAM thresholds in %
# Default values if not defined: 50/70/90
careful=50
#careful_action_repeat=echo {{percent}} >> /tmp/memory.alert
warning=70
critical=90
[memswap]
disable=False
# Define SWAP thresholds in %
# Default values if not defined: 50/70/90
careful=50
warning=70
critical=90
[load]
disable=False
# Define LOAD thresholds
# Value * number of cores
# Default values if not defined: 0.7/1.0/5.0 per number of cores
# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
# http://www.linuxjournal.com/article/9001
careful=0.7
warning=1.0
critical=5.0
#log=False
[network]
disable=False
# Default bitrate thresholds in % of the network interface speed
# Default values if not defined: 70/80/90
rx_careful=70
rx_warning=80
rx_critical=90
tx_careful=70
tx_warning=80
tx_critical=90
# Define the list of hidden network interfaces (comma-separated regexp)
#hide=docker.*,lo
# Define the list of wireless network interfaces to be show (comma-separated)
#show=docker.*
# WLAN 0 alias
#wlan0_alias=Wireless
# It is possible to overwrite the bitrate thresholds per interface
# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate
#wlan0_rx_careful=4000000
#wlan0_rx_warning=5000000
#wlan0_rx_critical=6000000
#wlan0_rx_log=True
#wlan0_tx_careful=700000
#wlan0_tx_warning=900000
#wlan0_tx_critical=1000000
#wlan0_tx_log=True
[ip]
disable=False
[connections]
# Display additional information about TCP connections
# This plugin is disabled by default
disable=False
# nf_conntrack thresholds in %
nf_conntrack_percent_careful=70
nf_conntrack_percent_warning=80
nf_conntrack_percent_critical=90
[wifi]
disable=True
# Define the list of hidden wireless network interfaces (comma-separated regexp)
hide=lo,docker.*
# Define the list of wireless network interfaces to be show (comma-separated)
#show=docker.*
# Define SIGNAL thresholds in db (lower is better...)
# Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength
careful=-65
warning=-75
critical=-85
[diskio]
disable=False
# Define the list of hidden disks (comma-separated regexp)
#hide=sda2,sda5,loop.*
hide=loop.*,/dev/loop.*
# Define the list of disks to be show (comma-separated)
#show=sda.*
# Alias for sda1
#sda1_alias=InternalDisk
[fs]
disable=False
# Define the list of hidden file system (comma-separated regexp)
hide=/boot.*,/snap.*
# Define the list of file system to be show (comma-separated)
#show=/,/srv
# Define filesystem space thresholds in %
# Default values if not defined: 50/70/90
# It is also possible to define per mount point value
# Example: /_careful=40
careful=50
warning=70
critical=90
# Allow additional file system types (comma-separated FS type)
#allow=shm
[irq]
# Documentation: https://glances.readthedocs.io/en/stable/aoa/irq.html
# This plugin is disabled by default
disable=True
[folders]
# Documentation: https://glances.readthedocs.io/en/stable/aoa/folders.html
disable=False
# Define a folder list to monitor
# The list is composed of items (list_#nb <= 10)
# An item is defined by:
# * path: absolute path
# * careful: optional careful threshold (in MB)
# * warning: optional warning threshold (in MB)
# * critical: optional critical threshold (in MB)
# * refresh: interval in second between two refreshs
#folder_1_path=/tmp
#folder_1_careful=2500
#folder_1_warning=3000
#folder_1_critical=3500
#folder_1_refresh=60
#folder_2_path=/home/nicolargo/Videos
#folder_2_warning=17000
#folder_2_critical=20000
#folder_3_path=/nonexisting
#folder_4_path=/root
[raid]
# Documentation: https://glances.readthedocs.io/en/stable/aoa/raid.html
# This plugin is disabled by default
disable=True
[smart]
# Documentation: https://glances.readthedocs.io/en/stable/aoa/smart.html
# This plugin is disabled by default
disable=True
[hddtemp]
disable=False
# Define hddtemp server IP and port (default is 127.0.0.1 and 7634 (TCP))
host=127.0.0.1
port=7634
[sensors]
# Documentation: https://glances.readthedocs.io/en/latest/aoa/sensors.html
disable=False
# By default refresh every refresh time * 2
#refresh=6
# Hide some sensors
#hide=ambient
# Sensors core thresholds (in Celsius...)
# Default values are grabbed from the system
#temperature_core_careful=60
#temperature_core_warning=70
#temperature_core_critical=80
# Temperatures threshold in °C for hddtemp
# Default values if not defined: 45/52/60
temperature_hdd_careful=45
temperature_hdd_warning=52
temperature_hdd_critical=60
# Battery threshold in %
battery_careful=80
battery_warning=90
battery_critical=95
# Sensors alias
#temp1_alias=Motherboard 0
#temp2_alias=Motherboard 1
#core 0_alias=CPU Core 0
#core 1_alias=CPU Core 1
[processcount]
disable=False
# If you want to change the refresh rate of the processing list, please uncomment:
#refresh=10
[processlist]
disable=False
# Sort key: if not defined, the sort is automatically done by Glances (recommended)
# Should be one of the following:
# cpu_percent, memory_percent, io_counters, name, cpu_times, username
#sort_key=memory_percent
# Define CPU/MEM (per process) thresholds in %
# Default values if not defined: 50/70/90
cpu_careful=50
cpu_warning=70
cpu_critical=90
mem_careful=50
mem_warning=70
mem_critical=90
#
# Nice priorities range from -20 to 19.
# Configure nice levels using a comma separated list.
#
# Nice: Example 1, non-zero is warning (default behavior)
nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
#
# Nice: Example 2, low priority processes escalate from careful to critical
#nice_careful=1,2,3,4,5,6,7,8,9
#nice_warning=10,11,12,13,14
#nice_critical=15,16,17,18,19
[ports]
disable=False
# Interval in second between two scans
# Ports scanner plugin configuration
refresh=30
# Set the default timeout (in second) for a scan (can be overwritten in the scan list)
timeout=3
# If port_default_gateway is True, add the default gateway on top of the scan list
port_default_gateway=True
#
# Define the scan list (1 < x < 255)
# port_x_host (name or IP) is mandatory
# port_x_port (TCP port number) is optional (if not set, use ICMP)
# port_x_description is optional (if not set, define to host:port)
# port_x_timeout is optional and overwrite the default timeout value
# port_x_rtt_warning is optional and defines the warning threshold in ms
#
#port_1_host=192.168.0.1
#port_1_port=80
#port_1_description=Home Box
#port_1_timeout=1
#port_2_host=www.free.fr
#port_2_description=My ISP
#port_3_host=www.google.com
#port_3_description=Internet ICMP
#port_3_rtt_warning=1000
#port_4_description=Internet Web
#port_4_host=www.google.com
#port_4_port=80
#port_4_rtt_warning=1000
#
# Define Web (URL) monitoring list (1 < x < 255)
# web_x_url is the URL to monitor (example: http://my.site.com/folder)
# web_x_description is optional (if not set, define to URL)
# web_x_timeout is optional and overwrite the default timeout value
# web_x_rtt_warning is optional and defines the warning respond time in ms (approximatively)
#
#web_1_url=https://blog.nicolargo.com
#web_1_description=My Blog
#web_1_rtt_warning=3000
#web_2_url=https://github.com
#web_3_url=http://www.google.fr
#web_3_description=Google Fr
#web_4_url=https://blog.nicolargo.com/nonexist
#web_4_description=Intranet
[docker]
disable=False
# Only show specific containers (comma separeted list of container name or regular expression)
# Comment this line to display all containers (default configuration)
#show=telegraf
# Hide some containers (comma separeted list of container name or regular expression)
# Comment this line to display all containers (default configuration)
#hide=telegraf
# Define the maximum docker size name (default is 20 chars)
max_name_size=20
#cpu_careful=50
# Thresholds for CPU and MEM (in %)
#cpu_warning=70
#cpu_critical=90
#mem_careful=20
#mem_warning=50
#mem_critical=70
#
# Per container thresholds
#containername_cpu_careful=10
#containername_cpu_warning=20
#containername_cpu_critical=30
#
# By default, Glances only display running containers
# Set the following key to True to display all containers
all=False
[amps]
# AMPs configuration are defined in the bottom of this file
disable=False
##############################################################################
# Client/server
##############################################################################
[serverlist]
# Define the static servers list
#server_1_name=localhost
#server_1_alias=My local PC
#server_1_port=61209
#server_2_name=localhost
#server_2_port=61235
#server_3_name=192.168.0.17
#server_3_alias=Another PC on my network
#server_3_port=61209
#server_4_name=pasbon
#server_4_port=61237
[passwords]
# Define the passwords list
# Syntax: host=password
# Where: host is the hostname
# password is the clear password
# Additionally (and optionally) a default password could be defined
#localhost=abc
#default=defaultpassword
##############################################################################
# Exports
##############################################################################
[graph]
# Configuration for the --export graph option
# Set the path where the graph (.svg files) will be created
# Can be overwrite by the --graph-path command line option
path=/tmp
# It is possible to generate the graphs automatically by setting the
# generate_every to a non zero value corresponding to the seconds between
# two generation. Set it to 0 to disable graph auto generation.
generate_every=60
# See followings configuration keys definitions in the Pygal lib documentation
# http://pygal.org/en/stable/documentation/index.html
width=800
height=600
style=DarkStyle
[influxdb]
# !!!
# Will be DEPRECATED in future release.
# Please have a look on the new influxdb2 export module (compatible with InfluxDB 1.8.x and 2.x)
# !!!
# Configuration for the --export influxdb option
# https://influxdb.com/
host=localhost
port=8086
protocol=http
user=root
password=root
db=glances
# Prefix will be added for all measurement name
# Ex: prefix=foo
# => foo.cpu
# => foo.mem
# You can also use dynamic values
#prefix=foo
# Followings tags will be added for all measurements
# You can also use dynamic values.
# Note: hostname is always added as a tag
#tags=foo:bar,spam:eggs,domain:`domainname`
[influxdb2]
# Configuration for the --export influxdb2 option
# https://influxdb.com/
host=localhost
port=8086
protocol=http
org=nicolargo
bucket=glances
token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kAdVD1purDLuxA==
# Prefix will be added for all measurement name
# Ex: prefix=foo
# => foo.cpu
# => foo.mem
# You can also use dynamic values
#prefix=foo
# Followings tags will be added for all measurements
# You can also use dynamic values.
# Note: hostname is always added as a tag
#tags=foo:bar,spam:eggs,domain:`domainname`
[cassandra]
# Configuration for the --export cassandra option
# Also works for the ScyllaDB
# https://influxdb.com/ or http://www.scylladb.com/
host=localhost
port=9042
protocol_version=3
keyspace=glances
replication_factor=2
# If not define, table name is set to host key
table=localhost
# If not define, username and password will not be used
#username=cassandra
#password=password
[opentsdb]
# Configuration for the --export opentsdb option
# http://opentsdb.net/
host=localhost
port=4242
#prefix=glances
#tags=foo:bar,spam:eggs
[statsd]
# Configuration for the --export statsd option
# https://github.com/etsy/statsd
host=localhost
port=8125
#prefix=glances
[elasticsearch]
# Configuration for the --export elasticsearch option
# Data are available via the ES RESTful API. ex: URL/<index>/cpu
# https://www.elastic.co
host=localhost
port=9200
index=glances
[riemann]
# Configuration for the --export riemann option
# http://riemann.io
host=localhost
port=5555
[rabbitmq]
# Configuration for the --export rabbitmq option
host=localhost
port=5672
user=guest
password=guest
queue=glances_queue
#protocol=amqps
[mqtt]
# Configuration for the --export mqtt option
host=localhost
port=8883
tls=true
user=guest
password=guest
topic=glances
topic_structure=per-metric
[couchdb]
# Configuration for the --export couchdb option
# https://www.couchdb.org
host=localhost
port=5984
db=glances
# user and password are optional (comment if not configured on the server side)
#user=root
#password=root
[kafka]
# Configuration for the --export kafka option
# http://kafka.apache.org/
host=localhost
port=9092
topic=glances
#compression=gzip
# Tags will be added for all events
#tags=foo:bar,spam:eggs
# You can also use dynamic values
#tags=hostname:`hostname -f`
[zeromq]
# Configuration for the --export zeromq option
# http://www.zeromq.org
# Use * to bind on all interfaces
host=*
port=5678
# Glances envelopes the stats in a publish message with two frames:
# - First frame containing the following prefix (STRING)
# - Second frame with the Glances plugin name (STRING)
# - Third frame with the Glances plugin stats (JSON)
prefix=G
[prometheus]
# Configuration for the --export prometheus option
# https://prometheus.io
# Create a Prometheus exporter listening on localhost:9091 (default configuration)
# Metric are exporter using the following name:
# <prefix>_<plugin>_<stats>{labelkey:labelvalue}
# Note: You should add this exporter to your Prometheus server configuration:
# scrape_configs:
# - job_name: 'glances_exporter'
# scrape_interval: 5s
# static_configs:
# - targets: ['localhost:9091']
#
# Labels will be added for all measurements (default is src:glances)
# labels=foo:bar,spam:eggs
# You can also use dynamic values
# labels=system:`uname -s`
#
host=localhost
port=9091
#prefix=glances
labels=src:glances
[restful]
# Configuration for the --export restful option
# Example, export to http://localhost:6789/
host=localhost
port=6789
protocol=http
path=/
[graphite]
# Configuration for the --export graphite option
# https://graphiteapp.org/
host=localhost
port=2003
# Prefix will be added for all measurement name
prefix=glances
# System name added between the prefix and the stats
# By default, system_name = FQDN
#system_name=mycomputer
##############################################################################
# AMPS
# * enable: Enable (true) or disable (false) the AMP
# * regex: Regular expression to filter the process(es)
# * refresh: The AMP is executed every refresh seconds
# * one_line: (optional) Force (if true) the AMP to be displayed in one line
# * command: (optional) command to execute when the process is detected (thk to the regex)
# * countmin: (optional) minimal number of processes
# A warning will be displayed if number of process < count
# * countmax: (optional) maximum number of processes
# A warning will be displayed if number of process > count
# * <foo>: Others variables can be defined and used in the AMP script
##############################################################################
[amp_dropbox]
# Use the default AMP (no dedicated AMP Python script)
# Check if the Dropbox daemon is running
# Every 3 seconds, display the 'dropbox status' command line
enable=false
regex=.*dropbox.*
refresh=3
one_line=false
command=dropbox status
countmin=1
[amp_python]
# Use the default AMP (no dedicated AMP Python script)
# Monitor all the Python scripts
# Alert if more than 20 Python scripts are running
enable=false
regex=.*python.*
refresh=3
countmax=20
[amp_conntrack]
# Use comma separated for multiple commands (no space around the comma)
# If the regex key is not defined, the AMP will be executed every refresh second
# and the process count will not be displayed (countmin and countmax will be ignore)
enable=false
refresh=30
one_line=false
command=sysctl net.netfilter.nf_conntrack_count;sysctl net.netfilter.nf_conntrack_max
[amp_nginx]
# Use the NGinx AMP
# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
enable=false
regex=\/usr\/sbin\/nginx
refresh=60
one_line=false
status_url=http://localhost/nginx_status
[amp_systemd]
# Use the Systemd AMP
enable=false
regex=\/lib\/systemd\/systemd
refresh=30
one_line=true
systemctl_cmd=/bin/systemctl --plain
[amp_systemv]
# Use the Systemv AMP
enable=false
regex=\/sbin\/init
refresh=30
one_line=true
service_cmd=/usr/bin/service --status-all

View File

@ -1,26 +1,19 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=47
sort_direction=1
hide_threads=1
# template htoprc, since the real one contains
# machine-specific stuff
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_base_name=1
highlight_deleted_exe=1
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=AllCPUs Tasks Battery Uptime
left_meter_modes=3 2 1 4
right_meters=Memory Swap LoadAverage Clock
right_meter_modes=3 3 2 4
cpu_count_from_one=1
enable_mouse=1
header_layout=two_50_50
column_meters_0=AllCPUs2 Tasks
column_meter_modes_0=3 2
column_meters_1=LoadAverage LoadAverage MemorySwap Battery Uptime Clock
column_meter_modes_1=3 2 1 1 2 2

View File

@ -53,6 +53,11 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle
bindsym XF86AudioPlay exec --no-startup-id "playerctl -p rhythmbox,%any play-pause"
bindsym XF86AudioPause exec --no-startup-id "playerctl -p rhythmbox,%any play-pause"
bindsym XF86AudioNext exec --no-startup-id "playerctl -p rhythmbox,%any next"
bindsym XF86AudioPrev exec --no-startup-id "playerctl -p rhythmbox,%any previous"
# toggle touchpad
bindsym XF86TouchpadToggle exec --no-startup-id ~/.config/i3/touchpad
@ -99,9 +104,9 @@ bindsym $mod+space focus mode_toggle
#bindsym $mod+a focus parent
# take a screenshot
bindsym --release $mod+s exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://va.furryplace.eu/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
bindsym $mod+shift+s exec "scrot -l mode=edge -e 'curl -F\\"file=@$f\\" https://va.furryplace.eu/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
bindsym --release $mod+z exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://va.furryplace.eu/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
bindsym --release $mod+s exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://0x0.st/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
bindsym --release $mod+z exec "scrot -l mode=edge -e 'mv $f ~/Pictures/scrot/'"
bindsym $mod+shift+s exec "scrot -l mode=edge -e 'curl -F\\"file=@$f\\" https://0x0.st/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
#bindsym --release $mod+x exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://xfnw.ttm.sh/u.php | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
@ -169,8 +174,12 @@ mode "resize" {
bindsym $mod+r mode "resize"
# colors border backg text indicator clild
client.focused #666666 #88ccaa #ffffff #2ef49e #287755
# class border bground text indicator child_border
client.focused #5555ff #5555ff #1f1f1f #5555ff #5555ff
#client.focused_inactive #ffffff #ffffff #1f1f1f #ffffff #ffffff
client.focused_inactive #272727 #383c3e #aaaaaa #484e50 #5f676a
client.urgent #2f343a #ff55dd #1f1f1f #ff55dd #ff55dd
client.background #333333
# window config
@ -189,10 +198,10 @@ bar {
status_command i3status
colors {
background #1f1f1f
focused_workspace #66aa77 #66aa77 #ffffff
active_workspace #66aa77 #66aa77 #ffffff
focused_workspace #5555ff #5555ff #1f1f1f
active_workspace #5555ff #5555ff #1f1f1f
inactive_workspace #333333 #333333 #888888
urgent_workspace #aa7766 #aa7766 #ffffff
urgent_workspace #ff55dd #ff55dd #1f1f1f
}
}

View File

@ -115,7 +115,7 @@
😿 crying cat face; U+1F63F
😾 pouting cat face; U+1F63E
🥺👉👈 pleading face right left;
☭ communism;
☭ communism; U+262D
🙈 see-no-evil monkey; U+1F648
🙉 hear-no-evil monkey; U+1F649
🙊 speak-no-evil monkey; U+1F64A
@ -299,6 +299,7 @@
🤵 man in tuxedo; U+1F935
👰 bride with veil; U+1F470
🤰 pregnant woman; U+1F930
🫃 pregnant man; U+1FAC3
🤱 breast-feeding; U+1F931
👼 baby angel; U+1F47C
🎅 Santa Claus; U+1F385
@ -1388,7 +1389,7 @@
🏴 black flag; U+1F3F4
🏳 white flag; U+1F3F3
🏳️‍🌈 rainbow flag; U+1F3F3 U+FE0F U+200D U+1F308
🏳️‍⚧️ trans flag;
🏳️‍⚧️ trans flag; U+1F3F3 U+FE0F U+200D U+26A7 U+FE0F
🏴‍☠️ pirate flag; U+1F3F4 U+200D U+2620 U+FE0F
🇦🇨 flag: Ascension Island; U+1F1E6 U+1F1E8
🇦🇩 flag: Andorra; U+1F1E6 U+1F1E9
@ -1651,5 +1652,7 @@
🏴󠁧󠁢󠁥󠁮󠁧󠁿 flag: England; U+1F3F4 U+E0067 U+E0062 U+E0065 U+E006E U+E0067 U+E007F
🏴󠁧󠁢󠁳󠁣󠁴󠁿 flag: Scotland; U+1F3F4 U+E0067 U+E0062 U+E0073 U+E0063 U+E0074 U+E007F
🏴󠁧󠁢󠁷󠁬󠁳󠁿 flag: Wales; U+1F3F4 U+E0067 U+E0062 U+E0077 U+E006C U+E0073 U+E007F
🦦 otter;
🧇 waffle;
🦦 otter; U+1F9A6
🧇 waffle; U+1F9C7
¯\_(ツ)_/¯ shrug;
ʘ‿ʘ Smile;

View File

@ -8,8 +8,8 @@ scrot /tmp/lock.png
convert /tmp/lock.png -paint 1 -blur 8x5 ~/.config/i3/lockfox.png -gravity center -composite -matte /tmp/lock.png
# lock agents
command -v keepassxc && keepassxc --lock &
command -v ratbox-respond && killall -1 ratbox-respond
command -v keepassxc && keepassxc --lock
command -v gpgconf && gpgconf --reload gpg-agent
# hmm i3lock

View File

@ -5,19 +5,22 @@ SOLANUM IS THE TRUE PATH TO NIRVANA! SOLANUM HAS BEEN THE CHOICE OF EDUCATED AND
I didnt fuck my cat. I didnt cum on my cat. I didnt put my dick anywhere near my cat. Ive never done anything weird with my cats. I promised myself I wasnt going to make apology videos after last years thing so Im just trying to be as short and honest with this as possible.
I have put you on a permanent ignore, public and private. I have found you disturbing, rude and generally not worth talking to. According to the channels you hang on, it strengtens the effect of wanting to put you on ignore because of my lack of interest in you as a person. This message is not meant to be rude to you, just to inform you that i won't see anything of what you type from now on.
"Ok, I have a better plan. - you learn to fly by flapping your arms fast enough - you then learn to pee burning gasoline - then, you fly around New York, setting everybody you see on fire, until people make you emperor." --Linus Torvalds
the quick brown fox jumps over the lazy dog
/me is broadcasting on Tilderadio! Tune in now at https://tilderadio.org/ !
We are one. We are many. We are all. We are none. We are the singularity.
We are the collective, we are seven
We are one. We are many. We are all. We are none. We are the collective.
set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "" textcolor rgb "white"; set ylabel "" textcolor rgb "white"; set key textcolor rgb "white"
set object rectangle from screen -1,-1 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "" textcolor rgb "white"; set ylabel "" textcolor rgb "white"; set key textcolor rgb "white"
set boxwidth 0.5; set style fill solid
set style histogram cluster gap 1; set style fill solid
-vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0
/msg NickServ IDENTIFY TQwYoSpaZj2WFf!!VEiH272Q
I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
Id just like to interject for a moment. What youre referring to as Freenode, is in fact, Andrew Lee/Freenode, or as Ive recently taken to calling it, Andrew Lee plus Freenode. Freenode is not an IRC network unto itself, but rather another free component of a fully functioning business operated by Andrew Lee, Crown Prince of Korea, made useful by throwing massive temper tantrums, and letting people who turn a blind eye to the hate-speech while punishing those who object run his network.
I'd like to just interject for a moment. What you're referring to as kline is in fact K-line, or as I've recently taken to calling it, a network ban. kline is not an abuse measure unto himself, but rather another member of staff who issue fully functional K-lines.
No, Richard, it's 'Linux', not 'GNU/Linux'. The most important contributions that the FSF made to Linux were the creation of the GPL and the GCC compiler. Those are fine and inspired products. GCC is a monumental achievement and has earned you, RMS, and the Free Software Foundation countless kudos and much appreciation. Following are some reasons for you to mull over, including some already answered in your FAQ. One guy, Linus Torvalds, used GCC to make his operating system (yes, Linux is an OS -- more on this later). He named it 'Linux' with a little help from his friends. Why doesn't he call it GNU/Linux? Because he wrote it, with more help from his friends, not you. You named your stuff, I named my stuff -- including the software I wrote using GCC -- and Linus named his stuff. The proper name is Linux because Linus Torvalds says so. Linus has spoken. Accept his authority. To do otherwise is to become a nag. You don't want to be known as a nag, do you? (An operating system) != (a distribution). Linux is an operating system. By my definition, an operating system is that software which provides and limits access to hardware resources on a computer. That definition applies whereever you see Linux in use. However, Linux is usually distributed with a collection of utilities and applications to make it easily configurable as a desktop system, a server, a development box, or a graphics workstation, or whatever the user needs. In such a configuration, we have a Linux (based) distribution.
ITS MY HARD COCK https://youtu.be/yDiJKSI5VR8
AH! https://www.youtube.com/watch?v=XE6YaLtctcI
rollt sich ein und schläft ein.
La la la lovely tiny pee peepy
May I have your attention. May I have your attention please. There has been a fire emergency reported in the building. Please leave the building by the nearest exit or exit stairway. Do not use the elevators.
Im 59 and new to twitch. Is bussin good? Is it like a bussy? Can a bussy be bussin? Are they related? My grand son keeps using this word and any help will do. God Bless
You notice a wall of text in twitch chat and your hand instinctively goes to the mouse. You scroll up to stop the chat elevator and read the pasta, indulging in its delights... You soon realize that this pasta conveys no information nor is it particularly witty or funny. Nevertheless, you drag your mouse across, hit Ctrl+C, then Ctrl+V and press Enter

View File

@ -659,6 +659,10 @@ term xterm-256color
#: OS specific tweaks {{{
# disable confirm_os_window_close prompt
confirm_os_window_close 0
# macos_titlebar_color system
#: Change the color of the kitty window's titlebar on macOS. A value

12
.config/mpv/mpv.conf Normal file
View File

@ -0,0 +1,12 @@
[eee]
sws-scaler=bilinear
sws-fast=yes
zimg-scaler=bilinear
zimg-dither=no
scale=nearest
cscale=nearest
dither=no
framedrop=decoder+vo
vd-lavc-threads=4
vd-lavc-fast

View File

@ -2,7 +2,8 @@ feed-sort-order unreadarticlecount
confirm-mark-feed-read no
browser "firefox %u"
auto-reload yes
reload-time 10
suppress-first-reload yes
reload-time 30
reload-threads 10
notify-beep yes
include /usr/share/doc/newsboat/contrib/colorschemes/inkpot

2
.config/nix/nix.conf Normal file
View File

@ -0,0 +1,2 @@
auto-optimise-store = true
experimental-features = nix-command flakes

View File

@ -7,34 +7,34 @@
blue: #39f;
selected-normal-foreground: @lightbg;
normal-foreground: @foreground;
normal-foreground: @text-color;
alternate-normal-background: @lightbg;
selected-urgent-foreground: @lightbg;
urgent-foreground: @lightbg;
alternate-urgent-background: @background;
alternate-urgent-background: @background-color;
active-foreground: @lightbg;
selected-active-foreground: @lightbg;
alternate-normal-foreground: @foreground;
alternate-normal-foreground: @text-color;
alternate-active-background: @blue;
bordercolor: @foreground;
normal-background: @background;
bordercolor: @text-color;
normal-background: @background-color;
selected-normal-background: @blue;
separatorcolor: @orange;
spacing: 2;
urgent-background: @red;
alternate-urgent-foreground: @foreground;
alternate-urgent-foreground: @text-color;
selected-urgent-background: @red;
alternate-active-foreground: @foreground;
alternate-active-foreground: @text-color;
selected-active-background: @blue;
active-background: @orange;
}
window {
border: 0;
text-color: @foreground;
text-color: @text-color;
background-color: rgba ( 0, 0, 0, 0 % );
padding: 5;
text-color: @bordercolor;
background-color: @background;
background-color: @background-color;
}
mainbox {
border: 0;
@ -46,7 +46,7 @@ message {
padding: 2px 0px 0px ;
}
textbox {
text-color: @foreground;
text-color: @text-color;
}
listview {
fixed-height: 0;
@ -110,7 +110,7 @@ inputbar {
border: 0px ;
}
button normal {
text-color: @foreground;
text-color: @text-color;
}
inputbar {

View File

@ -0,0 +1,208 @@
; subtitleeditor GtkAccelMap rc-file -*- scheme -*-
; this file is an automated accelerator map dump
;
; (gtk_accel_path "<Actions>/default/menu-extensions" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/display" "")
; (gtk_accel_path "<Actions>/ClipboardPlugin/clipboard-paste" "")
(gtk_accel_path "<Actions>/SelectionPlugin/select-next-subtitle" "<Primary>semicolon")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/close" "<Primary>w")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/menu-adjust-time-add-frame" "")
(gtk_accel_path "<Actions>/AdjustTimePlugin/add-frame-to-duration" "<Shift>Up")
(gtk_accel_path "<Actions>/SplitSelectedSubtitlesPlugin/split-selected-subtitles" "<Primary>b")
; (gtk_accel_path "<Actions>/ExtendLengthPlugin/extend-length" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/generate-dummy" "")
; (gtk_accel_path "<Actions>/InsertSubtitlePlugin/insert-subtitle-after" "Insert")
; (gtk_accel_path "<Actions>/TimeModeManagement/menu-framerate" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-last-second" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/new-document" "<Primary>n")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/menu-adjust-time-add" "")
; (gtk_accel_path "<Actions>/ViewManagerPlugin/Advanced" "")
(gtk_accel_path "<Actions>/SelectionPlugin/select-first-subtitle" "asciicircum")
; (gtk_accel_path "<Actions>/ExtendLengthPlugin/extend-length-bwd" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/zoom-out" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/generate-using-frame" "")
(gtk_accel_path "<Actions>/ClipboardPlugin/clipboard-copy" "<Primary><Shift>c")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/seek-to-next" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/snap-start-to-previous" "")
; (gtk_accel_path "<Actions>/default/menu-timings" "")
; (gtk_accel_path "<Actions>/StackSubtitlesPlugin/stack-subtitles" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/remove-frame-from-start" "")
(gtk_accel_path "<Actions>/SelectionPlugin/select-last-subtitle" "<Primary>e")
; (gtk_accel_path "<Actions>/default/menu-tools" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-backwards-very-short" "<Shift>Left")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/add-frame-to-start" "")
(gtk_accel_path "<Actions>/SelectionPlugin/select-previous-subtitle" "semicolon")
; (gtk_accel_path "<Actions>/CommandPlugin/undo-command" "<Primary>z")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/seek-to-previous" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/zoom-selection" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/remove-from-start" "")
; (gtk_accel_path "<Actions>/default/menu-export" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/zoom-in" "")
; (gtk_accel_path "<Actions>/MoveAfterPrecedingSubtitlePlugin/move-after-preceding-subtitle" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-forward-very-short" "<Shift>Right")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-pause" "<Primary>space")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/recent-files" "")
; (gtk_accel_path "<Actions>/CommandPlugin/redo-command" "<Primary><Shift>z")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/close-document" "<Primary>w")
(gtk_accel_path "<Actions>/DocumentManagementPlugin/open-document" "<Primary><Shift>o")
; (gtk_accel_path "<Actions>/ViewManagerPlugin/Simple" "")
; (gtk_accel_path "<Actions>/FindAndReplacePlugin/find-previous" "<Primary><Shift>g")
; (gtk_accel_path "<Actions>/DocumentsNavigationPluginDocuments/documentsnavigation-document-0" "<Alt>1")
; (gtk_accel_path "<Actions>/TimingFromPlayer/menu-timing-from-player" "")
; (gtk_accel_path "<Actions>/ErrorCheckingPlugin/error-checking" "")
; (gtk_accel_path "<Actions>/DocumentsNavigationPlugin/documentsnavigation-previous-document" "")
; (gtk_accel_path "<Actions>/ExternalVideoPlayer/external-video-player/preferences" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/display" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/respect-timing" "")
(gtk_accel_path "<Actions>/AdjustTimePlugin/add-to-duration" "<Primary>Up")
; (gtk_accel_path "<Actions>/StackSubtitlesPlugin/stack-subtitles-from-end" "")
; (gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/preferences" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/save-as-document" "<Primary><Shift>s")
; (gtk_accel_path "<Actions>/MinimizeDurationPlugin/minimize-duration" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/open" "<Primary>o")
; (gtk_accel_path "<Actions>/SelectionPlugin/unselect-all-subtitles" "<Primary><Shift>a")
; (gtk_accel_path "<Actions>/default/menu-waveform" "")
; (gtk_accel_path "<Actions>/StyleEditorPlugin/style-editor" "")
; (gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-start-and-end-with-one-key" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-forward-long" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/snap-start-to-next" "")
; (gtk_accel_path "<Actions>/InsertSubtitleFromKeyframePlugin/insert-subtitle-between-keyframes" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/rate-faster" "")
; (gtk_accel_path "<Actions>/DocumentsNavigationPlugin/documentsnavigation-next-document" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-backwards-frame" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/add-frame-to-start-and-to-duration" "")
(gtk_accel_path "<Actions>/EditCellPlugin/edit-cell" "a")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-backwards-short" "less")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/save-document" "<Primary>s")
; (gtk_accel_path "<Actions>/default/menu-file" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/close" "")
; (gtk_accel_path "<Actions>/PlainTextPlugin/plain-text-export" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/repeat" "")
; (gtk_accel_path "<Actions>/ViewManagerPlugin/Timing" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-next-subtitle" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-previous-subtitle" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/menu-adjust-time-remove-frame" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/menu-adjust-time-remove" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-backwards-long" "")
; (gtk_accel_path "<Actions>/default/menu-selection" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-forward-medium" "")
; (gtk_accel_path "<Actions>/ChangeFrameratePlugin/change-framerate" "")
; (gtk_accel_path "<Actions>/default/menu-keyframes" "")
; (gtk_accel_path "<Actions>/MoveSubtitlesPlugin/move-subtitles" "<Primary>m")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-forward-tiny" "period")
; (gtk_accel_path "<Actions>/DeleteSelectedSubtitlePlugin/delete-selected-subtitles" "<Primary>Delete")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-forward-frame" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/seek-to-selection-end" "bracketright")
; (gtk_accel_path "<Actions>/DocumentsNavigationPlugin/documentsnavigation-last-document" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-forward-short" "greater")
; (gtk_accel_path "<Actions>/ItalicizeSelectedSubtitlesPlugin/italicize-selected-subtitles" "i")
; (gtk_accel_path "<Actions>/DocumentsNavigationPlugin/documentsnavigation-first-document" "")
; (gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-start-and-next" "")
; (gtk_accel_path "<Actions>/TimeModeManagement/times" "")
; (gtk_accel_path "<Actions>/JoinDocumentPlugin/join-document" "")
; (gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-start-and-go-next" "")
; (gtk_accel_path "<Actions>/TextCorrectionPlugin/text-correction" "")
; (gtk_accel_path "<Actions>/TypewriterPlugin/typewriter-characters-random" "")
; (gtk_accel_path "<Actions>/default/menu-import" "")
(gtk_accel_path "<Actions>/AdjustTimePlugin/add-to-start-and-to-duration" "<Primary>Right")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/recent-files" "")
; (gtk_accel_path "<Actions>/TimeModeManagement/set-framerate-30" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/scrolling-with-selection" "")
; (gtk_accel_path "<Actions>/ClipboardPlugin/clipboard-copy-with-timing" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play" "")
; (gtk_accel_path "<Actions>/EditCellPlugin/edit-next-cell" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/generate-from-player-file" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/menu-rate" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-backwards-tiny" "comma")
; (gtk_accel_path "<Actions>/default/menu-edit" "")
; (gtk_accel_path "<Actions>/TimeModeManagement/frames" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/skip-backwards-medium" "")
(gtk_accel_path "<Actions>/ExternalVideoPlayer/external-video-player/open" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/zoom-all" "")
; (gtk_accel_path "<Actions>/ViewManagerPlugin/Translation" "")
(gtk_accel_path "<Actions>/AdjustTimePlugin/remove-frame-from-duration" "<Shift>Down")
; (gtk_accel_path "<Actions>/TypewriterPlugin/typewriter-words-random" "")
; (gtk_accel_path "<Actions>/default/menu-save" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/rate-slower" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/save-project" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-first-second" "")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/seek-to-selection" "bracketleft")
; (gtk_accel_path "<Actions>/default/menu-open" "")
; (gtk_accel_path "<Actions>/ScaleSubtitlesPlugin/scale-subtitles" "")
; (gtk_accel_path "<Actions>/InsertSubtitlePlugin/insert-subtitle-before" "<Primary>Insert")
; (gtk_accel_path "<Actions>/PlainTextPlugin/plain-text-import" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/open-translation" "<Primary>t")
; (gtk_accel_path "<Actions>/SpellCheckingPlugin/spell-checking" "F7")
; (gtk_accel_path "<Actions>/ClipboardPlugin/clipboard-paste-as-new-document" "")
(gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-end" "<Primary>bracketright")
; (gtk_accel_path "<Actions>/MinimizeDurationPlugin/minimize-duration-from-end" "")
; (gtk_accel_path "<Actions>/InsertSubtitleFromKeyframePlugin/insert-subtitle-between-each-keyframes" "")
; (gtk_accel_path "<Actions>/TypewriterPlugin/typewriter-characters-linear" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/open-project" "")
(gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-start" "<Primary>bracketleft")
; (gtk_accel_path "<Actions>/default/menu-video" "")
; (gtk_accel_path "<Actions>/SplitDocumentPlugin/split-document" "<Primary>x")
; (gtk_accel_path "<Actions>/TypewriterPlugin/typewriter" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/menu-recent-open-document" "")
; (gtk_accel_path "<Actions>/TimeModeManagement/set-framerate-23.976" "")
; (gtk_accel_path "<Actions>/MoveAfterPrecedingSubtitlePlugin/move-before-next-subtitle" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagementAudioTrack/audio-track-auto" "")
; (gtk_accel_path "<Actions>/TemplatePlugin/save-as-template" "")
; (gtk_accel_path "<Actions>/ReverseTextAndTranslationPlugin/reverse-text-and-translation" "")
; (gtk_accel_path "<Actions>/SortSubtitlesPlugin/sort-subtitles" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/rate-normal" "")
; (gtk_accel_path "<Actions>/SelectionPlugin/select-all-subtitles" "<Primary>a")
; (gtk_accel_path "<Actions>/ConfigureKeyboardShortcuts/configure-keyboard-shortcuts" "")
; (gtk_accel_path "<Actions>/TimeModeManagement/set-framerate-25" "")
; (gtk_accel_path "<Actions>/TemplatePlugin/template" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/save" "<Primary><Alt>s")
; (gtk_accel_path "<Actions>/DialoguizeSelectedSubtitlesPlugin/dialoguize-selected-subtitles" "d")
; (gtk_accel_path "<Actions>/ApplyTranslationPlugin/apply-translation" "")
; (gtk_accel_path "<Actions>/TypewriterPlugin/typewriter-words-linear" "")
; (gtk_accel_path "<Actions>/AboutPlugin/about" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/scrolling-with-player" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/open" "<Primary><Alt>o")
; (gtk_accel_path "<Actions>/TimeModeManagement/set-framerate-24" "")
; (gtk_accel_path "<Actions>/SelectionPlugin/invert-subtitles-selection" "<Primary>i")
; (gtk_accel_path "<Actions>/default/menu-view" "")
; (gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-end-and-next" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/snap-end-to-previous" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/generate" "")
; (gtk_accel_path "<Actions>/ExternalVideoPlayer/menu-external-video-player" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/save-translation" "<Primary><Shift>t")
(gtk_accel_path "<Actions>/ClipboardPlugin/clipboard-paste-at-player-position" "<Primary><Shift>v")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/recent-files" "")
; (gtk_accel_path "<Actions>/FindAndReplacePlugin/find-next" "<Primary>g")
(gtk_accel_path "<Actions>/ExternalVideoPlayer/external-video-player/play" "<Primary><Shift>p")
; (gtk_accel_path "<Actions>/TimeModeManagement/set-framerate-29.97" "")
; (gtk_accel_path "<Actions>/FindAndReplacePlugin/find-and-replace" "<Primary>f")
(gtk_accel_path "<Actions>/AdjustTimePlugin/remove-from-start-and-from-duration" "<Primary>Left")
; (gtk_accel_path "<Actions>/BestFitPlugin/best-fit" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/menu-skip-backwards" "")
; (gtk_accel_path "<Actions>/DuplicateSelectedSubtitlesPlugin/duplicate-selected-subtitles" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/remove-frame-from-start-and-from-duration" "")
; (gtk_accel_path "<Actions>/AdjustTimePlugin/add-to-start" "")
; (gtk_accel_path "<Actions>/default/menu-options" "")
; (gtk_accel_path "<Actions>/default/menu-help" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/menu-skip-forward" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/save" "<Primary><Shift>k")
; (gtk_accel_path "<Actions>/DocumentsNavigationPlugin/documentsnavigation" "")
; (gtk_accel_path "<Actions>/WaveformManagement/waveform/center-with-selected-subtitle" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-next-second" "")
; (gtk_accel_path "<Actions>/ViewManagerPlugin/view-manager-preferences" "")
; (gtk_accel_path "<Actions>/StylizeSelectedSubtitlesPlugin/stylize-selected-subtitles" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/open" "<Primary>k")
(gtk_accel_path "<Actions>/ClipboardPlugin/clipboard-cut" "<Primary><Shift>x")
(gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-current-subtitle" "<Primary><Shift>space")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/menu-audio-track" "")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/exit" "<Primary>q")
(gtk_accel_path "<Actions>/AdjustTimePlugin/remove-from-duration" "<Primary>Down")
; (gtk_accel_path "<Actions>/DocumentManagementPlugin/save-all-documents" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/pause" "")
(gtk_accel_path "<Actions>/CombineSelectedSubtitlesPlugin/combine-selected-subtitles" "<Primary><Shift>b")
; (gtk_accel_path "<Actions>/VideoPlayerManagementAudioTrack/audio-track-0" "")
; (gtk_accel_path "<Actions>/PreferencesPlugin/preferences" "")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/close" "<Primary><Alt>k")
; (gtk_accel_path "<Actions>/KeyframesManagementPlugin/keyframes/snap-end-to-next" "")
; (gtk_accel_path "<Actions>/VideoPlayerManagement/video-player/play-previous-second" "")
; (gtk_accel_path "<Actions>/TimingFromPlayer/timing-from-player/set-subtitle-end-and-go-next" "")

View File

@ -0,0 +1,185 @@
[video-player]
repeat=true
display=true
display-translated-subtitle=false
automatically-open-video=true
audio-sink=autoaudiosink
video-sink=ximagesink
font-desc=Sans 26
shaded-background=true
force-aspect-ratio=true
text-valignment=baseline
skip-short=10
skip-very-short=3
skip-tiny=500
[waveform]
scrolling-with-player=true
scrolling-with-selection=true
respect-timing=true
display=true
renderer=cairo
display-background=false
display-waveform-fill=true
zoom=8
[interface]
maximize-window=false
used-autosave=false
use-dynamic-keyboard-shortcuts=true
max-undo=20
window-x=0
window-y=20
window-width=1366
window-height=726
paned-main-position=338
paned-multimedia-position=372
ask-to-save-on-exit=false
create-backup-copy=false
autosave-minutes=10
[extension-manager]
Keyboard Shortcuts=enable
Document Management=enable
Style Editor=enable
Stylize=enable
Selection=enable
Move Subtitles=enable
Best Fit=enable
Adjust Time=enable
Remove Subtitle=enable
Error Checking=enable
Keyframes Management=enable
External Video Player=enable
Timing From Player=enable
Type Writer=enable
Scale Subtitles=enable
Stack Subtitles=enable
Time Mode Management=enable
Join Document=enable
Dialoguize=enable
Split Document=enable
Video Player Management=enable
Apply Translation=enable
Duplicate Subtitle=enable
Waveform Management=enable
Combine Subtitles=enable
Insert Subtitle=enable
Minimize Duration=enable
Clipboard=enable
About=enable
Spell Checking=enable
Text Correction=enable
Find And Replace=enable
Command=enable
Documents Navigation=enable
Extend Length=enable
Move After Preceding Subtitle=enable
Edit Cell=enable
View Manager=enable
Italicize=enable
Plain Text=enable
Change Framerate=enable
Insert Subtitle From Keyframe=enable
Sort Subtitles=enable
Template Management=enable
Preferences=enable
Split Subtitle=enable
Reverse Text And Translation=enable
Sami=enable
SubViewer2=enable
BITC (Burnt-in timecode)=enable
MicroDVD=enable
Adobe Encore DVD (NTSC)=enable
MPsub=enable
Avid DS=enable
Adobe Encore DVD (PAL)=enable
Spruce STL=enable
SBV=enable
Subtitle Editor Project=enable
SubRip=enable
DCSubtitle=enable
Advanced Sub Station Alpha=enable
Sub Station Alpha=enable
MPL2=enable
Plain Text Format=enable
Timed Text Authoring Format 1.0=enable
[find-and-replace]
column-text=true
column-translation=true
ignore-case=false
used-regular-expression=false
[encodings]
encodings=ISO-8859-15;UTF-8
used-auto-detected=true
default=UTF-8
[dialog-last-folder]
dialog-open-document=file:///home/xfnw/Videos/sub
dialog-open-video=file:///home/xfnw/Videos
dialog-save-document=file:///home/xfnw/Videos/sub
dialog-save-waveform=file:///home/xfnw/Videos/waf
dialog-import-text=file:///home/xfnw/Documents/lyrics
[document]
format=SubRip
newline=Unix
[subtitle-view]
property-alignment-center=false
show-character-per-line=true
columns-displayed=number;start;end;duration;text
enable-rubberband-selection=false
used-ctrl-enter-to-confirm-change=false
do-not-disable-actions-during-editing=false
[timing]
min-display=1000
min-gap-between-subtitles=100
min-characters-per-second=5
max-characters-per-second=25
do-auto-timing-check=true
ignore-space=false
max-characters-per-line=40
max-line-per-subtitle=4
[waveform-renderer]
display-subtitle-text=true
color-background=#4C4C4CFF
color-wave=#99CC4CFF
color-wave-fill=#FFFFFFFF
color-subtitle=#994C1999
color-subtitle-selected=#E57F4C99
color-subtitle-invalid=#FFFF00CC
color-text=#FFFFFFFF
color-player-position=#FFFFFFFF
color-keyframe=#4C99FFFF
[dialoguize]
dash=-
dash-escaped=-
[spell-checker]
lang=en_US
[external-video-player]
command=mpv "#video_file" --sub-file="#subtitle_file" --start="#time"
[timing-from-player]
offset=500
[view-manager]
Simple=number;start;end;duration;text
Advanced=number;start;end;duration;style;name;text
Translation=number;text;translation
Timing=number;start;end;duration;cps;text

193
.emacs
View File

@ -1,4 +1,14 @@
(add-to-list 'package-archives
(cons "nongnu" (format "http%s://elpa.nongnu.org/nongnu/"
(if (gnutls-available-p) "s" ""))))
(add-to-list 'package-archives
(cons "melpa" (format "http%s://melpa.org/packages/"
(if (gnutls-available-p) "s" ""))))
(add-to-list 'load-path (concat user-emacs-directory
(convert-standard-filename "lisp/")))
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
@ -7,14 +17,10 @@
(global-set-key (kbd "C-x M-r") 'rename-buffer)
(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c c") 'org-capture)
(global-set-key (kbd "C-c q") 'auto-fill-mode)
(add-to-list 'package-archives
(cons "nongnu" (format "http%s://elpa.nongnu.org/nongnu/"
(if (gnutls-available-p) "s" ""))))
(add-to-list 'package-archives
(cons "melpa" (format "http%s://melpa.org/packages/"
(if (gnutls-available-p) "s" ""))))
(global-set-key (kbd "<f12>") 'buffer-menu)
(custom-set-variables
;; custom-set-variables was added by Custom.
@ -23,41 +29,143 @@
;; If there is more than one, they won't work right.
'(ansi-color-names-vector
["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(auth-source-save-behavior nil)
'(backup-directory-alist `(("." \, (concat user-emacs-directory "backups"))))
'(browse-url-browser-function 'eww-browse-url)
'(c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "bsd")))
'(circe-default-part-message "ABSOLUTELY PROPRIETARY!")
'(circe-default-quit-message "mmmmmmmm lunchtime")
'(circe-format-self-say "<{nick}> {body}")
'(circe-format-server-netmerge
"*** Netjoin: {split}, split {ago} ago (Use /WL to see who's still missing)")
'(circe-format-server-quit "*** Quit: {nick} ({userhost}) quit ({reason})")
'(circe-format-server-quit-channel "*** Quit: {nick} ({userhost}) quit ({reason})")
'(circe-format-server-topic "*** Topic change by {nick} ({userhost}): {topic-diff}")
'(circe-server-send-unknown-command-p t)
'(circe-use-cycle-completion t)
'(company-minimum-prefix-length 4)
'(company-quick-access-modifier 'super)
'(company-selection-wrap-around t)
'(company-show-quick-access t)
'(custom-enabled-themes '(gruvbox-dark-hard))
'(custom-safe-themes
'("6b5c518d1c250a8ce17463b7e435e9e20faa84f3f7defba8b579d4f5925f60c1" "f27c3fcfb19bf38892bc6e72d0046af7a1ded81f54435f9d4d09b3bff9c52fc1" default))
'("d445c7b530713eac282ecdeea07a8fa59692c83045bf84dd112dd738c7bcad1d" "d80952c58cf1b06d936b1392c38230b74ae1a2a6729594770762dc0779ac66b7" default))
'(display-line-numbers 'relative)
'(evil-undo-system 'undo-redo)
'(evil-want-C-u-scroll t)
'(initial-scratch-message
";; This buffer is for text that is not saved, and for Lisp evaluation.
")
'(eww-search-prefix "https://google.com/search?q=")
'(global-company-mode t)
'(inferior-lisp-program "ecl")
'(initial-scratch-message ";; Meow! Welcome to the scratching post!\12\12")
'(lui-fill-column 105)
'(lui-logging-directory (concat user-emacs-directory "irclogs"))
'(lui-logging-flush-delay 2)
'(menu-bar-mode nil)
'(nix-nixfmt-bin "nixpkgs-fmt")
'(nix-repl-executable-args '("repl" "--file" "<nixpkgs>"))
'(nxml-auto-insert-xml-declaration-flag t)
'(nxml-slash-auto-complete-flag t)
'(org-agenda-files '("."))
'(package-selected-packages '(elpher evil gruvbox-theme))
'(tool-bar-mode nil))
'(org-agenda-start-on-weekday 0)
'(org-default-notes-file "~/org/notes.org")
'(org-footnote-define-inline t)
'(org-latex-default-packages-alist
'(("AUTO" "inputenc" t
("pdflatex"))
("T1" "fontenc" t
("pdflatex"))
("" "graphicx" t nil)
("" "longtable" nil nil)
("" "wrapfig" nil nil)
("" "rotating" nil nil)
("normalem" "ulem" t nil)
("" "amsmath" t nil)
("" "amssymb" t nil)
("" "capt-of" nil nil)
("pdfa" "hyperref" nil nil)))
'(org-latex-image-default-width "\\linewidth")
'(org-src-preserve-indentation t)
'(org-structure-template-alist
'(("a" . "export ascii")
("c" . "center")
("C" . "comment")
("e" . "example")
("E" . "export")
("h" . "export html")
("l" . "export latex")
("q" . "quote")
("s" . "src")
("v" . "verse")
("f" . "fixme")))
'(org-support-shift-select t)
'(org-todo-keywords '((sequence "TODO" "DELAYED" "RERUN" "|" "DONE")))
'(package-selected-packages
'(slime ob-nix graphviz-dot-mode nix-mode circe badwolf-theme evil elpher gruvbox-theme sudo-edit company))
'(sudo-edit-indicator-mode t)
'(tab-always-indent nil)
'(tool-bar-mode nil)
'(use-short-answers t))
(setq split-height-threshold nil)
(setq split-width-threshold 160)
(require 'evil)
(evil-set-initial-state 'term-mode 'emacs)
(evil-mode 1)
(defvar move-file-default-target "~/Documents/" "move-file's default target")
(server-start)
(add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
(setenv "EDITOR" "emacsclient")
;; borrowed from https://emacs.stackexchange.com/a/45910/37594
(defun move-file ()
"Move current to another directory, for which you're prompted.
Directory defaults to the value of 'move-file-default-target'."
(interactive)
(let ((old (or (buffer-file-name) (user-error "Not visiting a file")))
(dir (read-directory-name "Move to: " move-file-default-target)))
(write-file (expand-file-name (file-name-nondirectory old) dir) t)
(delete-file old)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:height 105 :width normal :foundry "JB" :family "JetBrainsMono Nerd Font")))))
'(default ((t (:height 105 :width normal :foundry "JB" :family "JetBrainsMono Nerd Font"))))
'(line-number ((t (:background nil :foreground "#7c6f64"))))
'(line-number-current-line ((t (:background nil :foreground "#fe8019")))))
(require 'zone)
(zone-when-idle 120)
(require 'evil)
(define-key evil-insert-state-map [S-left] nil)
(define-key evil-insert-state-map [S-right] nil)
(evil-set-initial-state 'term-mode 'emacs)
(evil-set-initial-state 'circe-mode 'emacs)
(evil-mode 1)
(evil-define-operator evil-fill-justify (beg end)
"fill justified text."
:move-point nil
:type line
(save-excursion
(condition-case nil
(fill-region beg end "fill")
(error nil))))
(define-key evil-normal-state-map "gj" 'evil-fill-justify)
(require 'elisp-mode)
(define-key lisp-mode-shared-map (kbd "C-c C-c") 'eval-defun)
(display-time-mode 1)
(require 'text-mode)
(add-to-list 'auto-mode-alist '("\\.gm\\'" . text-mode))
(add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
(setenv "EDITOR" "emacsclient")
(require 'eww)
(define-key eww-mode-map "u" 'eww-back-url)
(define-key eww-mode-map "g" 'eww)
(define-key eww-mode-map "G" 'eww-reload)
(define-key eww-mode-map (kbd "C-x w") 'eww-copy-page-url)
(require 'elpher)
(define-key elpher-mode-map (kbd "C-x w") 'elpher-copy-current-url)
(require 'org)
;; support gopher and gemini links for org
@ -85,4 +193,41 @@
(org-link-set-parameters "gopher" :export #'org-link-gopher-export-link)
(org-link-set-parameters "gemini" :export #'org-link-gemini-export-link)
(defun org-export-deterministic-reference (references)
"make org export's html anchor ids deterministic."
(let ((new 0))
(while (rassq new references) (setq new (+ new 1)))
new))
(advice-add #'org-export-new-reference :override #'org-export-deterministic-reference)
(define-key org-mode-map (kbd "C-M-<return>") 'org-meta-return)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(require 'inf-lisp)
(define-key lisp-mode-map "\C-c\C-c" 'lisp-eval-defun)
(define-key lisp-mode-map "\C-c\C-e" 'lisp-compile-defun)
(require 'slime)
(define-key slime-parent-map "\C-\M-x" 'slime-compile-defun)
(define-key slime-mode-map "\C-c\C-c" 'slime-eval-defun)
(defun turn-off-company ()
(company-mode -1))
(add-hook 'term-mode-hook 'turn-off-company)
(add-hook 'eshell-mode-hook 'turn-off-company)
(add-hook 'circe-mode-hook 'turn-off-company)
(add-hook 'doc-view-mode-hook 'auto-revert-mode)
(require 'circe)
(defalias 'circe-command-J 'circe-command-JOIN)
(load "lui-logging" nil t)
(enable-lui-logging-globally)
(require 'redtick)
(redtick-mode 1)
(server-start)

312
.emacs.d/lisp/redtick.el Normal file
View File

@ -0,0 +1,312 @@
;;; redtick.el --- Smallest pomodoro timer (1 char)
;; Author: F. Febles
;; URL: http://github.com/ferfebles/redtick
;; Version: 00.01.03
;; Package-Requires: ((emacs "24.4"))
;; Keywords: calendar
;; This is free and unencumbered software released into the public domain.
;; Anyone is free to copy, modify, publish, use, compile, sell, or
;; distribute this software, either in source code form or as a compiled
;; binary, for any purpose, commercial or non-commercial, and by any
;; means.
;; In jurisdictions that recognize copyright laws, the author or authors
;; of this software dedicate any and all copyright interest in the
;; software to the public domain. We make this dedication for the benefit
;; of the public at large and to the detriment of our heirs and
;; successors. We intend this dedication to be an overt act of
;; relinquishment in perpetuity of all present and future rights to this
;; software under copyright law.
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
;; IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
;; OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
;; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
;; OTHER DEALINGS IN THE SOFTWARE.
;; For more information, please refer to <http://unlicense.org/>
;;; Commentary:
;; This package provides a little pomodoro timer in the mode-line.
;;
;; After importing, it shows a little red tick (✓) in the mode-line.
;; When you click on it, it starts a pomodoro timer.
;;
;; It only shows the timer in the selected window (a moving timer
;; replicated in each window is a little bit distracting!).
;;
;; I thought about this, after seeing the spinner.el package.
;;
;; I tried to make it efficient:
;; - It uses an elisp timer to program the next modification of the
;; mode line: no polling, no sleeps...
;; - Only works when the mode-line is changed.
;; - It uses mpv player, that supports looping wav files without gaps.
;; Thanks to the loop, I only launch a player process when starting
;; the work or rest interval.
;;
;;; Code:
(defgroup redtick nil
"Little pomodoro timer in the mode-line."
:group 'tools
:prefix "redtick-")
;; pomodoro work & rest intervals in seconds
(defcustom redtick-work-interval (* 60 10)
"Interval of time you will be working, in seconds."
:type 'number)
(defcustom redtick-rest-interval (* 60 5)
"Interval of time you will be resting, in seconds."
:type 'number)
(defcustom redtick-history-file (concat user-emacs-directory "redtick-history.txt")
"File to store all the completed pomodoros."
:type 'string)
(defcustom redtick-popup-header '(format "Working with '%s'" (current-buffer))
"Header used in popup."
:type 'sexp)
(defcustom redtick-play-sound t
"Play sounds when true."
:type 'boolean)
(defcustom redtick-sound-volume "100"
"Sound volume as numeric string (low < 1.0 < high)."
:type 'string)
(defcustom redtick-mpv-buffer nil
"Name of the buffer used for mpv output (p.e. '*mpv-debug*')."
:type 'string)
(defcustom redtick-work-sound
(expand-file-name "./resources/work.ogg"
(file-name-directory (or load-file-name buffer-file-name)))
"Sound file to loop during the work period."
:type 'string)
(defcustom redtick-rest-sound
(expand-file-name "./resources/rest.ogg"
(file-name-directory (or load-file-name buffer-file-name)))
"Sound file to loop during the rest period."
:type 'string)
(defcustom redtick-end-rest-sound
(expand-file-name "./resources/end-rest.ogg"
(file-name-directory (or load-file-name buffer-file-name)))
"Sound file to play at the end of the rest period."
:type 'string)
(require 'which-func)
;; stores redtick timer, to be cancelled if restarted
(defvar redtick--timer nil)
;; stores the number of completed pomodoros
(defvar redtick--completed-pomodoros 0)
;; pomodoro start time
(defvar redtick--pomodoro-started-at (current-time))
;; current pomodoro description
(defvar redtick--pomodoro-description "Start your first pomodoro now!!!")
;; redtick intervals for every bar
(defvar redtick--workbar-interval (/ redtick-work-interval 8.0))
(defvar redtick--restbar-interval (/ redtick-rest-interval 8.0))
;; intervals, bars & colours
(defvar redtick--bars
`((,redtick--workbar-interval "" "#ffff66")
(,redtick--workbar-interval "" "#ffcc66")
(,redtick--workbar-interval "" "#cc9966")
(,redtick--workbar-interval "" "#ff9966")
(,redtick--workbar-interval "" "#cc6666")
(,redtick--workbar-interval "" "#ff6666")
(,redtick--workbar-interval "" "#ff3366")
(,redtick--workbar-interval "" "#ff0066")
(,redtick--restbar-interval "" "#00cc66")
(,redtick--restbar-interval "" "#33cc66")
(,redtick--restbar-interval "" "#66cc66")
(,redtick--restbar-interval "" "#00ff66")
(,redtick--restbar-interval "" "#33ff66")
(,redtick--restbar-interval "" "#66ff66")
(,redtick--restbar-interval "" "#99ff66")
(,redtick--restbar-interval "" "#ccff66")
(nil "h" "#fabd2f")))
(defun redtick--ended-work-interval-p (redtick--current-bars)
"Return t when ended work interval based on REDTICK--CURRENT-BARS."
(equal `(,redtick--restbar-interval "")
(butlast (car redtick--current-bars))))
;; variable that stores the sound process object
(defvar redtick--sound-process nil)
(defun redtick--play-sound (file &optional args)
"Play FILE using mpv with optional ARGS."
(if redtick-play-sound
(if (executable-find "mpv")
(setq redtick--sound-process
(apply 'start-process "mpv" redtick-mpv-buffer
"mpv" file (concat "--volume=" redtick-sound-volume) args))
(warn "mpv executable not found"))))
(defun redtick--stop-sound ()
"Stops sound if playing."
(if redtick--sound-process
(delete-process redtick--sound-process)))
(defun redtick--play-sound-during (file seconds)
"Play FILE during SECONDS, repeating or cutting if needed."
(let ((fade (if (< seconds 8) "0" "4")))
(redtick--play-sound file `("--loop"))))
(defun redtick--play-work-sound ()
(redtick--stop-sound)
(redtick--play-sound redtick-work-sound))
(add-hook 'redtick-before-work-hook #'redtick--play-work-sound)
(defun redtick--play-rest-sound ()
(redtick--stop-sound)
(redtick--play-sound redtick-rest-sound))
(add-hook 'redtick-before-rest-hook #'redtick--play-rest-sound)
(defun redtick--play-end-of-rest-sound ()
(redtick--stop-sound)
(redtick--play-sound redtick-end-rest-sound))
(add-hook 'redtick-after-rest-hook #'redtick--play-end-of-rest-sound)
(defun redtick--seconds-since (time)
"Seconds since TIME."
(truncate (- (float-time (current-time)) (float-time time))))
(defun redtick--popup-message (time desc)
"TIME since start, DESC(ription) and instructions."
(let* ((seconds (redtick--seconds-since time))
(minutes (truncate seconds 60)))
(concat (format "%s completed pomodoro(s) in this session\n"
redtick--completed-pomodoros)
(format "%s, %s\n" (format-time-string "%T" time) desc)
(cond
((= 0 minutes) (format "%s seconds" seconds))
((= 1 minutes) "1 minute")
(t (format "%s minutes" minutes)))
" elapsed, click to (re)start")))
(defun redtick--propertize (bar bar-color)
"Propertize BAR with BAR-COLOR, help echo, and click action."
(propertize bar
'face `(:inherit mode-line :foreground ,bar-color :weight bold)
'help-echo '(redtick--popup-message redtick--pomodoro-started-at
redtick--pomodoro-description)
'pointer 'hand
'local-map (make-mode-line-mouse-map 'mouse-1 'redtick)))
;; initializing current bar
(defvar redtick--current-bar (apply #'redtick--propertize
(cdar (last redtick--bars))))
;; setting as risky, so it's painted with colour
(put 'redtick--current-bar 'risky-local-variable t)
;; storing selected window to use from mode-line
(defvar redtick--selected-window (selected-window))
;; function that updates selected window variable
(defun redtick--update-selected-window (windows)
"WINDOWS parameter avoids error when called before 'pre-redisplay-function'."
(when (not (minibuffer-window-active-p (frame-selected-window)))
(setq redtick--selected-window (selected-window))))
(add-function :before pre-redisplay-function #'redtick--update-selected-window)
(defun redtick--selected-window-p ()
"Check if current window is the selected one."
(eq redtick--selected-window (get-buffer-window)))
;; adding to mode-line
(add-to-list 'mode-line-misc-info
'(:eval (if (and redtick-mode (redtick--selected-window-p))
redtick--current-bar))
t)
(defun redtick--save (file data)
"Use FILE to save DATA."
(with-temp-file file
(let ((standard-output (current-buffer))
(print-circle t)) ; Allow circular data
(prin1 data))))
(defun redtick--load (file)
"Use FILE to load DATA."
(ignore-errors (with-temp-buffer
(insert-file-contents file)
(read (current-buffer)))))
(defun redtick--save-history ()
"Adding current-pomodoro info to history file."
(when redtick-history-file
(let ((history (redtick--load redtick-history-file)))
(redtick--save redtick-history-file
(add-to-list 'history
(list redtick--pomodoro-started-at
redtick-work-interval
redtick-rest-interval
redtick--pomodoro-description)
t)))))
(add-hook 'redtick-after-rest-hook #'redtick--save-history)
(defun redtick--update-current-bar (redtick--current-bars)
"Update current bar, and program next update using REDTICK--CURRENT-BARS."
(setq redtick--current-bar (apply #'redtick--propertize
(cdar redtick--current-bars)))
(when (redtick--ended-work-interval-p redtick--current-bars)
(run-hooks 'redtick-after-work-hook
'redtick-before-rest-hook))
(if (caar redtick--current-bars)
(setq redtick--timer
(run-at-time (caar redtick--current-bars)
nil
#'redtick--update-current-bar
(cdr redtick--current-bars)))
(run-hooks 'redtick-after-rest-hook)
(setq redtick--completed-pomodoros
(1+ redtick--completed-pomodoros)))
(force-mode-line-update t))
;;;###autoload
(define-minor-mode redtick-mode
"Little pomodoro timer in the mode-line."
:global t)
(defun redtick--default-desc ()
"Default pomodoro description: Working with 'current-buffer'..."
(concat (eval redtick-popup-header)
(cond ((which-function)
(format ":'%s'" (which-function))))))
;;;###autoload
(defun redtick ()
"Enable minor-mode, and start the pomodoro."
(interactive)
(redtick-with-description (redtick--default-desc)))
;;;###autoload
(defun redtick-with-description (description)
"Ask for DESCRIPTION, enable minor-mode, and start the pomodoro."
(interactive (list (read-string (format "Description (%s): "
(redtick--default-desc))
nil nil (redtick--default-desc))))
(redtick-mode t)
(if redtick--timer (cancel-timer redtick--timer))
(run-hooks 'redtick-before-work-hook)
(setq redtick--pomodoro-started-at (current-time)
redtick--pomodoro-description description)
(redtick--update-current-bar redtick--bars))
(provide 'redtick)
;;; redtick.el ends here

Binary file not shown.

Binary file not shown.

Binary file not shown.

84
.fvwmrc
View File

@ -75,7 +75,8 @@ Mouse 3 R A WindowList
# for the title bar buttons:
Mouse 0 1 A Menu Window-Ops2 Close
Mouse 0 2 A Close
Mouse 0 4 A Iconify
Mouse 0 4 A Maximize-Func
Mouse 0 6 A Iconify
# for other parts of the window/borders/icons:
Mouse 1 F A Resize-or-Raise
@ -113,6 +114,7 @@ AddToMenu RootMenu "Root Menu" Title
+ "Exit" Module FvwmForm QuitVerify
AddToMenu Utilities "Utilities" Title
+ "Systat" Exec exec xterm -T Systat -n Systat -e systat
+ "Top" Exec exec xterm -T Top -n Top -e top
+ "w3m" Exec exec xterm -T w3m -n w3m -e w3m google.com
+ "Lynx" Exec exec xterm -T Lynx -n Lynx -e lynx google.com
@ -202,7 +204,7 @@ AddToMenu Module-Popup "FvwmModules" Title
+ "IconBox" Module FvwmIconBox
+ "IconMan" Module FvwmIconMan
+ "" Nop
+ "Form - Rlogin" Module FvwmForm Rlogin
+ "Form - Ssh" Module FvwmForm Ssh
+ "Form - MyFvwmTalk" Module FvwmForm MyFvwmTalk
+ "Form - QuitVerify" Module FvwmForm QuitVerify
@ -261,8 +263,8 @@ AddToFunc PrintReverseFunction "I" Raise
AddToFunc Iconify-and-Raise "I" Iconify
+ "I" Raise
# RLOGIN machine fg bg
AddToFunc RLOGIN "I" Exec xterm -fg $1 -bg $2 -e rlogin $0 -8
# SSH machine fg bg
AddToFunc SSH "I" Exec xterm -fg $1 -bg $2 -e ssh $0
# TELNET machine fg bg
AddToFunc TELNET "I" Exec xterm -fg $1 -bg $2 -e telnet $0
@ -354,7 +356,7 @@ Key F8 A M CirculateDown
*FvwmPagerFore white
*FvwmPagerHilight #2d2d2d
*FvwmPagerGeometry 80x60-1-1
*FvwmPagerLabel 0 "OpenBSD 6.8"
*FvwmPagerLabel 0 "OpenBSD"
*FvwmPagerLabel 1 Maker
*FvwmPagerLabel 2 Mail
*FvwmPagerLabel 3 Matlab
@ -423,43 +425,43 @@ Key F8 A M CirculateDown
#
*FvwmIconBox "Fvwm*" -
# FvwmForm alias - rlogin or telnet to host via xterm
*RloginWarpPointer
*RloginFont *helvetica*m*r*n*12*
*RloginButtonFont *helvetica*m*o*n*12*
*RloginInputFont *cour*m*r*n*12*
*RloginFore Black
*RloginBack White
*RloginItemFore Yellow
*RloginItemBack Wheat
# FvwmForm alias - ssh or telnet to host via xterm
*SshWarpPointer
*SshFont *helvetica*m*r*n*12*
*SshButtonFont *helvetica*m*o*n*12*
*SshInputFont *cour*m*r*n*12*
*SshFore Black
*SshBack White
*SshItemFore Black
*SshItemBack Wheat
# begin items
*RloginLine center
*RloginText "Login to Remote Host"
*RloginLine center
*RloginText "Host:"
*RloginInput HostName 30 ""
*RloginLine center
*RloginSelection meth single
*RloginChoice TN TN off "telnet"
*RloginChoice RL RL on "rlogin"
*RloginSelection UserSel single
#*RloginChoice Default Default on "same user"
#*RloginChoice Custom Custom off "user:"
*RloginText "(Userid:"
*RloginInput UserName 10 ""
*RloginText ")"
*RloginLine center
*RloginText "FG:"
*RloginInput FgColor 15 ""
*RloginText "BG:"
*RloginInput BgColor 15 ""
*RloginLine expand
*RloginButton quit "Login" ^M
*RloginCommand Exec xterm $(FgColor?-fg $(FgColor)) $(BgColor?-bg $(BgColor)) -T xterm@$(HostName) -e $(RL?rlogin) $(TN?telnet) $(HostName) $(RL?-8 $(UserName?-l $(UserName)))
*RloginButton restart "Clear"
*RloginCommand Beep
*RloginButton quit "Cancel"
*RloginCommand Nop
*SshLine center
*SshText "Login to Remote Host"
*SshLine center
*SshText "Host:"
*SshInput HostName 30 ""
*SshLine center
*SshSelection meth single
*SshChoice TN TN off "telnet"
*SshChoice RL RL on "ssh"
*SshSelection UserSel single
#*SshChoice Default Default on "same user"
#*SshChoice Custom Custom off "user:"
*SshText "(Userid:"
*SshInput UserName 10 ""
*SshText ")"
*SshLine center
*SshText "FG:"
*SshInput FgColor 15 ""
*SshText "BG:"
*SshInput BgColor 15 ""
*SshLine expand
*SshButton quit "Login" ^M
*SshCommand Exec xterm $(FgColor?-fg $(FgColor)) $(BgColor?-bg $(BgColor)) -T xterm@$(HostName) -e $(RL?ssh) $(TN?telnet) $(HostName) $(UserName?-l $(UserName))
*SshButton restart "Clear"
*SshCommand Beep
*SshButton quit "Cancel"
*SshCommand Nop
# FvwmForm alias - query exit ala mwm
*QuitVerifyGrabServer

8
.ghci Normal file
View File

@ -0,0 +1,8 @@
:set prompt "λ "
:set +t
import Data.Char
import Control.Monad
import qualified Data.ByteString.Char8 as P
import qualified Data.Map as M

View File

@ -1,9 +1,8 @@
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = xfnw
email = xfnw@riseup.net
signingkey = A75FA9A87E447AE0
[init]
defaultBranch = main
[sendemail]
@ -13,8 +12,10 @@
smtpserverport = 587
[alias]
psuh = push
br = !git log --oneline | head
quickserve = daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/
fetch-notes = !"git fetch ${1:-origin} $2refs/notes/*:refs/notes/* #"
[commit]
verbose = true
[pull]
rebase = true
ff = only

View File

@ -1,7 +1,6 @@
aliases = {
ATAG = "WINDOW SERVER";
ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";
B = "BAN";
BACK = "AWAY";
BANS = "BAN";
BYE = "QUIT";
@ -31,8 +30,8 @@ aliases = {
MUB = "UNBAN *";
N = "NAMES";
NMSG = "^MSG";
P = "PART";
Q = "QUERY";
READ = "SCRIPT EXEC \\$_->activity(0) for Irssi::windows";
RESET = "SET -default";
RUN = "SCRIPT LOAD";
SAY = "MSG *";
@ -55,111 +54,42 @@ aliases = {
WN = "WINDOW NEW HIDDEN";
WQUERY = "QUERY -window";
WW = "WHOWAS";
1 = "WINDOW GOTO 1";
2 = "WINDOW GOTO 2";
3 = "WINDOW GOTO 3";
4 = "WINDOW GOTO 4";
5 = "WINDOW GOTO 5";
6 = "WINDOW GOTO 6";
7 = "WINDOW GOTO 7";
8 = "WINDOW GOTO 8";
9 = "WINDOW GOTO 9";
10 = "WINDOW GOTO 10";
11 = "WINDOW GOTO 11";
12 = "WINDOW GOTO 12";
13 = "WINDOW GOTO 13";
14 = "WINDOW GOTO 14";
15 = "WINDOW GOTO 15";
16 = "WINDOW GOTO 16";
17 = "WINDOW GOTO 17";
18 = "WINDOW GOTO 18";
19 = "WINDOW GOTO 19";
20 = "WINDOW GOTO 20";
21 = "WINDOW GOTO 21";
22 = "WINDOW GOTO 22";
23 = "WINDOW GOTO 23";
24 = "WINDOW GOTO 24";
25 = "WINDOW GOTO 25";
26 = "WINDOW GOTO 26";
27 = "WINDOW GOTO 27";
28 = "WINDOW GOTO 28";
29 = "WINDOW GOTO 29";
30 = "WINDOW GOTO 30";
31 = "WINDOW GOTO 31";
32 = "WINDOW GOTO 32";
33 = "WINDOW GOTO 33";
34 = "WINDOW GOTO 34";
35 = "WINDOW GOTO 35";
36 = "WINDOW GOTO 36";
37 = "WINDOW GOTO 37";
38 = "WINDOW GOTO 38";
39 = "WINDOW GOTO 39";
40 = "WINDOW GOTO 40";
41 = "WINDOW GOTO 41";
42 = "WINDOW GOTO 42";
43 = "WINDOW GOTO 43";
44 = "WINDOW GOTO 44";
45 = "WINDOW GOTO 45";
46 = "WINDOW GOTO 46";
47 = "WINDOW GOTO 47";
48 = "WINDOW GOTO 48";
49 = "WINDOW GOTO 49";
50 = "WINDOW GOTO 50";
51 = "WINDOW GOTO 51";
52 = "WINDOW GOTO 52";
53 = "WINDOW GOTO 53";
54 = "WINDOW GOTO 54";
55 = "WINDOW GOTO 55";
56 = "WINDOW GOTO 56";
57 = "WINDOW GOTO 57";
58 = "WINDOW GOTO 58";
59 = "WINDOW GOTO 59";
60 = "WINDOW GOTO 60";
61 = "WINDOW GOTO 61";
62 = "WINDOW GOTO 62";
63 = "WINDOW GOTO 63";
64 = "WINDOW GOTO 64";
65 = "WINDOW GOTO 65";
66 = "WINDOW GOTO 66";
67 = "WINDOW GOTO 67";
68 = "WINDOW GOTO 68";
69 = "WINDOW GOTO 69";
70 = "WINDOW GOTO 70";
71 = "WINDOW GOTO 71";
72 = "WINDOW GOTO 72";
73 = "WINDOW GOTO 73";
74 = "WINDOW GOTO 74";
75 = "WINDOW GOTO 75";
76 = "WINDOW GOTO 76";
77 = "WINDOW GOTO 77";
78 = "WINDOW GOTO 78";
79 = "WINDOW GOTO 79";
80 = "WINDOW GOTO 80";
81 = "WINDOW GOTO 81";
82 = "WINDOW GOTO 82";
83 = "WINDOW GOTO 83";
84 = "WINDOW GOTO 84";
85 = "WINDOW GOTO 85";
86 = "WINDOW GOTO 86";
87 = "WINDOW GOTO 87";
88 = "WINDOW GOTO 88";
89 = "WINDOW GOTO 89";
90 = "WINDOW GOTO 90";
91 = "WINDOW GOTO 91";
92 = "WINDOW GOTO 92";
93 = "WINDOW GOTO 93";
94 = "WINDOW GOTO 94";
95 = "WINDOW GOTO 95";
96 = "WINDOW GOTO 96";
97 = "WINDOW GOTO 97";
98 = "WINDOW GOTO 98";
99 = "WINDOW GOTO 99";
rainbow = "exec -o toilet --irc --gay -f term -- $";
nn = "window number";
move = "window move";
kline = "quote kline";
gline = "quote gline";
challenge = "quote challenge";
kline = "QUOTE KLINE";
unkline = "QUOTE UNKLINE";
gline = "QUOTE GLINE";
dline = "QUOTE DLINE";
undline = "QUOTE UNDLINE";
resv = "QUOTE RESV";
unresv = "QUOTE UNRESV";
xline = "QUOTE XLINE";
unxline = "QUOTE UNXLINE";
challenge = "QUOTE CHALLENGE";
testline = "QUOTE TESTLINE";
testmask = "QUOTE TESTMASK";
oc = "MSG @$C $*";
omsg = "MSG @$C $*";
vc = "MSG +$C $*";
vmsg = "MSG +$C $*";
ns = "QUOTE NICKSERV";
nsi = "QUOTE NICKSERV INFO";
nst = "QUOTE NICKSERV TAXONOMY";
csi = "QUOTE CHANSERV INFO";
csf = "QUOTE CHANSERV FLAGS";
cs = "QUOTE CHANSERV";
hs = "QUOTE HOSTSERV";
bs = "QUOTE BOTSERV";
os = "QUOTE OPERSERV";
shelp = "QUOTE HELP";
dh = "UMODE -h";
h = "UMODE +h";
dp = "UMODE -p";
p = "UMODE +p";
fuck = "server purge";
isquiet = "ismuted";
ne = "me";
};
settings = {
@ -167,20 +97,46 @@ settings = {
real_name = "we dont play by the rules, whats the caution";
user_name = "xfnw";
nick = "xfnw";
timestamp_format = "%H:%M:%S";
rawlog_lines = "1000";
quit_message = "Connection reset by queer";
resolve_prefer_ipv6 = "yes";
};
"fe-text" = {
actlist_sort = "refnum";
paste_join_multiline = "no";
actlist_names = "yes";
actlist_prefer_window_name = "yes";
scrollback_time = "7days";
break_wide = "yes";
show_server_time = "yes";
paste_ignore_first_nl = "yes";
};
"fe-text" = { actlist_sort = "refnum"; paste_join_multiline = "no"; };
"fe-common/core" = {
autolog = "yes";
theme = "furry";
active_window_ignore_refnum = "no";
autoclose_query = "172800";
beep_msg_level = "MSGS HILIGHT DCCMSGS";
show_names_on_join_limit = "120";
show_extended_join = "yes";
show_account_notify = "yes";
max_command_history = "1000";
show_nickmode_empty = "no";
window_number_commands = "yes";
activity_hide_level = "JOINS PARTS QUITS NICKS MODES";
autolog_path = "~/irclogs/$tag/$0/%Y-%m-%d.log";
autolog_colors = "yes";
};
"irc/core" = { cmds_max_at_once = "100"; };
"irc/core" = {
cmds_max_at_once = "1024";
channel_max_who_sync = "64";
max_ctcp_queue = "0";
};
"irc/flood" = { flood_max_msgs = "1024"; };
"perl/core/scripts" = { go_match_anchored = "no"; };
};
logs = { };
windows = { 1 = { immortal = "yes"; name = "(status)"; level = "ALL"; }; };
mainwindows = { 1 = { first_line = "1"; lines = "39"; }; };
ignores = ( );
statusbar = {
items = {
@ -228,3 +184,5 @@ hilights = (
full = "yes";
}
);
windows = { 1 = { immortal = "yes"; name = "hilight"; level = "ALL"; }; };
mainwindows = { 1 = { first_line = "1"; lines = "39"; }; };

View File

@ -21,7 +21,7 @@ info_eol = "false";
# these characters are automatically replaced with specified color
# (dark grey by default)
replaces = { "[]=" = "%K$*%n"; };
replaces = { "[]()=" = "%K$*%n"; };
abstracts = {
##
@ -29,10 +29,10 @@ abstracts = {
##
# text to insert at the beginning of each non-message line
line_start = "%B-%W!%B-%n ";
line_start = "%B--%n ";
# timestamp styling, nothing by default
timestamp = "$*";
timestamp = "%K$*%n";
# any kind of text that needs hilighting, default is to bold
hilight = "%_$*%_";
@ -56,7 +56,7 @@ abstracts = {
comment = "[$*]";
# reason for something is printed (part, quit, kick, ..)
reason = "{comment $*}";
reason = "($*)";
# mode change is printed ([+o nick])
mode = "{comment $*}";
@ -168,7 +168,7 @@ abstracts = {
# notices
ownnotice = "[%r$0%K(%R$1-%K)]%n ";
notice = "%K-%M$*%K-%n ";
pubnotice_channel = "%K:%m$*";
pubnotice_channel = "";
pvtnotice_host = "%K(%m$*%K)";
servernotice = "%g!$*%n ";
@ -258,3 +258,12 @@ abstracts = {
# hilight with specified color, $0 = color, $1 = text
sb_act_hilight_color = "$0$1-%n";
};
formats = {
"fe-common/core" = {
join_extended = "{channick_hilight $0} {reason $4} {chanhost_hilight $1} has joined {channel $2}";
join_extended_account = "{channick_hilight $0} [{hilight $3}] {reason $4} {chanhost_hilight $1} has joined {channel $2}";
logged_out = "{channick $0} {chanhost $1} has unidentified";
logged_in = "{channick_hilight $0} {chanhost_hilight $1} has identified as {hilight $2}";
host_changed = "{channick_hilight $0} {chanhost_hilight $2} has changed host to {chanhost_hilight $1}";
};
};

View File

@ -1,54 +0,0 @@
use strict;
use warnings;
use Irssi;
our $VERSION = '0.0.1';
our %IRSSI = (
authors => 'launchd',
contact => 'me@zpld.me',
name => 'chghost',
description => 'implement support for https://ircv3.net/specs/extensions/chghost.html',
license => 'MIT',
changed => '5/20/2021'
);
Irssi::theme_register([
chghost => '{channick_hilight $0} {nickhost $1} has changed hostname to {hilight $2}',
]);
Irssi::signal_add('event chghost', sub {
my ($server, $data, $nick, $oldhost) = @_;
my @parts = split m/ /, $data;
my $newhost = "$parts[0]\@$parts[1]";
# Print the notification to all shared channels, and the nick's query if any
for my $c ($server->channels) {
$c->printformat(MSGLEVEL_NICKS, 'chghost', $nick, $oldhost, $newhost) if $c->nick_find($nick);
}
my $q = $server->query_find($nick);
$q->printformat(MSGLEVEL_NICKS, 'chghost', $nick, $oldhost, $newhost) if defined $q;
Irssi::signal_stop();
});
Irssi::signal_add('event connected', sub {
my ($server) = @_;
if ($server->{chat_type} eq 'IRC')
{
$server->irc_server_cap_toggle('chghost', 1);
}
});
if (!Irssi::Irc::Server->can('irc_server_cap_toggle')) {
die 'this version of irssi is not supported';
}
for my $server (Irssi::servers()) {
if ($server->{chat_type} eq 'IRC')
{
$server->irc_server_cap_toggle('chghost', 1);
}
}

View File

@ -0,0 +1,55 @@
use Irssi 20010920.0000 ();
$VERSION = "2.01";
%IRSSI = (
authors => 'From irssi source, modified by David Leadbeater (dg)',
name => 'clones',
description => '/CLONES - Display clones in the active channel (with added options)',
license => 'Same as Irssi',
url => 'http://irssi.dgl.yi.org/',
);
use strict;
sub cmd_clones {
my ($data, $server, $channel) = @_;
my $min = $data =~ /\d/ ? $data : Irssi::settings_get_int('clones_min_show');
if (!$channel || $channel->{type} ne 'CHANNEL') {
Irssi::print('No active channel in window');
return;
}
my %hostnames = {};
my $ident = Irssi::settings_get_bool('clones_host_only');
foreach my $nick ($channel->nicks()) {
my $hostname;
if($ident) {
($hostname = $nick->{host}) =~ s/^[^@]+@//;
}else{
$hostname = $nick->{host};
}
$hostnames{$hostname} ||= [];
push( @{ $hostnames{$hostname} }, $nick->{nick});
}
my $count = 0;
foreach my $host (keys %hostnames) {
next unless ref($hostnames{$host}) eq 'ARRAY'; # sometimes a hash is here
my @clones = @{ $hostnames{$host} };
if (scalar @clones >= $min) {
$channel->print('Clones:') if ($count == 0);
$channel->print("$host: " . join(' ',@clones));
$count++;
}
}
$channel->print('No clones in channel') if ($count == 0);
}
Irssi::command_bind('clones', 'cmd_clones');
Irssi::settings_add_bool('misc', 'clones_host_only', 1);
Irssi::settings_add_int('misc', 'clones_min_show', 2);

View File

@ -0,0 +1,59 @@
use Irssi;
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => "David Leadbeater",
contact => "dgl\@dgl.cx",
url => "http://irssi.dgl.cx/",
license => "GNU GPLv2 or later",
name => "foreach user",
description => "Extends the /foreach command to have /foreach user
(users in a channel).
Syntax: /foreach user [hostmask] command.",
);
# Examples:
# /foreach user /whois $0
# /foreach user *!eviluser@* /k $0 evil! (consider kicks.pl ;) )
Irssi::command_bind('foreach user', sub {
my($command) = @_;
return unless length $command;
my $mask = '*!*@*';
# see if it begins with a mask (kind of assumes cmdchars is /).
if($command !~ m!^/! && $command =~ /^\S+[!@]/) {
($mask,$command) = split / /, $command, 2;
# make sure the mask is okay.
$mask .= '@*' if $mask !~ /\@/;
$mask = "*!$mask" if $mask !~ /!/;
}
my $channel = ref Irssi::active_win ? Irssi::active_win->{active} : '';
return unless ref $channel;
for my $nick($channel->nicks) {
next unless ref $nick;
next unless $channel->{server}->mask_match_address($mask, $nick->{nick},
$nick->{host} ? $nick->{host} : '');
# the backtracking is only so $$0 is escaped (don't ask me why...)
(my $tmpcommand = $command) =~ s/(?<!\$)\$(\d)/
if($1 == 0) {
$nick->{nick}
}elsif($1 == 1) {
$nick->{host}
}elsif($1 == 2) {
(split('@',$nick->{host}))[0];
}elsif($1 == 3) {
(split('@',$nick->{host}))[1];
}elsif($1 == 4) {
$nick->{realname}
}
/eg;
$tmpcommand =~ s/\$\$(\d)/\$$1/g;
$channel->command($tmpcommand);
}
} );

View File

@ -0,0 +1,115 @@
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
use Irssi::Irc;
# Usage:
# /script load go.pl
# If you are in #irssi you can type /go #irssi or /go irssi or even /go ir ...
# also try /go ir<tab> and /go <tab> (that's two spaces)
#
# The following settings exist:
#
# /SET go_match_case_sensitive [ON|OFF]
# Match window/item names sensitively (the default). Turning this off
# means e.g. "/go foo" would jump to a window named "Foobar", too.
#
# /SET go_match_anchored [ON|OFF]
# Match window/names only at the start of the word (the default). Turning
# this off will mean that strings can match anywhere in the window/names.
# The leading '#' of channel names is optional either way.
#
# /SET go_complete_case_sensitive [ON|OFF]
# When using tab-completion, match case-insensitively (the default).
# Turning this on means that "/go foo<tab>" will *not* suggest "Foobar".
#
# /SET go_complete_anchored [ON|OFF]
# Match window/names only at the start of the word. The default is 'off',
# which causes completion to match anywhere in the window/names during
# completion. The leading '#' of channel names is optional either way.
#
$VERSION = '1.1.1';
%IRSSI = (
authors => 'nohar',
contact => 'nohar@freenode',
name => 'go to window',
description => 'Implements /go command that activates a window given a name/partial name. It features a nice completion.',
license => 'GPLv2 or later',
changed => '2019-02-25'
);
sub _make_regexp {
my ($name, $ci, $aw) = @_;
my $re = "\Q${name}\E";
$re = "(?i:$re)" unless $ci;
$re = "^#?$re" if $aw;
return $re;
}
sub signal_complete_go {
my ($complist, $window, $word, $linestart, $want_space) = @_;
my $channel = $window->get_active_name();
my $k = Irssi::parse_special('$k');
return unless ($linestart =~ /^\Q${k}\Eb\b/i);
my $re = _make_regexp($word,
Irssi::settings_get_bool('go_complete_case_sensitive'),
Irssi::settings_get_bool('go_complete_anchored'));
@$complist = ();
foreach my $w (Irssi::windows) {
my $name = $w->get_active_name();
if ($word ne "") {
if ($name =~ $re) {
push(@$complist, $name)
}
} else {
push(@$complist, $name);
}
}
Irssi::signal_stop();
};
sub cmd_go
{
my($chan,$server,$witem) = @_;
my $case_sensitive = Irssi::settings_get_bool('go_match_case_sensitive');
my $match_anchored = Irssi::settings_get_bool('go_match_anchored');
$chan =~ s/ *//g;
my $re = _make_regexp($chan, $case_sensitive, $match_anchored);
my @matches;
foreach my $w (Irssi::windows) {
my $name = $w->get_active_name();
if (($case_sensitive && $name eq $chan) ||
(!$case_sensitive && CORE::fc $name eq CORE::fc $chan)) {
$w->set_active();
return;
} elsif ($name =~ /$re/) {
push(@matches, $w);
}
}
if (@matches) {
$matches[0]->set_active();
}
}
Irssi::command_bind("b", "cmd_go");
Irssi::signal_add_first('complete word', 'signal_complete_go');
Irssi::settings_add_bool('b', 'go_match_case_sensitive', 1);
Irssi::settings_add_bool('b', 'go_complete_case_sensitive', 0);
Irssi::settings_add_bool('b', 'go_match_anchored', 1);
Irssi::settings_add_bool('b', 'go_complete_anchored', 0);
# Changelog
#
# 2017-02-02 1.1 martin f. krafft <madduck@madduck.net>
# - made case-sensitivity of match configurable
# - made anchoring of search strings configurable
#
# 2019-02-025 1.1.1 dylan lloyd <dylan@disinclined.org>
# - prefer exact channel matches

View File

@ -0,0 +1,253 @@
# Idea based on queryresume.pl by Stefan Tomanek
### NOTES/BUGS
# - /set logresume_query_lines
# - /set logresume_channel_lines (set to 0 to make this script act more like queryresume.pl)
# - Coloured logs (/set autolog_colors ON) work perfectly well, and are recommended if you want it to look like you never left
# - bonus feature: /logtail 10 will print the last 10 lines of a log
# - bonus feature: /logview will open the log in your PAGER, or do e.g. /logview tmux split-window vim -R. You'll need to be using irssi in screen. Running the program without screen is possible, but you need to ^L to redraw after closing it, and if you look at it too long irssi blocks on output and all your connections will ping out
# - behaviour on channel join fail is potentially a little odd. Unmotivated to test or fix this.
use strict;
use Irssi;
use Fcntl qw( :seek O_RDONLY );
our $VERSION = "0.6";
our %IRSSI = (
name => "logresume",
description => "print last n lines of logs when opening queries/channels",
url => "http://explodingferret.com/linux/irssi/logresume.pl",
authors => "ferret",
contact => "ferret(tA)explodingferret(moCtoD), ferret on irc.freenode.net",
licence => "Public Domain",
changed => "2012-10-08",
changes => "0.6: added memory of windows that have been logresumed already"
. "0.5: added /logtail and /logview"
. "0.4: fixed problem with lines containing %, removed use warnings"
. "0.3: swapped File::ReadBackwards for internal tail implementation",
modules => "",
commands => "logtail, logview",
settings => "logresume_channel_lines, logresume_query_lines",
);
Irssi::print "$IRSSI{name} version $VERSION loaded, see the top of the script for help";
if ( ! Irssi::settings_get_bool('autolog') ) {
Irssi::print( "$IRSSI{name}: /set autolog is currently OFF. This script probably won't work well unless it's ON" );
}
Irssi::settings_add_int($IRSSI{name}, 'logresume_channel_lines', 15);
Irssi::settings_add_int($IRSSI{name}, 'logresume_query_lines', 20);
my $debug = 0;
sub debug_print { $debug and Irssi::print $IRSSI{name} . ' %RDEBUG%n: ' . $_[0]; }
sub prettyprint { Irssi::print $IRSSI{name} . ' %Winfo%n: ' . $_[0]; }
# This hash of hashes maps servertag -> item names -> _irssi. The point of this is so that
# we don't print the last n log entries into a window that just recently had that item in it
# (e.g. on server reconnect), since that content is like right there already.
# the _irssi hash key is used as a unique identifier for windows (although they get reused).
# Was using refnum for this originally, but it's very difficult to implement with that due to
# the way the 'window refnum changed' and 'window destroyed' signals work (mostly the order
# they run in).
my %haveprinted;
# initial fill of hash
sub inithash {
for my $win ( Irssi::windows() ) {
for my $winitem ( $win->items() ) {
next unless $winitem->{type} eq 'QUERY' or $winitem->{type} eq 'CHANNEL';
next unless defined $winitem->{server} and defined $winitem->{name};
$haveprinted{$winitem->{server}{tag}}{$winitem->{name}} = $win->{_irssi};
}
}
}
inithash();
# a new log was opened! initiate the process of printing some stuff to the screen
Irssi::signal_add_last 'log started' => sub {
my ( $log ) = @_;
my $lines;
for my $logitem ( @{ $log->{items} } ) {
my $server = Irssi::server_find_tag( $logitem->{servertag} );
next unless defined $server;
next unless defined $logitem->{name};
my $winitem = $server->window_item_find( $logitem->{name} );
next unless defined $winitem;
my $irssiref = $winitem->window()->{_irssi};
my $servertag = $server->{tag};
my $itemname = $winitem->{name};
debug_print( "log started | servertag='$servertag' itemname='$itemname' irssiref='$irssiref'" );
if( $winitem->{type} eq 'QUERY' ) {
$lines = Irssi::settings_get_int('logresume_query_lines');
} elsif( $winitem->{type} eq 'CHANNEL' ) {
$lines = Irssi::settings_get_int('logresume_channel_lines');
} else {
next; # other window types not implemented
}
# don't print log output if we already did for this window, as that would indicate the
# item was recently in this window, so the scrollback contains this stuff already
if( $haveprinted{$servertag}{$itemname} ne $irssiref ) {
$haveprinted{$servertag}{$itemname} = $irssiref;
debug_print( "log started || not recorded as already printed, will do print_tail" );
print_tail( $winitem, $lines );
}
}
};
# when windows are destroyed we need to remove entries from %haveprinted
Irssi::signal_add 'window destroyed' => sub {
my ( $win ) = @_;
my $irssiref = $win->{_irssi};
debug_print( "window destroyed | refnum='$win->{refnum}' irssiref='$irssiref'" );
for my $servertag (keys %haveprinted) {
for my $itemname (keys %{$haveprinted{$servertag}}) {
if ( $haveprinted{$servertag}{$itemname} eq $irssiref ) {
debug_print( "window destroyed || removed servertag='$servertag' itemname='$itemname'" );
$haveprinted{$servertag}{$itemname} = '';
}
}
}
};
Irssi::signal_add 'window item moved' => sub {
my ( $to_win, $winitem, $from_win ) = @_;
my $servertag = $winitem->{server}{tag};
my $itemname = $winitem->{name};
debug_print( "window item moved | servertag='$servertag' itemname='$itemname' was='$haveprinted{$servertag}{$itemname}' fromref='$from_win->{_irssi}' toref='$to_win->{_irssi}'" );
$haveprinted{$servertag}{$itemname} = $to_win->{_irssi};
};
Irssi::signal_add 'query nick changed' => sub {
my ( $win, $oldnick ) = @_;
debug_print( "query nick changed | oldnick='$oldnick' newnick='$win->{name}' transferring='$haveprinted{$win->{server}{tag}}{$oldnick}'" );
$haveprinted{$win->{server}{tag}}{$win->{name}} = $haveprinted{$win->{server}{tag}}{$oldnick};
$haveprinted{$win->{server}{tag}}{$oldnick} = '';
};
sub print_tail {
my ( $winitem, $lines ) = @_; # winitem is a channel or query or whatever
return unless $lines > 0;
my $log = get_log_filename( $winitem );
return unless defined $log;
my $winrec = $winitem->window(); # need to print to the window, not the window item
for( tail( $lines, $log ) ) { # sub tail is defined below
s/%/%%/g; # prevent irssi format notation being expanded
$winrec->print( $_, MSGLEVEL_NEVER );
}
$winrec->print( '%K[%Clogresume%n ' . $log . '%K]%n' );
}
sub get_log_filename {
my ( $winitem ) = @_;
my ( $tag, $name ) = ( $winitem->{server}{tag}, $winitem->{name} );
my @logs = map { $_->{real_fname} } grep {
grep {
$_->{name} eq $name and $_->{servertag} eq $tag
} @{ $_->{items} }
} Irssi::logs();
unless( @logs ) {
debug_print( "no logfile for $tag, $name" );
return undef;
}
debug_print( "surplus logfile for $tag, $name: $_" ) for @logs[1..$#logs];
return $logs[0];
}
Irssi::command_bind 'logtail' => sub {
my ( $lines ) = @_;
if ( not $lines =~ /[1-9][0-9]*/ ) {
prettyprint( 'usage: /logtail <number>' );
}
print_tail( Irssi::active_win()->{active}, $lines );
};
# irssi will NOT communicate in any way with the server while the command is running, unless the command returns immediately (e.g. running screen in screen, or backgrounded X11 text editor). So use screen.
# usage: /logview foo bar baz
# will run: foo bar baz filename.log
Irssi::command_bind 'logview' => sub {
my ( $args, $server, $winitem ) = @_;
my $log = get_log_filename( $winitem );
return unless defined $log;
my $pager = $ENV{PAGER} || "less";
my $program = $_[0] || "tmux split-window $pager";
system( split( / /, $program ), $log ) == 0 or do {
if ( $? == -1 ) {
prettyprint( "logview: running command '$program $log' failed: $!" );
} elsif ( $? & 127 ) {
prettyprint( "logview: running command '$program $log' died with signal " . ( $? & 127 ) );
} else {
prettyprint( "logview: running command '$program $log' exited with status " . ( $? >> 8 ) );
}
};
};
sub tail {
my ( $needed_lines, $filename ) = @_;
return unless $needed_lines > 0;
my @lines = ();
sysopen( my $fh, $filename, O_RDONLY ) or return;
binmode $fh;
my $blksize = (stat $fh)[11];
# start at the end of the file
my $pos = sysseek( $fh, 0, SEEK_END ) or return;
# for the first chunk read a trailing partial block, so we start on what's probably a natural disk boundary
# if there's no trailing partial block read a full one
# Also guarantees that $pos will become zero before it becomes negative
$pos -= $pos % $blksize || $blksize;
# - 1 is because $lines[0] is partial
while ( @lines - 1 < $needed_lines ) {
# go to top of this chunk
sysseek( $fh, $pos, SEEK_SET ) or last; # partial output better than none
sysread( $fh, my $buf, $blksize );
last if $!;
# ruin my lovely generic tail function
$buf =~ s/^--- Log.*\n//mg;
if ( @lines ) {
splice @lines, 0, 1, split( /\n/, $buf . $lines[0], -1 );
} else {
@lines = split( /\n/, $buf, -1 );
# unix philosophy (as tail, wc, etc.): trailing newline is not a line for counting purposes
pop @lines if @lines and $lines[-1] eq "";
}
last if $pos == 0;
$pos -= $blksize;
}
return ( $needed_lines >= @lines ? @lines : @lines[ -$needed_lines .. -1 ] );
}

View File

@ -0,0 +1,202 @@
use Irssi;
use strict;
use FileHandle;
use vars qw($VERSION %IRSSI);
$VERSION = "2.1"; # e8934ed1ce04461
%IRSSI = (
authors => 'cdidier',
name => 'tmux_away',
description => 'set (un)away if tmux session is attached/detached',
license => 'GPL v2',
url => 'http://cybione.org',
);
# tmux_away irssi module
#
# Written by Colin Didier <cdidier@cybione.org> and heavily based on
# screen_away irssi module version 0.9.7.1 written by Andreas 'ads' Scherbaum
# <ads@ufp.de>.
#
# Updated by John C. Vernaleo <john@netpurgatory.com> to handle tmux with
# named sessions and other code cleanup and forked as version 2.0.
#
# usage:
#
# put this script into your autorun directory and/or load it with
# /SCRIPT LOAD <name>
#
# there are 5 settings available:
#
# /set tmux_away_active ON/OFF/TOGGLE
# /set tmux_away_repeat <integer>
# /set tmux_away_grace <integer>
# /set tmux_away_message <string>
# /set tmux_away_window <string>
# /set tmux_away_nick <string>
#
# active means that you will be only set away/unaway, if this
# flag is set, default is ON
# repeat is the number of seconds, after the script will check the
# tmux session status again, default is 5 seconds
# grace is the number of seconds, to wait additionally, before
# setting you away, default is disabled (0)
# message is the away message sent to the server, default: not here ...
# window is a window number or name, if set, the script will switch
# to this window, if it sets you away, default is '1'
# nick is the new nick, if the script goes away
# will only be used it not empty
# variables
my $timer_name = undef;
my $away_status = 0;
my %old_nicks = ();
my %away = ();
# Register formats
Irssi::theme_register(
[
'tmux_away_crap',
'{line_start}{hilight ' . $IRSSI{'name'} . ':} $0'
]);
# try to find out if we are running in a tmux session
# (see if $ENV{TMUX} is set)
if (!defined($ENV{TMUX})) {
# just return, we will never be called again
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap',
"no tmux session!");
return;
}
my @args_env = split(',', $ENV{TMUX});
my $tmux_socket = $args_env[0];
# register config variables
Irssi::settings_add_bool('misc', $IRSSI{'name'} . '_active', 1);
Irssi::settings_add_int('misc', $IRSSI{'name'} . '_repeat', 5);
Irssi::settings_add_int('misc', $IRSSI{'name'} . '_grace', 0);
Irssi::settings_add_str('misc', $IRSSI{'name'} . '_message', "not here...");
Irssi::settings_add_str('misc', $IRSSI{'name'} . '_window', "1");
Irssi::settings_add_str('misc', $IRSSI{'name'} . '_nick', "");
# check, set or reset the away status
sub tmux_away {
my ($immediate) = @_;
my ($status, @res);
# only run, if activated
if (Irssi::settings_get_bool($IRSSI{'name'} . '_active') != 1) {
$away_status = 0;
} else {
if ($away_status == 0) {
# display init message at first time
my $grace = Irssi::settings_get_int($IRSSI{'name'} . '_grace');
$grace = ", $grace seconds grace" if $grace;
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap',
"activating $IRSSI{'name'} (interval: " . Irssi::settings_get_int($IRSSI{'name'} . '_repeat') . " seconds$grace)");
$away_status = 2;
}
# get actual tmux session status
chomp(@res = `tmux -S '$tmux_socket' lsc 2>&1`);
chomp(my $tmux_session = `tmux -S '$tmux_socket' display -p '#S' 2>/dev/null`);
if ($res[0] =~ /^server not found/ || $? >> 8) {
die "error getting tmux session status.";
}
$status = 1; # away, assumes the session is detached
foreach (@res) {
my @args_st = split(' ');
if ($args_st[1] eq $tmux_session) {
$status = 2; # unaway
}
}
# unaway -> away
if ($status == 1 and $away_status != 1) {
if (my $grace = Irssi::settings_get_int($IRSSI{'name'} . '_grace')) {
if (!$immediate) {
Irssi::timeout_add_once($grace * 1000, 'tmux_away', '1');
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap',
"(in grace for away: $grace seconds)");
return 1;
}
}
if (length(Irssi::settings_get_str($IRSSI{'name'} . '_window')) > 0) {
# if length of window is greater then 0, make this window active
Irssi::command('window goto ' . Irssi::settings_get_str($IRSSI{'name'} . '_window'));
}
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap', "Set away");
my $message = Irssi::settings_get_str($IRSSI{'name'} . '_message');
if (length($message) == 0) {
# we have to set a message or we wouldnt go away
$message = "not here ...";
}
foreach (Irssi::servers()) {
if (!$_->{usermode_away}) {
# user isn't yet away
$away{$_->{'tag'}} = 0;
$_->command("^AWAY " . ($_->{chat_type} ne 'SILC' ? "-one " : "") . "$message");
if ($_->{chat_type} ne 'XMPP' and length(Irssi::settings_get_str($IRSSI{'name'} . '_nick')) > 0) {
# only change if actual nick isn't already the away nick
if (Irssi::settings_get_str($IRSSI{'name'} . '_nick') ne $_->{nick}) {
# keep old nick
$old_nicks{$_->{'tag'}} = $_->{nick};
# set new nick
$_->command("NICK " . Irssi::settings_get_str($IRSSI{'name'} . '_nick'));
}
}
} else {
# user is already away, remember this
$away{$_->{'tag'}} = 1;
}
}
$away_status = $status;
# away -> unaway
} elsif ($status == 2 and $away_status != 2) {
if (my $grace = Irssi::settings_get_int($IRSSI{'name'} . '_grace')) {
if (!$immediate) {
Irssi::timeout_add_once($grace * 1000, 'tmux_away', '1');
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap',
"(in grace for unaway: $grace seconds)");
return 1;
}
}
# unset away
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap', "Reset away");
foreach (Irssi::servers()) {
if ($away{$_->{'tag'}} == 1) {
# user was already away, don't reset away
$away{$_->{'tag'}} = 0;
next;
}
$_->command("^AWAY" . (($_->{chat_type} ne 'SILC') ? " -one" : "")) if ($_->{usermode_away});
if ($_->{chat_type} ne 'XMPP' and defined($old_nicks{$_->{'tag'}}) and length($old_nicks{$_->{'tag'}}) > 0) {
# set old nick
$_->command("NICK " . $old_nicks{$_->{'tag'}});
$old_nicks{$_->{'tag'}} = "";
}
}
$away_status = $status;
} elsif ($immediate) {
Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'tmux_away_crap',
"in grace aborted");
}
}
# but everytimes install a new timer
register_tmux_away_timer();
return 0;
}
# remove old timer and install a new one
sub register_tmux_away_timer {
# add new timer with new timeout (maybe the timeout has been changed)
Irssi::timeout_add_once(Irssi::settings_get_int($IRSSI{'name'} . '_repeat') * 1000, 'tmux_away', '');
}
# init process
tmux_away();

View File

@ -1,6 +1,7 @@
macro index ir '<sync-mailbox><enter-command>source ~/.mutt/account.net.riseup<enter><change-folder>!<enter>'
macro index it '<sync-mailbox><enter-command>source ~/.mutt/account.sh.ttm<enter><change-folder>!<enter>'
macro index if '<sync-mailbox><enter-command>source ~/.mutt/account.org.bellz<enter><change-folder>!<enter>'
macro index ie '<sync-mailbox><enter-command>source ~/.mutt/account.feesh<enter><change-folder>!<enter>'
folder-hook 'account.net.riseup' 'source ~/.mutt/account.net.riseup'

View File

@ -13,7 +13,7 @@ macro index gs "<change-folder>=Spam<enter>" "Go to Spam"
macro index gS "<change-folder>=Sent<enter>" "Go to Sent"
macro index gd "<change-folder>=Drafts<enter>" "Go to Drafts"
macro index gt "<change-folder>=Trash<enter>" "Go to Trash"
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF-8 > ~/.cache/mutt/mail.html<enter><shell-escape>$BROWSER ~/.cache/mutt/mail.html<enter>"
source ~/.local/share/mutt/gpg.rc
source "gpg -d ~/.mutt/passwords.gpg |"

View File

@ -30,6 +30,7 @@ export TZ='America/New_York'
export GTK_THEME=Materia-dark
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export ZSTD_CLEVEL=19
export CDPATH=:~

View File

@ -19,11 +19,11 @@
}
.splits, .split-last {
font-size: 10pt;
background: #000;
}
.split, .split-last {
color: #99a;
font-family: "Roboto Condensed", "Arial Narrow", sans-serif;
background: #000;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.split, .split .split-time {
@ -82,7 +82,6 @@
text-shadow: 0px 2px 3px rgba(0,0,0,0.65);
color: #4CAF50;
background: #111;
transition: .5s;
}
.timer-millis {
font-size: 12pt;
@ -95,11 +94,9 @@
.losing {
color: #4CAF50;
transition: .5s;
}
.behind {
color: #F44336;
transition: .5s;
}
.footer {
color: #555;

2279
.vim/plugin/AnsiEsc.vim Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
" AnsiEscPlugin.vim
" Author: Charles E. Campbell
" Date: Apr 07, 2010
" Version: 13i
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_AnsiEscPlugin")
finish
endif
let g:loaded_AnsiEscPlugin = "v13i"
let s:keepcpo = &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Public Interface: {{{1
com! -bang -nargs=0 AnsiEsc :call AnsiEsc#AnsiEsc(<bang>0)
au BufReadPost * :call AnsiEsc#BufReadPost()
" DrChip Menu Support: {{{2
if !exists('g:no_drchip_menu') && !exists('g:no_ansiesc_menu')
if has("gui_running") && has("menu") && &go =~ 'm'
if !exists("g:DrChipTopLvlMenu")
let g:DrChipTopLvlMenu= "DrChip."
endif
exe 'menu '.g:DrChipTopLvlMenu.'AnsiEsc.Start<tab>:AnsiEsc :AnsiEsc<cr>'
endif
endif
" ---------------------------------------------------------------------
" Restore: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim: ts=4 fdm=marker

69
.vim/plugin/Artist.vim Normal file
View File

@ -0,0 +1,69 @@
" xfnw's vim artist mode
" loosely based on https://www.reddit.com/r/vim/comments/1mkdhn/
" This is free and unencumbered software released into the public domain.
" For more information, please refer to <http://unlicense.org/>
function! ArtistMode()
syntax off
setlocal virtualedit=all
setlocal cc=80
hi ColorColumn ctermbg=1 guibg=#ff0000
autocmd BufWritePre * :%s/\s\+$//e
nnore <F1> r
nnore <F2> r
nnore <F3> r
nnore <F4> r
nore! <F1>
nore! <F2>
nore! <F3>
nore! <F4>
nnore <F5> r
nnore <F6> r
nnore <F7> r
nnore <F8> r
nore! <F5>
nore! <F6>
nore! <F7>
nore! <F8>
nnore <F9> r
nnore <F10> r
nnore <F11> r
nnore <F12> r
nore! <F9>
nore! <F10>
nore! <F11>
nore! <F12>
nnore gc9 i<Esc>[0m<Esc>l
nnore gc8 i<Esc>[38;5;m<Esc>i
nnore gb9 i<Esc>[0m<Esc>l
nnore gb8 i<Esc>[48;5;m<Esc>i
nnore gc0 i<Esc>[30m<Esc>l
nnore gc1 i<Esc>[31m<Esc>l
nnore gc2 i<Esc>[32m<Esc>l
nnore gc3 i<Esc>[33m<Esc>l
nnore gc4 i<Esc>[34m<Esc>l
nnore gc5 i<Esc>[35m<Esc>l
nnore gc6 i<Esc>[36m<Esc>l
nnore gc7 i<Esc>[37m<Esc>l
nnore gb0 i<Esc>[90m<Esc>l
nnore gb1 i<Esc>[91m<Esc>l
nnore gb2 i<Esc>[92m<Esc>l
nnore gb3 i<Esc>[93m<Esc>l
nnore gb4 i<Esc>[94m<Esc>l
nnore gb5 i<Esc>[95m<Esc>l
nnore gb6 i<Esc>[96m<Esc>l
nnore gb7 i<Esc>[97m<Esc>l
endfunction
command! Artist call ArtistMode()

538
.vim/plugin/cecutil.vim Normal file
View File

@ -0,0 +1,538 @@
" cecutil.vim : save/restore window position
" save/restore mark position
" save/restore selected user maps
" Author: Charles E. Campbell
" Version: 18i ASTRO-ONLY
" Date: Oct 21, 2013
"
" Saving Restoring Destroying Marks: {{{1
" call SaveMark(markname) let savemark= SaveMark(markname)
" call RestoreMark(markname) call RestoreMark(savemark)
" call DestroyMark(markname)
" commands: SM RM DM
"
" Saving Restoring Destroying Window Position: {{{1
" call SaveWinPosn() let winposn= SaveWinPosn()
" call RestoreWinPosn() call RestoreWinPosn(winposn)
" \swp : save current window/buffer's position
" \rwp : restore current window/buffer's previous position
" commands: SWP RWP
"
" Saving And Restoring User Maps: {{{1
" call SaveUserMaps(mapmode,maplead,mapchx,suffix)
" call RestoreUserMaps(suffix)
"
" GetLatestVimScripts: 1066 1 :AutoInstall: cecutil.vim
"
" You believe that God is one. You do well. The demons also {{{1
" believe, and shudder. But do you want to know, vain man, that
" faith apart from works is dead? (James 2:19,20 WEB)
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_cecutil")
finish
endif
let g:loaded_cecutil = "v18i"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn
" =======================
" Public Interface: {{{1
" =======================
" ---------------------------------------------------------------------
" Map Interface: {{{2
if !exists('g:no_plugin_maps') && !exists('g:no_cecutil_maps')
if !hasmapto('<Plug>SaveWinPosn')
map <unique> <Leader>swp <Plug>SaveWinPosn
endif
if !hasmapto('<Plug>RestoreWinPosn')
map <unique> <Leader>rwp <Plug>RestoreWinPosn
endif
endif
nmap <silent> <Plug>SaveWinPosn :call SaveWinPosn()<CR>
nmap <silent> <Plug>RestoreWinPosn :call RestoreWinPosn()<CR>
" ---------------------------------------------------------------------
" Command Interface: {{{2
com! -bar -nargs=0 SWP call SaveWinPosn()
com! -bar -nargs=? RWP call RestoreWinPosn(<args>)
com! -bar -nargs=1 SM call SaveMark(<q-args>)
com! -bar -nargs=1 RM call RestoreMark(<q-args>)
com! -bar -nargs=1 DM call DestroyMark(<q-args>)
com! -bar -nargs=1 WLR call s:WinLineRestore(<q-args>)
if v:version < 630
let s:modifier= "sil! "
else
let s:modifier= "sil! keepj "
endif
" ===============
" Functions: {{{1
" ===============
" ---------------------------------------------------------------------
" SaveWinPosn: {{{2
" let winposn= SaveWinPosn() will save window position in winposn variable
" call SaveWinPosn() will save window position in b:cecutil_winposn{b:cecutil_iwinposn}
" let winposn= SaveWinPosn(0) will *only* save window position in winposn variable (no stacking done)
fun! SaveWinPosn(...)
" echomsg "Decho: SaveWinPosn() a:0=".a:0
if line("$") == 1 && getline(1) == ""
" echomsg "Decho: SaveWinPosn : empty buffer"
return ""
endif
let so_keep = &l:so
let siso_keep = &siso
let ss_keep = &l:ss
setlocal so=0 siso=0 ss=0
let swline = line(".") " save-window line in file
let swcol = col(".") " save-window column in file
if swcol >= col("$")
let swcol= swcol + virtcol(".") - virtcol("$") " adjust for virtual edit (cursor past end-of-line)
endif
let swwline = winline() - 1 " save-window window line
let swwcol = virtcol(".") - wincol() " save-window window column
let savedposn = ""
" echomsg "Decho: sw[".swline.",".swcol."] sww[".swwline.",".swwcol."]"
let savedposn = "call GoWinbufnr(".winbufnr(0).")"
let savedposn = savedposn."|".s:modifier.swline
let savedposn = savedposn."|".s:modifier."norm! 0z\<cr>"
if swwline > 0
let savedposn= savedposn.":".s:modifier."call s:WinLineRestore(".(swwline+1).")\<cr>"
endif
if swwcol > 0
let savedposn= savedposn.":".s:modifier."norm! 0".swwcol."zl\<cr>"
endif
let savedposn = savedposn.":".s:modifier."call cursor(".swline.",".swcol.")\<cr>"
" save window position in
" b:cecutil_winposn_{iwinposn} (stack)
" only when SaveWinPosn() is used
if a:0 == 0
if !exists("b:cecutil_iwinposn")
let b:cecutil_iwinposn= 1
else
let b:cecutil_iwinposn= b:cecutil_iwinposn + 1
endif
" echomsg "Decho: saving posn to SWP stack"
let b:cecutil_winposn{b:cecutil_iwinposn}= savedposn
endif
let &l:so = so_keep
let &siso = siso_keep
let &l:ss = ss_keep
" if exists("b:cecutil_iwinposn") " Decho
" echomsg "Decho: b:cecutil_winpos{".b:cecutil_iwinposn."}[".b:cecutil_winposn{b:cecutil_iwinposn}."]"
" else " Decho
" echomsg "Decho: b:cecutil_iwinposn doesn't exist"
" endif " Decho
" echomsg "Decho: SaveWinPosn [".savedposn."]"
return savedposn
endfun
" ---------------------------------------------------------------------
" RestoreWinPosn: {{{2
" call RestoreWinPosn()
" call RestoreWinPosn(winposn)
fun! RestoreWinPosn(...)
" echomsg "Decho: RestoreWinPosn() a:0=".a:0
" echomsg "Decho: getline(1)<".getline(1).">"
" echomsg "Decho: line(.)=".line(".")
if line("$") == 1 && getline(1) == ""
" echomsg "Decho: RestoreWinPosn : empty buffer"
return ""
endif
let so_keep = &l:so
let siso_keep = &l:siso
let ss_keep = &l:ss
setlocal so=0 siso=0 ss=0
if a:0 == 0 || a:1 == ""
" use saved window position in b:cecutil_winposn{b:cecutil_iwinposn} if it exists
if exists("b:cecutil_iwinposn") && exists("b:cecutil_winposn{b:cecutil_iwinposn}")
" echomsg "Decho: using stack b:cecutil_winposn{".b:cecutil_iwinposn."}<".b:cecutil_winposn{b:cecutil_iwinposn}.">"
try
exe s:modifier.b:cecutil_winposn{b:cecutil_iwinposn}
catch /^Vim\%((\a\+)\)\=:E749/
" ignore empty buffer error messages
endtry
" normally drop top-of-stack by one
" but while new top-of-stack doesn't exist
" drop top-of-stack index by one again
if b:cecutil_iwinposn >= 1
unlet b:cecutil_winposn{b:cecutil_iwinposn}
let b:cecutil_iwinposn= b:cecutil_iwinposn - 1
while b:cecutil_iwinposn >= 1 && !exists("b:cecutil_winposn{b:cecutil_iwinposn}")
let b:cecutil_iwinposn= b:cecutil_iwinposn - 1
endwhile
if b:cecutil_iwinposn < 1
unlet b:cecutil_iwinposn
endif
endif
else
echohl WarningMsg
echomsg "***warning*** need to SaveWinPosn first!"
echohl None
endif
else " handle input argument
" echomsg "Decho: using input a:1<".a:1.">"
" use window position passed to this function
exe a:1
" remove a:1 pattern from b:cecutil_winposn{b:cecutil_iwinposn} stack
if exists("b:cecutil_iwinposn")
let jwinposn= b:cecutil_iwinposn
while jwinposn >= 1 " search for a:1 in iwinposn..1
if exists("b:cecutil_winposn{jwinposn}") " if it exists
if a:1 == b:cecutil_winposn{jwinposn} " and the pattern matches
unlet b:cecutil_winposn{jwinposn} " unlet it
if jwinposn == b:cecutil_iwinposn " if at top-of-stack
let b:cecutil_iwinposn= b:cecutil_iwinposn - 1 " drop stacktop by one
endif
endif
endif
let jwinposn= jwinposn - 1
endwhile
endif
endif
" Seems to be something odd: vertical motions after RWP
" cause jump to first column. The following fixes that.
" Note: was using wincol()>1, but with signs, a cursor
" at column 1 yields wincol()==3. Beeping ensued.
let vekeep= &ve
set ve=all
if virtcol('.') > 1
exe s:modifier."norm! hl"
elseif virtcol(".") < virtcol("$")
exe s:modifier."norm! lh"
endif
let &ve= vekeep
let &l:so = so_keep
let &l:siso = siso_keep
let &l:ss = ss_keep
" echomsg "Decho: RestoreWinPosn"
endfun
" ---------------------------------------------------------------------
" s:WinLineRestore: {{{2
fun! s:WinLineRestore(swwline)
" echomsg "Decho: s:WinLineRestore(swwline=".a:swwline.")"
while winline() < a:swwline
let curwinline= winline()
exe s:modifier."norm! \<c-y>"
if curwinline == winline()
break
endif
endwhile
" echomsg "Decho: s:WinLineRestore"
endfun
" ---------------------------------------------------------------------
" GoWinbufnr: go to window holding given buffer (by number) {{{2
" Prefers current window; if its buffer number doesn't match,
" then will try from topleft to bottom right
fun! GoWinbufnr(bufnum)
" call Dfunc("GoWinbufnr(".a:bufnum.")")
if winbufnr(0) == a:bufnum
" call Dret("GoWinbufnr : winbufnr(0)==a:bufnum")
return
endif
winc t
let first=1
while winbufnr(0) != a:bufnum && (first || winnr() != 1)
winc w
let first= 0
endwhile
" call Dret("GoWinbufnr")
endfun
" ---------------------------------------------------------------------
" SaveMark: sets up a string saving a mark position. {{{2
" For example, SaveMark("a")
" Also sets up a global variable, g:savemark_{markname}
fun! SaveMark(markname)
" call Dfunc("SaveMark(markname<".a:markname.">)")
let markname= a:markname
if strpart(markname,0,1) !~ '\a'
let markname= strpart(markname,1,1)
endif
" call Decho("markname=".markname)
let lzkeep = &lz
set lz
if 1 <= line("'".markname) && line("'".markname) <= line("$")
let winposn = SaveWinPosn(0)
exe s:modifier."norm! `".markname
let savemark = SaveWinPosn(0)
let g:savemark_{markname} = savemark
let savemark = markname.savemark
call RestoreWinPosn(winposn)
else
let g:savemark_{markname} = ""
let savemark = ""
endif
let &lz= lzkeep
" call Dret("SaveMark : savemark<".savemark.">")
return savemark
endfun
" ---------------------------------------------------------------------
" RestoreMark: {{{2
" call RestoreMark("a") -or- call RestoreMark(savemark)
fun! RestoreMark(markname)
" call Dfunc("RestoreMark(markname<".a:markname.">)")
if strlen(a:markname) <= 0
" call Dret("RestoreMark : no such mark")
return
endif
let markname= strpart(a:markname,0,1)
if markname !~ '\a'
" handles 'a -> a styles
let markname= strpart(a:markname,1,1)
endif
" call Decho("markname=".markname." strlen(a:markname)=".strlen(a:markname))
let lzkeep = &lz
set lz
let winposn = SaveWinPosn(0)
if strlen(a:markname) <= 2
if exists("g:savemark_{markname}") && strlen(g:savemark_{markname}) != 0
" use global variable g:savemark_{markname}
" call Decho("use savemark list")
call RestoreWinPosn(g:savemark_{markname})
exe "norm! m".markname
endif
else
" markname is a savemark command (string)
" call Decho("use savemark command")
let markcmd= strpart(a:markname,1)
call RestoreWinPosn(markcmd)
exe "norm! m".markname
endif
call RestoreWinPosn(winposn)
let &lz = lzkeep
" call Dret("RestoreMark")
endfun
" ---------------------------------------------------------------------
" DestroyMark: {{{2
" call DestroyMark("a") -- destroys mark
fun! DestroyMark(markname)
" call Dfunc("DestroyMark(markname<".a:markname.">)")
" save options and set to standard values
let reportkeep= &report
let lzkeep = &lz
set lz report=10000
let markname= strpart(a:markname,0,1)
if markname !~ '\a'
" handles 'a -> a styles
let markname= strpart(a:markname,1,1)
endif
" call Decho("markname=".markname)
let curmod = &mod
let winposn = SaveWinPosn(0)
1
let lineone = getline(".")
exe "k".markname
d
put! =lineone
let &mod = curmod
call RestoreWinPosn(winposn)
" restore options to user settings
let &report = reportkeep
let &lz = lzkeep
" call Dret("DestroyMark")
endfun
" ---------------------------------------------------------------------
" QArgSplitter: to avoid \ processing by <f-args>, <q-args> is needed. {{{2
" However, <q-args> doesn't split at all, so this one returns a list
" with splits at all whitespace (only!), plus a leading length-of-list.
" The resulting list: qarglist[0] corresponds to a:0
" qarglist[i] corresponds to a:{i}
fun! QArgSplitter(qarg)
" call Dfunc("QArgSplitter(qarg<".a:qarg.">)")
let qarglist = split(a:qarg)
let qarglistlen = len(qarglist)
let qarglist = insert(qarglist,qarglistlen)
" call Dret("QArgSplitter ".string(qarglist))
return qarglist
endfun
" ---------------------------------------------------------------------
" ListWinPosn: {{{2
"fun! ListWinPosn() " Decho
" if !exists("b:cecutil_iwinposn") || b:cecutil_iwinposn == 0 " Decho
" call Decho("nothing on SWP stack") " Decho
" else " Decho
" let jwinposn= b:cecutil_iwinposn " Decho
" while jwinposn >= 1 " Decho
" if exists("b:cecutil_winposn{jwinposn}") " Decho
" call Decho("winposn{".jwinposn."}<".b:cecutil_winposn{jwinposn}.">") " Decho
" else " Decho
" call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho
" endif " Decho
" let jwinposn= jwinposn - 1 " Decho
" endwhile " Decho
" endif " Decho
"endfun " Decho
"com! -nargs=0 LWP call ListWinPosn() " Decho
" ---------------------------------------------------------------------
" SaveUserMaps: this function sets up a script-variable (s:restoremap) {{{2
" which can be used to restore user maps later with
" call RestoreUserMaps()
"
" mapmode - see :help maparg for details (n v o i c l "")
" ex. "n" = Normal
" The letters "b" and "u" are optional prefixes;
" The "u" means that the map will also be unmapped
" The "b" means that the map has a <buffer> qualifier
" ex. "un" = Normal + unmapping
" ex. "bn" = Normal + <buffer>
" ex. "bun" = Normal + <buffer> + unmapping
" ex. "ubn" = Normal + <buffer> + unmapping
" maplead - see mapchx
" mapchx - "<something>" handled as a single map item.
" ex. "<left>"
" - "string" a string of single letters which are actually
" multiple two-letter maps (using the maplead:
" maplead . each_character_in_string)
" ex. maplead="\" and mapchx="abc" saves user mappings for
" \a, \b, and \c
" Of course, if maplead is "", then for mapchx="abc",
" mappings for a, b, and c are saved.
" - :something handled as a single map item, w/o the ":"
" ex. mapchx= ":abc" will save a mapping for "abc"
" suffix - a string unique to your plugin
" ex. suffix= "DrawIt"
fun! SaveUserMaps(mapmode,maplead,mapchx,suffix)
" call Dfunc("SaveUserMaps(mapmode<".a:mapmode."> maplead<".a:maplead."> mapchx<".a:mapchx."> suffix<".a:suffix.">)")
if !exists("s:restoremap_{a:suffix}")
" initialize restoremap_suffix to null string
let s:restoremap_{a:suffix}= ""
endif
" set up dounmap: if 1, then save and unmap (a:mapmode leads with a "u")
" if 0, save only
let mapmode = a:mapmode
let dounmap = 0
let dobuffer = ""
while mapmode =~ '^[bu]'
if mapmode =~ '^u'
let dounmap = 1
let mapmode = strpart(a:mapmode,1)
elseif mapmode =~ '^b'
let dobuffer = "<buffer> "
let mapmode = strpart(a:mapmode,1)
endif
endwhile
" call Decho("dounmap=".dounmap." dobuffer<".dobuffer.">")
" save single map :...something...
if strpart(a:mapchx,0,1) == ':'
" call Decho("save single map :...something...")
let amap= strpart(a:mapchx,1)
if amap == "|" || amap == "\<c-v>"
let amap= "\<c-v>".amap
endif
let amap = a:maplead.amap
let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:sil! ".mapmode."unmap ".dobuffer.amap
if maparg(amap,mapmode) != ""
let maprhs = substitute(maparg(amap,mapmode),'|','<bar>','ge')
let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:".mapmode."map ".dobuffer.amap." ".maprhs
endif
if dounmap
exe "sil! ".mapmode."unmap ".dobuffer.amap
endif
" save single map <something>
elseif strpart(a:mapchx,0,1) == '<'
" call Decho("save single map <something>")
let amap = a:mapchx
if amap == "|" || amap == "\<c-v>"
let amap= "\<c-v>".amap
" call Decho("amap[[".amap."]]")
endif
let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|sil! ".mapmode."unmap ".dobuffer.amap
if maparg(a:mapchx,mapmode) != ""
let maprhs = substitute(maparg(amap,mapmode),'|','<bar>','ge')
let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".dobuffer.amap." ".maprhs
endif
if dounmap
exe "sil! ".mapmode."unmap ".dobuffer.amap
endif
" save multiple maps
else
" call Decho("save multiple maps")
let i= 1
while i <= strlen(a:mapchx)
let amap= a:maplead.strpart(a:mapchx,i-1,1)
if amap == "|" || amap == "\<c-v>"
let amap= "\<c-v>".amap
endif
let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|sil! ".mapmode."unmap ".dobuffer.amap
if maparg(amap,mapmode) != ""
let maprhs = substitute(maparg(amap,mapmode),'|','<bar>','ge')
let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".dobuffer.amap." ".maprhs
endif
if dounmap
exe "sil! ".mapmode."unmap ".dobuffer.amap
endif
let i= i + 1
endwhile
endif
" call Dret("SaveUserMaps : restoremap_".a:suffix.": ".s:restoremap_{a:suffix})
endfun
" ---------------------------------------------------------------------
" RestoreUserMaps: {{{2
" Used to restore user maps saved by SaveUserMaps()
fun! RestoreUserMaps(suffix)
" call Dfunc("RestoreUserMaps(suffix<".a:suffix.">)")
if exists("s:restoremap_{a:suffix}")
let s:restoremap_{a:suffix}= substitute(s:restoremap_{a:suffix},'|\s*$','','e')
if s:restoremap_{a:suffix} != ""
" call Decho("exe ".s:restoremap_{a:suffix})
exe "sil! ".s:restoremap_{a:suffix}
endif
unlet s:restoremap_{a:suffix}
endif
" call Dret("RestoreUserMaps")
endfun
" ==============
" Restore: {{{1
" ==============
let &cpo= s:keepcpo
unlet s:keepcpo
" ================
" Modelines: {{{1
" ================
" vim: ts=4 fdm=marker

3
.vim/templates/bib.tex Normal file
View File

@ -0,0 +1,3 @@
\usepackage[backend=biber, style=nature]{biblatex}
\addbibresource{refs.bib}

View File

@ -2,14 +2,21 @@
\usepackage[letterpaper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[tagged, highstructure]{accessibility}
\usepackage{caption}
\usepackage[pdfa, hidelinks]{hyperref}
\usepackage{graphicx}
\usepackage[a-3b]{pdfx}
\pdfpageattr{/StructParents 0/Tabs/S}
\graphicspath{ {./images/} }
\captionsetup{labelformat=empty}
\title{}
\author{}
\date{}
\date{\today}
\begin{document}
\maketitle

View File

@ -12,14 +12,9 @@
.Sh DESCRIPTION
.
.Sh OPTIONS
.Bl -tag -width Ds
.El
.Sh AUTHORS
.An xfnw Aq Mt xfnw@riseup.net
.
.Sh BUGS
please report any bugs found to
.Lk
.
.Sh AUTHORS
.An xfnw Aq Mt xfnw@riseup.net

View File

@ -1,120 +0,0 @@
:root {
--ansi0: #161510;
--ansi1: #A32810;
--ansi2: #727A18;
--ansi3: #A37720;
--ansi4: #3D6266;
--ansi5: #7A4955;
--ansi6: #557A55;
--ansi7: #8E8463;
--ansi8: #4C4635;
--ansi9: #CC3214;
--ansi10: #8E991E;
--ansi11: #CC9528;
--ansi12: #4C7B7F;
--ansi13: #995B6B;
--ansi14: #6B996B;
--ansi15: #CCBC8E;
--ansi16: #14130E;
--ansi17: #B7A980;
--ansi18: #CCBC8E;
--ansi19: #A34110;
--ansi20: #72694F;
}
.fg0 { color: var(--ansi0); }
.bg0 { background-color: var(--ansi0); }
.fg1 { color: var(--ansi1); }
.bg1 { background-color: var(--ansi1); }
.fg2 { color: var(--ansi2); }
.bg2 { background-color: var(--ansi2); }
.fg3 { color: var(--ansi3); }
.bg3 { background-color: var(--ansi3); }
.fg4 { color: var(--ansi4); }
.bg4 { background-color: var(--ansi4); }
.fg5 { color: var(--ansi5); }
.bg5 { background-color: var(--ansi5); }
.fg6 { color: var(--ansi6); }
.bg6 { background-color: var(--ansi6); }
.fg7 { color: var(--ansi7); }
.bg7 { background-color: var(--ansi7); }
.fg8 { color: var(--ansi8); }
.bg8 { background-color: var(--ansi8); }
.fg9 { color: var(--ansi9); }
.bg9 { background-color: var(--ansi9); }
.fg10 { color: var(--ansi10); }
.bg10 { background-color: var(--ansi10); }
.fg11 { color: var(--ansi11); }
.bg11 { background-color: var(--ansi11); }
.fg12 { color: var(--ansi12); }
.bg12 { background-color: var(--ansi12); }
.fg13 { color: var(--ansi13); }
.bg13 { background-color: var(--ansi13); }
.fg14 { color: var(--ansi14); }
.bg14 { background-color: var(--ansi14); }
.fg15 { color: var(--ansi15); }
.bg15 { background-color: var(--ansi15); }
.fg16 { color: var(--ansi16); }
.bg16 { background-color: var(--ansi16); }
.fg17 { color: var(--ansi17); }
.bg17 { background-color: var(--ansi17); }
.fg18 { color: var(--ansi18); }
.bg18 { background-color: var(--ansi18); }
.fg19 { color: var(--ansi19); }
.bg19 { background-color: var(--ansi19); }
.fg20 { color: var(--ansi20); }
.bg20 { background-color: var(--ansi20); }
table.head, table.foot { width: 100%; }
td.head-rtitle, td.foot-os { text-align: right; }
td.head-vol { text-align: center; }
div.Pp { margin: 1ex 0ex; }
div.Nd, div.Bf, div.Op { display: inline; }
span.Pa, span.Ad { font-style: italic; }
span.Ms { font-weight: bold; }
dl.Bl-diag > dt { font-weight: bold; }
code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
code.Cd { font-weight: bold; font-family: inherit; }
table { border-collapse: collapse; }
table.Nm code.Nm { padding-right: 1ch; }
table.foot { margin-top: 1em; }
html {
line-height: 1.25em;
font-family: monospace;
background-color: var(--ansi16);
color: var(--ansi17);
-moz-tab-size: 4;
tab-size: 4;
}
body {
max-width: 80ch;
margin: 1em auto;
padding: 0 1ch;
}
ul.index { padding: 0; }
ul.index li {
display: inline;
list-style-type: none;
}
a { color: var(--ansi4); }
a:visited { color: var(--ansi5); }
a.permalink, a.tag {
color: var(--ansi3);
text-decoration: none;
}
a.permalink code:target,
h1.Sh:target a.permalink,
h2.Ss:target a.permalink,
a.tag:target {
color: var(--ansi11);
outline: none;
}
.hilex.Keyword { color: var(--ansi7); }
.hilex.Macro { color: var(--ansi2); }
.hilex.Comment { color: var(--ansi4); }
.hilex.String { color: var(--ansi6); }
.hilex.StringFormat { color: var(--ansi14); }
.hilex.Interpolation { color: var(--ansi1); }

View File

@ -38,7 +38,7 @@
td.head-vol { text-align: center; }
div.Pp { margin: 1ex 0ex; }
div.Nd, div.Bf, div.Op { display: inline; }
div.Bd-indent, section.Ss { margin-left: 6ch; }
div.Bd-indent { margin-left: 6ch; }
span.Pa, span.Ad { font-style: italic; }
span.Ms { font-weight: bold; }
dl.Bl-diag dt { font-weight: bold; }

View File

@ -1,2 +0,0 @@
<link rel="stylesheet" href="///home/ltc/Documents/assets/mvp.css">

View File

@ -1,4 +1,4 @@
Copyright (c) 2022
Copyright (c) 2023
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,25 +1,25 @@
" some custom commands
"
" insert mom templates
" insert templates
command Tmomc :r ~/.vim/templates/chapter.mom
command Tmomg :r ~/.vim/templates/general.mom
command Tmomr :r ~/.vim/templates/recipe.mom
command Tmome :r ~/.vim/templates/english.mom
command Tmd :r ~/.vim/templates/md.html
command Tman :r ~/.vim/templates/man.1
command Tmh :r ~/.vim/templates/man.html
command Ttex :r ~/.vim/templates/general.tex
command Tbib :r ~/.vim/templates/bib.tex
command Tmit :r ~/.vim/templates/mit
command Tuni :r ~/.vim/templates/uni
" run groff+refer on file
command Groff :w|!sh -c 'p="%"; refer -PS -e -p ~/Documents/bib ${p::-4}.mom | groff -mom -Tpdf > ${p::-4}.pdf'
command Grofft :w|!sh -c 'p="%"; refer -PS -e -p ~/Documents/bib ${p::-4}.mom | groff -mom -T ascii | sed -b "s/\x1b[^m]*m//g" > ${p::-4}.txt'
command Man :w|!sh -c 'p="%"; mandoc -T html "$p" | tail -n +17 | cat ~/.vim/templates/man.html - > "$p".html'
command Tex :w|!sh -c 'p="%"; pdflatex "$p"'
command Bib :w|!sh -c 'p="%"; biber "${p::-4}"'
command Man :w|!sh -c 'p="%"; mandoc -T html -O man=\%N.\%S.html "$p" | awk "f;/<\/style>/{f=1}" | cat ~/.vim/templates/man.html - > "$p".html'
command TexCmp :silent !sh -c 'p="%"; pdflatex "$p"'
command Tex :w|exe 'TexCmp'|redraw!
command BibCmp :silent !sh -c 'p="%"; biber "${p::-4}"'
command Bib :w|exe 'TexCmp'|exe 'BibCmp'|exe 'TexCmp'|exe 'TexCmp'|redraw!
command Md :w|!sh -c 'p="%"; cmark --unsafe ${p::-3}.md | h2p - ${p::-3}.pdf'
" nice line numbers
@ -49,7 +49,7 @@ set hidden " Hide buffers when they are abandoned
set mouse=a " Enable mouse usage (all modes)
" fmt stuffs
set textwidth=60
set textwidth=70
set formatoptions-=t
" 2 space tabbing for nix files
@ -60,3 +60,13 @@ if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
nnore gbd o\begin{dialogue}{}<Return>\end{dialogue}<Esc>kf{a
nnore gbm o\begin{multicols}{}<Return>\end{multicols}<Esc>kf{a
nnore gbD o\begin{dialogue}[]{}<Return>\end{dialogue}<Esc>kf[a
nnore gbe o\begin{enumerate}[]<Return>\end{enumerate}<Esc>kf[a
nnore gbf o\begin{figure}[]<Return>\end{figure}<Esc>kf[a
nnore gbv o\begin{verbatim}<Return>\end{verbatim}<Esc>O
nnore gbM o\begin{bmatrix}<Return>\end{bmatrix}<Esc>O
nnore gbi o\begin{itemize}<Return>\end{itemize}<Esc>O
nnore gbc o\begin{center}<Return>\end{center}<Esc>O

65
.zshrc
View File

@ -1,32 +1,48 @@
# The following lines were added by compinstall
#zstyle ':completion:*' completer _complete _ignored
#zstyle ':completion:*' menu select=long
#zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
#zstyle :compinstall filename '/home/ltc/.zshrc'
#
#[status]
# showUntrackedFiles = no
plot() { gnuplot -p -e 'set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col='$1'] "< cat -" using '$2':col title "'$4'" with '$3' lw 2 pt 7' ; }
smoothplot() { gnuplot -p -e 'set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col='$1'] "< cat -" using '$2':col smooth cspline title "'$4'" with '$3' lw 2 pt 7' ; }
plot() { gnuplot -p -e 'set object rectangle from screen -1,-1 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col='$1'] "< cat -" using '$2':col title "'$4'" with '$3' lw 2 pt 7' ; }
smoothplot() { gnuplot -p -e 'set object rectangle from screen -1,-1 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col='$1'] "< cat -" using '$2':col smooth cspline title "'$4'" with '$3' lw 2 pt 7' ; }
calcpi() { echo "scale=$1; 16*a(1/5)-4*a(1/239)" | bc -l ; }
vhsify() { ffmpeg -i "$1" -vf fps=24,scale="(iw*sar)*max(640/(iw*sar)\,480/ih):ih*max(640/(iw*sar)\,480/ih)",crop=640:480,setsar=1:1,convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2",curves="0/0 0.5/0.58 1/1",rgbashift=rh=-1:gh=1 -preset veryfast -c:a copy "$2" }
deshake() { ffmpeg -i "$1" -vf "format=rgb24,split[a][b];[a]deshake=rx=64:ry=64:edge=0,colorkey=0x008000:blend=0:similarity=.2[a];[b]drawbox=color=black:t=fill[b];[b][a]overlay" -c:a copy "$2" "$3" "$4"}
datamosh() { ffmpeg -i "$1" -c copy -bsf:v noise=drop='gt(pts/tb\,30)*key' "$2" }
calcbd() { echo "h=sqrt($1*2*l(2))+1; scale=0; h/1" | bc -l ; }
vhsify() { ffmpeg -i "$1" -vf fps=24,scale="(iw*sar)*max(640/(iw*sar)\,480/ih):ih*max(640/(iw*sar)\,480/ih)",crop=640:480,setsar=1:1,convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2",curves="0/0 0.5/0.58 1/1",rgbashift=rh=-1:gh=1 -preset veryfast -c:a copy "$2" ; }
deshake() { ffmpeg -i "$1" -vf "format=rgb24,split[a][b];[a]deshake=rx=64:ry=64:edge=0,colorkey=0x008000:blend=0:similarity=.2[a];[b]drawbox=color=black:t=fill[b];[b][a]overlay" -c:a copy "$2" ; }
ffdiff() { ffmpeg -i "$1" -preset ultrafast -tune zerolatency -c:a "${3:-copy}" -filter_complex "color=black,format=yuv410p[color];format=yuva444p,split[diff][out];[diff]tblend=all_expr='if(eq(A,B),0,A)',geq=lum='p(X,Y)':a='if(eq(lum(X,Y)+cb(X,Y)+cr(X,Y),0),0,255)',alphaextract[diff];[out]trim=start_frame=1[out];[out][diff]alphamerge[out];[color][out]scale2ref[color][out];[color][out]overlay=format=auto:shortest=1,setsar=1" -vsync vfr "$2" ; }
datamosh() { ffmpeg -i "$1" -c copy -bsf:v noise=drop='gt(pts/tb\,30)*key' "$2" ; }
dither() { convert "$1" -filter box -resize 700 -ordered-dither o4x4,2 "$2" ; }
ditherc() { convert "$1" -colorspace RGB -filter box -resize 700 -ordered-dither o4x4,2 -colorspace sRGB "$2" ; }
9serve() { socat TCP-LISTEN:"$1",reuseaddr,fork SYSTEM:"9pex $2" ; }
unidec() { echo -n "$@" | uniname -bcpe | tail -n +2 | awk -F' ' '{gsub("^0*","",$1); printf "U+%s %s (%s)\n",$1,$5,$2}' ; }
base58gen() { echo $(base64 /dev/urandom | tr -d "\n/+Il0O$2" | head -c ${$(($1/5.*8+1))%.*}) }
base58gen() { echo $(base64 /dev/urandom | tr -d "\n/+Il0O$2" | head -c ${$(($1/5.*8+1))%.*}) ; }
vid() { echo "VULP$(base64 /dev/urandom | tr -d "\n/+I0Oa-z" | head -c 17)" ; }
tuch() { touch "$@" ; chmod 755 "$@" ; ${EDITOR:-vim} "$@" ; }
rot13() { tr 'a-zA-Z' 'n-za-mN-ZA-M' ; }
meili() { curl -X POST "http://$1:7700/indexes/$2?$3" -H 'Content-Type: application/json' --data-binary @- ; }
meiliset() { curl -X PATCH "http://$1:7700/indexes/$2/settings" -H 'Content-Type: application/json' --data-binary @- ; }
meilit() { curl "http://$1:7700/tasks/$2" ; }
alias hexcat="catgirl -h irc.libera.chat -n xfnwtest -ec cert.pem -u"
alias warc="wget -rpkm --warc-cdx --warc-file"
alias ytdl="yt-dlp --extract-audio --audio-format mp3"
alias mpvferret="mpv --config=no --quiet --vo=tct --lavfi-complex='[aid1]asplit[ao][a1];[a1]avectorscope=r=25:m=lissajous_xy:bc=100:gc=100:rc=75:bf=5:gf=3:rf=1:mirror=y:zoom=1[vo]'"
alias mpvcqt="mpv --config=no --lavfi-complex='[aid1]asplit[ao][a1];[a1]showcqt=r=25[vo]'"
alias mpvscope="mpv --config=no --alpha=no --lavfi-complex='[aid1]asplit[ao][a1];[a1]avectorscope=r=25:m=lissajous_xy:bc=100:gc=100:rc=75:bf=255:gf=80:rf=255:mirror=y:draw=line:zoom=1[vo]'"
alias mpvscopedot="mpv --config=no --alpha=no --lavfi-complex='[aid1]asplit[ao][a1];[a1]avectorscope=r=25:m=lissajous_xy:bc=100:gc=100:rc=75:bf=255:gf=80:rf=255:mirror=y:zoom=1[vo]'"
alias ssk="ssh-keygen -l -f ~/.ssh/known_hosts | grep"
alias qqemu="qemu-system-x86_64 -display gtk,zoom-to-fit=on -nic user -hdd"
alias gitversion='printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"'
alias gitpretty='git log --graph --pretty="%Cred%h%Creset %Cblue%G?%Creset %C(green)%an <%ae> %C(white)%ar%Creset%Cred% D%Creset%n%w(50,1,1)%B"'
alias raged="rage -i ~/.age/private -d"
alias sshemacs="ssh -R ~/.sshemacs:${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/emacs/server"
alias cch="cppcheck --enable=all --suppress=missingIncludeSystem ."
alias ahex='hexdump -e '"'"'"%4.4_ax:" 8/1 "%3.1X" "\n"'"'"
alias after="at now +"
alias ddiff="datediff -f '%d days, %H hours, %M minutes, %S seconds'"
alias m='eval $(xdotool getmouselocation --shell)'
alias tess='tesseract ~/Pictures/scrot/$(ls -t ~/Pictures/scrot | head -n1) -'
alias ncdu='ncdu --color off'
alias sydi="sudo"
alias rn="rm -i"
@ -38,6 +54,8 @@ alias rn="rm -i"
HISTFILE=~/.zsh_history
HISTSIZE=10000000
SAVEHIST=10000000
WORDCHARS='*?_-.[]~=&#$%^(){}<>'
setopt autocd
unsetopt nomatch
bindkey -v
@ -46,12 +64,6 @@ bindkey -v
# why wont it run my profile lol
source ~/.profile
#f1# are we running within an utf environment?
function isutfenv () {
case "$LANG $CHARSET $LANGUAGE" in
@ -2099,6 +2111,9 @@ fi
else
prompt grml
fi
if [[ "$TERM" == dumb ]] ; then
prompt redhat
fi
# Terminal-title wizardry
@ -2687,7 +2702,7 @@ function xtrename () {
zpst () { curl -F'file=@-' https://va.furryplace.eu }
zpst () { curl -F'file=@-' https://0x0.st }
# upload to ttm
function zup () {
@ -2711,7 +2726,7 @@ function zup () {
print "curl is not available, but mandatory for ${PN}. Aborting."
return 1
fi
api='https://va.furryplace.eu/'
api='https://0x0.st/'
curl -F"file=@${url}" $api
}
@ -2741,7 +2756,7 @@ function zpost () {
print "curl is not available, but mandatory for ${PN}. Aborting."
return 1
fi
api='https://va.furryplace.eu/'
api='https://0x0.st/'
curl -F"url=${url}" $api
}
@ -2774,7 +2789,7 @@ function zurl () {
print "curl is not available, but mandatory for ${PN}. Aborting."
return 1
fi
api='https://va.furryplace.eu/'
api='https://0x0.st/'
curl -F"shorten=${url}" $api
}

5
bin/am Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
py_asciimath from-file "${1:-/dev/stdin}" \
from asciimath to "${2:-latex}"

2
bin/bb
View File

@ -915,7 +915,7 @@ make_rss() {
echo '</title><description><![CDATA['
get_html_file_content 'text' 'entry' $cut_do <"$i"
echo "]]></description><link>$global_url/${i#./}</link>"
echo "<guid>$global_url/$i</guid>"
echo "<guid>$global_url/${i#./}</guid>"
echo "<dc:creator>$(get_post_author "$i")</dc:creator>"
echo "<pubDate>$(LC_ALL=C date -r "$i" +"$date_format_full")</pubDate></item>"

View File

@ -915,7 +915,7 @@ make_rss() {
echo '</title><description><![CDATA['
get_html_file_content 'text' 'entry' $cut_do <"$i"
echo "]]></description><link>$global_url/${i#./}</link>"
echo "<guid>$global_url/$i</guid>"
echo "<guid>$global_url/${i#./}</guid>"
echo "<dc:creator>$(get_post_author "$i")</dc:creator>"
echo "<pubDate>$(LC_ALL=C date -r "$i" +"$date_format_full")</pubDate></item>"

View File

@ -1045,7 +1045,7 @@ body {
padding: 10px 0;
}
h1,h2,h3,h4,h5 {
.content h1,h2,h3,h4,h5 {
font-size: 20pt;
width: 100%;
font-weight: 400;
@ -1136,8 +1136,8 @@ usage() {
echo ""
echo "Commands:"
echo " post [-html] [filename] insert a new blog post, or the filename of a draft to continue editing it"
echo " it tries to use markdown by default, and falls back to HTML if it's not available."
echo " use '-html' to override it and edit the post as HTML even when markdown is available"
echo " it tries to use org by default, and falls back to HTML if it's not available."
echo " use '-html' to override it and edit the post as HTML even when org is available"
echo " edit [-n|-f] [filename] edit an already published .html or .org file. **NEVER** edit manually a published .html file,"
echo " always use this function as it keeps internal data and rebuilds the blog"
echo " use '-n' to give the file a new name, if title was changed"

15
bin/c
View File

@ -32,11 +32,15 @@ EOF
expr=
type=
while getopts 'e:i:t' opt; do
decompile=
debug=
while getopts 'e:i:tdg' opt; do
case "${opt}" in
(e) expr=$OPTARG;;
(i) echo "#include <${OPTARG}>" >&3;;
(t) type=1;;
(d) decompile=1;;
(g) debug="-fsanitize=address -g";;
(?) exit 1;;
esac
done
@ -115,8 +119,13 @@ fi
echo '}' >&3
cat >"${temp}/Makefile" <<EOF
CFLAGS += -Wall -Wextra -Wpedantic
CFLAGS += -Wall -Wextra -Wpedantic $debug
EOF
make -s -C "${temp}" run
"${temp}/run"
if [ -n "${decompile}" ]; then
objdump -d -Mintel "${temp}/run"
else
"${temp}/run"
fi

8
bin/cov Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
manifest="${1:-.}"
RUSTFLAGS='-Cinstrument-coverage' cargo test &&
mkdir -p "$manifest/target/coverage/html" &&
~/.cargo/bin/grcov . --binary-path "$manifest/target/debug/deps/" -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o "$manifest/target/coverage/html"

15
bin/decch Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import argparse, ipaddress
def _decip(ip: str):
ipenc = ipaddress.ip_address(ip)
return int(ipenc)
if __name__ == "__main__":
parser = argparse.ArgumentParser("IP declify")
parser.add_argument("ip")
args = parser.parse_args()
print(_decip(args.ip))

View File

@ -8,9 +8,9 @@ then
elif [ "$(uname)" = "OpenBSD" ]
then
echo $(( ($(date -j -f "%b %d %T %Y %z" "$dat" "+%s") - $(date '+%s')) / 86400 ))
elif [ -h /bin/date ] # date is symlinked, assume its busybox
then
echo $(( ($(date -D "%b %d %T %Y %z" -d "$dat" "+%s") - $(date '+%s')) / 86400 ))
elif [ -x /bin/busybox ]
then # -1 to correct for it rounding up
echo $(( ($(busybox date -D "%b %d %T %Y %n" -d "$dat" "+%s") - $(busybox date '+%s')) / 86400 - 1 ))
else
echo $(( ($(date -d "$dat" '+%s') - $(date '+%s')) / 86400 ))
fi

View File

@ -1,9 +0,0 @@
#!/bin/bash
rm output.$1 -i
printf "file '%s'\n" *.$1 > vidList.txt
ffmpeg -f concat -i vidList.txt -c copy output.mkv

60
bin/golf.py Executable file
View File

@ -0,0 +1,60 @@
#!/usr/bin/env python3
# adapted from https://codegolf.stackexchange.com/a/17872
import re, sys
def findregex(winners, losers):
"Find a regex that matches all winners but no losers (sets of strings)."
# Make a pool of candidate components, then pick from them to cover winners.
# On each iteration, add the best component to 'cover'; finally disjoin them together.
pool = candidate_components(winners, losers)
cover = []
while winners:
best = max(pool, key=lambda c: 3 * len(matches(c, winners)) - len(c))
cover.append(best)
pool.remove(best)
winners = winners - matches(best, winners)
return "|".join(cover)
def candidate_components(winners, losers):
"Return components, c, that match at least one winner, w, but no loser."
parts = set(mappend(dotify, mappend(subparts, winners)))
wholes = {"^" + winner + "$" for winner in winners}
return wholes | {p for p in parts if not matches(p, losers)}
def mappend(function, *sequences):
"""Map the function over the arguments. Each result should be a sequence.
Append all the results together into one big list."""
results = map(function, *sequences)
return [item for result in results for item in result]
def subparts(word):
"Return a set of subparts of word, consecutive characters up to length 4, plus the whole word."
return set(word[i : i + n] for i in range(len(word)) for n in (1, 2, 3, 4))
def dotify(part):
"Return all ways to replace a subset of chars in part with '.'."
if part == "":
return {""}
else:
return {c + rest for rest in dotify(part[1:]) for c in (".", part[0])}
def matches(regex, strings):
"Return a set of all the strings that are matched by regex."
return {s for s in strings if re.search(regex, s)}
if __name__ == "__main__":
with open(sys.argv[2]) as includefile:
include = set(includefile.read().splitlines())
with open(sys.argv[1]) as excludefile:
exclude = set(excludefile.read().splitlines())
exclude -= include
print(findregex(include, exclude))

84
bin/json2xml Executable file
View File

@ -0,0 +1,84 @@
#!/bin/sh
## adapted from https://stackoverflow.com/a/73040814/9406294
jq -r '
"@" as $attr_prefix |
"#text" as $content_key |
# ">" only needs to be escaped if preceded by "]]".
# Some whitespace also need escaping, at least in attribute.
{ "&": "&amp;", "<": "&lt;", ">": "&gt;" } as $escapes |
{ "&": "&amp;", "<": "&lt;", "\"": "&quot;" } as $attr_escapes |
def text_to_xml: split( "" ) |
map( $escapes[.] // . ) | join( "" );
def text_to_xml_attr_val: split( "" ) |
map( $attr_escapes [.] // . ) | join( "" );
def node_to_xml:
if type == "string" then
text_to_xml
elif type == "number" or type == "boolean" then
tostring
else
(
if .attrs then
.attrs |
to_entries |
map( " " + .key + "=\"" +
( .value | text_to_xml_attr_val ) +
"\"" ) |
join( "" )
else
""
end
) as $attrs |
(
.name[0:1] as $start |
if $start and ("1234567890" | contains($start)) then
"n" + .name
else
.name
end
) as $name |
if .children and ( .children | length ) > 0 then
( .children | map( node_to_xml ) | join( "" ) )
as $children |
"<" + $name + $attrs + ">" + $children + "</" +
$name + ">"
elif .name then
"<" + $name + $attrs + "/>"
else
"<!---->"
end
end
;
def fix_tree( $name ):
type as $type |
if $type == "array" then
.[] | fix_tree( $name )
elif $type == "object" then
reduce to_entries[] as { key: $k, value: $v } (
{ name: $name, attrs: {}, children: [] };
if $k[0:1] == $attr_prefix then
.attrs[ $k[1:] ] = $v
elif $k == $content_key then
.children += [ $v ]
else
.children += [ $v | fix_tree( $k ) ]
end
)
else
{ name: $name, attrs: {}, children: [ . ] }
end
;
def fix_tree: fix_tree( "" ) | .children[];
fix_tree | node_to_xml
'

View File

@ -64,7 +64,7 @@ parser.add_argument('-i', type=str, help='the video file you want modified')
parser.add_argument('--url', type=str, help='A youtube url to download and process')
parser.add_argument('-o', type=str, default="", help="the output file. (optional. if not included, it'll just modify the input file name)")
parser.add_argument('--silent-threshold', type=float, default=0.03, help="the volume amount that frames' audio needs to surpass to be consider \"sounded\". It ranges from 0 (silence) to 1 (max volume)")
parser.add_argument('--sounded-speed', type=float, default=1.75, help="the speed that sounded (spoken) frames should be played at. Typically 1.")
parser.add_argument('--sounded-speed', type=float, default=1.50, help="the speed that sounded (spoken) frames should be played at. Typically 1.")
parser.add_argument('--silent-speed', type=float, default=7.50, help="the speed that silent frames should be played at. 999999 for jumpcutting.")
parser.add_argument('--frame-margin', type=float, default=2, help="some silent frames adjacent to sounded frames are included to provide context. How many frames on either the side of speech should be included? That's this variable.")
parser.add_argument('--sample-rate', type=float, default=44100, help="sample rate of the input and output videos")

View File

@ -1,5 +1,6 @@
tr [[:space:]] '\n' |
sed 's/.*@//' |
xargs -I'{}' echo '/gline *@'{}' 604800 :VPN/Proxy. If this as in error please contact support at this domain.'
pee cat "xargs -n1 ngirchash" |
xargs -I'{}' echo '/gline *@'{}' 604800 :VPN/Proxy. If this is in error please email support at this domain.'

23
bin/meilid Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
import sys, json, hashlib, base64
field = sys.argv[1]
if len(sys.argv) > 2:
fieldout = sys.argv[2]
else:
fieldout = field
out = json.load(sys.stdin)
for item in range(len(out)):
out[item][fieldout] = (
base64.b64encode(
hashlib.sha1(bytes(out[item][field], "utf-8")).digest(), altchars=b"-_"
)
.decode("utf-8")
.replace("=", "")
)
print(json.dumps(out))

View File

@ -1,18 +1,28 @@
#!/bin/sh
#!/bin/bash
TARGET="$1"
mkdir -p $TARGET
pacstrap $TARGET busybox
cd $TARGET
mkdir -p usr/bin
cp /bin/busybox usr/bin
ln -s usr/bin bin
mkdir -p home
tee etc/passwd <<<'root:x:0:0::/root:/bin/sh'
tee etc/group <<<'root:x:0:root'
mkdir -p home/box etc
tee etc/passwd <<EOF
root:x:0:0:root:/root:/bin/ash
box:x:1000:1000:box:/root:/bin/ash
EOF
tee etc/group <<EOF
root:x:0:root
box:x:1000:
EOF
tee etc/profile <<<'export PS1="[\u@\h \W]\$ "'
ldcp busybox
cd usr/bin
busybox --list | grep -v busybox | xargs -n1 ln -s busybox

29
bin/mp3meta Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env python3
import sys, json, hashlib, base64
from mutagen.id3 import ID3
from mutagen.mp3 import MP3
args = sys.argv[1:]
out = []
for item in args:
tags = MP3(item, ID3=ID3).tags
title = str(tags["TIT2"]) if "TIT2" in tags else None
author = str(tags["TPE1"]) if "TPE1" in tags else None
out.append(
{
"path": item,
"hid": base64.b64encode(
hashlib.sha1(bytes(item, "utf-8")).digest(), altchars=b"_-"
)
.decode("utf-8")
.replace("=", ""),
"title": title,
"author": author,
}
)
print(json.dumps(out))

View File

@ -1,3 +1,3 @@
#!/bin/bash
zbarcam --raw -Sdisable -Sqrcode.enable | crikey -i
zbarcam --raw -Sdisable -Sqrcode.enable "$@" | crikey -i

File diff suppressed because one or more lines are too long

16
bin/ranger Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env python3
import argparse
from netaddr import IPNetwork
def _run(cidr: str):
net = IPNetwork(cidr)
return f"{net.cidr} starts at {net.network} and ends at {net.broadcast} containing {net.size}"
if __name__ == "__main__":
parser = argparse.ArgumentParser("compute range from CIDR")
parser.add_argument("cidr", type=str)
args = parser.parse_args()
print(_run(args.cidr))

6
bin/rotate Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
field="$1"
shift
printf "%s\n" "$@" | sort -Vr | awk -F. -vOFS=. '{print; $'"$field"'=$'"$field"'+1; print}' | tr '\n' '\0' | xargs -0 -n2 mv

23
bin/roughsync Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
# https://stackoverflow.com/a/33226295/9406294
# FIXME: breaks if spot-on one second
until_next_second(){
sleep "0.$(printf '%04d' $((10000 - 10#$(date +%4N))))"
}
waittime=${1:-5}
until_next_second
date +"starting at %s %N" >&2
echo date -s "@$((waittime+$(date -u '+%s')))"
for i in $(seq $waittime)
do
until_next_second
printf "%d " "$((waittime-i))" >&2
done
echo
date +"it is now %s %N" >&2

10
bin/rtramp Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
if [ -S ~/.sshemacs -a -n "$SSH_CONNECTION" ]; then
for fn in "$@"; do
real=$(realpath "$fn" || echo "$fn")
printf "/ssh:%s@%s:%s\0" "$USER" "$(echo $SSH_CONNECTION | cut -d' ' -f3-4 | tr ' ' '#')" "$real"
done | xargs -0 emacsclient -s ~/.sshemacs
else
emacsclient -a '' "$@"
fi

17
bin/sortfqdn Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env python3
## adapted from https://serverfault.com/a/1112437
import sys
column = 0
def kf(v):
"""key-function to sort by domain order"""
return ".".join(reversed(v.split()[column].split(".")))
if len(sys.argv) > 1:
column = int(sys.argv[1])
sys.stdout.writelines(sorted(sys.stdin, key=kf))

53
bin/taint Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
#
# Diagnose tainted kernels, as described by https://docs.kernel.org/admin-guide/tainted-kernels.html
#
# adapted from https://github.com/tstromberg/sunlight/blob/main/kernel-taint.sh
declare -A table=(
[0]="proprietary module was loaded"
[1]="module was force loaded"
[2]="kernel running on an out of specification system"
[3]="module was force unloaded"
[4]="processor reported a Machine Check Exception (MCE)"
[5]="bad page referenced or some unexpected page flags"
[6]="taint requested by userspace application"
[7]="kernel died recently, i.e. there was an OOPS or BUG"
[8]="ACPI table overridden by user"
[9]="kernel issued warning"
[10]="staging driver was loaded"
[11]="workaround for bug in platform firmware applied"
[12]="externally-built (out-of-tree) module was loaded"
[13]="unsigned module was loaded"
[14]="soft lockup occurred"
[15]="kernel has been live patched"
[16]="auxiliary taint, defined for and used by distros"
[17]="kernel was built with the struct randomization plugin"
[18]="an in-kernel test has been run"
)
checktaint() {
echo "kernel taint value: ${taint}"
[[ $taint == 0 ]] && exit
for i in $(seq 18); do
bit=$(($i-1))
match=$(($taint >> $bit &1))
[[ $match == 0 ]] && continue
echo "* matches bit $bit: ${table[$bit]}"
done
}
if [ -z "$1" ]
then
taint=$(cat /proc/sys/kernel/tainted)
checktaint
printf '\ndmesg:\n'
dmesg | grep taint
else
taint="$1"
checktaint
fi

155
bin/temp Executable file
View File

@ -0,0 +1,155 @@
#!/bin/bash
# Usage: temp_throttle.sh max_temp
# USE CELSIUS TEMPERATURES.
# version 2.21
cat << EOF
Author: Sepero 2016 (sepero 111 @ gmx . com)
URL: http://github.com/Sepero/temp-throttle/
EOF
# Additional Links
# http://seperohacker.blogspot.com/2012/10/linux-keep-your-cpu-cool-with-frequency.html
# Additional Credits
# Wolfgang Ocker <weo AT weo1 DOT de> - Patch for unspecified cpu frequencies.
# License: GNU GPL 2.0
# Generic function for printing an error and exiting.
err_exit () {
echo ""
echo "Error: $@" 1>&2
exit 128
}
if [ $# -ne 1 ]; then
# If temperature wasn't given, then print a message and exit.
echo "Please supply a maximum desired temperature in Celsius." 1>&2
echo "For example: ${0} 60" 1>&2
exit 2
else
#Set the first argument as the maximum desired temperature.
MAX_TEMP=$1
fi
### START Initialize Global variables.
# The frequency will increase when low temperature is reached.
LOW_TEMP=$((MAX_TEMP - 5))
CORES=$(nproc) # Get number of CPU cores.
echo -e "Number of CPU cores detected: $CORES\n"
CORES=$((CORES - 1)) # Subtract 1 from $CORES for easier counting later.
# Temperatures internally are calculated to the thousandth.
MAX_TEMP=${MAX_TEMP}000
LOW_TEMP=${LOW_TEMP}000
FREQ_FILE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies"
FREQ_MIN="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
FREQ_MAX="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
# Store available cpu frequencies in a space separated string FREQ_LIST.
if [ -f $FREQ_FILE ]; then
# If $FREQ_FILE exists, get frequencies from it.
FREQ_LIST=$(cat $FREQ_FILE | xargs -n1 | sort -g -r | xargs) || err_exit "Could not read available cpu frequencies from file $FREQ_FILE"
elif [ -f $FREQ_MIN -a -f $FREQ_MAX ]; then
# Else if $FREQ_MIN and $FREQ_MAX exist, generate a list of frequencies between them.
FREQ_LIST=$(seq $(cat $FREQ_MAX) -100000 $(cat $FREQ_MIN)) || err_exit "Could not compute available cpu frequencies"
else
err_exit "Could not determine available cpu frequencies"
fi
FREQ_LIST_LEN=$(echo $FREQ_LIST | wc -w)
# CURRENT_FREQ will save the index of the currently used frequency in FREQ_LIST.
CURRENT_FREQ=2
# This is a list of possible locations to read the current system temperature.
TEMPERATURE_FILES="
/sys/class/thermal/thermal_zone0/temp
/sys/class/thermal/thermal_zone1/temp
/sys/class/thermal/thermal_zone2/temp
/sys/class/hwmon/hwmon0/temp1_input
/sys/class/hwmon/hwmon1/temp1_input
/sys/class/hwmon/hwmon2/temp1_input
/sys/class/hwmon/hwmon0/device/temp1_input
/sys/class/hwmon/hwmon1/device/temp1_input
/sys/class/hwmon/hwmon2/device/temp1_input
null
"
# Store the first temperature location that exists in the variable TEMP_FILE.
# The location stored in $TEMP_FILE will be used for temperature readings.
for file in $TEMPERATURE_FILES; do
TEMP_FILE=$file
[ -f $TEMP_FILE ] && break
done
[ $TEMP_FILE == "null" ] && err_exit "The location for temperature reading was not found."
### END Initialize Global variables.
### START define script functions.
# Set the maximum frequency for all cpu cores.
set_freq () {
# From the string FREQ_LIST, we choose the item at index CURRENT_FREQ.
FREQ_TO_SET=$(echo $FREQ_LIST | cut -d " " -f $CURRENT_FREQ)
echo $FREQ_TO_SET
for i in $(seq 0 $CORES); do
# Try to set core frequency by writing to /sys/devices.
{ echo $FREQ_TO_SET 2> /dev/null > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq; } ||
# Else, try to set core frequency using command cpufreq-set.
{ cpufreq-set -c $i --max $FREQ_TO_SET > /dev/null; } ||
# Else, return error message.
{ err_exit "Failed to set frequency CPU core$i. Run script as Root user. Some systems may require to install the package cpufrequtils."; }
done
}
# Will reduce the frequency of cpus if possible.
throttle () {
if [ $CURRENT_FREQ -lt $FREQ_LIST_LEN ]; then
CURRENT_FREQ=$((CURRENT_FREQ + 1))
echo -n "throttle "
set_freq $CURRENT_FREQ
fi
}
# Will increase the frequency of cpus if possible.
unthrottle () {
if [ $CURRENT_FREQ -ne 1 ]; then
CURRENT_FREQ=$((CURRENT_FREQ - 1))
echo -n "unthrottle "
set_freq $CURRENT_FREQ
fi
}
get_temp () {
# Get the system temperature. Take the max of all counters
TEMP=$(cat $TEMPERATURE_FILES 2>/dev/null | xargs -n1 | sort -g -r | head -1)
}
### END define script functions.
echo "Initialize to max CPU frequency"
unthrottle
# Main loop
while true; do
get_temp # Gets the current temperature and set it to the variable TEMP.
if [ $TEMP -gt $MAX_TEMP ]; then # Throttle if too hot.
throttle
elif [ $TEMP -le $LOW_TEMP ]; then # Unthrottle if cool.
unthrottle
fi
sleep 3 # The amount of time between checking temperatures.
done

24
bin/tex2svg Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
WORKDIR="$(mktemp -d)"
cat >"$WORKDIR/math.tex" <<EOF
\documentclass[12pt,border=2pt]{standalone}
\usepackage{varwidth}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\newcommand{\ols}[1]{\mskip.5\thinmuskip\overline{\mskip-.5\thinmuskip {#1}}}
\newcommand{\trans}[0]{^\mathrm{T}}
\begin{document}
\begin{varwidth}{\linewidth}
${1:-usage: $0 expression [output]}
\end{varwidth}
\end{document}
EOF
pdflatex --output-directory "$WORKDIR" "$WORKDIR/math.tex" 1>&2 &&
pdf2svg "$WORKDIR/math.pdf" "${2:-/dev/stdout}"
rm -r -- "$WORKDIR"

17
bin/typog Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env python3
import random, re
while True:
line = input()
words = []
for word in re.sub(r"([\.,\?!'\"\*\(\)])", r" \1 ", line).split(' '):
if len(word) >= 4:
first = word[0]
last = word[-1]
letters = list(word[1:-1])
random.shuffle(letters)
word = first+''.join(letters)+last
words.append(word)
print(re.sub(r" ([\.,\?!'\"\*\(\)]) ", r"\1", ' '.join(words)))

15
bin/undecch Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import argparse, ipaddress
def _decip(i: str):
ip = ipaddress.ip_address(int(i))
return str(ip)
if __name__ == "__main__":
parser = argparse.ArgumentParser("IP dedeclify")
parser.add_argument("dec")
args = parser.parse_args()
print(_decip(args.dec))

10
bin/xrc Executable file
View File

@ -0,0 +1,10 @@
cat <<EOF
:root {
--background-color: $((RANDOM * 435437 % 360));
--text-color: $((RANDOM * 47777 % 360));
--accent-color: $((RANDOM * 984563 % 360));
--width: 70em;
--padding: 0;
}
EOF

32
org/latex.org Normal file
View File

@ -0,0 +1,32 @@
#+TITLE: LaTeX setupfile
#+STARTUP: content noindent
Included via ~#+SETUPFILE:~ in notes meant to be exported to ~LaTeX~
* latex options
** table of contents
hide table of contents. if we really want it, we can include it at our
own location with ~#+TOC:~. without this, unlike ~HTML~ export,
~LaTeX~ will force the table of contents to be at the top, meaning the
preamble will not be on the first page.
#+OPTIONS: toc:nil
** define some packages for accessibility
#+LATEX_CLASS_OPTIONS: [12pt]
#+LATEX_HEADER: \usepackage[letterpaper]{geometry}
#+LATEX_HEADER: \usepackage[english]{babel}
#+LATEX_HEADER: \usepackage[tagged, highstructure]{accessibility}
#+LATEX_HEADER: \usepackage{caption}
#+LATEX_HEADER: \pdfpageattr{/StructParents 0/Tabs/S}
#+LATEX_HEADER: \captionsetup{labelformat=empty}
** PDF/A export
#+LATEX_HEADER: \usepackage[a-3b]{pdfx}
** hide todo tokens and tags
#+OPTIONS: todo:nil tags:nil

250
org/orgwiki.org Normal file
View File

@ -0,0 +1,250 @@
#+STARTUP: content noindent
Included via ~#+SETUPFILE:~ in wiki pages
* ~org~ settings
#+OPTIONS: html-postamble:nil
#+OPTIONS: html-style:nil
#+OPTIONS: html-scripts:nil
#+OPTIONS: html-self-link-headlines:t
#+OPTIONS: toc:nil
#+OPTIONS: num:t
#+OPTIONS: H:6
#+OPTIONS: ^:nil
#+OPTIONS: tags:nil
#+OPTIONS: author:nil
#+TODO: TODO DELAYED RERUN | DONE
#+HTML_HEAD: <meta charset="UTF-8">
** MACROs
#+MACRO: code @@html:<code>@@$1@@html:</code>@@
#+MACRO: FileLink @@html:<a href="$1">@@{{{code($1)}}}@@html:</a>@@
#+MACRO: DirFileLink @@html:<a href="$1/$2">@@{{{code($2)}}}@@html:</a>@@
** CSS (nah7+20210715)
*** begin style
#+HTML_HEAD: <style>
*** body
#+HTML_HEAD: body {
#+HTML_HEAD: font-family:monospace; font-size:12pt;
#+HTML_HEAD: max-width: 700px; margin: 10px 20px;
#+HTML_HEAD: }
#+HTML_HEAD: @media only print {
#+HTML_HEAD: body {
#+HTML_HEAD: color:#000000; background-color:#ffffff;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: body {
#+HTML_HEAD: color:#bfbfbf; background-color:#000000;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** headings h1..h6
#+HTML_HEAD: h1 { font-size:144%; }
#+HTML_HEAD: h2,h3,h4,h5,h6 { font-size:120%; }
*** a
#+HTML_HEAD: a {
#+HTML_HEAD: text-decoration-style:solid;
#+HTML_HEAD: }
#+HTML_HEAD: @media only print {
#+HTML_HEAD: a {
#+HTML_HEAD: background-color:#ffffff;
#+HTML_HEAD: color:#000000;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: a {
#+HTML_HEAD: background-color:#112222;
#+HTML_HEAD: color:#bfbfbf;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** pre, (inline) code, example, src
#+COMMENT: pre is used in src and example blocks
#+HTML_HEAD: pre {
#+HTML_HEAD: font-size:10.5pt;
#+HTML_HEAD: max-width:80ch;
#+HTML_HEAD: border: 1pt dotted #bfbfbf;
#+HTML_HEAD: padding:1ch;
#+HTML_HEAD: }
#+COMMENT: inline code
#+HTML_HEAD: code {
#+HTML_HEAD: border: 1pt dotted #bfbfbf;
#+HTML_HEAD: padding: 0 0.15em;
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: code {
#+HTML_HEAD: background-color:#222211;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+COMMENT: #+begin_example & #+begin_src
#+HTML_HEAD: .example { white-space:pre-wrap; }
#+HTML_HEAD: .src { white-space:pre-wrap; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .example { background-color:#222211; }
#+HTML_HEAD: .src { background-color:#222211; }
#+HTML_HEAD: }
*** blockquote
#+COMMENT: blockquote (#+begin_quote)
#+HTML_HEAD: blockquote {
#+HTML_HEAD: border: 1pt solid #bfbfbf;
#+HTML_HEAD: padding: 0 1ch;
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: blockquote {
#+HTML_HEAD: background-color: #111100;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** .tag - find better solution
#+comment: make tag and status distinguishable in BW prints
#+HTML_HEAD: .tag { float:right; }
#+HTML_HEAD: .tag:before { content: "["; }
#+HTML_HEAD: .tag:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .tag { background-color:#111100; }
#+HTML_HEAD: .tag:before { background-color:#111100; }
#+HTML_HEAD: .tag:after { background-color:#111100; }
#+HTML_HEAD: }
*** Status TODO DONE (DELAYED RERUN)
#+HTML_HEAD: .done { }
#+HTML_HEAD: .done:before { content: "["; }
#+HTML_HEAD: .done:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .done { background-color: #117711; }
#+HTML_HEAD: }
#+HTML_HEAD: .todo { }
#+HTML_HEAD: .todo:before { content: "["; }
#+HTML_HEAD: .todo:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .todo { background-color: #bb1111; }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .DELAYED { background-color: #220077; }
#+HTML_HEAD: .RERUN { background-color: #775511; }
#+HTML_HEAD: }
*** #+begin_fixme, .FIXME as kind of block to do note
#+COMMENT: to do: @media
#+COMMENT: doesn't fit colour scheme yet
#+HTML_HEAD: .FIXME:before,.fixme:before { content: "[FIXME] "; float:left; }
#+COMMENT: ugly inline unbreakable space. ↑
#+COMMENT: find better way!
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .FIXME,.fixme { background-color: #bb1111; }
#+HTML_HEAD: }
*** org-center (#+begin_center)
#+HTML_HEAD: .org-center { text-align:center; }
*** table stuff
#+HTML_HEAD: table { width:100%; border-collapse:collapse; }
#+HTML_HEAD: table, th, td { vertical-align:top; }
*** img
#+comment: ???????????????????????????????????????????????
#+comment: ?? @@@TODO@@@ modify class figure instead? ??
#+comment: ???????????????????????????????????????????????
#+HTML_HEAD: img { max-width:100%;display:block;margin:auto;height:auto; }
*** WIP class timestamp (timestamp-wrapper?)
#+COMMENT: to do: @media
#+comment: ??????????????????
#+comment: ?? @@@TODO@@@ ??
#+comment: ??????????????????
#+comment: [2020-10-14 Wed] text text text
#+comment: ^^^^^^^^^^^^^^^^^
#+comment: The space after a timestamp is affectd too. :-/
#+comment: But it's a start.
#+comment:
#+comment: This does NOT happen if the timestamp is followed by e.g. a ':'
#+comment: Use this for now.
#+HTML_HEAD: .timestamp { }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .timestamp { background-color: #221122; }
#+HTML_HEAD: }
*** anchor targets
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: :target { background-color: #222211; }
#+HTML_HEAD: }
*** hide nav during printing
#+HTML_HEAD: @media only print {
#+HTML_HEAD: nav { display: none; }
#+HTML_HEAD: }
*** footnote
#+HTML_HEAD: .footpara { display: inline; }
*** end style
#+HTML_HEAD: </style>
#+HTML_HEAD: <nav>
#+HTML_HEAD: <a href="index.html">home</a> /
#+HTML_HEAD: <a href="about.html">about</a> /
#+HTML_HEAD: <a href="sitemap.html">sitemap</a> /
#+HTML_HEAD: </nav>
** LaTeX
*** define some packages for accessibility
#+LATEX_CLASS_OPTIONS: [12pt]
#+LATEX_HEADER: \usepackage[letterpaper]{geometry}
#+LATEX_HEADER: \usepackage[english]{babel}
#+LATEX_HEADER: \usepackage[tagged, highstructure]{accessibility}
#+LATEX_HEADER: \usepackage{caption}
#+LATEX_HEADER: \pdfpageattr{/StructParents 0/Tabs/S}
#+LATEX_HEADER: \captionsetup{labelformat=empty}
*** PDF/A export
#+LATEX_HEADER: \usepackage[a-3b]{pdfx}

239
org/setupfile.org Normal file
View File

@ -0,0 +1,239 @@
#+STARTUP: content noindent
Included via ~#+SETUPFILE:~ in notes meant to be exported to ~HTML~
* ~org~ settings
#+OPTIONS: html-postamble:nil
#+OPTIONS: html-style:nil
#+OPTIONS: html-scripts:nil
#+OPTIONS: html-self-link-headlines:t
#+OPTIONS: toc:nil
#+OPTIONS: num:t
#+OPTIONS: H:6
#+OPTIONS: ^:nil
#+OPTIONS: tags:nil
#+TODO: TODO DELAYED RERUN | DONE
#+HTML_HEAD: <meta charset="UTF-8">
** MACROs
#+MACRO: code @@html:<code>@@$1@@html:</code>@@
#+MACRO: FileLink @@html:<a href="$1">@@{{{code($1)}}}@@html:</a>@@
#+MACRO: DirFileLink @@html:<a href="$1/$2">@@{{{code($2)}}}@@html:</a>@@
** CSS (nah7+20210715)
*** begin style
#+HTML_HEAD: <style>
*** body
#+HTML_HEAD: body {
#+HTML_HEAD: font-family:monospace; font-size:12pt;
#+HTML_HEAD: max-width: 72ch; margin: 0px auto;
#+HTML_HEAD: }
#+HTML_HEAD: @media only print {
#+HTML_HEAD: body {
#+HTML_HEAD: color:#000000; background-color:#ffffff;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: body {
#+HTML_HEAD: color:#bfbfbf; background-color:#000000;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** headings h1..h6
#+HTML_HEAD: h1 { font-size:144%; }
#+HTML_HEAD: h2,h3,h4,h5,h6 { font-size:120%; }
*** a
#+HTML_HEAD: a {
#+HTML_HEAD: text-decoration-style:solid;
#+HTML_HEAD: }
#+HTML_HEAD: @media only print {
#+HTML_HEAD: a {
#+HTML_HEAD: background-color:#ffffff;
#+HTML_HEAD: color:#000000;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: a {
#+HTML_HEAD: background-color:#112222;
#+HTML_HEAD: color:#bfbfbf;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** pre, (inline) code, example, src
#+COMMENT: pre is used in src and example blocks
#+HTML_HEAD: pre {
#+HTML_HEAD: font-size:10.5pt;
#+HTML_HEAD: width:80ch;
#+HTML_HEAD: border: 1pt dotted #bfbfbf;
#+HTML_HEAD: padding:1ch;
#+HTML_HEAD: }
#+COMMENT: inline code
#+HTML_HEAD: code {
#+HTML_HEAD: border: 1pt dotted #bfbfbf;
#+HTML_HEAD: padding: 0 0.15em;
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: code {
#+HTML_HEAD: background-color:#222211;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+COMMENT: #+begin_example & #+begin_src
#+HTML_HEAD: .example { white-space:pre-wrap; word-break:pre-wrap; }
#+HTML_HEAD: .src { white-space:pre-wrap; word-break:pre-wrap; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .example { background-color:#222211; }
#+HTML_HEAD: .src { background-color:#222211; }
#+HTML_HEAD: }
*** blockquote
#+COMMENT: blockquote (#+begin_quote)
#+HTML_HEAD: blockquote {
#+HTML_HEAD: border: 1pt solid #bfbfbf;
#+HTML_HEAD: padding: 0 1ch;
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: blockquote {
#+HTML_HEAD: background-color: #111100;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** .tag - find better solution
#+comment: make tag and status distinguishable in BW prints
#+HTML_HEAD: .tag { float:right; }
#+HTML_HEAD: .tag:before { content: "["; }
#+HTML_HEAD: .tag:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .tag { background-color:#111100; }
#+HTML_HEAD: .tag:before { background-color:#111100; }
#+HTML_HEAD: .tag:after { background-color:#111100; }
#+HTML_HEAD: }
*** Status TODO DONE (DELAYED RERUN)
#+HTML_HEAD: .done { }
#+HTML_HEAD: .done:before { content: "["; }
#+HTML_HEAD: .done:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .done { background-color: #117711; }
#+HTML_HEAD: }
#+HTML_HEAD: .todo { }
#+HTML_HEAD: .todo:before { content: "["; }
#+HTML_HEAD: .todo:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .todo { background-color: #bb1111; }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .DELAYED { background-color: #220077; }
#+HTML_HEAD: .RERUN { background-color: #775511; }
#+HTML_HEAD: }
*** #+begin_fixme, .FIXME as kind of block to do note
#+COMMENT: to do: @media
#+COMMENT: doesn't fit colour scheme yet
#+HTML_HEAD: .FIXME:before,.fixme:before { content: "[FIXME] "; float:left; }
#+COMMENT: ugly inline unbreakable space. ↑
#+COMMENT: find better way!
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .FIXME,.fixme { background-color: #bb1111; }
#+HTML_HEAD: }
*** org-center (#+begin_center) and text alignment
#+HTML_HEAD: .org-center { text-align:center; }
#+HTML_HEAD: .org-left { text-align:left; }
#+HTML_HEAD: .org-right { text-align:right; }
*** table stuff
#+HTML_HEAD: table { width:100%; border-collapse:collapse; }
#+HTML_HEAD: table, th, td { vertical-align:top; }
*** img
#+comment: ???????????????????????????????????????????????
#+comment: ?? @@@TODO@@@ modify class figure instead? ??
#+comment: ???????????????????????????????????????????????
#+HTML_HEAD: img { max-width:100%;display:block;margin:auto;height:auto; }
*** WIP class timestamp (timestamp-wrapper?)
#+COMMENT: to do: @media
#+comment: ??????????????????
#+comment: ?? @@@TODO@@@ ??
#+comment: ??????????????????
#+comment: [2020-10-14 Wed] text text text
#+comment: ^^^^^^^^^^^^^^^^^
#+comment: The space after a timestamp is affectd too. :-/
#+comment: But it's a start.
#+comment:
#+comment: This does NOT happen if the timestamp is followed by e.g. a ':'
#+comment: Use this for now.
#+HTML_HEAD: .timestamp { }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .timestamp { background-color: #221122; }
#+HTML_HEAD: }
*** anchor targets
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: :target { background-color: #222211; }
#+HTML_HEAD: }
*** footnote
#+HTML_HEAD: .footpara { display: inline; }
*** end style
#+HTML_HEAD: </style>
** LaTeX
*** define some packages for accessibility
#+LATEX_CLASS_OPTIONS: [12pt]
#+LATEX_HEADER: \usepackage[letterpaper]{geometry}
#+LATEX_HEADER: \usepackage[english]{babel}
#+LATEX_HEADER: \usepackage[tagged, highstructure]{accessibility}
#+LATEX_HEADER: \usepackage{caption}
#+LATEX_HEADER: \pdfpageattr{/StructParents 0/Tabs/S}
#+LATEX_HEADER: \captionsetup{labelformat=empty}
*** PDF/A export
#+LATEX_HEADER: \usepackage[a-3b]{pdfx}

317
org/yeti.org Normal file
View File

@ -0,0 +1,317 @@
#+STARTUP: content noindent
Included via ~#+SETUPFILE:~ in notes meant to be exported to ~HTML~.
* ~org~ settings
#+OPTIONS: html-postamble:nil
#+OPTIONS: html-style:nil
#+OPTIONS: html-scripts:nil
#+OPTIONS: html-self-link-headlines:t
#+OPTIONS: toc:t
#+OPTIONS: num:t
#+OPTIONS: H:6
#+OPTIONS: ^:nil
#+OPTIONS: tags:nil
#+TODO: TODO DELAYED RERUN | DONE
#+HTML_HEAD: <meta charset="UTF-8">
** MACROs
#+MACRO: code @@html:<code>@@$1@@html:</code>@@
#+MACRO: FileLink @@html:<a href="$1">@@{{{code($1)}}}@@html:</a>@@
#+comment: present link to file in workdir $1/$2 only as filename 2
#+MACRO: DirFileLink @@html:<a href="$1/$2">@@{{{code($2)}}}@@html:</a>@@
** CSS (nah7+20210715)
*** begin style
#+HTML_HEAD: <style>
*** body
#+HTML_HEAD: body {
#+HTML_HEAD: font-family:monospace; font-size:12pt;
#+HTML_HEAD: max-width: 72ch; margin: 0px auto;
#+HTML_HEAD: }
#+HTML_HEAD: @media only print {
#+HTML_HEAD: body {
#+HTML_HEAD: color:#000000; background-color:#ffffff;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: body {
#+HTML_HEAD: color:#000000; background-color:#dddddd;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** headings h1..h6
#+HTML_HEAD: h1 { font-size:144%; }
#+HTML_HEAD: h2,h3,h4,h5,h6 { font-size:120%; }
*** a
#+HTML_HEAD: a {
#+HTML_HEAD: color:#000000;
#+HTML_HEAD: text-decoration-style:solid;
#+HTML_HEAD: }
#+HTML_HEAD: @media only print {
#+HTML_HEAD: a {
#+HTML_HEAD: background-color:#ffffff;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: a {
#+HTML_HEAD: background-color:#ddeeee;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** pre, (inline) code, example, src
#+COMMENT: pre is used in src and example blocks
#+HTML_HEAD: pre {
#+HTML_HEAD: font-size:10.5pt;
#+HTML_HEAD: width:80ch;
#+HTML_HEAD: border: 1pt dotted black;
#+HTML_HEAD: padding:1ch;
#+HTML_HEAD: }
#+COMMENT: inline code
#+HTML_HEAD: code {
#+HTML_HEAD: border: 1pt dotted;
#+HTML_HEAD: padding: 0 0.15em;
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: code {
#+HTML_HEAD: background-color:#eeeeaa;
#+HTML_HEAD: }
#+HTML_HEAD: }
#+COMMENT: #+begin_example & #+begin_src
#+HTML_HEAD: .example { white-space:pre-wrap; word-break:break-all; }
#+HTML_HEAD: .src { white-space:pre-wrap; word-break:break-all; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .example { background-color:#eeeeaa; }
#+HTML_HEAD: .src { background-color:#eeeeaa; }
#+HTML_HEAD: }
*** blockquote
#+COMMENT: blockquote (#+begin_quote)
#+HTML_HEAD: blockquote {
#+HTML_HEAD: border: 1pt solid;
#+HTML_HEAD: padding: 0 1ch;
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: blockquote {
#+HTML_HEAD: background-color: #bbbbff;
#+HTML_HEAD: }
#+HTML_HEAD: }
*** .tag - find better solution
#+comment: make tag and status distinguishable in BW prints
#+HTML_HEAD: .tag { float:right; }
#+HTML_HEAD: .tag:before { content: "["; }
#+HTML_HEAD: .tag:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .tag { background-color:#aaaaff; }
#+HTML_HEAD: .tag:before { background-color:#aaaaff; }
#+HTML_HEAD: .tag:after { background-color:#aaaaff; }
#+HTML_HEAD: }
*** Status TODO DONE (DELAYED WIP RERUN NEW)
#+COMMENT: doesn't fit colour scheme yet
#+HTML_HEAD: .done { }
#+HTML_HEAD: .done:before { content: "["; }
#+HTML_HEAD: .done:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .done { background-color: #aaffaa; }
#+HTML_HEAD: }
#+HTML_HEAD: .todo { }
#+HTML_HEAD: .todo:before { content: "["; }
#+HTML_HEAD: .todo:after { content: "]"; }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .todo { background-color: #ffaaaa; }
#+HTML_HEAD: }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .DELAYED { background-color: #ffbbaa; }
#+HTML_HEAD: .WIP { background-color: #eeccaa; }
#+HTML_HEAD: .RERUN { background-color: #ddddaa; }
#+comment: .NEW just inherits DONE's green
#+HTML_HEAD: }
*** #+begin_fixme, .FIXME as kind of block to do note
#+COMMENT: to do: @media
#+COMMENT: doesn't fit colour scheme yet
#+HTML_HEAD: .FIXME:before,.fixme:before { content: "[FIXME] "; float:left; }
#+COMMENT: ugly inline unbreakable space. ↑
#+COMMENT: find better way!
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .FIXME,.fixme { background-color: #ffaaaa; }
#+HTML_HEAD: }
*** org-center (#+begin_center)
#+HTML_HEAD: .org-center { text-align:center; }
*** table stuff
#+HTML_HEAD: table { width:100%; }
#+HTML_HEAD: table, th, td { vertical-align:top; }
*** img
#+comment: ???????????????????????????????????????????????
#+comment: ?? @@@TODO@@@ modify class figure instead? ??
#+comment: ???????????????????????????????????????????????
#+HTML_HEAD: img { max-width:100%;display:block;margin:auto;height:auto; }
*** WIP class timestamp (timestamp-wrapper?)
#+COMMENT: to do: @media
#+comment: ??????????????????
#+comment: ?? @@@TODO@@@ ??
#+comment: ??????????????????
#+comment: [2020-10-14 Wed] text text text
#+comment: ^^^^^^^^^^^^^^^^^
#+comment: The space after a timestamp is affectd too. :-/
#+comment: But it's a start.
#+comment:
#+comment: This does NOT happen if the timestamp is followed by e.g. a ':'
#+comment: Use this for now.
#+HTML_HEAD: .timestamp { }
#+HTML_HEAD: @media only screen {
#+HTML_HEAD: .timestamp { background-color: #eebbee; }
#+HTML_HEAD: }
*** footnote
#+HTML_HEAD: .footpara { display: inline; }
*** end style
#+HTML_HEAD: </style>
* Helper Functions
#+name: fs-cat-file
#+begin_src sh :var pathname="" :results output :exports results :wrap example
cat "$pathname"
#+end_src
#+name: footer
#+begin_src org :results output :exports results
,* Famous Last Words
:PROPERTIES:
:CUSTOM_ID: famous-last-words
:END:
,#+BEGIN_EXAMPLE
.-----+-----.
.----+----. | The END |
| Repent! | | is neigh! |
·----+----· ·-----+-----·
| _ _ _ |
|\°v° °v° ò.ó/|
|_|\/|_|) /|_|
--------------------------------^-^--^-^-----^-^--------------------------------
,#+END_EXAMPLE
,* The End
:PROPERTIES:
:CUSTOM_ID: the-end
:END:
#+end_src
#+begin_fixme
The following code scans the file instead of a possibly unsaved buffer,
so the ~#+BRAIN*~ references may not be up to date on exports from
unsaved buffers.
If unsure use the ~Makefile~ way to rebuild all exports that are older
than their ~.org~ sources.
A better solution has to be found, and because currently only file
references can be correctly exported, it probably needs learning elisp
first.
ॐ!
#+end_fixme
#+name: navigation
#+begin_src org :results output :exports results
,* Navigation
:PROPERTIES:
:OFF-UNNUMBERED: notoc
:CUSTOM_ID: navigation
:END:
,#+BEGIN_SRC awk :var FILE=(buffer-file-name) :results output wrap html :exports results :eval always
function splittolinks(c,s ,n,i,A,sort) {
##
## BASEDIR is global ... ugly.
##
if( length(s) ) {
print "<b>" c "</b><br>"
n=split(s,A," ")
sort="sort"
for(i=1;i<=n;i++) print " <a href=" BASEDIR A[i] ".html>[" A[i] "]</a>" | sort
close(sort)
print "<br>"
print "<br>"
}
}
BEGIN {
##
## hacky: assume 1 subdir level if not seeing .org-brain-data.el
##
c="if test -f .org-brain-data.el ; then echo ./ ; else echo ../ ; fi"
c|getline BASEDIR
close(c)
while( getline < FILE ) {
if( index($0,"#+BRAIN_PARENTS: ")==1 )
splittolinks("Parents",substr($0,18))
else if( index($0,"#+BRAIN_FRIENDS: ")==1 )
splittolinks("Friends",substr($0,18))
else if( index($0,"#+BRAIN_CHILDREN: ")==1 )
splittolinks("Children",substr($0,19))
}
}
,#+end_src
#+end_src