@ -0,0 +1,160 @@ | |||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- | |||
;; Place your private configuration here! Remember, you do not need to run 'doom | |||
;; sync' after modifying this file! | |||
;; Some functionality uses this to identify you, e.g. GPG configuration, email | |||
;; clients, file templates and snippets. | |||
(setq user-full-name "Yigit Colakoglu" | |||
user-mail-address "yigit@yigitcolakoglu.com") | |||
(add-to-list 'default-frame-alist | |||
'(ns-transparent-titlebar . t)) | |||
(add-to-list 'default-frame-alist | |||
'(ns-appearance . light)) | |||
(global-auto-revert-mode t) | |||
(add-hook! 'org-mode-hook (company-mode -1)) | |||
(add-hook! 'org-capture-mode-hook (company-mode -1)) | |||
(setq baby-blue '("#d2ecff" "#d2ecff" "brightblue")) | |||
(setq | |||
doom-theme 'doom-challenger-deep | |||
doom-font (font-spec :family "CaskaydiaCove Nerd Font Mono" :size 16 :weight 'regular) | |||
default-directory "~" | |||
dart-format-on-save t | |||
web-mode-markup-indent-offset 2 | |||
web-mode-code-indent-offset 2 | |||
web-mode-css-indent-offset 2 | |||
mac-command-modifier 'meta | |||
js-indent-level 2 | |||
typescript-indent-level 2 | |||
json-reformat:indent-width 2 | |||
prettier-js-args '("--single-quote") | |||
projectile-project-search-path '("~/Projects/") | |||
dired-dwim-target t | |||
org-ellipsis " ▾ " | |||
org-bullets-bullet-list '("·") | |||
org-tags-column -80 | |||
org-agenda-files (ignore-errors (directory-files +org-dir t "\\.org$" t)) | |||
org-log-done 'time | |||
css-indent-offset 2 | |||
org-refile-targets (quote ((nil :maxlevel . 1))) | |||
org-capture-templates '(("x" "Note" entry | |||
(file+olp+datetree "journal.org") | |||
"**** [ ] %U %?" :prepend t :kill-buffer t) | |||
("t" "Task" entry | |||
(file+headline "tasks.org" "Inbox") | |||
"* [ ] %?\n%i" :prepend t :kill-buffer t)) | |||
+doom-dashboard-banner-file (expand-file-name "logo.png" doom-private-dir) | |||
+org-capture-todo-file "tasks.org" | |||
org-super-agenda-groups '((:name "Today" | |||
:time-grid t | |||
:scheduled today) | |||
(:name "Due today" | |||
:deadline today) | |||
(:name "Important" | |||
:priority "A") | |||
(:name "Overdue" | |||
:deadline past) | |||
(:name "Due soon" | |||
:deadline future) | |||
(:name "Big Outcomes" | |||
:tag "bo"))) | |||
(add-hook! reason-mode | |||
(add-hook 'before-save-hook #'refmt-before-save nil t)) | |||
(add-hook! | |||
js2-mode 'prettier-js-mode | |||
(add-hook 'before-save-hook #'refmt-before-save nil t)) | |||
(defun insert-current-date () (interactive) | |||
(insert (shell-command-to-string "echo -n $(date +%Y-%m-%d)"))) | |||
(map! :ne "M-/" #'comment-or-uncomment-region) | |||
(map! :ne "SPC / r" #'deadgrep) | |||
(map! :ne "SPC n b" #'org-brain-visualize) | |||
(map! :ne "SPC i d" #'insert-current-date) | |||
;; (def-package! parinfer ; to configure it | |||
;; :bind (("C-," . parinfer-toggle-mode) | |||
;; ("<tab>" . parinfer-smart-tab:dwim-right) | |||
;; ("S-<tab>" . parinfer-smart-tab:dwim-left)) | |||
;; :hook ((clojure-mode emacs-lisp-mode common-lisp-mode lisp-mode) . parinfer-mode) | |||
;; :config (setq parinfer-extensions '(defaults pretty-parens evil paredit))) | |||
(after! org | |||
(set-face-attribute 'org-link nil | |||
:weight 'normal | |||
:background nil) | |||
(set-face-attribute 'org-code nil | |||
:foreground "#a9a1e1" | |||
:background nil) | |||
(set-face-attribute 'org-date nil | |||
:foreground "#5B6268" | |||
:background nil) | |||
(set-face-attribute 'org-level-1 nil | |||
:foreground "steelblue2" | |||
:background nil | |||
:height 1.2 | |||
:weight 'normal) | |||
(set-face-attribute 'org-level-2 nil | |||
:foreground "slategray2" | |||
:background nil | |||
:height 1.0 | |||
:weight 'normal) | |||
(set-face-attribute 'org-level-3 nil | |||
:foreground "SkyBlue2" | |||
:background nil | |||
:height 1.0 | |||
:weight 'normal) | |||
(set-face-attribute 'org-level-4 nil | |||
:foreground "DodgerBlue2" | |||
:background nil | |||
:height 1.0 | |||
:weight 'normal) | |||
(set-face-attribute 'org-level-5 nil | |||
:weight 'normal) | |||
(set-face-attribute 'org-level-6 nil | |||
:weight 'normal) | |||
(set-face-attribute 'org-document-title nil | |||
:foreground "SlateGray1" | |||
:background nil | |||
:height 1.75 | |||
:weight 'bold) | |||
(setq org-fancy-priorities-list '("⚡" "⬆" "⬇" "☕"))) | |||
(after! web-mode | |||
(add-to-list 'auto-mode-alist '("\\.njk\\'" . web-mode))) | |||
(defun +data-hideshow-forward-sexp (arg) | |||
(let ((start (current-indentation))) | |||
(forward-line) | |||
(unless (= start (current-indentation)) | |||
(require 'evil-indent-plus) | |||
(let ((range (evil-indent-plus--same-indent-range))) | |||
(goto-char (cadr range)) | |||
(end-of-line))))) | |||
(add-to-list 'hs-special-modes-alist '(yaml-mode "\\s-*\\_<\\(?:[^:]+\\)\\_>" "" "#" +data-hideshow-forward-sexp nil)) | |||
(setq org-directory "~/Documents/org/") | |||
(setq +magit-hub-features t) | |||
(set-popup-rule! "^\\*Org Agenda" :side 'bottom :size 0.90 :select t :ttl nil) | |||
(set-popup-rule! "^CAPTURE.*\\.org$" :side 'bottom :size 0.90 :select t :ttl nil) | |||
(set-popup-rule! "^\\*org-brain" :side 'right :size 1.00 :select t :ttl nil) | |||
(defun my-open-calendar () | |||
(interactive) | |||
(cfw:open-calendar-buffer | |||
:contents-sources | |||
(list | |||
(cfw:org-create-source "Green") ; org-agenda source | |||
))) |
@ -0,0 +1,136 @@ | |||
;;; init.el -*- lexical-binding: t; -*- | |||
;; Copy me to ~/.doom.d/init.el or ~/.config/doom/init.el, then edit me! | |||
(doom! :feature | |||
;debugger ; FIXME stepping through code, to help you add bugs | |||
:completion | |||
(company ; the ultimate code completion backend | |||
+tng | |||
+auto ; as-you-type code completion | |||
+childframe) ; a nicer company UI. Emacs +26 only! | |||
(ivy | |||
+fuzzy); a search engine for love and life | |||
:ui | |||
deft | |||
workspaces ; tab emulation, persistence & separate workspaces | |||
doom ; what makes DOOM look the way it does | |||
doom-dashboard ; a nifty splash screen for Emacs | |||
modeline ; a snazzy Atom-inspired mode-line | |||
doom-quit ; DOOM quit-message prompts when you quit Emacs | |||
ophints ; display visual hints when editing in evil | |||
hl-todo ; highlight TODO/FIXME/NOTE tags | |||
nav-flash ; blink the current line after jumping | |||
treemacs ; a project drawer, like neotree but cooler | |||
(popup ; tame sudden yet inevitable temporary windows | |||
+all ; catch all popups that start with an asterix | |||
+defaults) ; default popup rules | |||
vc-gutter ; vcs diff in the fringe | |||
vi-tilde-fringe ; fringe tildes to mark beyond EOB | |||
window-select ; visually switch windows | |||
:emacs | |||
(dired | |||
+icons); making dired pretty [functional] | |||
electric ; smarter, keyword-based electric-indent | |||
vc ; version-control and Emacs, sitting in a tree | |||
:term | |||
eshell ; a consistent, cross-platform shell (WIP) | |||
vterm | |||
:editor | |||
(evil +everywhere); come to the dark side, we have cookies | |||
file-templates ; auto-snippets for empty files | |||
fold | |||
multiple-cursors ; editing in many places at once | |||
snippets ; my elves. They type so I don't have to | |||
;;parinfer ; turn lisp into python, sort of | |||
rotate-text ; cycle region at point between text candidates | |||
:tools | |||
eval ; run code, run (also, repls) | |||
gist ; interacting with github gists | |||
(lookup ; helps you navigate your code and documentation | |||
+devdocs ; ...on devdocs.io online | |||
+docsets) ; ...or in Dash docsets locally | |||
;macos ; MacOS-specific commands | |||
make ; run make tasks from Emacs | |||
magit ; | |||
pass ; password manager for nerds | |||
;pdf ; pdf enhancements | |||
;rgb ; creating color strings | |||
tmux ; an API for interacting with tmux | |||
upload ; map local to remote projects via ssh/ftp | |||
flycheck | |||
flyspell | |||
:lang | |||
assembly ; assembly for fun or debugging | |||
cc ; C/C++/Obj-C madness | |||
;; crystal ; ruby at the speed of c | |||
;; clojure ; java with a lisp | |||
;; csharp ; unity, .NET, and mono shenanigans | |||
common-lisp | |||
data ; config/data formats | |||
;erlang ; an elegant language for a more civilized age | |||
;; elixir ; erlang done right | |||
;; elm ; care for a cup of TEA? | |||
emacs-lisp ; drown in parentheses | |||
;;ess ; emacs speaks statistics | |||
go ; the hipster dialect | |||
;; (haskell +intero) ; a language that's lazier than I am | |||
;; hy ; readability of scheme w/ speed of python | |||
(java +meghanada) ; the poster child for carpal tunnel syndrome | |||
javascript ; all(hope(abandon(ye(who(enter(here)))))) | |||
;; julia ; a better, faster MATLAB | |||
latex ; writing papers in Emacs has never been so fun | |||
;; ledger ; an accounting system in Emacs | |||
;; lua ; one-based indices? one-based indices | |||
markdown ; writing docs for people to ignore | |||
;; nix ; I hereby declare "nix geht mehr!" | |||
;; ocaml ; an objective camel | |||
(org ; organize your plain life in plain text | |||
+attach ; custom attachment system | |||
+babel ; running code in org | |||
+hugo | |||
+capture ; org-capture in and outside of Emacs | |||
+export ; Exporting org to whatever you want | |||
+present) ; Emacs for presentations | |||
;; +publish ; Emacs+Org as a static site generator | |||
;; perl ; write code no one else can comprehend | |||
php ; perl's insecure younger brother | |||
;; plantuml ; diagrams for confusing people more | |||
;; purescript ; javascript, but functional | |||
(python +lsp +pyright) ; beautiful is better than ugly | |||
rest ; Emacs as a REST client | |||
;; ruby ; 1.step do {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} | |||
;; rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() | |||
;; scala ; java, but good | |||
sh ; she sells (ba|z)sh shells on the C xor | |||
;; swift ; who asked for emoji variables? | |||
web ; the tubes | |||
;; Applications are complex and opinionated modules that transform Emacs | |||
;; toward a specific purpose. They may have additional dependencies and | |||
;; should be loaded late. | |||
:app | |||
(:if (executable-find "mu") (mu4e +org +gmail)) | |||
;;notmuch | |||
;;(wanderlust +gmail) | |||
calendar ; A dated approach to timetabling | |||
;;emms ; Multimedia in Emacs is music to my ears | |||
everywhere ; *leave* Emacs!? You must be joking. | |||
irc ; how neckbeards socialize | |||
(rss +org) ; emacs as an RSS reader | |||
;;twitter ; twitter client https://twitter.com/vnought | |||
:config | |||
;; The default module set reasonable defaults for Emacs. It also provides | |||
;; a Spacemacs-inspired keybinding scheme, a custom yasnippet library, | |||
;; and additional ex commands for evil-mode. Use it as a reference for | |||
;; your own modules. | |||
(default +bindings +snippets +evil-commands)) |
@ -0,0 +1,12 @@ | |||
;;; -*- lexical-binding: t; -*- | |||
;;; -*- no-byte-compile: t; -*- | |||
(package! reason-mode) | |||
(package! prettier-js) | |||
(package! org-fancy-priorities) | |||
(package! move-text) | |||
(package! vue-mode) | |||
(package! org-super-agenda) | |||
(package! deadgrep) | |||
(package! sql-indent) | |||
(package! org-brain) |
@ -0,0 +1,156 @@ | |||
;;; doom-material-theme.el --- inspired by Material Theme by equinusocio -*- no-byte-compile: t; -*- | |||
(require 'doom-themes) | |||
;; | |||
(defgroup doom-material-ocean-theme nil | |||
"Options for doom-themes" | |||
:group 'doom-themes) | |||
(defcustom doom-material-ocean-padded-modeline doom-themes-padded-modeline | |||
"If non-nil, adds a 4px padding to the mode-line. | |||
Can be an integer to determine the exact padding." | |||
:group 'doom-material-ocean-theme | |||
:type '(choice integer boolean)) | |||
;; | |||
(def-doom-theme doom-material-ocean | |||
"A dark theme inspired by Material Theme by equinusocio" | |||
;; name default 256 16 | |||
((bg '("#0F111A" nil nil)) | |||
(bg-alt '("#00010A" nil nil)) | |||
(base0 '("#171F24" "black" "black")) | |||
(base1 '("#1C262B" "#262626" "brightblack")) | |||
(base2 '("#222D32" "#303030" "brightblack")) | |||
(base3 '("#171F24" "#3a3a3a" "brightblack")) | |||
(base4 '("#314048" "#444444" "brightblack")) | |||
(base5 '("#37474F" "#585858" "brightblack")) | |||
(base6 '("#556369" "#626262" "brightblack")) | |||
(base7 '("#737E84" "#767676" "brightblack")) | |||
(base8 '("#9BA3A7" "#a8a8a8" "white")) | |||
(fg '("#E5E9F0" "#e4e4e4" "brightwhite")) | |||
(fg-alt '("#BFC7D5" "#bcbcbc" "white")) | |||
(grey base5) | |||
(red '("#BF616A" "#ff0000" "red")) | |||
(orange '("#f78c6c" "#ff5f00" "brightred")) | |||
(green '("#A3BE8C" "#afff00" "green")) | |||
(teal '("#44b9b1" "#00d7af" "brightgreen")) | |||
(yellow '("#EBCB8B" "#ffd700" "brightyellow")) | |||
(blue '("#88C0D0" "#5fafff" "brightblue")) | |||
(dark-blue '("#81A1C1" "#d7ffff" "blue")) | |||
(magenta '("#A48EAD" "#d787d7" "brightmagenta")) | |||
(violet '("#bb80b3" "#d787af" "magenta")) | |||
(cyan '("#89DDFF" "#5fd7ff" "brightcyan")) | |||
(dark-cyan '("#80cbc4" "#00d7af" "cyan")) | |||
;; face categories -- required for all themes | |||
(highlight magenta) | |||
(vertical-bar base2) | |||
(selection base4) | |||
(builtin blue) | |||
(comments base6) | |||
(doc-comments base6) | |||
(constants orange) | |||
(functions blue) | |||
(keywords cyan) | |||
(methods blue) | |||
(operators cyan) | |||
(type magenta) | |||
(strings green) | |||
(variables yellow) | |||
(numbers orange) | |||
(region base3) | |||
(error red) | |||
(warning yellow) | |||
(success green) | |||
(vc-modified blue) | |||
(vc-added green) | |||
(vc-deleted red) | |||
;; custom categories | |||
(modeline-bg base2) | |||
(modeline-bg-alt (doom-darken bg 0.01)) | |||
(modeline-fg base8) | |||
(modeline-fg-alt comments) | |||
(-modeline-pad | |||
(when doom-material-ocean-padded-modeline | |||
(if (integerp doom-material-ocean-padded-modeline) doom-material-ocean-padded-modeline 4)))) | |||
;; --- base faces ------------------------ | |||
(((lazy-highlight &override) :background base4 :foreground fg :distant-foreground fg :bold bold) | |||
(doom-modeline-buffer-path :foreground green :weight 'bold) | |||
(doom-modeline-buffer-major-mode :inherit 'doom-modeline-buffer-path) | |||
;; highlight-thing highlight-symbol | |||
(highlight-symbol-face :background region :distant-foreground fg-alt) | |||
;; highlight-thing | |||
(highlight-thing :background region :distant-foreground fg-alt) | |||
(mode-line | |||
:background modeline-bg :foreground modeline-fg | |||
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg))) | |||
(mode-line-inactive | |||
:background modeline-bg-alt :foreground modeline-fg-alt | |||
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-alt))) | |||
(fringe :background base2) | |||
;; --- major-mode faces ------------------------ | |||
;; man-mode | |||
(Man-overstrike :inherit 'bold :foreground magenta) | |||
(Man-underline :inherit 'underline :foreground blue) | |||
;; org-mode | |||
((org-block &override) :background base2) | |||
((org-block-background &override) :background base2) | |||
((org-block-begin-line &override) :background base2) | |||
;; --- plugin faces ------------------- | |||
;; css-mode / scss-mode | |||
(css-proprietary-property :foreground orange) | |||
(css-property :foreground green) | |||
(css-selector :foreground blue) | |||
;; dired-k | |||
(dired-k-commited :foreground base4) | |||
(dired-k-modified :foreground vc-modified) | |||
(dired-k-ignored :foreground cyan) | |||
(dired-k-added :foreground vc-added) | |||
;; ivy | |||
(ivy-current-match :background base5) | |||
;; js2-mode | |||
(js2-jsdoc-tag :foreground magenta) | |||
(js2-object-property :foreground yellow) | |||
(js2-object-property-access :foreground cyan) | |||
(js2-function-param :foreground violet) | |||
(js2-jsdoc-type :foreground base8) | |||
(js2-jsdoc-value :foreground cyan) | |||
;; lsp | |||
(lsp-headerline-breadcrumb-symbols-face :foreground base7) | |||
;; rainbow-delimiters | |||
(rainbow-delimiters-depth-1-face :foreground magenta) | |||
(rainbow-delimiters-depth-2-face :foreground orange) | |||
(rainbow-delimiters-depth-3-face :foreground green) | |||
(rainbow-delimiters-depth-4-face :foreground cyan) | |||
(rainbow-delimiters-depth-5-face :foreground violet) | |||
(rainbow-delimiters-depth-6-face :foreground yellow) | |||
(rainbow-delimiters-depth-7-face :foreground blue) | |||
(rainbow-delimiters-depth-8-face :foreground teal) | |||
(rainbow-delimiters-depth-9-face :foreground dark-cyan) | |||
;; rjsx-mode | |||
(rjsx-tag :foreground red) | |||
(rjsx-attr :foreground yellow :slant 'italic :weight 'medium) | |||
;; tooltip | |||
(tooltip :background (doom-darken bg-alt 0.2) :foreground fg))) | |||
(provide 'doom-material-ocean-theme) |
@ -0,0 +1,14 @@ | |||
{ | |||
"host": "mail.fr1nge.xyz", | |||
"port": 993, | |||
"tls": true, | |||
"tlsOptions": { | |||
"rejectUnauthorized": true | |||
}, | |||
"username": "yigit@fr1nge.xyz", | |||
"passwordCmd": "pass show Email/fr1nge.xyz/yigit@fr1nge.xyz", | |||
"onNewMail": "mailsync yigit@fr1nge.xyz", | |||
"boxes": [ | |||
"INBOX" | |||
] | |||
} |
@ -0,0 +1,14 @@ | |||
{ | |||
"host": "mail.privateemail.com", | |||
"port": 993, | |||
"tls": true, | |||
"tlsOptions": { | |||
"rejectUnauthorized": true | |||
}, | |||
"username": "yigit@yigitcolakoglu.com", | |||
"passwordCmd": "pass show Email/privateemail.com/yigit@yigitcolakoglu.com", | |||
"onNewMail": "mailsync yigit@yigitcolakoglu.com", | |||
"boxes": [ | |||
"INBOX" | |||
] | |||
} |
@ -0,0 +1,14 @@ | |||
{ | |||
"host": "outlook.office365.com", | |||
"port": 993, | |||
"tls": true, | |||
"tlsOptions": { | |||
"rejectUnauthorized": true | |||
}, | |||
"username": "yigitcolakoglu@hotmail.com", | |||
"passwordCmd": "pass show AppPass/microsoft.com/yigitcolakoglu@hotmail.com", | |||
"onNewMail": "mailsync yigitcolakoglu@hotmail.com", | |||
"boxes": [ | |||
"INBOX" | |||
] | |||
} |
@ -0,0 +1,46 @@ | |||
# vim: filetype=neomuttrc | |||
# muttrc file for account yigit@fr1nge.xyz | |||
set realname = "Yigit Colakoglu" | |||
set from = "yigit@fr1nge.xyz" | |||
set sendmail = "msmtp -a yigit@fr1nge.xyz" | |||
alias me yigit <yigit@fr1nge.xyz> | |||
set folder = "/home/yigit/.local/share/mail/yigit@fr1nge.xyz" | |||
set header_cache = /home/yigit/.cache/mutt-wizard/yigit@fr1nge.xyz/headers | |||
set message_cachedir = /home/yigit/.cache/mutt-wizard/yigit@fr1nge.xyz/bodies | |||
set mbox_type = Maildir | |||
set signature = "/home/yigit/.config/mutt/accounts/3-yigit@fr1nge.xyz.sig" | |||
bind index,pager gg noop | |||
bind index,pager g noop | |||
bind index,pager M noop | |||
bind index,pager C noop | |||
bind index gg first-entry | |||
unmailboxes * | |||
unalternates * | |||
unset signature | |||
unmacro index o | |||
macro index o "<shell-escape>mw -y yigit@fr1nge.xyz<enter>" "run mbsync to sync yigit@fr1nge.xyz" | |||
mailboxes "=Drafts" "=INBOX" "=Junk" "=Sent" "=Archive" "=Deleted Items" | |||
macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" | |||
macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" | |||
macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" | |||
macro index,pager gj "<change-folder>=Junk<enter>" "go to spam" | |||
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to spam" | |||
macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to spam" | |||
set record = "+Sent" | |||
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" | |||
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent" | |||
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent" | |||
macro index,pager gt "<change-folder>=Deleted Items<enter>" "go to trash" | |||
macro index,pager Mt ";<save-message>=Deleted Items<enter>" "move mail to trash" | |||
macro index,pager Ct ";<copy-message>=Deleted Items<enter>" "copy mail to trash" | |||
set trash = "+Trash" | |||
set postponed = "+Drafts" | |||
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" | |||
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts" | |||
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts" | |||
macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" | |||
macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" | |||
macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" | |||
set spoolfile = "+INBOX" |
@ -0,0 +1,4 @@ | |||
Yiğit Çolakoğlu | |||
=================== | |||
Senior Student at Ted Ankara College Foundation High School | |||
@ -1,4 +0,0 @@ | |||
setlocal wrap linebreak nolist | |||
" Only run LanguageTool between % GRAMMAROUS % tags | |||
map <leader>G magg:/% GRAMMAROUS %<CR>jVnk:GrammarousCheck<CR>:noh<CR>`a |
@ -0,0 +1,565 @@ | |||
" Vim Color File | |||
" Name: material.vim | |||
" Maintainer: https://github.com/kaicataldo/material.vim | |||
" License: The MIT License (MIT) | |||
" === Configuration === | |||
" Clear any other set colors | |||
highlight clear | |||
if exists('syntax_on') | |||
syntax reset | |||
endif | |||
let g:colors_name = 'material' | |||
let g:material_theme_style = get(g:, 'material_theme_style', 'default') | |||
let g:material_terminal_italics = get(g:, 'material_terminal_italics', 0) | |||
" For backwards compatibility | |||
if (g:material_theme_style == 'dark') | |||
let g:material_theme_style = 'darker' | |||
endif | |||
" === Functions === | |||
function! s:SetHighlight(group, fg, bg, attr) | |||
let l:attr = a:attr | |||
if !g:material_terminal_italics && l:attr == 'italic' | |||
let l:attr = '' | |||
endif | |||
if empty(l:attr) | |||
let l:attr = 'none' | |||
endif | |||
if !empty(a:fg) | |||
exec 'hi ' . a:group . ' guifg=' . a:fg.gui . ' ctermfg=' . a:fg.cterm | |||
endif | |||
if !empty(a:bg) | |||
exec 'hi ' . a:group . ' guibg=' . a:bg.gui . ' ctermbg=' . a:bg.cterm | |||
endif | |||
if !empty(l:attr) | |||
exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr | |||
endif | |||
endfun | |||
" === Color Definitions === | |||
" Default colors | |||
set background=dark | |||
let s:bg = { 'gui': '#263238', 'cterm': 'none' } | |||
let s:fg = { 'gui': '#eeffff', 'cterm': 231 } | |||
let s:invisibles = { 'gui': '#65738e', 'cterm': 66 } | |||
let s:comments = { 'gui': '#546e7a', 'cterm': 145 } | |||
let s:caret = { 'gui': '#ffcc00', 'cterm': 220 } | |||
let s:selection = { 'gui': '#2c3b41', 'cterm': 239 } | |||
let s:guides = { 'gui': '#37474f', 'cterm': 17 } | |||
let s:line_numbers = { 'gui': '#37474f', 'cterm': 145 } | |||
let s:line_highlight = { 'gui': '#1a2327', 'cterm': 235 } | |||
let s:white = { 'gui': '#ffffff', 'cterm': 231 } | |||
let s:black = { 'gui': '#000000', 'cterm': 232 } | |||
let s:red = { 'gui': '#ff5370', 'cterm': 203 } | |||
let s:orange = { 'gui': '#f78c6c', 'cterm': 209 } | |||
let s:yellow = { 'gui': '#ffcb6b', 'cterm': 11 } | |||
let s:green = { 'gui': '#c3e88d', 'cterm': 2 } " 186 –– almost perfect match | |||
let s:cyan = { 'gui': '#89ddff', 'cterm': 117 } | |||
let s:blue = { 'gui': '#82aaff', 'cterm': 111 } | |||
let s:paleblue = { 'gui': '#b2ccd6', 'cterm': 152 } | |||
let s:purple = { 'gui': '#c792ea', 'cterm': 176 } | |||
let s:brown = { 'gui': '#c17e70', 'cterm': 137 } | |||
let s:pink = { 'gui': '#f07178', 'cterm': 204 } | |||
let s:violet = { 'gui': '#bb80b3', 'cterm': 139 } | |||
" Theme-specific color overrides | |||
if g:material_theme_style == 'palenight' || g:material_theme_style == 'palenight-community' | |||
let s:bg = { 'gui': '#292d3e', 'cterm': 'none' } | |||
let s:fg = { 'gui': '#a6accd', 'cterm': 146 } | |||
let s:invisibles = { 'gui': '#4e5579', 'cterm': 60 } | |||
let s:comments = { 'gui': '#676e95', 'cterm': 60 } | |||
let s:selection = { 'gui': '#343b51', 'cterm': 60 } | |||
let s:guides = { 'gui': '#4e5579', 'cterm': 60 } | |||
let s:line_numbers = { 'gui': '#3a3f58', 'cterm': 60 } | |||
let s:line_highlight = { 'gui': '#1c1f2b', 'cterm': 234 } | |||
elseif g:material_theme_style == 'darker' || g:material_theme_style == 'darker-community' | |||
let s:bg = { 'gui': '#212121', 'cterm': 'none' } | |||
let s:fg = { 'gui': '#eeffff', 'cterm': 231 } | |||
let s:invisibles = { 'gui': '#65737e', 'cterm': 66 } | |||
let s:comments = { 'gui': '#545454', 'cterm': 59 } | |||
let s:selection = { 'gui': '#2c2c2c', 'cterm': 237 } | |||
let s:guides = { 'gui': '#424242', 'cterm': 0 } | |||
let s:line_numbers = { 'gui': '#424242', 'cterm': 0 } | |||
let s:line_highlight = { 'gui': '#171717', 'cterm': 0 } | |||
elseif g:material_theme_style == 'ocean' || g:material_theme_style == 'ocean-community' | |||
let s:bg = { 'gui': '#0f111a', 'cterm': 'none' } | |||
let s:fg = { 'gui': '#8f93a2', 'cterm': 103 } | |||
let s:invisibles = { 'gui': '#80869e', 'cterm': 103 } | |||
let s:comments = { 'gui': '#464b5d', 'cterm': 60 } | |||
let s:selection = { 'gui': '#1f2233', 'cterm': 60 } | |||
let s:guides = { 'gui': '#3b3f51', 'cterm': 17 } | |||
let s:line_numbers = { 'gui': '#3b3f51', 'cterm': 60 } | |||
let s:line_highlight = { 'gui': '#0a0c12', 'cterm': 0 } | |||
elseif g:material_theme_style == 'lighter' || g:material_theme_style == 'lighter-community' | |||
set background=light | |||
let s:bg = { 'gui': '#fafafa', 'cterm': 'none' } | |||
let s:fg = { 'gui': '#90a4ae', 'cterm': 109 } | |||
let s:invisibles = { 'gui': '#e7eaec', 'cterm': 189 } | |||
let s:comments = { 'gui': '#90a4ae', 'cterm': 109 } | |||
let s:caret = { 'gui': '#272727', 'cterm': 0 } | |||
let s:selection = { 'gui': '#ebf4f3', 'cterm': 254 } | |||
let s:guides = { 'gui': '#b0bec5', 'cterm': 146 } | |||
let s:line_numbers = { 'gui': '#cfd8dc', 'cterm': 188 } | |||
let s:line_highlight = { 'gui': '#ecf0f1', 'cterm': 253 } | |||
let s:white = { 'gui': '#ffffff', 'cterm': 231 } | |||
let s:black = { 'gui': '#000000', 'cterm': 0 } | |||
let s:red = { 'gui': '#e53935', 'cterm': 160 } | |||
let s:orange = { 'gui': '#f76d47', 'cterm': 202 } | |||
let s:yellow = { 'gui': '#ffb62c', 'cterm': 214 } | |||
let s:green = { 'gui': '#91b859', 'cterm': 107 } | |||
let s:cyan = { 'gui': '#39adb5', 'cterm': 37 } | |||
let s:blue = { 'gui': '#6182b8', 'cterm': 67 } | |||
let s:paleblue = { 'gui': '#8796b0', 'cterm': 103 } | |||
let s:purple = { 'gui': '#7c4dff', 'cterm': 99 } | |||
let s:brown = { 'gui': '#c17e70', 'cterm': 137 } | |||
let s:pink = { 'gui': '#ff5370', 'cterm': 203 } | |||
let s:violet = { 'gui': '#945eb8', 'cterm': 97 } | |||
endif | |||
" Defined globally so that the Airline theme has access | |||
let g:material_colorscheme_map = {} | |||
let g:material_colorscheme_map.bg = s:bg | |||
let g:material_colorscheme_map.fg = s:fg | |||
let g:material_colorscheme_map.invisibles = s:invisibles | |||
let g:material_colorscheme_map.comments = s:comments | |||
let g:material_colorscheme_map.caret = s:caret | |||
let g:material_colorscheme_map.selection = s:selection | |||
let g:material_colorscheme_map.guides = s:guides | |||
let g:material_colorscheme_map.line_numbers = s:line_numbers | |||
let g:material_colorscheme_map.line_highlight = s:line_highlight | |||
let g:material_colorscheme_map.white = s:white | |||
let g:material_colorscheme_map.black = s:black | |||
let g:material_colorscheme_map.red = s:red | |||
let g:material_colorscheme_map.orange = s:orange | |||
let g:material_colorscheme_map.yellow = s:yellow | |||
let g:material_colorscheme_map.green = s:green | |||
let g:material_colorscheme_map.cyan = s:cyan | |||
let g:material_colorscheme_map.blue = s:blue | |||
let g:material_colorscheme_map.paleblue = s:paleblue | |||
let g:material_colorscheme_map.purple = s:purple | |||
let g:material_colorscheme_map.brown = s:brown | |||
let g:material_colorscheme_map.pink = s:pink | |||
let g:material_colorscheme_map.violet = s:violet | |||
" === Highlights === | |||
" Vim Editor | |||
call s:SetHighlight('ColorColumn', '', s:invisibles, '') | |||
call s:SetHighlight('Cursor', s:bg, s:caret, '') | |||
call s:SetHighlight('CursorColumn', '', s:line_highlight, '') | |||
call s:SetHighlight('CursorLine', '', s:line_highlight, '') | |||
call s:SetHighlight('CursorLineNr', s:comments, '', '') | |||
call s:SetHighlight('Directory', s:blue, '', '') | |||
call s:SetHighlight('DiffAdd', s:green, s:bg, '') | |||
call s:SetHighlight('DiffDelete', s:red, s:bg, '') | |||
call s:SetHighlight('DiffChange', s:yellow, s:bg, '') | |||
call s:SetHighlight('DiffText', s:orange, s:bg, '') | |||
call s:SetHighlight('ErrorMsg', s:bg, s:red, 'bold') | |||
call s:SetHighlight('FoldColumn', s:line_numbers, s:bg, '') | |||
call s:SetHighlight('Folded', s:brown, s:bg, 'bold') | |||
call s:SetHighlight('LineNr', s:line_numbers, '', '') | |||
call s:SetHighlight('MatchParen', s:comments, s:cyan, 'bold') | |||
call s:SetHighlight('ModeMsg', s:green, '', '') | |||
call s:SetHighlight('MoreMsg', s:green, '', '') | |||
call s:SetHighlight('NonText', s:comments, '', '') | |||
call s:SetHighlight('Normal', s:fg, s:bg, '') | |||
call s:SetHighlight('Pmenu', s:fg, s:selection, '') | |||
call s:SetHighlight('PmenuSel', s:bg, s:cyan, '') | |||
call s:SetHighlight('PmenuSbar', '', s:selection, '') | |||
call s:SetHighlight('PmenuThumb', '', s:comments, '') | |||
call s:SetHighlight('Question', s:blue, '', '') | |||
call s:SetHighlight('IncSearch', s:white, s:comments, 'none') | |||
call s:SetHighlight('Search', s:white, s:comments, 'none') | |||
call s:SetHighlight('SignColumn', s:fg, s:bg, '') | |||
call s:SetHighlight('SpecialKey', s:comments, '', '') | |||
call s:SetHighlight('SpellCap', s:blue, '', 'undercurl') | |||
call s:SetHighlight('SpellBad', s:red, '', 'undercurl') | |||
call s:SetHighlight('StatusLine', s:fg, s:selection, '') | |||
call s:SetHighlight('StatusLineNC', s:comments, s:selection, '') | |||
call s:SetHighlight('StatusLineTerm', s:bg, s:green, '') | |||
call s:SetHighlight('StatusLineTermNC', s:bg, s:green, '') | |||
call s:SetHighlight('TabLine', s:fg, s:line_numbers, '') | |||
call s:SetHighlight('TabLineFill', s:fg, s:selection, '') | |||
call s:SetHighlight('TabLineSel', s:bg, s:cyan, '') | |||
call s:SetHighlight('Title', s:green, '', '') | |||
call s:SetHighlight('VertSplit', s:comments, '', '') | |||
call s:SetHighlight('Visual', s:fg, s:selection, '') | |||
call s:SetHighlight('WarningMsg', s:red, '', '') | |||
call s:SetHighlight('WildMenu', s:bg, s:cyan, '') | |||
" Syntax | |||
call s:SetHighlight('Comment', s:comments, '', 'italic') | |||
call s:SetHighlight('Conceal', s:brown, s:bg, '') | |||
call s:SetHighlight('Constant', s:orange, '', '') | |||
call s:SetHighlight('String', s:green, '', '') | |||
call s:SetHighlight('Character', s:green, '', '') | |||
call s:SetHighlight('Identifier', s:red, '', '') | |||
call s:SetHighlight('Function', s:blue, '', '') | |||
call s:SetHighlight('Statement', s:purple, '', '') | |||
call s:SetHighlight('Operator', s:cyan, '', '') | |||
call s:SetHighlight('PreProc', s:cyan, '', '') | |||
call s:SetHighlight('Include', s:blue, '', '') | |||
call s:SetHighlight('Define', s:purple, '', '') | |||
call s:SetHighlight('Macro', s:purple, '', '') | |||
call s:SetHighlight('Type', s:yellow, '', '') | |||
call s:SetHighlight('Structure', s:cyan, '', '') | |||
call s:SetHighlight('Special', s:violet, '', '') | |||
call s:SetHighlight('Underlined', s:blue, '', '') | |||
call s:SetHighlight('Error', s:bg, s:red, '') | |||
call s:SetHighlight('Todo', s:orange, s:bg, 'italic') | |||
" Legacy groups for official git.vim and diff.vim syntax | |||
hi! link diffFile DiffAdd | |||
hi! link diffNewFile DiffDelete | |||
hi! link diffAdded DiffAdd | |||
hi! link diffChanged DiffChange | |||
hi! link diffLine DiffChange | |||
hi! link diffRemoved DiffDelete | |||
" Git Commit Messages | |||
call s:SetHighlight('gitcommitHeader', s:purple, '', '') | |||
call s:SetHighlight('gitcommitUnmerged', s:green, '', '') | |||
call s:SetHighlight('gitcommitSelectedFile', s:green, '', '') | |||
call s:SetHighlight('gitcommitDiscardedFile', s:red, '', '') | |||
call s:SetHighlight('gitcommitUnmergedFile', s:yellow, '', '') | |||
call s:SetHighlight('gitcommitSelectedType', s:green, '', '') | |||
call s:SetHighlight('gitcommitSummary', s:blue, '', '') | |||
call s:SetHighlight('gitcommitDiscardedType', s:red, '', '') | |||
hi link gitcommitNoBranch gitcommitBranch | |||
hi link gitcommitUntracked gitcommitComment | |||
hi link gitcommitDiscarded gitcommitComment | |||
hi link gitcommitSelected gitcommitComment | |||
hi link gitcommitDiscardedArrow gitcommitDiscardedFile | |||
hi link gitcommitSelectedArrow gitcommitSelectedFile | |||
hi link gitcommitUnmergedArrow gitcommitUnmergedFile | |||
" Javascript | |||
call s:SetHighlight('javaScriptBraces', s:fg, '', '') | |||
call s:SetHighlight('javaScriptNull', s:orange, '', '') | |||
call s:SetHighlight('javaScriptIdentifier', s:purple, '', '') | |||
call s:SetHighlight('javaScriptNumber', s:orange, '', '') | |||
call s:SetHighlight('javaScriptRequire', s:cyan, '', '') | |||
call s:SetHighlight('javaScriptReserved', s:purple, '', '') | |||
" pangloss/vim-javascript | |||
if g:material_theme_style !~ '-community$' | |||
call s:SetHighlight('jsArrowFunction', s:purple, '', '') | |||
call s:SetHighlight('jsAsyncKeyword', s:purple, '', '') | |||
call s:SetHighlight('jsBooleanTrue', s:orange, '', '') | |||
call s:SetHighlight('jsBooleanFalse', s:orange, '', '') | |||
call s:SetHighlight('jsBrackets', s:pink, '', '') | |||
call s:SetHighlight('jsCatch', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsClassBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsClassDefinition', s:yellow, '', '') | |||
call s:SetHighlight('jsClassFuncName', s:pink, '', '') | |||
call s:SetHighlight('jsClassProperty', s:pink, '', '') | |||
call s:SetHighlight('jsClassKeyword', s:purple, '', '') | |||
call s:SetHighlight('jsConditional', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsDocParam', s:green, '', '') | |||
call s:SetHighlight('jsDocTags', s:cyan, '', '') | |||
call s:SetHighlight('jsDot', s:cyan, '', '') | |||
call s:SetHighlight('jsException', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsExceptions', s:yellow, '', '') | |||
call s:SetHighlight('jsExport', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsExportDefault', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsExtendsKeyword', s:purple, '', '') | |||
call s:SetHighlight('jsFinally', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsFinallyBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '') | |||
call s:SetHighlight('jsForAwait', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsFrom', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsFuncBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsFuncCall', s:blue, '', '') | |||
call s:SetHighlight('jsFuncParens', s:cyan, '', '') | |||
call s:SetHighlight('jsFunction', s:purple, '', '') | |||
call s:SetHighlight('jsFunctionKey', s:pink, '', '') | |||
call s:SetHighlight('jsGlobalObjects', s:yellow, '', '') | |||
call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '') | |||
call s:SetHighlight('jsIfElseBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsImport', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsModuleAs', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsModuleBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsNull', s:cyan, '', '') | |||
call s:SetHighlight('jsNoise', s:cyan, '', '') | |||
call s:SetHighlight('jsObjectBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsObjectColon', s:cyan, '', '') | |||
call s:SetHighlight('jsObjectKey', s:pink, '', '') | |||
call s:SetHighlight('jsObjectSeparator', s:cyan, '', '') | |||
call s:SetHighlight('jsParens', s:pink, '', '') | |||
call s:SetHighlight('jsRepeat', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsReturn', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsStorageClass', s:purple, '', '') | |||
call s:SetHighlight('jsTemplateBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsTemplateExpression', s:fg, '', '') | |||
call s:SetHighlight('jsTemplateString', s:green, '', '') | |||
call s:SetHighlight('jsThis', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsTry', s:cyan, '', 'italic') | |||
call s:SetHighlight('jsTryCatchBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsUndefined', s:cyan, '', '') | |||
else | |||
call s:SetHighlight('jsArrowFunction', s:purple, '', '') | |||
call s:SetHighlight('jsAsyncKeyword', s:purple, '', '') | |||
call s:SetHighlight('jsExtendsKeyword', s:purple, '', '') | |||
call s:SetHighlight('jsClassKeyword', s:purple, '', '') | |||
call s:SetHighlight('jsDocParam', s:green, '', '') | |||
call s:SetHighlight('jsDocTags', s:cyan, '', '') | |||
call s:SetHighlight('jsForAwait', s:purple, '', '') | |||
call s:SetHighlight('jsFlowArgumentDef', s:yellow, '', '') | |||
call s:SetHighlight('jsFrom', s:purple, '', '') | |||
call s:SetHighlight('jsImport', s:purple, '', '') | |||
call s:SetHighlight('jsExport', s:purple, '', '') | |||
call s:SetHighlight('jsExportDefault', s:purple, '', '') | |||
call s:SetHighlight('jsFuncCall', s:blue, '', '') | |||
call s:SetHighlight('jsFunction', s:purple, '', '') | |||
call s:SetHighlight('jsGlobalObjects', s:yellow, '', '') | |||
call s:SetHighlight('jsGlobalNodeObjects', s:yellow, '', '') | |||
call s:SetHighlight('jsModuleAs', s:purple, '', '') | |||
call s:SetHighlight('jsNull', s:orange, '', '') | |||
call s:SetHighlight('jsStorageClass', s:purple, '', '') | |||
call s:SetHighlight('jsTemplateBraces', s:red, '', '') | |||
call s:SetHighlight('jsTemplateExpression', s:red, '', '') | |||
call s:SetHighlight('jsThis', s:red, '', '') | |||
call s:SetHighlight('jsUndefined', s:orange, '', '') | |||
endif | |||
" MaxMEllon/vim-jsx-pretty | |||
call s:SetHighlight('jsxTag', s:cyan, '', '') | |||
call s:SetHighlight('jsxTagName', s:pink, '', '') | |||
call s:SetHighlight('jsxComponentName', s:yellow, '', '') | |||
call s:SetHighlight('jsxCloseTag', s:cyan, '', '') | |||
call s:SetHighlight('jsxEscapeJs', s:fg, '', '') | |||
call s:SetHighlight('jsxCloseString', s:cyan, '', '') | |||
call s:SetHighlight('jsxAttrib', s:purple, '', 'italic') | |||
call s:SetHighlight('jsxString', s:green, '', '') | |||
call s:SetHighlight('jsxEqual', s:purple, '', '') | |||
call s:SetHighlight('jsxDot', s:cyan, '', '') | |||
call s:SetHighlight('jsxSpreadOperator', s:purple, '', '') | |||
call s:SetHighlight('jsxBraces', s:cyan, '', '') | |||
call s:SetHighlight('jsxNamespace', s:cyan, '', '') | |||
" JSON | |||
call s:SetHighlight('jsonBraces', s:fg, '', '') | |||
" CSS | |||
call s:SetHighlight('cssAttrComma', s:fg, '', '') | |||
call s:SetHighlight('cssPseudoClassId', s:yellow, '', '') | |||
call s:SetHighlight('cssBraces', s:fg, '', '') | |||
call s:SetHighlight('cssClassName', s:yellow, '', '') | |||
call s:SetHighlight('cssClassNameDot', s:yellow, '', '') | |||
call s:SetHighlight('cssFunctionName', s:blue, '', '') | |||
call s:SetHighlight('cssImportant', s:cyan, '', '') | |||
call s:SetHighlight('cssIncludeKeyword', s:purple, '', '') | |||
call s:SetHighlight('cssTagName', s:red, '', '') | |||
call s:SetHighlight('cssMediaType', s:orange, '', '') | |||
call s:SetHighlight('cssProp', s:fg, '', '') | |||
call s:SetHighlight('cssSelectorOp', s:cyan, '', '') | |||
call s:SetHighlight('cssSelectorOp2', s:cyan, '', '') | |||
" Sass | |||
call s:SetHighlight('sassAmpersand', s:red, '', '') | |||
call s:SetHighlight('sassClassChar', s:yellow, '', '') | |||
call s:SetHighlight('sassMixinName', s:blue, '', '') | |||
call s:SetHighlight('sassVariable', s:purple, '', '') | |||
" Less | |||
call s:SetHighlight('lessAmpersand', s:red, '', '') | |||
call s:SetHighlight('lessClassChar', s:yellow, '', '') | |||
call s:SetHighlight('lessCssAttribute', s:fg, '', '') | |||
call s:SetHighlight('lessFunction', s:blue, '', '') | |||
call s:SetHighlight('lessVariable', s:purple, '', '') | |||
" HTML | |||
call s:SetHighlight('htmlTagName', s:pink, '', '') | |||
call s:SetHighlight('htmlEndTag', s:cyan, '', '') | |||
call s:SetHighlight('htmlTag', s:cyan, '', '') | |||
call s:SetHighlight('htmlSpecialTagName', s:yellow, '', '') | |||
call s:SetHighlight('htmlArg', s:purple, '', 'italic') | |||
call s:SetHighlight('htmlTitle', s:fg, '', '') | |||
call s:SetHighlight('htmlLink', s:fg, '', '') | |||
"" Consistency with plasticboy/vim-markdown | |||
call s:SetHighlight('htmlBold', s:pink, '', 'bold') | |||
call s:SetHighlight('htmlH1', s:yellow, '', '') | |||
call s:SetHighlight('htmlH2', s:yellow, '', '') | |||
call s:SetHighlight('htmlH3', s:yellow, '', '') | |||
call s:SetHighlight('htmlH4', s:yellow, '', '') | |||
call s:SetHighlight('htmlH5', s:yellow, '', '') | |||
call s:SetHighlight('htmlH6', s:yellow, '', '') | |||
call s:SetHighlight('htmlItalic', s:pink, '', 'italic') | |||
" XML | |||
call s:SetHighlight('xmlAttrib', s:purple, '', 'italic') | |||
call s:SetHighlight('xmlEndTag', s:cyan, '', '') | |||
call s:SetHighlight('xmlTag', s:cyan, '', '') | |||
call s:SetHighlight('xmlTagName', s:pink, '', '') | |||
" Golang | |||
call s:SetHighlight('goFunctionCall', s:blue, '', '') | |||
call s:SetHighlight('goReceiverType', s:green, '', '') | |||
call s:SetHighlight('goParamName', s:orange, '', '') | |||
call s:SetHighlight('goParamType', s:green, '', '') | |||
call s:SetHighlight('goTypeDecl', s:purple, '', '') | |||
call s:SetHighlight('goTypeName', s:yellow, '', '') | |||
call s:SetHighlight('goBuiltins', s:red, '', '') | |||
call s:SetHighlight('goType', s:purple, '', '') | |||
call s:SetHighlight('goSignedInts', s:purple, '', '') | |||
call s:SetHighlight('goUnsignedInts', s:purple, '', '') | |||
call s:SetHighlight('goFloats', s:purple, '', '') | |||
call s:SetHighlight('goComplexes', s:purple, '', '') | |||
" Ruby | |||
call s:SetHighlight('rubyInterpolation', s:cyan, '', '') | |||
call s:SetHighlight('rubyInterpolationDelimiter', s:violet, '', '') | |||
call s:SetHighlight('rubyRegexp', s:cyan, '', '') | |||
call s:SetHighlight('rubyRegexpDelimiter', s:violet, '', '') | |||
call s:SetHighlight('rubyStringDelimiter', s:green, '', '') | |||
" Rust | |||
call s:SetHighlight('CocRustTypeHint', s:invisibles, '', '') | |||
call s:SetHighlight('CocRustChainingHint', s:invisibles, '', '') | |||
" TeX | |||
call s:SetHighlight('texBeginEndName', s:blue, '', '') | |||
call s:SetHighlight('texMathMatcher', s:blue, '', '') | |||
call s:SetHighlight('texCite', s:green, '', '') | |||
call s:SetHighlight('texRefZone', s:green, '', '') | |||
call s:SetHighlight('texInputFile', s:green, '', '') | |||
call s:SetHighlight('texMath', s:orange, '', '') | |||
call s:SetHighlight('texMathOper', s:yellow, '', '') | |||
" Markdown | |||
if g:material_theme_style !~ '-community$' | |||
call s:SetHighlight('markdownBold', s:pink, '', 'bold') | |||
call s:SetHighlight('markdownBoldDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('markdownCode', s:paleblue, '', '') | |||
call s:SetHighlight('markdownCodeDelimiter', s:green, '', '') | |||
call s:SetHighlight('markdownHeadingDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('markdownH1', s:yellow, '', '') | |||
call s:SetHighlight('markdownH2', s:yellow, '', '') | |||
call s:SetHighlight('markdownH3', s:yellow, '', '') | |||
call s:SetHighlight('markdownH4', s:yellow, '', '') | |||
call s:SetHighlight('markdownH5', s:yellow, '', '') | |||
call s:SetHighlight('markdownH6', s:yellow, '', '') | |||
call s:SetHighlight('markdownItalic', s:pink, '', 'italic') | |||
call s:SetHighlight('markdownItalicDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('markdownLinkDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('markdownLinkText', s:green, '', '') | |||
call s:SetHighlight('markdownLinkTextDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('markdownListMarker', s:cyan, '', '') | |||
call s:SetHighlight('markdownUrl', s:pink, '', 'underline') | |||
call s:SetHighlight('markdownUrlTitleDelimiter', s:green, '', '') | |||
else | |||
call s:SetHighlight('markdownBold', s:yellow, '', 'bold') | |||
call s:SetHighlight('markdownCode', s:cyan, '', '') | |||
call s:SetHighlight('markdownCodeBlock', s:cyan, '', '') | |||
call s:SetHighlight('markdownCodeDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('markdownHeadingDelimiter', s:green, '', '') | |||
call s:SetHighlight('markdownHeadingRule', s:comments, '', '') | |||
call s:SetHighlight('markdownId', s:purple, '', '') | |||
call s:SetHighlight('markdownItalic', s:blue, '', 'italic') | |||
call s:SetHighlight('markdownListMarker', s:orange, '', '') | |||
call s:SetHighlight('markdownOrderedListMarker', s:orange, '', '') | |||
call s:SetHighlight('markdownRule', s:comments, '', '') | |||
call s:SetHighlight('markdownUrl', s:purple, '', '') | |||
call s:SetHighlight('markdownUrlTitleDelimiter', s:yellow, '', '') | |||
endif | |||
" plasticboy/vim-markdown | |||
if g:material_theme_style !~ '-community$' | |||
call s:SetHighlight('mkdBold', s:cyan, '', '') | |||
call s:SetHighlight('mkdCodeStart', s:green, '', '') | |||
call s:SetHighlight('mkdCodeDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('mkdDelimiter', s:cyan, '', '') | |||
call s:SetHighlight('mkdHeading', s:cyan, '', '') | |||
call s:SetHighlight('mkdItalic', s:cyan, '', '') | |||
call s:SetHighlight('mkdLink', s:green, '', '') | |||
call s:SetHighlight('mkdListItem', s:cyan, '', '') | |||
call s:SetHighlight('mkdURL', s:pink, '', 'underline') | |||
endif | |||
" vimwiki/vimwiki | |||
if g:material_theme_style !~ '-community$' | |||
call s:SetHighlight('VimwikiBold', s:pink, '', 'bold') | |||
call s:SetHighlight('VimwikiBoldChar', s:cyan, '', 'bold') | |||
call s:SetHighlight('VimwikiDelText', s:pink, '', 'strikethrough') | |||
call s:SetHighlight('VimwikiDelTextChar', s:cyan, '', '') | |||
call s:SetHighlight('VimwikiCode', s:green, '', '') | |||
call s:SetHighlight('VimwikiCodeChar', s:cyan, '', '') | |||
call s:SetHighlight('VimwikiHeader1', s:yellow, '', '') | |||
call s:SetHighlight('VimwikiHeader2', s:yellow, '', '') | |||
call s:SetHighlight('VimwikiHeader3', s:yellow, '', '') | |||
call s:SetHighlight('VimwikiHeader4', s:yellow, '', '') | |||
call s:SetHighlight('VimwikiHeader5', s:yellow, '', '') | |||
call s:SetHighlight('VimwikiHeader6', s:yellow, '', '') | |||
call s:SetHighlight('VimwikiHeaderChar', s:cyan, '', '') | |||
call s:SetHighlight('VimwikiImage', s:cyan, '', '') | |||
call s:SetHighlight('VimwikiItalic', s:pink, '', 'italic') | |||
call s:SetHighlight('VimwikiItalicChar', s:cyan, '', '') | |||
call s:SetHighlight('VimwikiLink', s:green, '', 'underline') | |||
call s:SetHighlight('VimwikiListTodo', s:cyan, '', '') | |||
call s:SetHighlight('VimwikiPre', s:green, '', '') | |||
call s:SetHighlight('VimwikiWebLink1', s:green, '', 'underline') | |||
endif | |||
" vim-gitgutter | |||
call s:SetHighlight('GitGutterAdd', s:green, '', '') | |||
call s:SetHighlight('GitGutterChange', s:yellow, '', '') | |||
call s:SetHighlight('GitGutterChangeDelete', s:orange, '', '') | |||
call s:SetHighlight('GitGutterDelete', s:red, '', '') | |||
" vim-signify | |||
hi link SignifySignAdd GitGutterAdd | |||
hi link SignifySignChange GitGutterChange | |||
hi link SignifySignDelete GitGutterDelete | |||
" vim-better-whitespace | |||
call s:SetHighlight('ExtraWhitespace', '', s:red, '') | |||
" NERDTree | |||
if has('nvim') | |||
call s:SetHighlight('NERDTreeFile', s:fg, '', '') | |||
endif | |||
" coc.nvim | |||
call s:SetHighlight('CocMarkdownLink', s:purple, '', '') | |||
call s:SetHighlight('CocErrorSign', s:red, '', '') | |||
call s:SetHighlight('CocWarningSign', s:orange, '', '') | |||
call s:SetHighlight('CocHintSign', s:yellow, '', '') | |||
call s:SetHighlight('CocInfoSign', s:green, '', '') | |||
" Neovim terminal colors | |||
if has('nvim') | |||
let g:terminal_color_background = s:bg.gui | |||
let g:terminal_color_foreground = s:fg.gui | |||
let g:terminal_color_0 = s:comments.gui | |||
let g:terminal_color_1 = s:red.gui | |||
let g:terminal_color_2 = s:green.gui | |||
let g:terminal_color_3 = s:yellow.gui | |||
let g:terminal_color_4 = s:blue.gui | |||
let g:terminal_color_5 = s:purple.gui | |||
let g:terminal_color_6 = s:cyan.gui | |||
let g:terminal_color_7 = s:white.gui | |||
let g:terminal_color_8 = g:terminal_color_0 | |||
let g:terminal_color_9 = g:terminal_color_1 | |||
let g:terminal_color_10 = g:terminal_color_2 | |||
let g:terminal_color_11 = g:terminal_color_3 | |||
let g:terminal_color_12 = g:terminal_color_4 | |||
let g:terminal_color_13 = g:terminal_color_5 | |||
let g:terminal_color_14 = g:terminal_color_6 | |||
let g:terminal_color_15 = g:terminal_color_7 | |||
endif | |||
@ -1,16 +0,0 @@ | |||
let g:languagetool_cmd='/usr/bin/languagetool' | |||
let g:grammarous#default_comments_only_filetypes = { | |||
\ '*' : 1, 'help' : 0, 'markdown' : 0, 'tex': 0, | |||
\ } | |||
let g:grammarous#default_lang='en-GB' | |||
let g:grammarous#enabled_categories = {'*' : ['PUNCTUATION', | |||
\'COLLOQUIALISMS', 'COMPOUNDING', 'CONFUSED_WORDS', 'FALSE_FRIENDS', | |||
\ 'GENDER_NEUTRALITY', 'GRAMMAR', 'MISC', 'PLAIN_ENGLISH', | |||
\ 'PUNCTUATION', 'REDUNDANCY', 'REGIONALISMS', 'REPETITIONS', | |||
\ 'SEMANTICS', 'STYLE', 'TYPOGRAPHY', | |||
\ 'TYPOS', 'WIKIPEDIA'], 'markdown' : ['PUNCTUATION', | |||
\'COLLOQUIALISMS', 'COMPOUNDING', 'CONFUSED_WORDS', 'FALSE_FRIENDS', | |||
\ 'GENDER_NEUTRALITY', 'GRAMMAR', 'MISC', 'PLAIN_ENGLISH', | |||
\ 'PUNCTUATION', 'REDUNDANCY', 'REGIONALISMS', 'REPETITIONS', | |||
\ 'SEMANTICS', 'STYLE', 'TYPOGRAPHY',]} | |||
@ -0,0 +1,30 @@ | |||
#!/bin/bash | |||
eval "$(grep -h -- \ | |||
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\|XDG_DATA_HOME\|XDG_CONFIG_HOME\)=" \ | |||
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \ | |||
"$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" "$HOME/.pam_environment" 2>/dev/null)" | |||
export CALCURSE_CALDAV_PASSWORD=$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu) | |||
calcurse-caldav | |||
tmpfile=$(mktemp) | |||
destfile=$(mktemp) | |||
wget -q 'https://drive.yigitcolakoglu.com/remote.php/dav/addressbooks/users/yigitcolakoglu/contacts/?export' \ | |||
--user yigitcolakoglu \ | |||
--password "$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu)" \ | |||
-O $tmpfile | |||
abook --convert \ | |||
--informat vcard \ | |||
--infile $tmpfile \ | |||
--outformat abook \ | |||
--outfile $destfile | |||
rm $tmpfile | |||
chmod 600 $destfile | |||
sed -Ei 's/([0-9]) ([0-9])/\1\2/g' $destfile | |||
sed -Ei 's/\+([0-9])/\1/g' $destfile | |||
mv $destfile "$XDG_DATA_HOME"/abook/addressbook |
@ -1,9 +0,0 @@ | |||
#!/bin/bash | |||
eval "$(grep -h -- \ | |||
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\|XDG_DATA_HOME\|XDG_CONFIG_HOME\)=" \ | |||
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \ | |||
"$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" "$HOME/.pam_environment" 2>/dev/null)" | |||
export CALCURSE_CALDAV_PASSWORD=$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu) | |||
calcurse-caldav |
@ -0,0 +1,57 @@ | |||
#!/bin/sh | |||
# This script will compile or run another finishing operation on a document. I | |||
# have this script run via vim. | |||
# | |||
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent | |||
# presentations. Runs scripts based on extention or shebang. | |||
# | |||
# Note that .tex files which you wish to compile with XeLaTeX should have the | |||
# string "xelatex" somewhere in a comment/command in the first 5 lines. | |||
file=$(readlink -f "$1") | |||
dir=${file%/*} | |||
base="${file%.*}" | |||
ext="${file##*.}" | |||
cd "$dir" || exit 1 | |||
textype() { \ | |||
command="pdflatex" | |||
( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex" | |||
$command --output-directory="$dir" "$base" && | |||
grep -qi addbibresource "$file" && | |||
biber --input-directory "$dir" "$base" && | |||
$command --output-directory="$dir" "$base" && | |||
$command --output-directory="$dir" "$base" | |||
} | |||
case "$ext" in | |||
# Try to keep these cases in alphabetical order. | |||
[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; | |||
c) cc "$file" -o "$base" && "$base" ;; | |||
cpp) g++ "$file" -o "$base" && "$base" ;; | |||
cs) mcs "$file" && mono "$base".exe ;; | |||
go) go run "$file" ;; | |||
h) sudo make install ;; | |||
java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; | |||
m) octave "$file" ;; | |||
md) if [ -x "$(command -v lowdown)" ]; then | |||
lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf | |||
elif [ -x "$(command -v groffdown)" ]; then | |||
groffdown -i "$file" | groff > "$base.pdf" | |||
else | |||
pandoc -t ms --highlight-style=kate -s -o "$base".pdf "$file" | |||
fi ; ;; | |||
mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; | |||
ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; | |||
org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;; | |||
py) python "$file" ;; | |||
[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; | |||
rs) cargo build ;; | |||
sass) sassc -a "$file" "$base.css" ;; | |||
scad) openscad -o "$base".stl "$file" ;; | |||
sent) setsid -f sent "$file" 2>/dev/null ;; | |||
tex) textype "$file" ;; | |||
*) head -n1 "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; | |||
esac |
@ -0,0 +1,165 @@ | |||
#!/bin/sh | |||
# Usage: | |||
# `$0`: Ask for recording type via dmenu | |||
# `$0 screencast`: Record both audio and screen | |||
# `$0 video`: Record only screen | |||
# `$0 audio`: Record only audio | |||
# `$0 kill`: Kill existing recording | |||
# | |||
# If there is already a running instance, user will be prompted to end it. | |||
updateicon() { \ | |||
echo "$1" > /tmp/recordingicon | |||
#pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" | |||
} | |||
killrecording() { | |||
recpid="$(cat /tmp/recordingpid)" | |||
# kill with SIGTERM, allowing finishing touches. | |||
kill -15 "$recpid" | |||
rm -f /tmp/recordingpid | |||
updateicon "" | |||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it. | |||
sleep 3 | |||
kill -9 "$recpid" | |||
exit | |||
} | |||
screencast() { | |||
audio="$(printf "none\nscreen\nmicrophone\nboth" | dmenu -p "Audio Type:")" | |||
case "$audio" in | |||
none) | |||
ffmpeg -y \ | |||
-f x11grab \ | |||
-framerate 60 \ | |||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ | |||
-i "$DISPLAY" \ | |||
-r 30 \ | |||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \ | |||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "⏺️🎙️" | |||
;; | |||
screen) | |||
ffmpeg -y \ | |||
-f x11grab \ | |||
-framerate 60 \ | |||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ | |||
-i "$DISPLAY" \ | |||
-f pulse -i default \ | |||
-r 30 \ | |||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \ | |||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "⏺️🎙️" | |||
;; | |||
microphone) | |||
ffmpeg -y \ | |||
-f x11grab \ | |||
-framerate 60 \ | |||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ | |||
-i "$DISPLAY" \ | |||
-f alsa -i default \ | |||
-r 30 \ | |||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \ | |||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "⏺️🎙️" | |||
;; | |||
both) | |||
ffmpeg -y \ | |||
-f x11grab \ | |||
-framerate 60 \ | |||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ | |||
-i "$DISPLAY" \ | |||
-f alsa -i default \ | |||
-r 30 \ | |||
-c:v h264 -crf 0 -preset ultrafast -c:a aac \ | |||
"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "⏺️🎙️" | |||
;; | |||
esac | |||
} | |||
video() { ffmpeg \ | |||
-f x11grab \ | |||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ | |||
-i "$DISPLAY" \ | |||
-c:v libx264 -qp 0 -r 30 \ | |||
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "⏺️" | |||
} | |||
webcamhidef() { ffmpeg \ | |||
-f v4l2 \ | |||
-i /dev/video0 \ | |||
-video_size 1920x1080 \ | |||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "🎥" | |||
} | |||
webcam() { ffmpeg \ | |||
-f v4l2 \ | |||
-i /dev/video0 \ | |||
-video_size 640x480 \ | |||
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "🎥" | |||
} | |||
audio() { \ | |||
ffmpeg \ | |||
-f alsa -i default \ | |||
-c:a flac \ | |||
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "🎙️" | |||
} | |||
askrecording() { \ | |||
choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:") | |||
case "$choice" in | |||
screencast) screencast;; | |||
audio) audio;; | |||
video) video;; | |||
*selected) videoselected;; | |||
webcam) webcam;; | |||
"webcam (hi-def)") webcamhidef;; | |||
esac | |||
} | |||
asktoend() { \ | |||
response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && | |||
[ "$response" = "Yes" ] && killrecording | |||
} | |||
videoselected() | |||
{ | |||
slop -f "%x %y %w %h" > /tmp/slop | |||
read -r X Y W H < /tmp/slop | |||
rm /tmp/slop | |||
ffmpeg \ | |||
-f x11grab \ | |||
-framerate 60 \ | |||
-video_size "$W"x"$H" \ | |||
-i :0.0+"$X,$Y" \ | |||
-c:v libx264 -qp 0 -r 30 \ | |||
"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" & | |||
echo $! > /tmp/recordingpid | |||
updateicon "⏺️" | |||
} | |||
case "$1" in | |||
screencast) screencast;; | |||
audio) audio;; | |||
video) video;; | |||
*selected) videoselected;; | |||
kill) killrecording;; | |||
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;; | |||
esac |
@ -0,0 +1,7 @@ | |||
#!/bin/sh | |||
# This is a thin wrapper around "doom" so that it can easily be run from dmenu | |||
dunstify -r 57 -a "ξ Doom Emacs" "Running \"doom $@\"" | |||
$XDG_CONFIG_HOME/emacs/bin/doom $@ | |||
dunstify -r 57 -a "ξ Doom Emacs" "Finished \"doom $@\"" |
@ -0,0 +1,28 @@ | |||
#! /usr/bin/python | |||
""" | |||
List all Firefox tabs with title and URL | |||
Supported input: json or jsonlz4 recovery files | |||
Default output: title (URL) | |||
Output format can be specified as argument | |||
""" | |||
import sys | |||
import os | |||
import pathlib | |||
import lz4.block | |||
import json | |||
path = pathlib.Path.home().joinpath('.mozilla/firefox') | |||
files = path.glob(os.environ['FIREFOX_PROFILE'] + '/sessionstore-backups/recovery.js*') | |||
for f in files: | |||
b = f.read_bytes() | |||
if b[:8] == b'mozLz40\0': | |||
b = lz4.block.decompress(b[8:]) | |||
j = json.loads(b) | |||
for w in j['windows']: | |||
for t in w['tabs']: | |||
i = t['index'] - 1 | |||
print(t['entries'][i]['url']) |
@ -1,12 +1,14 @@ | |||
#!/bin/sh | |||
mcount=$(cat ~/.cache/mcount) | |||
msync=$(cat ~/.cache/msync) | |||
[ -f "$HOME/.cache/mcount" ] && mcount=$(cat ~/.cache/mcount) | |||
[ -f "$HOME/.cache/msync" ] && msync=$(cat ~/.cache/msync) | |||
#echo -n "^c#a3be8c^ ^d^ $msync ^c#81a1c1^ ^d^ $mcount" (Takes more space) | |||
echo -n "^c#81a1c1^ ^d^ $mcount" | |||
if [ ! "$mcount" = "0" ]; then | |||
echo -n "^c#81a1c1^ ^d^ $mcount" | |||
fi | |||
case $BLOCK_BUTTON in | |||
1) setsid -f st -c center -n center -e neomutt;; | |||
1) ~/.local/bin/mailsync;; | |||
3) ~/.local/bin/mailsync;; | |||
esac |
@ -1,20 +0,0 @@ | |||
#!/bin/bash | |||
tmpfile=$(mktemp) | |||
destfile=$(mktemp) | |||
wget -q 'https://drive.yigitcolakoglu.com/remote.php/dav/addressbooks/users/yigitcolakoglu/contacts/?export' \ | |||
--user yigitcolakoglu \ | |||
--password "$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu)" \ | |||
-O $tmpfile | |||
abook --convert \ | |||
--informat vcard \ | |||
--infile $tmpfile \ | |||
--outformat abook \ | |||
--outfile $destfile | |||
rm $tmpfile | |||
chmod 600 $destfile | |||
sed 's/([0-9]) ([0-9])/\1\2/g' $destfile | |||
mv $destfile "$XDG_DATA_HOME"/abook/addressbook |
@ -1,6 +1,4 @@ | |||
pinentry-program /usr/bin/pinentry | |||
pinentry-program /usr/bin/pinentry-qt | |||
no-grab | |||
allow-preset-passphrase | |||
max-cache-ttl 172800 | |||
enable-ssh-support | |||
max-cache-ttl-ssh 86400 |