commit ae76f3248905daebd0f16f32aa980c321022f4aa Author: Ian Mancini Date: Fri Sep 3 18:27:34 2021 -0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fde5a63 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +# Created by https://www.gitignore.io/api/vim,linux +# Edit at https://www.gitignore.io/?templates=vim,linux + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# End of https://www.gitignore.io/api/vim,linux + +out +.out.backup +.checksums diff --git a/appearances/base.toml b/appearances/base.toml new file mode 100644 index 0000000..715c412 --- /dev/null +++ b/appearances/base.toml @@ -0,0 +1,8 @@ +name = "Base" + +[custom] +gtk_theme = "Materia-dark-compact" +icon_theme = "Papirus-Dark" +cursor_theme = "capitaine-cursors" +terminal_padding = 8 +window_gap = 8 diff --git a/appearances/emojibar.toml b/appearances/emojibar.toml new file mode 100644 index 0000000..766a024 --- /dev/null +++ b/appearances/emojibar.toml @@ -0,0 +1,28 @@ +name = "Base with emoji themed Polybar" +extends = "base" + +[custom.polybar] +modules_left = "i3" +modules_center = "" +modules_right = "eth wifi cpu memory volume batteryemoji time date xkeyboard" +text_offset = "2" +icon_font_scale ="8" +antialias = "true" +bottom = "false" +height = "32" +i3_label = "%icon%" +wifi_dev = "wlp3s0" +wifi_icon = "📡" +eth_dev = "enp2s0" +eth_icon = "🔌" +cpu_icon = "💻" +ram_icon = "🧠" +date_icon = "📅" +time_icon = "🕖" +volume_icon = "🔊" +mute_icon = "🔈" +layout_icon = "⌨️" +charging_icon = "🔋⬆️" +full_charge_icon = "🔋" +discharging_icon = "🔋⬇️" + diff --git a/colorschemes/base.toml b/colorschemes/base.toml new file mode 100644 index 0000000..3d59a8e --- /dev/null +++ b/colorschemes/base.toml @@ -0,0 +1,44 @@ +name = "base" + +[colors.terminal] +bg = "#000000" +fg = "#ffffff" + +color0 = "#080808" +color1 = "#B21818" +color2 = "#18B218" +color3 = "#B26818" +color4 = "#1818B2" +color5 = "#B218B2" +color6 = "#18B2B2" +color7 = "#B2B2B2" +color8 = "#686868" +color9 = "#FF5454" +color10 = "#54FF54" +color11 = "#FFFF54" +color12 = "#5454FF" +color13 = "#FF54FF" +color14 = "#54FFFF" +color15 = "#FFFFFF" + +[colors.base16] +base00 = "#181818" +base01 = "#282828" +base02 = "#383838" +base03 = "#585858" +base04 = "#b8b8b8" +base05 = "#d8d8d8" +base06 = "#e8e8e8" +base07 = "#f8f8f8" +base08 = "#ab4642" +base09 = "#dc9656" +base0A = "#f7ca88" +base0B = "#a1b56c" +base0C = "#86c1b9" +base0D = "#7cafc2" +base0E = "#ba8baf" +base0F = "#a16946" + +[custom] +vim_colorscheme = "vim.cmd('colorscheme base16-default-dark')" +emacs_colorscheme = "doom-one" diff --git a/colorschemes/dracula.toml b/colorschemes/dracula.toml new file mode 100644 index 0000000..072beaf --- /dev/null +++ b/colorschemes/dracula.toml @@ -0,0 +1,45 @@ +name = "Dracula" +extends = "base" + +[colors.terminal] +bg = "#282A36" +fg = "#E6E6E6" + +color0 = "#000000" +color1 = "#FF5555" +color2 = "#50FA7B" +color3 = "#F1FA8C" +color4 = "#BD93F9" +color5 = "#FF79C6" +color6 = "#8BE9FD" +color7 = "#BFBFBF" +color8 = "#4D4D4D" +color9 = "#FF6E67" +color10 = "#5AF78E" +color11 = "#F4F99D" +color12 = "#CAA9FA" +color13 = "#FF92D0" +color14 = "#9AEDFE" +color15 = "#E6E6E6" + +[colors.base16] +base00 = "#282936" +base01 = "#3a3c4e" +base02 = "#4d4f68" +base03 = "#626483" +base04 = "#62d6e8" +base05 = "#e9e9f4" +base06 = "#f1f2f8" +base07 = "#f7f7fb" +base08 = "#ea51b2" +base09 = "#b45bcf" +base0A = "#ebff87" +base0B = "#00f769" +base0C = "#a1efe4" +base0D = "#62d6e8" +base0E = "#b45bcf" +base0F = "#00f769" + +[custom] +vim_colorscheme = "vim.cmd('colorscheme base16-dracula')" +emacs_colorscheme = "doom-dracula" diff --git a/colorschemes/onedark.toml b/colorschemes/onedark.toml new file mode 100644 index 0000000..a4544e7 --- /dev/null +++ b/colorschemes/onedark.toml @@ -0,0 +1,46 @@ +name = "OneDark" +extends = "base" + +[colors.terminal] +bg = "#282C34" +fg = "#ABB2BF" + +color0 = "#5C6370" +color1 = "#E06C75" +color2 = "#98C379" +color3 = "#E5C07B" +color4 = "#61AFEF" +color5 = "#C678DD" +color6 = "#56B6C2" +color7 = "#ABB2BF" +color8 = "#4C566A" +color9 = "#BE5046" +color10 = "#98C379" +color11 = "#D19A66" +color12 = "#61AFEF" +color13 = "#C678DD" +color14 = "#56B6C2" +color15 = "#3E4452" + +[colors.base16] +base00 = "#282c34" +base01 = "#353b45" +base02 = "#3e4451" +base03 = "#545862" +base04 = "#565c64" +base05 = "#abb2bf" +base06 = "#b6bdca" +base07 = "#c8ccd4" +base08 = "#e06c75" +base09 = "#d19a66" +base0A = "#e5c07b" +base0B = "#98c379" +base0C = "#56b6c2" +base0D = "#61afef" +base0E = "#c678dd" +base0F = "#be5046" + +[custom] +# vim_colorscheme = "vim.cmd('colorscheme base16-onedark')" +vim_colorscheme = "require('colorbuddy').colorscheme('onebuddy')" +emacs_colorscheme = "doom-one" diff --git a/filesets/base/alacritty/.config/alacritty/alacritty.yml b/filesets/base/alacritty/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..752b0d0 --- /dev/null +++ b/filesets/base/alacritty/.config/alacritty/alacritty.yml @@ -0,0 +1,57 @@ +env: + TERM: xterm-256color + +window: + padding: + x: {{appearance.terminal_padding}} + y: {{appearance.terminal_padding}} + +font: + normal: + family: {{typography.mono.font}} + style: {{typography.mono.weight}} + + bold: + family: {{typography.mono.font}} + style: {{typography.mono.bold}} + + italic: + family: {{typography.mono.font}} + style: {{typography.mono.italic}} + + bold_italic: + family: {{typography.mono.font}} + style: {{typography.mono.bold_italic}} + + size: {{typography.mono.size}} + +colors: + primary: + background: '{{colors.bg}}' + foreground: '{{colors.fg}}' + + cursor: + text: '{{colors.bg}}' + cursor: '{{colors.fg}}' + + normal: + black: '{{colors.bg}}' + red: '{{colors.red}}' + green: '{{colors.green}}' + yellow: '{{colors.yellow}}' + blue: '{{colors.blue}}' + magenta: '{{colors.magenta}}' + cyan: '{{colors.cyan}}' + white: '{{colors.fg}}' + + bright: + black: '{{colors.comment}}' + red: '{{colors.red}}' + green: '{{colors.green}}' + yellow: '{{colors.yellow}}' + blue: '{{colors.blue}}' + magenta: '{{colors.magenta}}' + cyan: '{{colors.cyan}}' + white: '{{colors.lighter_fg}}' + +live_reload_config: true diff --git a/filesets/base/bash/.bashrc b/filesets/base/bash/.bashrc new file mode 100755 index 0000000..13fa64d --- /dev/null +++ b/filesets/base/bash/.bashrc @@ -0,0 +1,160 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Enable bash_completion +if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion +fi + +# Enable vi mode +set -o vi + + +# Sensible Bash - An attempt at saner Bash defaults +# Maintainer: mrzool +# Repository: https://github.com/mrzool/bash-sensible +# Version: 0.2.2 + +## GENERAL OPTIONS ## + +# Prevent file overwrite on stdout redirection +# Use `>|` to force redirection to an existing file +set -o noclobber + +# Update window size after every command +shopt -s checkwinsize + +# Automatically trim long paths in the prompt (requires Bash 4.x) +PROMPT_DIRTRIM=2 + +# Enable history expansion with space +# E.g. typing !! will replace the !! with your last command +bind Space:magic-space + +# Turn on recursive globbing (enables ** to recurse all directories) +shopt -s globstar 2> /dev/null + +# Case-insensitive globbing (used in pathname expansion) +shopt -s nocaseglob; + +## SMARTER TAB-COMPLETION (Readline bindings) ## + +# Perform file completion in a case insensitive fashion +bind "set completion-ignore-case on" + +# Treat hyphens and underscores as equivalent +bind "set completion-map-case on" + +# Display matches for ambiguous patterns at first tab press +bind "set show-all-if-ambiguous on" + +# Immediately add a trailing slash when autocompleting symlinks to directories +bind "set mark-symlinked-directories on" + +## SANE HISTORY DEFAULTS ## + +# Append to the history file, don't overwrite it +shopt -s histappend + +# Save multi-line commands as one command +shopt -s cmdhist + +# Record each line as it gets issued +PROMPT_COMMAND='history -a' + +# Huge history. Doesn't appear to slow things down, so why not? +HISTSIZE=500000 +HISTFILESIZE=100000 + +# Avoid duplicate entries +HISTCONTROL="erasedups:ignoreboth" + +# Don't record some commands +export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear" + +# Use standard ISO 8601 timestamp +# %F equivalent to %Y-%m-%d +# %T equivalent to %H:%M:%S (24-hours format) +HISTTIMEFORMAT='%F %T ' + +# Enable incremental history search with up/down arrows (also Readline goodness) +# Learn more about this here: http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/ +bind '"\e[A": history-search-backward' +bind '"\e[B": history-search-forward' +bind '"\e[C": forward-char' +bind '"\e[D": backward-char' + +## BETTER DIRECTORY NAVIGATION ## + +# Prepend cd to directory names automatically +shopt -s autocd 2> /dev/null +# Correct spelling errors during tab-completion +shopt -s dirspell 2> /dev/null +# Correct spelling errors in arguments supplied to cd +shopt -s cdspell 2> /dev/null + +# This defines where cd looks for targets +# Add the directories you want to have fast access to, separated by colon +# Ex: CDPATH=".:~:~/projects" will look for targets in the current working directory, in home and in the ~/projects folder +CDPATH="." + +# This allows you to bookmark your favorite places across the file system +# Define a variable containing a path and you will be able to cd into it regardless of the directory you're in +shopt -s cdable_vars + +# Prompt + +# get current branch in git repo +function parse_git_branch() { + BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` + if [ ! "${BRANCH}" == "" ] + then + STAT=`parse_git_dirty` + echo "[${BRANCH}${STAT}]" + else + echo "" + fi +} + +# get current status of git repo +function parse_git_dirty { + status=`git status 2>&1 | tee` + dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"` + untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"` + ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"` + newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"` + renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"` + deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"` + bits='' + if [ "${renamed}" == "0" ]; then + bits=">${bits}" + fi + if [ "${ahead}" == "0" ]; then + bits="*${bits}" + fi + if [ "${newfile}" == "0" ]; then + bits="+${bits}" + fi + if [ "${untracked}" == "0" ]; then + bits="?${bits}" + fi + if [ "${deleted}" == "0" ]; then + bits="x${bits}" + fi + if [ "${dirty}" == "0" ]; then + bits="!${bits}" + fi + if [ ! "${bits}" == "" ]; then + echo " ${bits}" + else + echo "" + fi +} + +export PS1="\[\e[95m\]\u\[\e[m\]@\[\e[96m\]\h\[\e[m\]:\w \[\e[92m\]\`parse_git_branch\`\[\e[m\] \[\e[91m\]\\$\[\e[m\] " + +# Load environment +[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc" + +# load Aliases +[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc" diff --git a/filesets/base/dunst/.config/dunst/dunstrc b/filesets/base/dunst/.config/dunst/dunstrc new file mode 100755 index 0000000..513ef05 --- /dev/null +++ b/filesets/base/dunst/.config/dunst/dunstrc @@ -0,0 +1,59 @@ +# vim: ft=cfg +[global] + monitor = 0 + follow = none + geometry = "300x5-24+52" + indicate_hidden = yes + shrink = no + transparency = 0 + notification_height = 0 + separator_height = 0 + padding = 8 + horizontal_padding = 8 + frame_width = 3 + sort = yes + idle_threshold = 120 + font = {{typography.mono.font}} {{typography.mono.weight}} {{typography.mono.size}} + line_height = 0 + markup = full + format = "%s\n%b" + alignment = center + show_age_threshold = 60 + word_wrap = yes + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = false + show_indicators = no + icon_position = off + max_icon_size = 32 + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + sticky_history = yes + history_length = 20 + dmenu = /usr/bin/dmenu -p dunst: + browser = /usr/bin/chromium + always_run_script = true + title = Dunst + class = Dunst + startup_notification = false + force_xinerama = false + +[experimental] + per_monitor_dpi = false + +[urgency_low] + background = "{{colors.bg}}" + foreground = "{{colors.fg}}" + frame_color = "{{colors.blue}}" + timeout = 4 + +[urgency_normal] + background = "{{colors.bg}}" + foreground = "{{colors.fg}}" + frame_color = "{{colors.green}}" + timeout = 8 + +[urgency_critical] + background = "{{colors.red}}" + foreground = "{{colors.fg}}" + frame_color = "{{colors.red}}" + timeout = 0 diff --git a/filesets/base/emacs/.doom.d/config.el b/filesets/base/emacs/.doom.d/config.el new file mode 100644 index 0000000..ba4bbff --- /dev/null +++ b/filesets/base/emacs/.doom.d/config.el @@ -0,0 +1,194 @@ +;;; $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 "Ian Mancini" + user-mail-address "ianmethyst@gmail.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +(setq doom-font (font-spec :family "{{typography.mono.font}}" :size {{typography.mono.size}})) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme '{{colors.emacs_colorscheme}}) +(setq doom-themes-treemacs-theme "doom-colors") + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/.org/") + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type t) + + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. + + +(use-package! org) +(use-package! org-clock) + +(after! org + (setq org-modules '(ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww ol-bibtex)) + (setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) + (add-hook 'org-mode-hook 'visual-line-mode) + (add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) + (add-hook 'org-mode-hook 'turn-on-auto-fill) + (setq org-ellipsis " ... " + org-bullets-bullet-list '("⁖") + org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "WIP(i)" "INACTIVE(x)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)")) + org-todo-keyword-faces + '(("TODO" :inherit +org-todo-onhold :weight normal :underline t) + ("NEXT" :inherit +org-todo-onhold :weight normal :underline t) + ("WIP" :inherit org-todo :weight normal :underline t) + ("WAITING" :inherit +org-todo-active :weight normal :underline t) + ("INACTIVE" :inherit +org-todo-active :weight normal :underline t) + ("DONE" :inherit +org-todo-project :weight normal :underline t) + ("CANCELLED" :inherit org-priority :weight normal :underline t)) + ) + (setq org-log-done 'time) + (setq org-agenda-files (apply 'append + (mapcar + (lambda (directory) + (directory-files-recursively + directory org-agenda-file-regexp)) + '("~/.org/work/" "~/.org/projects/" "~/.org/learning/" "~/.org/calendars" "~/.org/conferences/")))) + ) + +(use-package! org-fancy-priorities + :after org + :ensure t + :hook + (org-mode . org-fancy-priorities-mode) + :config + (setq org-fancy-priorities-list '("▴" "▸" "▾"))) + +(use-package! org-bullets + :after org + :config + (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) + +(use-package! org-ref + :after org + :config + (setq bibtex-completion-pdf-field 'file) + (defun my/org-ref-open-pdf-at-point () + "Open the pdf for bibtex key under point if it exists." + (interactive) + (let* ((results (org-ref-get-bibtex-key-and-file)) + (key (car results)) + (pdf-file (car (bibtex-completion-find-pdf key)))) + (if (file-exists-p pdf-file) + (find-file pdf-file) ; original in org-ref-help, + ; opens external viewer (org-open-file pdf-file) + (message "No PDF found for %s" key)))) + (setq org-ref-open-pdf-function 'find-file) + + (setq bibtex-file "~/.org/biblio.bib" + bibtex-completion-bibliography bibtex-file + reftex-default-bibliography bibtex-file + org-ref-default-bibliography (list bibtex-file) + org-ref-completion-library 'org-ref-ivy-cite + org-ref-bibliography-notes "~/.org/biblio-notes.org" + org-ref-pdf-directory "~/.org/biblio-pdfs/") + ) + +(use-package! org-roam + :after org + :config + (setq org-roam-db-location "/home/ianmethyst/.local/share/emacs/org-roam.db")) + + +(setq deft-directory "~/.org" + deft-recursive t) + +(setq undo-limit 100000000 ; Raise undo-limit to 100mb + evil-want-fine-undo nil) ; By default while in insert all changes are one big blob. Be more granular + +(setq-default delete-by-moving-to-trash t) ; Delete files to trash + +(defvar holiday-custom-holidays nil + "Custom holidays") + +(setq holiday-custom-holidays + '((holiday-fixed 1 1 "Año nuevo") + (holiday-fixed 2 14 "San Valentín") + (holiday-fixed 3 24 "Día Nacional de la Memoria por la Verdad y la Justicia") + (holiday-fixed 4 1 "April Fools") + (holiday-fixed 4 2 "Día del Veterano y de los Caídos en la Guerra de Malvinas") + (holiday-fixed 5 1 "Día de lx trabajadorx") + (holiday-fixed 5 25 "Día de la Revolución de Mayo") + (holiday-fixed 6 17 "Paso a la Inmortalidad del General Martín Miguel de Güemes") + (holiday-fixed 6 20 "Paso a la Inmortalidad del General Manuel Belgrano") + (holiday-fixed 7 9 "Día de la Independencia") + (holiday-fixed 8 17 "Paso a la Inmortalidad del General José de San Martín") + (holiday-fixed 9 11 "Día de lx Maestrx") + (holiday-fixed 9 21 "Día de lx Estudiante") + (holiday-fixed 10 12 "Día del Respeto a la Diversidad Cultural") + (holiday-fixed 10 31 "Halloween") + (holiday-fixed 11 20 "Día de la Soberanía Nacional") + (holiday-fixed 12 8 "Día de la Inmaculada Concepción de María") + (holiday-fixed 12 25 "Navidad"))) + +(setq calendar-holidays holiday-custom-holidays) + + +(use-package! org-caldav + :after org + :config + (setq org-caldav-url "https://nextcloud.trov.ar/remote.php/dav/calendars/ianmethyst/" + org-caldav-calendar-id "contact_birthdays" + inbox-file (concat org-directory "calendars/nextcloud-caldav.org") + org-caldav-files (list inbox-file) + org-caldav-inbox inbox-file + org-icalendar-timezone "America/Buenos_Aires" + org-caldav-sync-direction 'cal->org) + + (defun fix-birthdays-timestamps () + "Fix birthdays fetched from nextcloud with org-caldav not being repeating events." + (let (birthdays-buffer find-replace) + ;; FIXME: This assumes the file exists + (setq birthdays-buffer (find-file-other-window (concat org-directory "calendars/nextcloud-caldav.org"))) + ;; NOTE: Remove repeating timestamps in case this function was executed previously + (setq find-replace (lambda (patt newtext) + (goto-char (point-min)) ;; In case buffer is open + (while (search-forward-regexp patt nil t) + (replace-match newtext nil t)))) + (funcall #'find-replace "\\s-+\\+1y>" ">") + (funcall #'find-replace ">" " +1y>") + (save-buffer))) + + (advice-add + 'org-caldav-sync + :after + #'fix-birthdays-timestamps)) diff --git a/filesets/base/emacs/.doom.d/init.el b/filesets/base/emacs/.doom.d/init.el new file mode 100644 index 0000000..4945c40 --- /dev/null +++ b/filesets/base/emacs/.doom.d/init.el @@ -0,0 +1,188 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a "Module Index" link where you'll find +;; a comprehensive list of Doom's modules and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + (company +childframe) ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + (ivy +fuzzy +prescient) ; a search engine for love and life + + :ui + deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;(emoji +unicode) ; 🙂 + fill-column ; a `fill-column' indicator + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + ;;indent-guides ; highlighted indent columns + ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + ;;(format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + (spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;debugger ; FIXME stepping through code, to help you add bugs + ;;direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + ;;lsp + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + pass ; password manager for nerds + pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :os + (:if IS-MAC macos) ; improve compatibility with macOS + tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + ;;cc ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(haskell +dante) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + ;;json ; At least it ain't XML + ;;(java +meghanada) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + ;;latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + ;;lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + ;;nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org +dragndrop +roam) ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + ;;python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + ;;sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + (mu4e +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + calendar + ;;emms + ;;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 + ;;literate + (default +bindings +smartparens)) diff --git a/filesets/base/emacs/.doom.d/packages.el b/filesets/base/emacs/.doom.d/packages.el new file mode 100644 index 0000000..db0134e --- /dev/null +++ b/filesets/base/emacs/.doom.d/packages.el @@ -0,0 +1,69 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see raxod502/straight.el#279) +;(package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. +;(package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;(unpin! pinned-package) +;; ...or multiple packages +;(unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;(unpin! t) + +;;; Code: + +(package! org-bullets) +(package! ob-typescript) +(package! org-fancy-priorities) +(package! org-ref) +(package! org-caldav) +(package! org-roam-server) + +(package! nyan-mode) + +;; (package! org-roam-bibtex +;; :recipe (:host github :repo "org-roam/org-roam-bibtex")) +;; (unpin! bibtex-completion helm-bibtex ivy-bibtex) + +;; (package! mixed-pitch) +;; (package! telega) +;; (package! elcord) diff --git a/filesets/base/environment/.aliasrc b/filesets/base/environment/.aliasrc new file mode 100644 index 0000000..777b102 --- /dev/null +++ b/filesets/base/environment/.aliasrc @@ -0,0 +1,39 @@ +#!/bin/sh + +# Neovim +command -v vim >/dev/null && alias vi="vi" vim="vim" vimdiff="vimdiff" +command -v nvim >/dev/null && alias vi="nvim" vim="nvim" vimdiff="nvim -d" + +# Verbose +alias \ + rm="rm -v" \ + mkdir="mkdir -pv" \ + dmesg="dmesg --ctime" \ + sudo='sudo ' # https://wiki.archlinux.org/index.php/Sudo#Passing_aliases + +# Color +alias \ + grep="grep -i --color=auto" \ + Grep="grep --color=auto" \ + diff="diff --color=auto" + +# Xorg +alias startx="startx ~/.xinitrc" + +# Improved coreutils +alias \ + ls="ls -hN --group-directories-first --color=auto" \ + ll="ls -lahN --group-directories-first --color=auto" \ + cat="bat" \ + top="gotop"\ + cp="advcp -pi" \ + mv="advmv -gi" + +# ls="ls-icons -hN --group-directories-first --color=auto" \ +# ll="ls-icons -lahN --group-directories-first --color=auto" \ + + +# Other software +alias \ + nnn='n' \ + N='sudo -E nnn -daH ' diff --git a/filesets/base/environment/.envrc b/filesets/base/environment/.envrc new file mode 100644 index 0000000..f5e2b58 --- /dev/null +++ b/filesets/base/environment/.envrc @@ -0,0 +1,51 @@ +#!/bin/sh + +# env +export EDITOR="nvim" +export TERMINAL="kitty" +export VISUAL="kitty $EDITOR" +export BROWSER="chromium" + +# bin +export PATH=/home/ianmethyst/.emacs.d/bin:/home/ianmethyst/.bin:/home/ianmethyst/.local/bin:$PATH + +# Enable colors +eval "`dircolors -b`" + +# Add some colour to LESS/MAN pages +export LESSOPEN="| /usr/bin/source-highlight-esc.sh %s" +export LESS='-R' + +export LESS_TERMCAP_mb=$'\E[01;31m' +export LESS_TERMCAP_md=$'\E[01;33m' +export LESS_TERMCAP_me=$'\E[0m' +export LESS_TERMCAP_se=$'\E[0m' +export LESS_TERMCAP_so=$'\E[01;42;30m' +export LESS_TERMCAP_ue=$'\E[0m' +export LESS_TERMCAP_us=$'\E[01;36m' + +# fzf +export FZF_DEFAULT_COMMAND='rg --hidden --ignore .git -g ""' +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + +# fnm +export PATH=/home/ianmethyst/.fnm:$PATH +eval "`fnm env --multi`" + +# Python + +# pip +export PIP_REQUIRE_VIRTUALENV=false +export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache +export PYTHON_KEYRING_BACKEND=keyring.backends.SecretService.Keyring + +# pyenv +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" +if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init -)"; fi + +# pipenv +export PIPENV_VENV_IN_PROJECT=1 +export PIPENV_SKIP_LOCK=true +export PIPENV_PYTHON=$PYENV_ROOT/shims/python +eval "$(pipenv --completion)" diff --git a/filesets/base/environment/.pam_environment b/filesets/base/environment/.pam_environment new file mode 100644 index 0000000..aca13fc --- /dev/null +++ b/filesets/base/environment/.pam_environment @@ -0,0 +1,4 @@ +XDG_DATA_HOME DEFAULT=@{HOME}/.local/share +XDG_CONFIG_HOME DEFAULT=@{HOME}/.config +XDG_CACHE_HOME DEFAULT=@{HOME}/.cache +XDG_CURRENT_DESKTOP DEFAULT=XFCE diff --git a/filesets/base/feh/.config/feh/keys b/filesets/base/feh/.config/feh/keys new file mode 100755 index 0000000..2256c78 --- /dev/null +++ b/filesets/base/feh/.config/feh/keys @@ -0,0 +1,38 @@ +menu_parent Left +menu_child Right +menu_down Down +menu_up Up + +scroll_left h +scroll_right l +scroll_up k +scroll_down j + +scroll_left_page C-h +scroll_right_page C-l +scroll_up_page C-k +scroll_down_page C-j + +toggle_aliasing A +toggle_filenames d +toggle_pointer o +toggle_fullscreen f + +zoom_in plus +zoom_out minus + +next_img greater +prev_img less +reload_image r +size_to_image w +next_dir bracketright +prev_dir bracketleft +orient_3 parenright +orient_1 parenleft +flip underscore +mirror bar +remove Delete +zoom_fit s +zoom_default a + +close q Q diff --git a/filesets/base/fontconfig/.config/fontconfig/fonts.conf b/filesets/base/fontconfig/.config/fontconfig/fonts.conf new file mode 100755 index 0000000..a06d6f0 --- /dev/null +++ b/filesets/base/fontconfig/.config/fontconfig/fonts.conf @@ -0,0 +1,34 @@ + + + + + + + Icons + + + + + {{typography.emoji.font}} + + + + + sans-serif + + {{typography.sans.font}} + + + + serif + + {{typography.serif.font}} + + + + monospace + + {{typography.mono.font}} + + + diff --git a/filesets/base/i3/.config/i3/config b/filesets/base/i3/.config/i3/config new file mode 100755 index 0000000..e510fc9 --- /dev/null +++ b/filesets/base/i3/.config/i3/config @@ -0,0 +1,352 @@ +########### +# General # +########### + +# Using Super instead of alt +set $mod Mod4 + +# Font +font pango: {{typography.mono.font}} {{typography.mono.weight}} {{typography.mono.size}} + +# Titles +for_window [class="^.*"] title_format " %title" + +############## +# Workspaces # +############## + +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +########## +# Colors # +########## + +set $background {{colors.bg}} +set $foreground {{colors.fg}} + +set $green {{colors.green}} +set $red {{colors.red}} + +# BORDER BACKGROUND TEXT INDICATOR +client.focused $green $green $background $green +client.unfocused $background $background $foreground $background +client.focused_inactive $background $background $foreground $background +client.urgent $red $red $foreground $red + +################ +# Key Bindings # +################ + +# Start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# Kill focused window +bindsym $mod+Shift+q kill + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# Start dmenu +# bindsym $mod+d exec dmenu_run +# bindsym $mod+Shift+d exec "dmenu_run -h 24 -x 12 -y 10 -w 1342 -fn 'Iosevka Nerd Font Mono-11' -nb '$background' -sb '$green' -nf '$foreground' -sf '$background'" + +# Change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# Alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# Alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Toggle Split in vertical/horizontal orientation +bindsym $mod+v split toggle + +# Enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# Change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# Toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# Toggle sticky +bindsym $mod+o sticky toggle + +# Change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# Focus the parent container +bindsym $mod+a focus parent + +# Focus the child container +# bindsym $mod+d focus child + +# Reload the configuration file +# bindsym $mod+Shift+c reload + +# Restart i3 inplace (preserves your layout/session, can be used to upgrde i3) +bindsym $mod+Shift+r restart + +# Lock +bindsym $mod+shift+x exec betterlockscreen -l dim + +# Program shortcuts + +# Scrot +bindsym --release Print exec $HOME/.bin/scrot-screen +bindsym --release Shift+Print exec $HOME/.bin/maim-area +bindsym --release $mod+Shift+Print exec $HOME/.bin/slop-ffmpeg-area + +# pcmanfm +# bindsym $mod+p exec --no-startup-id pcmanfm -n + +# Chromium +bindsym $mod+c exec --no-startup-id chromium + +# Rofi +bindsym $mod+d exec --no-startup-id rofi -show run +bindsym $mod+Shift+w exec --no-startup-id rofi -show window +bindsym $mod+Shift+s exec --no-startup-id rofi -show ssh +bindsym $mod+Shift+e exec --no-startup-id rofimoji +bindsym $mod+Shift+p exec --no-startup-id ~/.bin/rofi-passmenu +bindsym $mod+p exec --no-startup-id ~/.bin/rofi-xrandr +bindsym $mod+Shift+c exec --no-startup-id ~/.bin/rofi-project + +# dunst +bindsym $mod+Shift+d exec --no-startup-id dunstctl set-paused toggle +bindsym $mod+Control+grave exec --no-startup-id dunstctl history-pop +bindsym $mod+grave exec --no-startup-id dunstctl close + +############## +# Workspaces # +############## + +# Allow workspaces back and forth +workspace_auto_back_and_forth yes + +# Switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 +bindsym $mod+Tab workspace back_and_forth + +# Move workspace one monitor to the right +bindsym $mod+Shift+Tab move workspace to output right + +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# Assign clients to workspaces +assign [class="^Nautilus$"] → $ws1 +assign [class="^pcmanfm$"] → $ws1 +assign [class="^Pcmanfm$"] → $ws1 +assign [class="^Thunar$"] → $ws1 + +assign [class="^Firefox$"] → $ws2 +assign [class="^Chromium$" window_role="^browser$"] → $ws2 +for_window [class="^Chromium$" window_role="^pop-up$"] floating enable + +assign [class="^atom$"] → $ws3 +assign [class="^Atom$"] → $ws3 +assign [class="^sun-awt-X11-XFramePeer$"] → $ws3 +assign [class="^Processing$"] → $ws3 +for_window [title="^Welcome to Processing"] floating enable +assign [class="^processing-app-Base$"] → $ws3 +for_window [title="^Java$"] floating enable +for_window [title="^Java$"] move position center + +assign [class="^discord$"] → $ws4 +assign [class="^telegram-desktop$"] → $ws4 +assign [class="^TelegramDesktop$"] → $ws4 + +assign [class="^cura$"] → $ws6 +assign [class="^inkscape$"] → $ws6 +assign [class="^Inkscape$"] → $ws6 +assign [class="^Darktable$"] → $ws6 +assign [class="^darktable$"] → $ws6 +assign [class="^gimp$"] → $ws6 +assign [class="^Gimp$"] → $ws6 +assign [class="^krita$"] → $ws6 +assign [class="^Blender$"] → $ws6 +assign [title="^LibreOffice$"] → $ws6 +assign [class="^libreoffice$"] → $ws6 +assign [class="^libreoffice-startcenter$"] → $ws6 +assign [class="^libreoffice-writer$"] → $ws6 + +assign [class="^Steam$"] → $ws9 +assign [title="^Steam$"] → $ws9 +for_window [class="^Unity$"] floating enable +for_window [title="^Unity - Unity"] floating disable +for_window [class="^Steam$"] floating enable +for_window [class="^Steam$" title="^Steam$"] floating disable + +for_window [class="^pavucontrol$"] floating enable +for_window [class="^Pavucontrol$"] floating enable +for_window [class="^arandr$"] floating enable +for_window [class="^Arandr$"] floating enable + +############# +# Autostart # +############# + +exec_always $HOME/.bin/bg-feh $HOME/Pictures/wallpapers +exec_always xmodmap ~/.Xmodmap +exec_always $HOME/.bin/set-keymap +exec_always --no-startup-id $HOME/.bin/launch-dunst + +#exec_always compton --config $HOME/.config/compton/compton.conf +#exec_always $HOME/.bin/conky + +exec xautolock -time 15 -locker "betterlockscreen -l dim" -corners 0-00 + +exec pcmanfm -d +exec discord +exec telegram-desktop +exec steam +exec nm-applet +exec blueman-applet +exec pasystray +exec redshift-gtk +exec cbatticon BAT0 -l 25 -r 10 +# exec clipit + +######### +# Modes # +######### + +# Resize window (you can also use the mouse for that) +set $mode_resize resize +bindsym $mod+r mode "$mode_resize" +mode "$mode_resize" { + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + +# same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# System Menu +set $sysmenu "[p]oweroff re[b]oot [h]ibernate [s]uspend [l]ogout" +bindsym $mod+Delete mode $sysmenu + +mode $sysmenu { + bindsym r restart + bindsym l exit + bindsym p exec shutdown -P now + bindsym b exec shutdown -r now + bindsym s exec systemctl suspend + bindsym h exec systemctl hibernate + bindsym Return mode "default" + bindsym Escape mode "default" +} + + +####### +# Bar # +####### + +#bar { +# status_command $HOME/.bin/launch-polybar +# +#} + +exec_always --no-startup-id $HOME/.bin/launch-polybar + +################### +# Multimedia Keys # +################### + +# Volume + +# PulseAudio +bindsym XF86AudioRaiseVolume exec --no-startup-id $HOME/.bin/manage_volume -i 2 -n +bindsym XF86AudioLowerVolume exec --no-startup-id $HOME/.bin/manage_volume -d 2 -n +bindsym XF86AudioMute exec --no-startup-id $HOME/.bin/manage_volume -t -n + +# ALSA +#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master '2%+' +#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master '2%-' +#bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle + +# MPC +bindsym XF86AudioPrev exec mpc prev +bindsym XF86AudioNext exec mpc next +bindsym XF86AudioPlay exec mpc toggle +bindsym XF86AudioStop exec mpc stop + +# Sreen brightness controls +#bindsym XF86MonBrightnessUp exec xbacklight +2 +#bindsym XF86MonBrightnessDown exec xbacklight -2 + +bindsym XF86Display exec arandr +bindsym XF86TouchpadToggle exec pavucontrol + +########### +# i3-Gaps # +########### + +# Borders +for_window [class="^.*"] border pixel 3 +for_window [class="^Chromium$" window_role="^browser$"] border pixel 0 + +# Set inner/outer gaps +gaps inner 0 +gaps outer 0 + +# Smart gaps (gaps used if only more than one container on the workspace) +# smart_gaps on + +# Smart borders (draw borders around container only if it is not the only container on this workspace) +smart_borders on diff --git a/filesets/base/kitty/.config/kitty/kitty.conf b/filesets/base/kitty/.config/kitty/kitty.conf new file mode 100644 index 0000000..5c7c797 --- /dev/null +++ b/filesets/base/kitty/.config/kitty/kitty.conf @@ -0,0 +1,1213 @@ +# vim:fileencoding=utf-8:ft=conf:foldmethod=marker + +#: Fonts + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. + +font_family {{typography.kitty.font}} {{typography.mono.weight}} {{typography.kitty.append}} +bold_font {{typography.kitty.font}} {{typography.mono.bold}} {{typography.kitty.append}} +italic_font {{typography.kitty.font}} {{typography.mono.italic}} {{typography.kitty.append}} +bold_italic_font {{typography.kitty.font}} {{typography.mono.bold_italic}} {{typography.kitty.append}} + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. To get a full list of supported fonts use the `kitty +#: list-fonts` command. By default they are derived automatically, by +#: the OSes font system. Setting them manually is useful for font +#: families that have many weight variants like Book, Medium, Thick, +#: etc. For example:: + +#: font_family Operator Mono Book +#: bold_font Operator Mono Medium +#: italic_font Operator Mono Book Italic +#: bold_italic_font Operator Mono Medium Italic + +font_size {{typography.mono.size}} + +#: Font size (in pts) + +force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the the string been LTR. For example, assuming the Hebrew word +#: ירושלים, selecting the character that on the screen appears to be ם +#: actually writes into the selection buffer the character י. + +#: kitty's default behavior is useful in conjunction with a filter to +#: reverse the word order, however, if you wish to manipulate RTL +#: glyphs, it can be very challenging to work with, so this option is +#: provided to turn it off. Furthermore, this option can be used with +#: the command line program GNU FriBidi +#: to get BIDI +#: support, because it will force kitty to always treat the text as +#: LTR, which FriBidi expects for terminals. + +adjust_line_height 0 +adjust_column_width 0 + +#: Change the size of each character cell kitty renders. You can use +#: either numbers, which are interpreted as pixels or percentages +#: (number followed by %), which are interpreted as percentages of the +#: unmodified values. You can use negative pixels or percentages less +#: than 100% to reduce sizes (but this might cause rendering +#: artifacts). + +# symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each unicode code +#: point is specified in the form U+. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. symbol_map itself can be specified multiple +#: times. Syntax is:: + +#: symbol_map codepoints Font Family Name + +disable_ligatures always + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +font_features none + +#: Choose exactly which OpenType features to enable or disable. This +#: is useful as some fonts might have features worthwhile in a +#: terminal. For example, Fira Code Retina includes a discretionary +#: feature, zero, which in that font changes the appearance of the +#: zero (0), to make it more easily distinguishable from Ø. Fira Code +#: Retina also includes other discretionary features known as +#: Stylistic Sets which have the tags ss01 through ss20. + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: To get the PostScript name for a font, use kitty + list-fonts +#: --psnames:: + +#: $ kitty + list-fonts --psnames | grep Fira +#: Fira Code +#: Fira Code Bold (FiraCode-Bold) +#: Fira Code Light (FiraCode-Light) +#: Fira Code Medium (FiraCode-Medium) +#: Fira Code Regular (FiraCode-Regular) +#: Fira Code Retina (FiraCode-Retina) + +#: The part in brackets is the PostScript name. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero:: + +#: font_features FiraCode-Retina +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +box_drawing_scale 0.001, 1, 1.5, 2 + +#: Change the sizes of the lines used for the box drawing unicode +#: characters These values are in pts. They will be scaled by the +#: monitor DPI to arrive at a pixel value. There must be four values +#: corresponding to thin, normal, thick, and very thick lines. + + + +#: Cursor customization + +cursor {{colors.fg}} + +#: Default cursor color + +cursor_text_color {{colors.bg}} + +#: Choose the color of text under the cursor. If you want it rendered +#: with the background color of the cell underneath instead, use the +#: special keyword: background + +cursor_shape block + +#: The cursor shape can be one of (block, beam, underline) + +cursor_beam_thickness 1.5 + +#: Defines the thickness of the beam cursor (in pts) + +cursor_underline_thickness 2.0 + +#: Defines the thickness of the underline cursor (in pts) + +cursor_blink_interval -1 + +#: The interval (in seconds) at which to blink the cursor. Set to zero +#: to disable blinking. Negative values mean use system default. Note +#: that numbers smaller than repaint_delay will be limited to +#: repaint_delay. + +cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + + + +#: Scrollback + +scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down resizing of the terminal and also +#: use large amounts of RAM. + +scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. + +scrollback_pager_history_size 0 + +#: Separate scrollback history size, used only for browsing the +#: scrollback buffer (in MB). This separate buffer is not available +#: for interactive scrolling but will be piped to the pager program +#: when viewing scrollback buffer in a separate window. The current +#: implementation stores one character in 4 bytes, so approximatively +#: 2500 lines per megabyte at 100 chars per line. A value of zero or +#: less disables this feature. The maximum allowed size is 4GB. + +wheel_scroll_multiplier 5.0 + +#: Modify the amount scrolled by the mouse wheel. Note this is only +#: used for low precision scrolling devices, not for high precision +#: scrolling on platforms such as macOS and Wayland. Use negative +#: numbers to change scroll direction. + +touch_scroll_multiplier 1.0 + +#: Modify the amount scrolled by a touchpad. Note this is only used +#: for high precision scrolling devices on platforms such as macOS and +#: Wayland. Use negative numbers to change scroll direction. + + + +#: Mouse + +mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +url_color {{colors.blue}} +url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, single, double, curly + +open_url_with default + +#: The program with which to open URLs that are clicked on. The +#: special value default means to use the operating system's default +#: URL handler. + +url_prefixes http https file ftp + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, simply selecting text with the mouse will cause the text +#: to be copied to clipboard. Useful on platforms such as macOS that +#: do not have the concept of primary selections. You can instead +#: specify a name such as a1 to copy to a private kitty buffer +#: instead. Map a shortcut with the paste_from_buffer action to paste +#: from this private buffer. For example:: + +#: map cmd+shift+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. always will always do it. + +select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the unicode database will be matched. + +click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around + +pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. Valid values are: arrow, beam and hand + + + +#: Performance tuning + +repaint_delay 10 + +#: Delay (in milliseconds) between screen updates. Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS you have to either +#: set sync_to_monitor to no or use a monitor with a high refresh +#: rate. Also, to minimize latency when there is pending input to be +#: processed, repaint_delay is ignored. + +input_delay 3 + +#: Delay (in milliseconds) before input from the program running in +#: the terminal is processed. Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. + +sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing) +#: when scrolling. However, it limits the rendering speed to the +#: refresh rate of your monitor. With a very high speed mouse/high +#: keyboard repeat rate, you may notice some slight input latency. If +#: so, set this to no. + + + +#: Terminal bell + +enable_audio_bell yes + +#: Enable/disable the audio bell. Useful in environments that require +#: silence. + +visual_bell_duration 0.0 + +#: Visual bell duration. Flash the screen when a bell occurs for the +#: specified number of seconds. Set to zero to disable. + +window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on linux. + +bell_on_tab yes + +#: Show a bell symbol on the tab if a bell occurs in one of the +#: windows in the tab and the window is not the currently focused +#: window + +command_on_bell none + +#: Program to run when a bell occurs. + + + +#: Window layout + +remember_window_size no +initial_window_width 640 +initial_window_height 400 + +#: If enabled, the window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the https://sw.kovidgoyal.net/kitty/index.html#layouts. + +window_resize_step_cells 2 +window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing windows. The cells value is used for horizontal resizing +#: and the lines value for vertical resizing. + +window_border_width 1.0 + +#: The width (in pts) of window borders. Will be rounded to the +#: nearest number of pixels based on screen resolution. Note that +#: borders are displayed only when more than one window is visible. +#: They are meant to separate multiple windows. + +draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: minimum needed borders for inactive windows are drawn. That is only +#: the borders that separate the inactive window from a neighbor. Note +#: that setting a non-zero window margin overrides this and causes all +#: borders to be drawn. + +window_margin_width 12 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +single_window_margin_width -1 + +#: The window margin (in pts) to use when only a single window is +#: visible. Negative values will cause the value of +#: window_margin_width to be used instead. A single value sets all +#: four sides. Two values set the vertical and horizontal sides. Three +#: values set top, horizontal and bottom. Four values set top, right, +#: bottom and left. + +window_padding_width {{appearance.terminal_padding}} + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be on +#: only the bottom and right edges. + +active_border_color {{colors.green}} + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +inactive_border_color {{colors.light_bg}} + +#: The color for the border of inactive windows + +bell_border_color {{colors.yellow}} + +#: The color for the border of inactive windows in which a bell has +#: occurred + +inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only can be used to only hide the titlebar. +#: Whether this works and exactly what effect it has depends on the +#: window manager/operating system. + +resize_debounce_time 0.1 + +#: The time (in seconds) to wait before redrawing the screen when a +#: resize event is received. On platforms such as macOS, where the +#: operating system sends events corresponding to the start and end of +#: a resize, this number is ignored. + +resize_draw_strategy static + +#: Choose how kitty draws a window while a resize is in progress. A +#: value of static means draw the current window contents, mostly +#: unchanged. A value of scale means draw the current window contents +#: scaled. A value of blank means draw a blank window. A value of size +#: means show the window size in cells. + +resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with an +#: initial_window_width and initial_window_height in number of cells, +#: this option can be used to keep the margins as small as possible +#: when resizing the OS window. Note that this does not currently work +#: on Wayland. + + + +#: Tab bar + +tab_bar_edge bottom + +#: Which edge to show the tab bar on, top or bottom + +tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts) + +tab_bar_style fade + +#: The tab bar style, can be one of: fade, separator, powerline, or +#: hidden. In the fade style, each tab's edges fade into the +#: background color, in the separator style, tabs are separated by a +#: configurable separator, and the powerline shows the tabs as a +#: continuous line. + +tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown + +tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of last will switch to the right-most tab. + +tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +tab_title_template "{title}" + +#: A template to render the tab title. The default just renders the +#: title. If you wish to include the tab-index as well, use something +#: like: {index}: {title}. Useful if you have shortcuts mapped for +#: goto_tab N. In addition you can use {layout_name} for the current +#: layout name and {num_windows} for the number of windows in the tab. +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. + +active_tab_title_template none + +#: Template to use for active tabs, if not specified falls back to +#: tab_title_template. + +active_tab_foreground {{colors.bg}} +active_tab_background {{colors.fg}} +active_tab_font_style bold-italic +inactive_tab_foreground {{colors.comment}} +inactive_tab_background {{colors.light_bg}} +inactive_tab_font_style normal + +#: Tab bar colors and styles + +tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +#: Color scheme + +foreground {{colors.fg}} +background {{colors.bg}} + +#: The foreground and background colors + +background_opacity 1.0 + +#: The opacity of the background. A number between 0 and 1, where 1 is +#: opaque and 0 is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background. This is so that things like the status bar in vim, +#: powerline prompts, etc. still look good. But it means that if you +#: use a color theme with a background color in your editor, it will +#: not be rendered as transparent. Instead you should change the +#: default background color in your kitty config and not use a +#: background color in the editor color scheme. Or use the escape +#: codes to set the terminals default colors in a shell script to +#: launch your editor. Be aware that using a value less than 1.0 is a +#: (possibly significant) performance hit. If you want to dynamically +#: change transparency of windows set dynamic_background_opacity to +#: yes (this is off by default as it has a performance cost) + +background_image none + +#: Path to a background image. Must be in PNG format. + +background_image_layout tiled + +#: Whether to tile or scale the background image. + +background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. + +background_tint 0.0 + +#: How much to tint the background image by the background color. The +#: tint is applied only under the text area, not margin/borders. Makes +#: it easier to read the text. Tinting is done using the current +#: background color for each window. This setting applies only if +#: background_opacity is set and transparent windows are supported or +#: background_image is set. + +dim_opacity 0.75 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +selection_foreground {{colors.bg}} + +#: The foreground for text selected with the mouse. A value of none +#: means to leave the color unchanged. + +selection_background {{colors.fg}} + +#: The background for text selected with the mouse. + + +#: The 16 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version. You can also set the remaining colors from +#: the 256 color table as color16 to color255. + +color0 {{colors.bg}} +color8 {{colors.comment}} + +color1 {{colors.red}} +color9 {{colors.red}} + +color2 {{colors.green}} +color10 {{colors.green}} + +color3 {{colors.yellow}} +color11 {{colors.yellow}} + +color4 {{colors.cyan}} +color12 {{colors.cyan}} + +color5 {{colors.magenta}} +color13 {{colors.magenta}} + +color6 {{colors.blue}} +color14 {{colors.blue}} + +color7 {{colors.fg}} +color15 {{colors.lighter_fg}} + +mark1_foreground {{colors.fg}} + +#: Color for marks of type 1 + +mark1_background {{colors.blue}} + +#: Color for marks of type 1 (light steel blue) + +mark2_foreground {{colors.fg}} + +#: Color for marks of type 2 + +mark2_background {{colors.yellow}} + +#: Color for marks of type 1 (beige) + +mark3_foreground {{colors.bg}} + +#: Color for marks of type 3 + +mark3_background {{colors.magenta}} + +#: Color for marks of type 1 (violet) + + + +#: Advanced + +shell . + +#: The shell program to execute. The default value of . means to use +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login to ensure that the shell starts in interactive mode and +#: reads its startup rc files. + +editor . + +#: The console editor to use when editing the kitty config file or +#: similar tasks. A value of . means to use the environment variables +#: VISUAL and EDITOR in that order. Note that this environment +#: variable has to be set not just in your shell startup scripts but +#: system-wide, otherwise kitty will not see it. + +close_on_child_death no + +#: Close the window when the child process (shell) exits. If no (the +#: default), the terminal will remain open when the child exits as +#: long as there are still processes outputting to the terminal (for +#: example disowned or backgrounded processes). If yes, the window +#: will close as soon as the child process exits. Note that setting it +#: to yes means that any background processes still using the terminal +#: can fail silently because their stdout/stderr/stdin no longer work. + +allow_remote_control yes + +#: Allow other programs to control kitty. If you turn this on other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over ssh +#: connections. You can chose to either allow any program running +#: within kitty to control it, with yes or only programs that connect +#: to the socket specified with the kitty --listen-on command line +#: option, if you use the value socket-only. The latter is useful if +#: you want to prevent programs running on a remote computer over ssh +#: from controlling kitty. + +listen_on none + +#: Tell kitty to listen to the specified unix/tcp socket for remote +#: control connections. Note that this will apply to all kitty +#: instances. It can be overridden by the kitty --listen-on command +#: line flag. This option accepts only UNIX sockets, such as +#: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment +#: variables are expanded. If {kitty_pid} is present then it is +#: replaced by the PID of the kitty process, otherwise the PID of the +#: kitty process is appended to the value, with a hyphen. This option +#: is ignored unless you also set allow_remote_control to enable +#: remote control. See the help for kitty --listen-on for more +#: details. + +# env + +#: Specify environment variables to set in all child processes. Note +#: that environment variables are expanded recursively, so if you +#: use:: + +#: env MYVAR1=a +#: env MYVAR2=${MYVAR1}/${HOME}/b + +#: The value of MYVAR2 will be a//b. + +update_check_interval 24 + +#: Periodically check if an update to kitty is available. If an update +#: is found a system notification is displayed informing you of the +#: available update. The default is to check every 24 hrs, set to zero +#: to disable. + +startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session command line option for +#: individual instances. See +#: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. + +clipboard_control write-clipboard write-primary + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: set of possible actions is: write-clipboard read-clipboard write- +#: primary read-primary. You can additionally specify no-append to +#: disable kitty's protocol extension for clipboard concatenation. The +#: default is to allow writing to the clipboard and primary selection +#: with concatenation enabled. Note that enabling the read +#: functionality is a security risk as it means that any program, even +#: one running on a remote server via SSH can read your clipboard. + +term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on Stack Overflow +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. + + + +#: OS specific tweaks + +macos_titlebar_color system + +#: Change the color of the kitty window's titlebar on macOS. A value +#: of system means to use the default system color, a value of +#: background means to use the background color of the currently +#: active window and finally you can use an arbitrary color, such as +#: #12af59 or red. WARNING: This option works by using a hack, as +#: there is no proper Cocoa API for it. It sets the background color +#: of the entire window and makes the titlebar transparent. As such it +#: is incompatible with background_opacity. If you want to use both, +#: you are probably better off just hiding the titlebar with +#: hide_window_decorations. + +macos_option_as_alt no + +#: Use the option key as an alt key. With this set to no, kitty will +#: use the macOS native Option+Key = unicode character behavior. This +#: will break any Alt+key keyboard shortcuts in your terminal +#: programs, but you can use the macOS unicode input technique. You +#: can use the values: left, right, or both to use only the left, +#: right or both Option keys as Alt, instead. + +macos_hide_from_tasks no + +#: Hide the kitty window from running tasks (Option+Tab) on macOS. + +macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed. By +#: default, kitty will stay running, even with no open windows, as is +#: the expected behavior on macOS. + +macos_window_resizable yes + +#: Disable this if you want kitty top-level (OS) windows to not be +#: resizable on macOS. + +macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes. For example, a value of +#: 0.75 will result in rendering that looks similar to sub-pixel +#: antialiasing at common font sizes. + +macos_traditional_fullscreen no + +#: Use the traditional full-screen transition, that is faster, but +#: less pretty. + +macos_show_window_title_in all + +#: Show or hide the window title in the macOS window or menu-bar. A +#: value of window will show the title of the currently active window +#: at the top of the macOS window. A value of menubar will show the +#: title of the currently active window in the macOS menu-bar, making +#: use of otherwise wasted space. all will show the title everywhere +#: and none hides the title in the window and the menu-bar. + +macos_custom_beam_cursor no + +#: Enable/disable custom mouse cursor for macOS that is easier to see +#: on both light and dark backgrounds. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. + +linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. + + + +#: Keyboard shortcuts + +#: For a list of key names, see: the GLFW key macros +#: . +#: The name to use is the part after the GLFW_KEY_ prefix. For a list +#: of modifier names, see: GLFW mods +#: + +#: On Linux you can also use XKB key names to bind keys that are not +#: supported by GLFW. See XKB keys +#: for a list of key names. The name to use is the part +#: after the XKB_KEY_ prefix. Note that you can only use an XKB key +#: name for keys that are not known as GLFW keys. + +#: Finally, you can use raw system key codes to map keys, again only +#: for keys that are not known as GLFW keys. To see the system key +#: code for a key, start kitty with the kitty --debug-keyboard option. +#: Then kitty will output some debug text for every key event. In that +#: text look for ``native_code`` the value of that becomes the key +#: name in the shortcut. For example: + +#: .. code-block:: none + +#: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a' + +#: Here, the key name for the A key is 0x61 and you can use it with:: + +#: map ctrl+0x61 something + +#: to map ctrl+a to something. + +#: You can use the special action no_op to unmap a keyboard shortcut +#: that is assigned in the default configuration:: + +#: map kitty_mod+space no_op + +#: You can combine multiple actions to be triggered by a single +#: shortcut, using the syntax below:: + +#: map key combine action1 action2 action3 ... + +#: For example:: + +#: map kitty_mod+e combine : new_window : next_layout + +#: this will create a new window and switch to the next available +#: layout + +#: You can use multi-key shortcuts using the syntax shown below:: + +#: map key1>key2>key3 action + +#: For example:: + +#: map ctrl+f>2 set_font_size 20 + +kitty_mod ctrl+shift + +#: The value of kitty_mod is used as the modifier for all default +#: shortcuts, you can change it in your kitty.conf to change the +#: modifiers for all the default shortcuts. + +clear_all_shortcuts no + +#: You can have kitty remove all shortcut definition seen up to this +#: point. Useful, for instance, to remove the default shortcuts. + +# kitten_alias hints hints --hints-offset=0 + +#: You can create aliases for kitten names, this allows overriding the +#: defaults for kitten options and can also be used to shorten +#: repeated mappings of the same kitten with a specific group of +#: options. For example, the above alias changes the default value of +#: kitty +kitten hints --hints-offset to zero for all mappings, +#: including the builtin ones. + +#: Clipboard + +map kitty_mod+c copy_to_clipboard + +#: There is also a copy_or_interrupt action that can be optionally +#: mapped to Ctrl+c. It will copy only if there is a selection and +#: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt +#: will copy and clear the selection or send an interrupt if there is +#: no selection. + +map kitty_mod+v paste_from_clipboard +map kitty_mod+s paste_from_selection +map shift+insert paste_from_selection +map kitty_mod+o pass_selection_to_program + +#: You can also pass the contents of the current selection to any +#: program using pass_selection_to_program. By default, the system's +#: open program is used, but you can specify your own, the selection +#: will be passed as a command line argument to the program, for +#: example:: + +#: map kitty_mod+o pass_selection_to_program firefox + +#: You can pass the current selection to a terminal program running in +#: a new kitty window, by using the @selection placeholder:: + +#: map kitty_mod+y new_window less @selection + + + +#: Scrolling + +map kitty_mod+up scroll_line_up +map kitty_mod+k scroll_line_up +map kitty_mod+down scroll_line_down +map kitty_mod+j scroll_line_down +map kitty_mod+page_up scroll_page_up +map kitty_mod+page_down scroll_page_down +map kitty_mod+home scroll_home +map kitty_mod+end scroll_end +map kitty_mod+h show_scrollback + +#: You can pipe the contents of the current screen + history buffer as +#: STDIN to an arbitrary program using the ``launch`` function. For +#: example, the following opens the scrollback buffer in less in an +#: overlay window:: + +#: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#: For more details on piping screen and buffer contents to external +#: programs, see launch. + + + +#: Window management + +map kitty_mod+enter new_window + +#: You can open a new window running an arbitrary program, for +#: example:: + +#: map kitty_mod+y launch mutt + +#: You can open a new window with the current working directory set to +#: the working directory of the current window using:: + +#: map ctrl+alt+enter launch --cwd=current + +#: You can open a new window that is allowed to control kitty via the +#: kitty remote control facility by prefixing the command line with @. +#: Any programs running in that window will be allowed to control +#: kitty. For example:: + +#: map ctrl+enter launch --allow-remote-control some_program + +#: You can open a new window next to the currently active window or as +#: the first window, with:: + +#: map ctrl+n launch --location=neighbor some_program +#: map ctrl+f launch --location=first some_program + +#: For more details, see launch. + +map kitty_mod+n new_os_window + +#: Works like new_window above, except that it opens a top level OS +#: kitty window. In particular you can use new_os_window_with_cwd to +#: open a window with the current working directory. + +map kitty_mod+w close_window +map kitty_mod+] next_window +map kitty_mod+[ previous_window +map kitty_mod+f move_window_forward +map kitty_mod+b move_window_backward +map kitty_mod+` move_window_to_top +map kitty_mod+r start_resizing_window +map kitty_mod+1 first_window +map kitty_mod+2 second_window +map kitty_mod+3 third_window +map kitty_mod+4 fourth_window +map kitty_mod+5 fifth_window +map kitty_mod+6 sixth_window +map kitty_mod+7 seventh_window +map kitty_mod+8 eighth_window +map kitty_mod+9 ninth_window +map kitty_mod+0 tenth_window + + +#: Tab management + +map kitty_mod+right next_tab +map kitty_mod+left previous_tab +map kitty_mod+t new_tab +map kitty_mod+q close_tab +map kitty_mod+. move_tab_forward +map kitty_mod+, move_tab_backward +map kitty_mod+alt+t set_tab_title + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, and any number larger than the last tab being the last tab:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and use +#: new_tab_with_cwd. Finally, if you want the new tab to open next to +#: the current tab rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] + + +#: Layout management + +map kitty_mod+l next_layout + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + + +#: Font sizes + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +map kitty_mod+equal change_font_size all +2.0 +map kitty_mod+minus change_font_size all -2.0 +map kitty_mod+backspace change_font_size all 0 + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 + + +#: Select and act on visible text + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +map kitty_mod+e kitten hints + +#: Open a currently visible URL using the keyboard. The program used +#: to open the URL is specified in open_url_with. + +map kitty_mod+p>f kitten hints --type path --program - + +#: Select a path/filename and insert it into the terminal. Useful, for +#: instance to run git commands on a filename output from a previous +#: git command. + +map kitty_mod+p>shift+f kitten hints --type path + +#: Select a path/filename and open it with the default open program. + +map kitty_mod+p>l kitten hints --type line --program - + +#: Select a line of text and insert it into the terminal. Use for the +#: output of things like: ls -1 + +map kitty_mod+p>w kitten hints --type word --program - + +#: Select words and insert into terminal. + +map kitty_mod+p>h kitten hints --type hash --program - + +#: Select something that looks like a hash and insert it into the +#: terminal. Useful with git, which uses sha1 hashes to identify +#: commits + +map kitty_mod+p>n kitten hints --type linenum + +#: Select something that looks like filename:linenum and open it in +#: vim at the specified line number. + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see kittens/hints. + + +#: Miscellaneous + +map kitty_mod+f11 toggle_fullscreen +map kitty_mod+f10 toggle_maximized +map kitty_mod+u kitten unicode_input +map kitty_mod+f2 edit_config_file +map kitty_mod+escape kitty_shell window + +#: Open the kitty shell in a new window/tab/overlay/os_window to +#: control kitty using commands. + +map kitty_mod+a>m set_background_opacity +0.1 +map kitty_mod+a>l set_background_opacity -0.1 +map kitty_mod+a>1 set_background_opacity 1 +map kitty_mod+a>d set_background_opacity default +map kitty_mod+delete clear_terminal reset active + +#: You can create shortcuts to clear/reset the terminal. For example:: + +#: # Reset the terminal +#: map kitty_mod+f9 clear_terminal reset active +#: # Clear the terminal screen by erasing all contents +#: map kitty_mod+f10 clear_terminal clear active +#: # Clear the terminal scrollback by erasing it +#: map kitty_mod+f11 clear_terminal scrollback active +#: # Scroll the contents of the screen into the scrollback +#: map kitty_mod+f12 clear_terminal scroll active + +#: If you want to operate on all windows instead of just the current +#: one, use all instead of active. + +#: It is also possible to remap Ctrl+L to both scroll the current +#: screen contents into the scrollback buffer and clear the screen, +#: instead of just clearing the screen:: + +#: map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c + + +#: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#: client program when pressing specified shortcut keys. For example:: + +#: map ctrl+alt+a send_text all Special text + +#: This will send "Special text" when you press the ctrl+alt+a key +#: combination. The text to be sent is a python string literal so you +#: can use escapes like \x1b to send control codes or \u21fb to send +#: unicode characters (or you can just input the unicode characters +#: directly as UTF-8 text). The first argument to send_text is the +#: keyboard modes in which to activate the shortcut. The possible +#: values are normal or application or kitty or a comma separated +#: combination of them. The special keyword all means all modes. The +#: modes normal and application refer to the DECCKM cursor key mode +#: for terminals, and kitty refers to the special kitty extended +#: keyboard protocol. + +#: Another example, that outputs a word and then moves the cursor to +#: the start of the line (same as pressing the Home key):: + +#: map ctrl+alt+a send_text normal Word\x1b[H +#: map ctrl+alt+a send_text application Word\x1bOH diff --git a/filesets/base/nvim/.config/nvim/.gitignore b/filesets/base/nvim/.config/nvim/.gitignore new file mode 100644 index 0000000..d7ad043 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/.gitignore @@ -0,0 +1 @@ +plugin/ diff --git a/filesets/base/nvim/.config/nvim/init.lua b/filesets/base/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..55e8a92 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/init.lua @@ -0,0 +1,18 @@ +vim.g.python3_host_prog = '/usr/bin/python' +vim.g.mapleader = ' ' + +local fn = vim.fn +local execute = vim.api.nvim_command + +-- Setup packer +local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' +if fn.empty(fn.glob(install_path)) > 0 then + execute('!git clone https://github.com/wbthomason/packer.nvim '..install_path) +end +vim.cmd [[packadd packer.nvim]] + +vim.cmd 'autocmd BufWritePost plugins/init.lua PackerCompile' -- Auto compile when there are changes in plugins.lua + +-- Source settings +require('plugins') +require('settings') diff --git a/filesets/base/nvim/.config/nvim/lua/colorscheme.lua b/filesets/base/nvim/.config/nvim/lua/colorscheme.lua new file mode 100644 index 0000000..0c7dc3d --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/colorscheme.lua @@ -0,0 +1,4 @@ +local utils = require('utils') + +utils.opt('o', 'termguicolors', true) +{{colors.vim_colorscheme}} diff --git a/filesets/base/nvim/.config/nvim/lua/keybindings.lua b/filesets/base/nvim/.config/nvim/lua/keybindings.lua new file mode 100644 index 0000000..862245a --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/keybindings.lua @@ -0,0 +1,2 @@ +local utils = require('utils') +utils.map('n', '', 'noh') -- Clear highlights diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/formatter-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/formatter-nvim.lua new file mode 100644 index 0000000..7dfc260 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/formatter-nvim.lua @@ -0,0 +1,33 @@ +local prettier = function() + return { + exe = "prettier", + args = {"--stdin-filepath", vim.api.nvim_buf_get_name(0), '--single-quote', '--no-semi'}, + stdin = true + } +end + +local black = function() + return { + exe = "black", + args = {"-q", "--stdin-filename", vim.api.nvim_buf_get_name(0), "-"}, + stdin = true + } +end + +require('formatter').setup({ + logging = false, + filetype = { + javascript = {prettier}, + javascriptreact = {prettier}, + typescript = {prettier}, + typescriptreact = {prettier}, + python = {black} + } +}) + +vim.api.nvim_exec([[ +augroup FormatAutogroup +autocmd! +autocmd BufWritePost *.js,*.ts,*.jsx,*.tsx,*.py FormatWrite +augroup END +]], true) diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/fzf-lua.lua b/filesets/base/nvim/.config/nvim/lua/plugins/fzf-lua.lua new file mode 100644 index 0000000..a58227c --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/fzf-lua.lua @@ -0,0 +1,18 @@ +local utils = require("utils") +local opts = { noremap = true, silent = true } + +utils.map('n', '', 'lua require("fzf-lua").files()', opts) +utils.map('n', '/', 'lua require("fzf-lua").live_grep()', opts) +utils.map('n', ',', 'lua require("fzf-lua").buffers()', opts) +utils.map('n', 'bb', 'lua require("fzf-lua").buffers()', opts) +utils.map('n', 'hh', 'lua require("fzf-lua").help_tags()', opts) +utils.map('n', 'hm', 'lua require("fzf-lua").man_pages()', opts) +utils.map('n', 'fp', 'lua require("fzf-lua").files({ cwd = "~/.config/nvim/" })', opts) + +require'fzf-lua'.setup { + fzf_layout = 'default', + grep = { + rg_opts = "--hidden --column --line-number --no-heading " .. + "--color=always --smart-case -g '!{.git,node_modules}/*'", + } +} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/gitsigns-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/gitsigns-nvim.lua new file mode 100644 index 0000000..91fa65b --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/gitsigns-nvim.lua @@ -0,0 +1 @@ +require('gitsigns').setup() diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/hardline.lua b/filesets/base/nvim/.config/nvim/lua/plugins/hardline.lua new file mode 100644 index 0000000..b6702f2 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/hardline.lua @@ -0,0 +1 @@ +require('hardline').setup {} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/indent-blankline-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/indent-blankline-nvim.lua new file mode 100644 index 0000000..06e964e --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/indent-blankline-nvim.lua @@ -0,0 +1,6 @@ +local utils = require('utils') + +utils.map('n', 'i', ':IndentBlanklineToggle', {noremap = true, silent = true}) + +vim.g.indent_blankline_use_treesitter = true +vim.g.indent_blankline_filetype_exclude = {'help','dashboard','dashpreview','coc-explorer','startify','vista','sagahover', 'lspinfo'} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/init.lua b/filesets/base/nvim/.config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..b230c2f --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/init.lua @@ -0,0 +1,149 @@ +---@diagnostic disable: undefined-global + +return require('packer').startup(function() + use {'wbthomason/packer.nvim', opt = true} + + use {'ibhagwan/fzf-lua', + requires = { + 'vijaymarupudi/nvim-fzf', + 'kyazdani42/nvim-web-devicons' -- optional for icons + }, + config = [[require('plugins.fzf-lua')]] + } + + use { + 'kevinhwang91/rnvimr', + config = [[require('plugins.rnvimr')]] + } + + -- File explorer + use { + 'kyazdani42/nvim-tree.lua', + config = [[require('plugins.nvim-tree')]] + } + + -- LSP config + use { + 'neovim/nvim-lspconfig', + config = [[require('plugins.lsp')]] + } + + -- Langugage specific LSP plugins + use { 'tjdevries/nlua.nvim' } + + -- Additional LSP plugins + use { + 'glepnir/lspsaga.nvim', + config = [[require('plugins.lspsaga-nvim')]] + } + + use { 'folke/lsp-colors.nvim' } + + -- Outline (LSP) + -- use { 'simrat39/symbols-outline.nvim' } + use { 'stevearc/aerial.nvim' } + + -- Diagnostics + use { + 'folke/trouble.nvim', + config = [[require('plugins.trouble-nvim')]] + } + + -- Tree-sitter + use { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate', + config = [[require('plugins.nvim-treesitter')]] + } + + -- Formatting + use { + 'mhartington/formatter.nvim', + config = [[require('plugins.formatter-nvim')]] + } + use { + 'davinche/whitespace-vim', + config = [[require('plugins.whitespace-vim')]] + } + + -- Completion + use { + 'hrsh7th/nvim-compe', + config = [[require('plugins.nvim-compe')]] + } + + -- Snippets + use { 'hrsh7th/vim-vsnip' } + use { 'hrsh7th/vim-vsnip-integ' } + + -- Terminal + use { + "akinsho/nvim-toggleterm.lua", + config = [[require('plugins.nvim-toggleterm')]] + } + + -- Git + use { + 'lewis6991/gitsigns.nvim', + requires = { 'nvim-lua/plenary.nvim' }, + config = [[require('plugins.gitsigns-nvim')]] + } + use { 'tpope/vim-fugitive' } + use { + 'kdheepak/lazygit.nvim', + config = [[require('plugins.lazygit-nvim')]] + } + + -- Indent lines + use { + 'lukas-reineke/indent-blankline.nvim', + config = [[require('plugins.indent-blankline-nvim')]] + } + + -- Handy stuff + use { 'ygm2/rooter.nvim' } + use { 'dhruvasagar/vim-table-mode' } + use { 'tpope/vim-eunuch' } + + -- Statusline + -- use { + -- 'ojroques/nvim-hardline', + -- config = [[require('plugins.hardline')]] + -- } + + use { + 'hoob3rt/lualine.nvim', + requires = {'kyazdani42/nvim-web-devicons', opt = true}, + config = [[require('plugins.lualine')]] + } + + -- Syntax plugins + use { 'euclidianAce/BetterLua.vim' } + + -- Color highlighting + use { 'norcalli/nvim-colorizer.lua' } + + -- Colorschemes + use { + 'Th3Whit3Wolf/onebuddy', + requires = { {'tjdevries/colorbuddy.vim'} } + } + use { 'RRethy/nvim-base16' } + use { 'NTBBloodbath/doom-one.nvim' } + + -- Cursorline + use { 'xiyaowong/nvim-cursorword' } + -- use { 'yamatsum/nvim-cursorline' } + + use { + 'kyazdani42/nvim-web-devicons', + config = [[require('plugins.nvim-web-devicons')]] + } + + -- Python + use { + 'petobens/poet-v', + config = [[require('plugins.poet-v')]] + } +end) + diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua new file mode 100644 index 0000000..056f3d6 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua @@ -0,0 +1,8 @@ +local utils = require('utils') +local opts = { noremap = true, silent = true } + +utils.map('n', 'gg', 'LazyGit', opts) +utils.map('n', 'gc', 'LazyGitConfig', opts) + +vim.g.lazygit_floating_window_use_plenary = 1 +vim.g.lazygit_use_neovim_remote = 1 diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/lsp.lua b/filesets/base/nvim/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..af1c518 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,155 @@ +local lsp = require("lspconfig") +local aerial = require("aerial") + +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( +vim.lsp.diagnostic.on_publish_diagnostics, { + signs = true, + virtual_text = true, + underline = true +}) + +local noremap = function(lhs, rhs, mode) + mode = mode or 'n' + local opts = { noremap=true, silent=true } + vim.api.nvim_buf_set_keymap(0, mode, lhs, rhs, opts) +end + +local set_lsp_config = function(client, bufnr) + print("LSP started"); + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + aerial.on_attach(client) + + local mappings = { + v = { + ['ca'] = 'Lspsaga range_code_actiongh'] = 'Lspsaga lsp_finder', + ['gh'] = 'Lspsaga lsp_finder', + ['ca'] = 'Lspsaga code_action', + ['K'] = 'Lspsaga hover_doc', + ['gs'] = 'Lspsaga signature_help', + ['gr'] = 'Lspsaga rename', + ['cd'] = 'Lspsaga preview_definition', + ['cX'] = 'Lspsaga show_line_diagnostics', + ['[e'] = 'Lspsaga diagnostic_jump_next', + [']e'] = 'Lspsaga diagnostic_jump_prev', + ['co'] = 'AerialToggle!', + ['[['] = 'AerialPrevUp', + [']]'] = 'AerialNext', + } + } + + for mapping_type, map_table in pairs(mappings) do + for lhs, rhs in pairs(map_table) do + noremap(lhs, rhs, mapping_type) + end + end +end + + +-- Lua +require('nlua.lsp.nvim').setup(lsp, { + on_attach = set_lsp_config, +}) + +-- Typescript +lsp.tsserver.setup { + on_attach = function(client, bufnr) + client.resolved_capabilities.document_formatting = false + set_lsp_config(client, bufnr) + end +} + +-- Python + +lsp.pyright.setup{ + on_attach = set_lsp_config + } + + +-- lsp.pyls.setup{ +-- on_attach = set_lsp_config, +-- settings = { +-- pyls = { +-- plugins = { +-- jedi_completion = {enabled = false}, +-- jedi_definition = {enabled = false}, +-- yapf = {enabled = false}, +-- rope_completion = {enabled = false}, +-- pylint = {enabled = false}, +-- pyflakes = {enabled = false}, +-- pydocstyle = {enabled = false}, +-- preload = {enabled = false}, +-- mccabe = {enabled = false}, +-- jedi_symbols = {enabled = false}, +-- jedi_references = {enabled = false}, +-- }}}} + +-- EFM + +-- local function eslint_config_exists() +-- local eslintrc = vim.fn.glob(".eslintrc*", 0, 1) +-- +-- if not vim.tbl_isempty(eslintrc) then +-- return true +-- end +-- +-- if vim.fn.filereadable("package.json") then +-- if vim.fn.json_decode(vim.fn.readfile("package.json"))["eslintConfig"] then +-- return true +-- end +-- end +-- +-- return false +-- end + + +local eslint = { + lintCommand = "eslint_d -f unix --stdin --stdin-filename ${INPUT}", + lintStdin = true, + lintFormats = {"%f:%l:%c: %m"}, + lintIgnoreExitCode = true, + formatCommand = "eslint_d --fix-to-stdout --stdin --stdin-filename=${INPUT}", + formatStdin = true +} + +local flake8 = { + lintCommand = 'flake8 --stdin-display-name ${INPUT} -', + lintStdin = true, + lintFormats = {"%f:%l:%c: %m"} +} + +local isort = { + formatCommand = "isort --profile black -", + formatStdin = true, +} + +lsp.efm.setup { + init_options = { + documentFormatting = true + }, + filetypes = {"javascript", "typescript", "javascriptreact", "typescriptreact", "python" }, + on_attach = function(client, bufnr) + set_lsp_config(client, bufnr) + end, + root_dir = function() + -- if not eslint_config_exists() then + -- return nil + -- end + return vim.fn.getcwd() + end, + settings = { + rootMarkers = {".eslintrc", ".eslintrc.js", ".git/", "pyproject.toml" }, + languages = { + javascript = {eslint}, + javascriptreact = {eslint}, + typescript = {eslint}, + typescriptreact = {eslint}, + python = {flake8, isort} + } + } +} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/lspsaga-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/lspsaga-nvim.lua new file mode 100644 index 0000000..58176fe --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/lspsaga-nvim.lua @@ -0,0 +1,2 @@ +local saga = require('lspsaga') +saga.init_lsp_saga() diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/lualine.lua b/filesets/base/nvim/.config/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..9329654 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/lualine.lua @@ -0,0 +1,221 @@ +-- Eviline config for lualine +-- Author: shadmansaleh +-- Credit: glepnir +local lualine = require 'lualine' + +-- Color table for highlights +local colors = { + bg = '#202328', + fg = '#bbc2cf', + yellow = '#ECBE7B', + cyan = '#008080', + darkblue = '#081633', + green = '#98be65', + orange = '#FF8800', + violet = '#a9a1e1', + magenta = '#c678dd', + blue = '#51afef', + red = '#ec5f67' +} + +local conditions = { + buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end, + hide_in_width = function() return vim.fn.winwidth(0) > 80 end, + check_git_workspace = function() + local filepath = vim.fn.expand('%:p:h') + local gitdir = vim.fn.finddir('.git', filepath .. ';') + return gitdir and #gitdir > 0 and #gitdir < #filepath + end +} + +-- Config +local config = { + options = { + -- Disable sections and component separators + component_separators = "", + section_separators = "", + disabled_filetypes = {'NvimTree'}, + + theme = { + -- We are going to use lualine_c an lualine_x as left and + -- right section. Both are highlighted by c theme . So we + -- are just setting default looks o statusline + normal = {c = {fg = colors.fg, bg = colors.bg}}, + inactive = {c = {fg = colors.fg, bg = colors.bg}} + } + }, + sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + -- These will be filled later + lualine_c = {}, + lualine_x = {} + }, + inactive_sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_v = {}, + lualine_y = {}, + lualine_z = {}, + lualine_c = {}, + lualine_x = {} + } +} + +-- Inserts a component in lualine_c at left section +local function ins_left(component) + table.insert(config.sections.lualine_c, component) +end + +-- Inserts a component in lualine_x ot right section +local function ins_right(component) + table.insert(config.sections.lualine_x, component) +end + +ins_left { + function() return '▊' end, + color = {fg = colors.blue}, -- Sets highlighting of component + left_padding = 0 -- We don't need space before this +} + +ins_left { + -- mode component + function() + -- auto change color according to neovims mode + local mode_color = { + n = colors.red, + i = colors.green, + v = colors.blue, + [''] = colors.blue, + V = colors.blue, + c = colors.magenta, + no = colors.red, + s = colors.orange, + S = colors.orange, + [''] = colors.orange, + ic = colors.yellow, + R = colors.violet, + Rv = colors.violet, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ['r?'] = colors.cyan, + ['!'] = colors.red, + t = colors.red + } + vim.api.nvim_command( + 'hi! LualineMode guifg=' .. mode_color[vim.fn.mode()] .. " guibg=" .. + colors.bg) + return '' + end, + color = "LualineMode", + left_padding = 0 +} + +ins_left { + -- filesize component + function() + local function format_file_size(file) + local size = vim.fn.getfsize(file) + if size <= 0 then return '' end + local sufixes = {'b', 'k', 'm', 'g'} + local i = 1 + while size > 1024 do + size = size / 1024 + i = i + 1 + end + return string.format('%.1f%s', size, sufixes[i]) + end + local file = vim.fn.expand('%:p') + if string.len(file) == 0 then return '' end + return format_file_size(file) + end, + condition = conditions.buffer_not_empty +} + +ins_left { + 'filename', + condition = conditions.buffer_not_empty, + color = {fg = colors.magenta, gui = 'bold'} +} + +ins_left {'location'} + +ins_left {'progress', color = {fg = colors.fg, gui = 'bold'}} + +ins_left { + 'diagnostics', + sources = {'nvim_lsp'}, + symbols = {error = ' ', warn = ' ', info = ' '}, + color_error = colors.red, + color_warn = colors.yellow, + color_info = colors.cyan +} + +-- Insert mid section. You can make any number of sections in neovim :) +-- for lualine it's any number greater then 2 +-- ins_left {function() return '%=' end} + +ins_right { + -- Lsp server name . + function() + local msg = 'No Active Lsp' + local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') + local clients = vim.lsp.get_active_clients() + if next(clients) == nil then return msg end + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return client.name + end + end + return msg + end, + icon = '', + color = {fg = '#ffffff', gui = 'bold'} +} + +-- Add components to right sections +ins_right { + 'o:encoding', -- option component same as &encoding in viml + upper = true, -- I'm not sure why it's upper case either ;) + condition = conditions.hide_in_width, + color = {fg = colors.green, gui = 'bold'} +} + +ins_right { + 'fileformat', + upper = true, + icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh + color = {fg = colors.green, gui = 'bold'} +} + +ins_right { + 'branch', + icon = '', + condition = conditions.check_git_workspace, + color = {fg = colors.violet, gui = 'bold'} +} + +ins_right { + 'diff', + -- Is it me or the symbol for modified us really weird + symbols = {added = ' ', modified = '柳 ', removed = ' '}, + color_added = colors.green, + color_modified = colors.orange, + color_removed = colors.red, + condition = conditions.hide_in_width +} + +ins_right { + function() return '▊' end, + color = {fg = colors.blue}, + right_padding = 0 +} + +-- Now don't forget to initialize lualine +lualine.setup(config) diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-compe.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-compe.lua new file mode 100644 index 0000000..a1a9404 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-compe.lua @@ -0,0 +1,78 @@ +local utils = require('utils') + +utils.opt('o', 'completeopt', 'menuone,noselect') + +require'compe'.setup { + enabled = true; + autocomplete = true; + debug = false; + min_length = 1; + preselect = 'enable'; + throttle_time = 80; + source_timeout = 200; + incomplete_delay = 400; + max_abbr_width = 100; + max_kind_width = 100; + max_menu_width = 100; + documentation = true; + + source = { + path = true; + buffer = true; + calc = true; + nvim_lsp = true; + nvim_lua = true; + vsnip = false; + ultisnips = false; + }; +} + +local map_options = { silent = true, expr = true, noremap = true } +utils.map('i', '', "compe#complete()", map_options) +utils.map('i', '', "compe#confirm('')", map_options) +utils.map('i', '', "compe#close('', "compe#scroll({ 'delta': +4 })", map_options) +utils.map('i', '', "compe#scroll({ 'delta': -4 })", map_options) + +local t = function(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) +end + +local check_back_space = function() + local col = vim.fn.col('.') - 1 + if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + return true + else + return false + end +end + +-- Use (s-)tab to: +--- move to prev/next item in completion menuone +--- jump to prev/next snippet's placeholder +_G.tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif vim.fn.call("vsnip#available", {1}) == 1 then + return t "(vsnip-expand-or-jump)" + elseif check_back_space() then + return t "" + else + return vim.fn['compe#complete']() + end +end +_G.s_tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "" + elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then + return t "(vsnip-jump-prev)" + else + -- If is not working in your terminal, change it to + return t "" + end +end + +vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", {expr = true}) diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-nonicons.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-nonicons.lua new file mode 100644 index 0000000..4c4d65f --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-nonicons.lua @@ -0,0 +1,3 @@ +local icons = require "nvim-nonicons" + +icons.get("file") diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua new file mode 100644 index 0000000..28fad22 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua @@ -0,0 +1,13 @@ +require("toggleterm").setup{ + open_mapping = [[]], + hide_numbers = true, + shade_terminals = true, + shading_factor = 1, + start_in_insert = true, + direction = 'float', + close_on_exit = false, + float_opts = { + winblend = 0, + border = 'single', + } +} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-tree.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..2f10c63 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-tree.lua @@ -0,0 +1,33 @@ +local utils = require('utils') +utils.map('n', 'op', 'NvimTreeToggle') + +vim.g.nvim_tree_special_files = {} +vim.g.nvim_tree_git_hl = 1 +vim.g.nvim_tree_follow = 1 +vim.g.nvim_tree_show_icons = { + git = 0, + folders = 1, + files = 1, + folder_arrows = 1, +} + + +vim.g.nvim_tree_icons = { + default = '', + git = { + unstaged = '', + staged = '', + unmerged = '', + renamed = '', + untracked = '', + deleted = '', + ignored = "" + }, +} + +vim.api.nvim_exec( +[[ +au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif +]], +false +) diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..54d2336 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -0,0 +1,25 @@ +local utils = require('utils') +local tsconf = require'nvim-treesitter.configs' + +if not tsconf then + vim.cmd [[ echom 'Cannot load `nvim-treesitter.configs`' ]] + return +end + +utils.opt('w', 'foldmethod', 'expr') +utils.opt('w', 'foldexpr', 'nvim_treesitter#foldexpr()') + +tsconf.setup { + ensure_installed = "maintained", + highlight = { enable = true }, + indent = { enable = true }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm" + } + } +} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-web-devicons.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-web-devicons.lua new file mode 100644 index 0000000..6e64ed1 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-web-devicons.lua @@ -0,0 +1,3 @@ +require'nvim-web-devicons'.setup { + default = true; +} diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/poet-v.lua b/filesets/base/nvim/.config/nvim/lua/plugins/poet-v.lua new file mode 100644 index 0000000..6bfd39e --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/poet-v.lua @@ -0,0 +1,24 @@ +vim.g.poetv_executables = { 'poetry' } +vim.g.poetv_auto_activate = 0 +vim.g.poetv_set_environment = 1 + +function _G.ResetPyright() + local clients = vim.lsp.get_active_clients() + for _, client in pairs(clients) do + if client.name == 'pyright' then + vim.lsp.reset(client.id) + end + end +end + +vim.api.nvim_exec([[ +augroup poetv_autocmd + au! + au WinEnter,BufWinEnter *.py silent | + if &previewwindow != 1 && expand('%:p') !~# "/\\.git/" + call poetv#activate() | v:lua.ResetPyright() | + endif +augroup END +]], true) + +return { ResetPyright = _G.ResetPyright } diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/rnvimr.lua b/filesets/base/nvim/.config/nvim/lua/plugins/rnvimr.lua new file mode 100644 index 0000000..ead6fbb --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/rnvimr.lua @@ -0,0 +1,7 @@ +local utils = require("utils") + +utils.map('n', '.', 'RnvimrToggle') + +vim.g.rnvimr_enable_ex = 0 +vim.g.rnvimr_enable_picker = 1 +vim.g.rnvimr_enable_bw = 1 diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/telescope-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/telescope-nvim.lua new file mode 100644 index 0000000..e37e850 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/telescope-nvim.lua @@ -0,0 +1,30 @@ +local utils = require("utils") +local actions = require("telescope.actions") + +require("telescope").setup { + defaults = { + mappings = { + i = { + [""] = actions.close + } + } + }, + pickers = { + file_browser = { + hidden = true + }, + find_files = { + find_command={'rg','--ignore','--hidden','--files'} + }, + } +} + +local opts = { noremap = true, silent = true } +utils.map('n', '', 'Telescope find_files', opts) +utils.map('n', '.', 'Telescope file_browser', opts) +utils.map('n', '/', 'Telescope live_grep', opts) +utils.map('n', ',', 'Telescope buffers', opts) +utils.map('n', 'bb', 'Telescope buffers', opts) +utils.map('n', 'hh', 'Telescope help_tags', opts) +utils.map('n', 'hm', 'Telescope man_pages', opts) +utils.map('n', 'fp', [[lua require('telescope.builtin').find_files{ cwd = '~/.config/nvim/' }]], opts) diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/trim-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/trim-nvim.lua new file mode 100644 index 0000000..a1ae0f4 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/trim-nvim.lua @@ -0,0 +1,2 @@ +vim.g.highlight_whitespace = 1 +vim.g.strip_whitespace_on_save = 1 diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/trouble-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/trouble-nvim.lua new file mode 100644 index 0000000..50a7dcd --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/trouble-nvim.lua @@ -0,0 +1,8 @@ +local utils = require('utils') + +utils.map('n', 'cxx', 'TroubleToggle') +utils.map('n', 'cxw', 'TroubleToggle lsp_workspace_diagnostics') +utils.map('n', 'cxd', 'TroubleToggle lsp_document_diagnostics') +utils.map('n', 'cxq', 'TroubleToggle quickfix') +utils.map('n', 'cxl', 'TroubleToggle loclist') +utils.map('n', 'cr', 'TroubleToggle lsp_references') diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/vimwiki.lua b/filesets/base/nvim/.config/nvim/lua/plugins/vimwiki.lua new file mode 100644 index 0000000..937cbe8 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/vimwiki.lua @@ -0,0 +1 @@ +vim.g.vimwiki_list = { { path = '~/.wiki' } } diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/whitespace-vim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/whitespace-vim.lua new file mode 100644 index 0000000..3b55ac0 --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/plugins/whitespace-vim.lua @@ -0,0 +1,2 @@ +vim.g.highlight_whitespace = 0 +vim.g.strip_whitespace_on_save = 1 diff --git a/filesets/base/nvim/.config/nvim/lua/settings.lua b/filesets/base/nvim/.config/nvim/lua/settings.lua new file mode 100644 index 0000000..ed1ae5b --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/settings.lua @@ -0,0 +1,34 @@ +local utils = require('utils') + +local cmd = vim.cmd +local indent = 4 + +cmd 'syntax enable' +cmd 'filetype plugin indent on' +utils.opt('b', 'expandtab', true) +utils.opt('b', 'shiftwidth', indent) +utils.opt('b', 'smartindent', false) +utils.opt('b', 'autoindent', true) +utils.opt('b', 'tabstop', indent) +utils.opt('o', 'hidden', true) +utils.opt('w', 'wrap', true) +utils.opt('o', 'ignorecase', true) +utils.opt('o', 'scrolloff', 10) +utils.opt('o', 'shiftround', true) +utils.opt('o', 'smartcase', true) +utils.opt('o', 'splitbelow', true) +utils.opt('o', 'splitright', true) +utils.opt('o', 'wildmode', 'list:longest') +utils.opt('w', 'number', true) +utils.opt('w', 'relativenumber', true) +utils.opt('w', 'foldlevel', 99) +utils.opt('w', 'cursorline', true) +utils.opt('o', 'clipboard','unnamed,unnamedplus') +utils.opt('o', 'lazyredraw', true) +utils.opt('b', 'undofile', true) + +-- Highlight on yank +vim.cmd 'au TextYankPost * lua vim.highlight.on_yank {on_visual = false}' + +require('keybindings') +require('colorscheme') diff --git a/filesets/base/nvim/.config/nvim/lua/utils.lua b/filesets/base/nvim/.config/nvim/lua/utils.lua new file mode 100644 index 0000000..42b7bfa --- /dev/null +++ b/filesets/base/nvim/.config/nvim/lua/utils.lua @@ -0,0 +1,15 @@ +local utils = { } + +local scopes = {o = vim.o, b = vim.bo, w = vim.wo} + +function utils.opt(scope, key, value) + scopes[scope][key] = value + if scope ~= 'o' then scopes['o'][key] = value end +end + +function utils.map(mode, lhs, rhs, opts) + opts = opts or { noremap = true } + vim.api.nvim_set_keymap(mode, lhs, rhs, opts) +end + +return utils diff --git a/filesets/base/polybar/.config/polybar/config b/filesets/base/polybar/.config/polybar/config new file mode 100755 index 0000000..393c47c --- /dev/null +++ b/filesets/base/polybar/.config/polybar/config @@ -0,0 +1,270 @@ +[colors] +background = {{colors.bg}} +background-alt = {{colors.comment}} +foreground = {{colors.fg}} +red = {{colors.red}} +green = {{colors.green}} +yellow = {{colors.yellow}} +blue= {{colors.blue}} +purple = {{colors.magenta}} +cyan = {{colors.cyan}} + +[settings] +screenchange-reload = true + +[bar/bar] +enable-ipc = true +;monitor = ${env:MONITOR:eDP-1} +width = 100% +height = {{appearance.polybar.height}} +fixed-center = true +bottom = {{appearance.polybar.bottom}} + +background = ${colors.background} +foreground = ${colors.foreground} + +padding-left = 1 +padding-right = 1 +border-bottom-size = 0 +border-top-size = 0 + +font-0 = {{typography.mono.font}}:style={{typography.mono.weight}}:size={{typography.mono.size}}:{{appearance.polybar.antialias}};{{appearance.polybar.text_offset}} +font-1 = {{typography.emoji.font}}:size={{typography.emoji.size}}:scale={{appearance.polybar.icon_font_scale}}:{{appearance.polybar.antialias}};{{appearance.polybar.text_offset}} + +modules-left = {{appearance.polybar.modules_left}} +modules-center = {{appearance.polybar.modules_center}} +modules-right = {{appearance.polybar.modules_right}} +tray-position = +tray-background = ${colors.background-alt} +tray-padding = 2 +tray-maxsize = 18 +tray-detached = true +tray-offset-x = -4 + +[module/empty] +type = custom/script + +[module/rofi] +type = custom/script +exec = echo "  " + +format-background = ${colors.blue} +format-foreground = ${colors.foreground} +format-padding = 1 + +click-left = rofi -show run +click-right = rofi -show window + +[module/window] +type = internal/xwindow +label = %title% +label-maxlen = 50 +label-foreground = ${colors.foreground} +label-margin = 1 +label-padding = 1 + +[module/i3] +type = internal/i3 +index-sort = true +pin-workspaces = false +enable-scroll = true +wrapping-scroll = true + +format = + +label-mode = %mode% +label-mode-padding = 1 +label-mode-margin = 1 +label-mode-background = ${colors.yellow} +label-mode-foreground = ${colors.background} + +label-focused = {{appearance.polybar.i3_label}} +label-focused-padding = 1 +label-focused-foreground = ${colors.green} + +label-unfocused = {{appearance.polybar.i3_label}} +label-unfocused-padding= 1 +label-unfocused-foreground = ${colors.background-alt} + +label-urgent = {{appearance.polybar.i3_label}} +label-urgent-padding= 1 +label-urgent-foreground = ${colors.red} + +label-visible = {{appearance.polybar.i3_label}} +label-visible-padding= 1 +label-visible-foreground = ${colors.purple} + +ws-icon-0 = 1;home +ws-icon-1 = 2;web +ws-icon-2 = 3;vim +ws-icon-3 = 4;chat +ws-icon-4 = 5;music +ws-icon-5 = 6;design +ws-icon-6 = 7;seven +ws-icon-7 = 8;eight +ws-icon-8 = 9;games +ws-icon-9 = 10;random +ws-icon-default = ? + +[module/wifi] +type = internal/network +interface = {{appearance.polybar.wifi_dev}} +interval = 3.0 + +format-connected = +label-connected = "{{appearance.polybar.wifi_icon}} %essid% (%local_ip%)" +label-connected-padding = 1 +label-connected-margin = 0 +label-connected-foreground = ${colors.green} + +format-disconnected = +label-disconnected = "" +label-disconnected-padding = 0 +label-disconnected-foreground = ${colors.background} + +[module/eth] +type = internal/network +interface = {{appearance.polybar.eth_dev}} +interval = 3.0 + +format-connected = +label-connected = "{{appearance.polybar.eth_icon}} %local_ip%" +label-connected-padding = 1 +label-connected-margin = 0 +label-connected-foreground = ${colors.green} + +format-disconnected = +label-disconnected = "" +label-disconnected-padding = 0 +label-disconnected-foreground = ${colors.background} + +[module/cpu] +type = internal/cpu +interval = 2 +label = {{appearance.polybar.cpu_icon}} %percentage%% +label-foreground = ${colors.cyan} +label-padding= 1 + +[module/memory] +type = internal/memory +interval = 2 +label= {{appearance.polybar.ram_icon}} %percentage_used%% +label-foreground = ${colors.blue} +label-padding = 1 + +[module/date] +type = internal/date +label = "{{appearance.polybar.date_icon}} %date%" +date = %m/%d +time = %H:%M +interval = 5 + +label-padding = 1 +label-foreground = ${colors.background-alt} + +[module/time] +type = internal/date +label = "{{appearance.polybar.time_icon}} %time%" +date = %m/%d +time = %H:%M +interval = 5 + +label-padding = 1 +label-foreground = ${colors.foreground} + +[module/volume] +type = internal/pulseaudio + +format-volume = +label-volume = "{{appearance.polybar.volume_icon}} %percentage%%" +label-volume-foreground = ${colors.green} +label-volume-padding = 1 + +label-muted = {{appearance.polybar.mute_icon}} %percentage%% +label-muted-foreground = ${colors.red} +label-muted-padding = 1 + +[module/battery] +type = internal/battery +full-at = 100 +time-format = %H:%M + +format-charging = +label-charging = %percentage%% +format-charging-foreground = ${colors.green} +format-charging-padding = 1 + +format-full = "" +label-full = " %percentage%% " +format-full-foreground= ${colors.green} +format-full-padding = 1 + +format-discharging = +label-discharging = "%percentage%%" +format-discharging-foreground = ${colors.yellow} +format-discharging-padding = 1 + +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  + +animation-charging-0 =  +animation-charging-1 =  +animation-charging-2 =  +animation-charging-framerate = 800 + +[module/batteryemoji] +type = internal/battery +full-at = 100 +time-format = %H:%M + +format-charging = +label-charging = {{appearance.polybar.charging_icon}} %percentage%% +format-charging-foreground = ${colors.green} +format-charging-padding = 1 + +format-full = "" +label-full = "{{appearance.polybar.full_charge_icon}} %percentage%% " +format-full-foreground= ${colors.green} +format-full-padding = 1 + +format-discharging = +label-discharging = "{{appearance.polybar.discharging_icon}} %percentage%%" +format-discharging-foreground = ${colors.yellow} +format-discharging-padding = 1 + +[module/mpd] +type = internal/mpd + +format-online = +format-online-spacing = 0 +format-online-padding = 2 +format-online-margin = 1 +format-online-background = ${colors.background} + +format-offline = +format-offline-foreground = ${colors.background-alt} +format-offline-background = ${colors.background} +format-offline-padding = 2 +format-offline-margin = 1 + +label-offline = "mpd is off" +format-paused-foreground = ${colors.background-alt} + +label-song-maxlen = 50 +label-song-ellipsis = true + +label-time-foreground = ${colors.background-alt} + +[module/xkeyboard] +type = internal/xkeyboard + +blacklist-0 = num lock +;label-layout = " %layout%" +label-layout = {{appearance.polybar.layout_icon}} %layout% +label-layout-foreground = ${colors.purple} +label-layout-padding = 1 + +label-indicator-foreground = ${colors.red} + +; vim:ft=dosini diff --git a/filesets/base/processing/.processing/preferences.txt b/filesets/base/processing/.processing/preferences.txt new file mode 100644 index 0000000..e7f9c97 --- /dev/null +++ b/filesets/base/processing/.processing/preferences.txt @@ -0,0 +1,104 @@ +chooser.files.native=true +console.auto_clear=true +console.font.size={{typography.mono.size}} +console.lines=1 +console.scrollback.chars=40000 +console.scrollback.lines=500 +contribution.backup.on_install=true +contribution.backup.on_remove=true +editor.caret.blink=true +editor.caret.block=false +editor.completion.auto_close=false +editor.font.family={{typography.mono.font}} {{typography.mono.weight}} +editor.font.size={{typography.mono.size}} +editor.indent=true +editor.input_method_support=false +editor.keys.alternative_cut_copy_paste=true +editor.keys.home_and_end_travel_far=false +editor.keys.home_and_end_travel_smart=true +editor.keys.shift_backspace_is_delete=false +editor.laf=javax.swing.plaf.nimbus.NimbusLookAndFeel +editor.smooth=true +editor.tabs.expand=true +editor.tabs.size=2 +editor.token.comment1.style={{colors.blue}},plain +editor.token.comment2.style={{colors.comment}},plain +editor.token.function1.style={{colors.blue}},plain +editor.token.function2.style={{colors.blue}},plain +editor.token.function3.style={{colors.green}},plain +editor.token.function4.style={{colors.blue}},bold +editor.token.invalid.style={{colors.red}},bold +editor.token.keyword1.style={{colors.cyan}},plain +editor.token.keyword2.style={{colors.cyan}},plain +editor.token.keyword3.style={{colors.green}},plain +editor.token.keyword4.style={{colors.magenta}},plain +editor.token.keyword5.style={{colors.yellow}},plain +editor.token.keyword6.style={{colors.cyan}},plain +editor.token.label.style={{colors.green}},bold +editor.token.literal1.style={{colors.magenta}},plain +editor.token.literal2.style={{colors.green}},plain +editor.token.operator.style={{colors.blue}},plain +editor.untitled.prefix=sketch_ +editor.untitled.suffix=yyMMdd +editor.watcher=true +editor.watcher.debug=false +editor.watcher.window=1500 +editor.window.height.default=720 +editor.window.height.min=480 +editor.window.width.default=700 +editor.window.width.min=400 +editor.zoom=100% +editor.zoom.auto=true +examples.processing.app.ui.ExamplesFrame.visible=null/Contributed Libraries/Open Kinect for Processing/Kinect_v1:null/Contributed Libraries:null/Libraries:null:null/Contributed Libraries/Open Kinect for Processing +export.application.embed_java=true +export.application.fullscreen=false +export.application.stop=true +export.delete_target_folder=true +instance_server.key=0.6702974505479351 +instance_server.port=44097 +last.sketch.count=0 +last.sketch.restore=true +launcher=xdg-open +mode.last=processing.mode.java.JavaMode +pdex.autoSave.autoSaveByDefault=true +pdex.autoSave.autoSaveEnabled=false +pdex.autoSave.promptDisplay=true +pdex.autoSaveInterval=5 +pdex.completion=true +pdex.completion.trigger=false +pdex.dbgOutput=false +pdex.errorCheckEnabled=true +pdex.inspectMode.hotkey=true +pdex.suggest.imports=true +pdex.warningsEnabled=true +pdex.writeErrorLogs=false +platform.auto_file_type_associations=true +preproc.color_datatype=true +preproc.enhanced_casting=true +preproc.output_parse_tree=false +preproc.save_build_files=false +preproc.substitute_floats=true +preproc.web_colors=true +proxy.http.host= +proxy.http.port= +proxy.https.host= +proxy.https.port= +proxy.socks.host= +proxy.socks.port= +proxy.system=true +recent.count=10 +run.display=1 +run.options= +run.options.memory=false +run.options.memory.initial=64 +run.options.memory.maximum=256 +run.present.bgcolor={{colors.bg}} +run.present.stop.color={{colors.bg}} +run.window.bgcolor={{colors.bg}} +search.format=https://duckduckgo.com/?q=%s +sketchbook.path.three=/home/ianmethyst/Sandbox/processing +update.check=true +update.id=-183846065481687493 +update.last=1588352566738 +welcome.seen=true +welcome.show=false diff --git a/filesets/base/processing/Sandbox/processing/theme.txt b/filesets/base/processing/Sandbox/processing/theme.txt new file mode 100644 index 0000000..7f3aa0d --- /dev/null +++ b/filesets/base/processing/Sandbox/processing/theme.txt @@ -0,0 +1,172 @@ +# STATUS +# Status messages (1 file added to sketch, errors, etc) +status.notice.fgcolor = {{colors.fg}} +status.notice.bgcolor = {{colors.bg}} +status.error.fgcolor = {{colors.fg}} +status.error.bgcolor = {{colors.red}} +status.warning.bgcolor = {{colors.yellow}} +status.warning.fgcolor = {{colors.bg}} +status.url.fgcolor = {{colors.dark_fg}} +status.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +# For the clipboard icon, needs to be a little larger on macOS +status.emoji.font = {{typography.emoji.font}},plain,{{typography.emoji.size}} +status.emoji.font.macosx = Dialog,plain,22 + +# HEADER TABS +# Settings for the tab area at the top. +header.text.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +header.text.selected.color = {{colors.bg}} +header.text.unselected.color = {{colors.dark_fg}} +header.tab.arrow.color = {{colors.fg}} +header.gradient.top = {{colors.bg}} +header.gradient.bottom = {{colors.bg}} +header.tab.selected.color = {{colors.green}} +header.tab.unselected.color = {{colors.light_bg}} +header.tab.modified.color = {{colors.yellow}} + +# FOOTER TABS +footer.text.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +footer.text.selected.color = {{colors.fg}} +footer.text.unselected.color = {{colors.dark_fg}} +footer.tab.arrow.color = {{colors.fg}} +footer.gradient.top = {{colors.light_bg}} +footer.gradient.bottom = {{colors.light_bg}} +footer.tab.selected.color = {{colors.bg}} +footer.tab.unselected.color = {{colors.light_bg}} +# updates orange +footer.updates.color = {{colors.orange}} + +# CONSOLE +# The font is handled by preferences, so its size/etc are modifiable. +console.color = {{colors.bg}} +console.output.color = {{colors.fg}} +# text color for errors printed in the console +console.error.color = {{colors.red}} + +# TOOLBAR BUTTONS +buttons.bgcolor = {{colors.bg}} + +# for the debug and mode buttons +#reversed.gradient.top = {{colors.bg}} +#reversed.gradient.bottom = {{colors.bg}} + +## size of divider between editing area and the console +#divider.size = 0 +## the larger divider on windows is ugly with the little arrows +## this makes it large enough to see (mouse changes) and use, +## but keeps it from being annoyingly obtrusive +#divider.size.windows = 2 + +divider.height = 0 +divider.color = {{colors.light_bg}} +divider.dot.diameter = 3 +divider.dot.color = {{colors.dark_fg}} + +# TOOLBAR BUTTON TEXT +toolbar.rollover.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +toolbar.rollover.color = {{colors.fg}} +toolbar.gradient.top = {{colors.bg}} +toolbar.gradient.bottom = {{colors.bg}} + +# MODE SELECTOR +mode.title.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +mode.title.color = {{colors.fg}} +# outline color of the mode button +mode.button.color = {{colors.fg}} +#mode.button.gap = 13 +#mode.arrow.width +mode.bg.color = {{colors.light_bg}} +# stolen from gradient bottom +mode.bg.color = {{colors.bg}} +mode.outline.color = {{colors.light_bg}} + + +# EDITOR - DETAILS + +# fg and bg colors +editor.fgcolor = {{colors.fg}} +editor.bgcolor = {{colors.bg}} + +editor.gradient.top = {{colors.bg}} +editor.gradient.bottom = {{colors.bg}} + +# highlight for the current line +editor.linehighlight.color={{colors.light_bg}} +editor.linehighlight=true + +editor.caret.color = {{colors.fg}} +editor.selection.color = {{colors.light_bg}} + +# area that's not in use by the text (replaced with tildes) +editor.invalid.style = {{colors.dark_fg}},plain + +# little pooties at the end of lines that show where they finish +editor.eolmarkers = false +editor.eolmarkers.color = {{colors.dark_fg}} + +# bracket/brace highlighting +editor.brackethighlight = true +editor.brackethighlight.color = {{colors.blue}} + +editor.gutter.text.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +editor.gutter.text.color = {{colors.fg}} + +# marker for breakpointed lines in left hand gutter (2 ascii characters) +#editor.gutter.breakpoint.marker = <> +#editor.gutter.breakpoint.marker.color = #4a545e + +# marker for the current line in left hand gutter (2 ascii characters) +#editor.gutter.currentline.marker = -> +#editor.gutter.currentline.marker.color = #e27500 + +# bgcolor for the current (highlighted) line +editor.gutter.linehighlight.color={{colors.light_bg}} + +# left- and right-hand gutter color +editor.gutter.bgcolor = {{colors.bg}} + +# color of vertical separation line +#gutter.linecolor = #e9e9e9 +# space (in px) added to left and right of gutter markers +editor.gutter.padding = 3 + +# squiggly line underneath errors in the editor +editor.error.underline.color = {{colors.red}} +# squiggly line underneath warnings +editor.warning.underline.color = {{colors.yellow}} +# lines next to the scrollbar showing where errors are located +editor.column.error.color = {{colors.red}} +editor.column.warning.color = {{colors.yellow}} + +# not using these +# breakpoint.bgcolor = #f0f0f0 +# currentline.bgcolor = #ffff96 + +errors.header.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +errors.header.bgcolor = {{colors.bg}} +errors.header.fgcolor = {{colors.fg}} +errors.row.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +errors.row.fgcolor = {{colors.fg}} +errors.row.bgcolor = {{colors.bg}} +errors.selection.fgcolor = {{colors.fg}} +errors.selection.bgcolor = {{colors.light_bg}} +errors.selection.error.bgcolor = {{colors.light_bg}} +errors.selection.warning.bgcolor = {{colors.light_bg}} +#errors.indicator.size = 3 +errors.indicator.error.color = {{colors.red}} +errors.indicator.warning.color = {{colors.yellow}} + +manager.tab.selected.color = {{colors.fg}} +manager.tab.unselected.color = {{colors.light_bg}} +manager.tab.text.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} +manager.tab.text.selected.color = {{colors.bg}} +manager.tab.text.unselected.color = {{colors.fg}} + +# orange circle for updates +manager.tab.update.color = {{colors.orange}} +manager.tab.gradient.top = {{colors.bg}} +manager.tab.gradient.bottom = {{colors.bg}} +manager.tab.bg = {{colors.bg}} + +# tree for Examples and Sketchbook windows +tree.font = status.font = {{typography.mono.font}}{{typography.mono.weight}},plain,{{typography.mono.size}} diff --git a/filesets/base/qutebrowser/.config/qutebrowser/config.py b/filesets/base/qutebrowser/.config/qutebrowser/config.py new file mode 100644 index 0000000..fa53ccd --- /dev/null +++ b/filesets/base/qutebrowser/.config/qutebrowser/config.py @@ -0,0 +1,310 @@ +# pylint: disable=C0111 +from qutebrowser.config.configfiles import ConfigAPI # noqa: F401 +from qutebrowser.config.config import ConfigContainer # noqa: F401 + +config: ConfigAPI = config # noqa: F821 pylint: disable=E0602,C0103 +c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103 + +config.load_autoconfig() + +palette = { + "background": "{{colors.bg}}", + "background-alt": "{{colors.light_bg}}", + "border": "{{colors.light_bg}}", + "current-line": "{{colors.light_bg}}}", + "selection": "{{colors.selection}}", + "foreground": "{{colors.fg}}", + "foreground-alt": "{{colors.dark_fg}}", + "cyan": "{{colors.cyan}}", + "green": "{{colors.green}}", + "orange": "{{colors.orange}}", + "magenta": "{{colors.magenta}}", + "blue": "{{colors.blue}}", + "red": "{{colors.red}}", + "yellow": "{{colors.yellow}}", +} + +spacing = {"vertical": 5, "horizontal": 5} + +padding = { + "top": spacing["vertical"], + "right": spacing["horizontal"], + "bottom": spacing["vertical"], + "left": spacing["horizontal"], +} + +c.auto_save.session = True +c.editor.command = ["nvim", "-f", "{file}", "-c", "normal {line}G{column0}l"] +c.url.start_pages = ["https://duckduckgo.com"] +c.url.default_page = "https://duckduckgo.com/" +c.url.searchengines = {"DEFAULT": "https://duckduckgo.com/?q={}"} +c.downloads.position = "bottom" +c.scrolling.smooth = False + +# Background color of the completion widget category headers. +c.colors.completion.category.bg = palette["background"] + +# Bottom border color of the completion widget category headers. +c.colors.completion.category.border.bottom = palette["border"] + +# Top border color of the completion widget category headers. +c.colors.completion.category.border.top = palette["border"] + +# Foreground color of completion widget category headers. +c.colors.completion.category.fg = palette["foreground"] + +# Background color of the completion widget for even rows. +c.colors.completion.even.bg = palette["background"] + +# Background color of the completion widget for odd rows. +c.colors.completion.odd.bg = palette["background-alt"] + +# Text color of the completion widget. +c.colors.completion.fg = palette["foreground"] + +# Background color of the selected completion item. +c.colors.completion.item.selected.bg = palette["selection"] + +# Bottom border color of the selected completion item. +c.colors.completion.item.selected.border.bottom = palette["selection"] + +# Top border color of the completion widget category headers. +c.colors.completion.item.selected.border.top = palette["selection"] + +# Foreground color of the selected completion item. +c.colors.completion.item.selected.fg = palette["foreground"] + +# Foreground color of the matched text in the completion. +c.colors.completion.match.fg = palette["orange"] + +# Color of the scrollbar in completion view +c.colors.completion.scrollbar.bg = palette["background"] + +# Color of the scrollbar handle in completion view. +c.colors.completion.scrollbar.fg = palette["foreground"] + +# Background color for the download bar. +c.colors.downloads.bar.bg = palette["background"] + +# Background color for downloads with errors. +c.colors.downloads.error.bg = palette["background"] + +# Foreground color for downloads with errors. +c.colors.downloads.error.fg = palette["red"] + +# Color gradient stop for download backgrounds. +c.colors.downloads.stop.bg = palette["background"] + +# Color gradient interpolation system for download backgrounds. +# Type: ColorSystem +# Valid values: +# - rgb: Interpolate in the RGB color system. +# - hsv: Interpolate in the HSV color system. +# - hsl: Interpolate in the HSL color system. +# - none: Don't show a gradient. +c.colors.downloads.system.bg = "none" + +# Background color for hints. Note that you can use a `rgba(...)` value +# for transparency. +c.colors.hints.bg = palette["background"] + +# Font color for hints. +c.colors.hints.fg = palette["blue"] + +# Hints +c.hints.border = "1px solid " + palette["background-alt"] + +# Font color for the matched part of hints. +c.colors.hints.match.fg = palette["foreground-alt"] + +# Background color of the keyhint widget. +c.colors.keyhint.bg = palette["background"] + +# Text color for the keyhint widget. +c.colors.keyhint.fg = palette["blue"] + +# Highlight color for keys to complete the current keychain. +c.colors.keyhint.suffix.fg = palette["selection"] + +# Background color of an error message. +c.colors.messages.error.bg = palette["background"] + +# Border color of an error message. +c.colors.messages.error.border = palette["background-alt"] + +# Foreground color of an error message. +c.colors.messages.error.fg = palette["red"] + +# Background color of an info message. +c.colors.messages.info.bg = palette["background"] + +# Border color of an info message. +c.colors.messages.info.border = palette["background-alt"] + +# Foreground color an info message. +c.colors.messages.info.fg = palette["foreground-alt"] + +# Background color of a warning message. +c.colors.messages.warning.bg = palette["background"] + +# Border color of a warning message. +c.colors.messages.warning.border = palette["background-alt"] + +# Foreground color a warning message. +c.colors.messages.warning.fg = palette["red"] + +# Background color for prompts. +c.colors.prompts.bg = palette["background"] + +# Border used around UI elements in prompts. +c.colors.prompts.border = "1px solid " + palette["background-alt"] + +# Foreground color for prompts. +c.colors.prompts.fg = palette["cyan"] + +# Background color for the selected item in filename prompts. +c.colors.prompts.selected.bg = palette["selection"] + +# Background color of the statusbar in caret mode. +c.colors.statusbar.caret.bg = palette["background"] + +# Foreground color of the statusbar in caret mode. +c.colors.statusbar.caret.fg = palette["orange"] + +# Background color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.bg = palette["background"] + +# Foreground color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.fg = palette["orange"] + +# Background color of the statusbar in command mode. +c.colors.statusbar.command.bg = palette["background"] + +# Foreground color of the statusbar in command mode. +c.colors.statusbar.command.fg = palette["magenta"] + +# Background color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.bg = palette["background"] + +# Foreground color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.fg = palette["foreground-alt"] + +# Background color of the statusbar in insert mode. +c.colors.statusbar.insert.bg = palette["background"] + +# Foreground color of the statusbar in insert mode. +c.colors.statusbar.insert.fg = palette["green"] + +# Background color of the statusbar. +c.colors.statusbar.normal.bg = palette["background"] + +# Foreground color of the statusbar. +c.colors.statusbar.normal.fg = palette["foreground"] + +# Background color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.bg = palette["background"] + +# Foreground color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.fg = palette["orange"] + +# Background color of the statusbar in private browsing mode. +c.colors.statusbar.private.bg = palette["background-alt"] + +# Foreground color of the statusbar in private browsing mode. +c.colors.statusbar.private.fg = palette["foreground-alt"] + +# Background color of the progress bar. +c.colors.statusbar.progress.bg = palette["background"] + +# Foreground color of the URL in the statusbar on error. +c.colors.statusbar.url.error.fg = palette["red"] + +# Default foreground color of the URL in the statusbar. +c.colors.statusbar.url.fg = palette["foreground"] + +# Foreground color of the URL in the statusbar for hovered links. +c.colors.statusbar.url.hover.fg = palette["cyan"] + +# Foreground color of the URL in the statusbar on successful load +c.colors.statusbar.url.success.http.fg = palette["green"] + +# Foreground color of the URL in the statusbar on successful load +c.colors.statusbar.url.success.https.fg = palette["green"] + +# Foreground color of the URL in the statusbar when there's a warning. +c.colors.statusbar.url.warn.fg = palette["yellow"] + +# Status bar padding +c.statusbar.padding = padding + +# Background color of the tab bar. +# Type: QtColor +c.colors.tabs.bar.bg = palette["selection"] + +# Background color of unselected even tabs. +# Type: QtColor +c.colors.tabs.even.bg = palette["selection"] + +# Foreground color of unselected even tabs. +# Type: QtColor +c.colors.tabs.even.fg = palette["foreground"] + +# Color for the tab indicator on errors. +# Type: QtColor +c.colors.tabs.indicator.error = palette["red"] + +# Color gradient start for the tab indicator. +# Type: QtColor +c.colors.tabs.indicator.start = palette["orange"] + +# Color gradient end for the tab indicator. +# Type: QtColor +c.colors.tabs.indicator.stop = palette["green"] + +# Color gradient interpolation system for the tab indicator. +# Type: ColorSystem +# Valid values: +# - rgb: Interpolate in the RGB color system. +# - hsv: Interpolate in the HSV color system. +# - hsl: Interpolate in the HSL color system. +# - none: Don't show a gradient. +c.colors.tabs.indicator.system = "none" + +# Background color of unselected odd tabs. +# Type: QtColor +c.colors.tabs.odd.bg = palette["selection"] + +# Foreground color of unselected odd tabs. +# Type: QtColor +c.colors.tabs.odd.fg = palette["foreground"] + +# Background color of selected even tabs. +# Type: QtColor +c.colors.tabs.selected.even.bg = palette["background"] + +# Foreground color of selected even tabs. +# Type: QtColor +c.colors.tabs.selected.even.fg = palette["foreground"] + +# Background color of selected odd tabs. +# Type: QtColor +c.colors.tabs.selected.odd.bg = palette["background"] + +# Foreground color of selected odd tabs. +# Type: QtColor +c.colors.tabs.selected.odd.fg = palette["foreground"] + +# Tab padding +c.tabs.padding = padding +c.tabs.indicator.width = 3 +c.tabs.favicons.scale = 1 + +# Widevine +c.qt.args = ["papi-widevine-path=/usr/lib/qt/plugins/ppapi/libwidevinecdm.so"] + +# Adblock +c.content.blocking.enabled = True +c.content.blocking.method = "adblock" + +# Confirm quit +c.confirm_quit = "downloads" diff --git a/filesets/base/ranger/.config/ranger/rc.conf b/filesets/base/ranger/.config/ranger/rc.conf new file mode 100755 index 0000000..ebc5513 --- /dev/null +++ b/filesets/base/ranger/.config/ranger/rc.conf @@ -0,0 +1,3 @@ +set preview_images true +set draw_borders true +set preview_images_method ueberzug diff --git a/filesets/base/settings.toml b/filesets/base/settings.toml new file mode 100644 index 0000000..81e62a7 --- /dev/null +++ b/filesets/base/settings.toml @@ -0,0 +1 @@ +name = "Base" diff --git a/filesets/base/tmux/.tmux.conf b/filesets/base/tmux/.tmux.conf new file mode 100755 index 0000000..555560d --- /dev/null +++ b/filesets/base/tmux/.tmux.conf @@ -0,0 +1,91 @@ +############## +# True Color # +############## + +# Use the xterm-256color terminal +set -g default-terminal "xterm-256color" + +# Apply Tc +set-option -ga terminal-overrides ",xterm-256color:Tc" + +########### +# Keymaps # +########### + +# Prefix is Ctrl-a +set -g prefix C-a +bind C-a send-prefix +unbind C-b + +# Vi split pane commands +unbind '"' +unbind % +unbind s +bind v split-window -h +bind s split-window -v + +# Moving between panes with vim movement keys +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Moving between windows with vim movement keys +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ +bind-key C-a last-window + +# Resize panes with vim movement keys +bind -r H resize-pane -L 5 +bind -r J resize-pane -D 5 +bind -r K resize-pane -U 5 +bind -r L resize-pane -R 5 + +# Reload the tmux config file +bind r source-file ~/.tmux.conf + +# Enable vi mode + +set-window-option -g mode-keys vi + +# Vi mode select and yank +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' +bind -T copy-mode-vi v send-keys -X begin-selection + +########### +# General # +########### + +# Enable mouse control +set -g mouse on +set -g base-index 1 +setw -g pane-base-index 1 + +set -s escape-time 0 + +######## +# Look # +######## + +# Messaging +#set -g message-fg colour14 +#set -g message-bg black +#set -g message-command-fg white +#set -g message-command-bg black + +# Pane +set -g pane-active-border-style fg=colour8 +set -g pane-border-style fg=colour8 + +# Status bar +set -g status-justify left +set -g status-interval 2 +set -g status-bg default +set -g status-fg colour7 +set -g status-left '' +set -g status-right '#[fg=colour15,bg=blue] %b %d %Y #[fg=colour15,bg=red] %R ' +set -g status-right-length 100 + +# Window +set -g window-status-format '#[fg=colour249,bg=colour241] #I #[fg=colour249,bg=colour242] #W ' +set -g window-status-current-format '#[fg=black,bg=colour15] #I #[fg=black,bg=colour2] #W ' diff --git a/filesets/base/x/.Xdefaults b/filesets/base/x/.Xdefaults new file mode 100755 index 0000000..63bd2dd --- /dev/null +++ b/filesets/base/x/.Xdefaults @@ -0,0 +1,156 @@ +#define alpha #00000000 + +#define base00 {{colors.bg}} +#define base01 {{colors.light_bg}} +#define base02 {{colors.selection}} +#define base03 {{colors.comment}} +#define base04 {{colors.dark_fg}} +#define base05 {{colors.fg}} +#define base06 {{colors.light_fg}} +#define base07 {{colors.lighter_fg}} +#define base08 {{colors.red}} +#define base09 {{colors.orange}} +#define base0A {{colors.yellow}} +#define base0B {{colors.green}} +#define base0C {{colors.blue}} +#define base0D {{colors.cyan}} +#define base0E {{colors.magenta}} +#define base0F {{colors.brown}} + +*foreground: base05 +#ifdef background_opacity +*background: [background_opacity]base00 +#else +*background: base00 +#endif +*cursorColor: base05 + +*color0: base00 +*color1: base08 +*color2: base0B +*color3: base0A +*color4: base0D +*color5: base0E +*color6: base0C +*color7: base05 + +*color8: base03 +*color9: base08 +*color10: base0B +*color11: base0A +*color12: base0D +*color13: base0E +*color14: base0C +*color15: base07 + +! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt), +! use 'shell' template to set these if necessary +*color16: base09 +*color17: base0F +*color18: base01 +*color19: base02 +*color20: base04 +*color21: base06 + +! General settings +URxvt*saveline: 15000 + +! Disable scrollbar +URxvt.scrollBar: 0 + +! Cursor blink +URxvt.cursorBlink: 1 + +! Geometry +URxvt.geometry: 102x22 + +! Clipboard +!URxvt.perl-ext-common: default,clipboard +!URxvt.keysym.Shift-Control-C: perl:clipboard:copy +!URxvt.keysym.Shift-Control-V: perl:clipboard:paste + +! Font +URxvt.font :xft:{{typography.mono.font}}:{{typography.mono.weight}}:size={{typography.mono.size}} +URxvt.boldFont :xft:{{typography.mono.font}}:{{typography.mono.bold}}:size={{typography.mono.size}} +URxvt.italicFont :xft:{{typography.mono.font}}:{{typography.mono.italic}}:size={{typography.mono.size}} +URxvt.boldItalicFont :xft:{{typography.mono.font}}:{{typography.mono.bold_italic}}:size={{typography.mono.size}} +URxvt.letterSpace: 0 +URxvt*lineSpace: 0 + +! Icon +URxvt.iconFile: terminal.svg + +! Clickable links +URxvt.url-launcher: /usr/bin/chromium + +! Border +URxvt.internalBorder: 18 + +! Fade +URxvt*fading: 30 + + +! Transparency + +! fake +!urxvt*transparent: true +!urxvt*shading: 10 + +urxvt*depth: 32 + +! Map CTRL + arrow keys +URxvt.keysym.Control-Up: \033[1;5A +URxvt.keysym.Control-Down: \033[1;5B +URxvt.keysym.Control-Left: \033[1;5D +URxvt.keysym.Control-Right: \033[1;5C + +! Font rendering +Xft.autohint: 1 +Xft.dpi: 96 +Xft.antialias: 1 +Xft.hinting: true +Xft.hintstyle: hintslight +Xft.rgba: rgb +Xft.lcdfilter: lcddefault + + +!!!!!!!! +! Rofi ! +!!!!!!!! + +! Enable the extended coloring options +rofi.color-enabled: true +rofi.modi: run,window,ssh +rofi.sidebar-mode: true + +! bg fg bg-alt hl-bg hl-fg +rofi.color-window: {{colors.bg}}, {{colors.bg}}, alpha, alpha, alpha +rofi.color-normal: alpha, {{colors.comment}}, alpha, {{colors.selection}}, {{colors.fg}} +rofi.color-active: alpha, {{colors.green}}, alpha, {{colors.selection}}, {{colors.green}} +rofi.color-urgent: alpha, {{colors.red}}, alpha, {{colors.selection}}, {{colors.red}} + +rofi.fake-transparency: false +rofi.hide-scrollbar: true +rofi.font: {{typography.mono.font}} {{typography.mono.size}} +rofi.separator-style: none +rofi.scrollbar-width: 0 + +rofi.location: 1 +rofi.yoffset: 40 +rofi.xoffset: 24 +rofi.padding: 18 +rofi.lines: 18 +rofi.eh: 1 +rofi.width: 400 +rofi.bw: 0 + +rofi.terminal: kitty +rofi.ssh-client: ssh +rofi.ssh-command: {terminal} -e {ssh-client} {host} +rofi.run-command: {cmd} +rofi.run-shell-command: {terminal} -e {cmd} +rofi.disable-history: false +rofi.levenshtein-sort: false +rofi.case-sensitive: false +rofi.auto-select: false +rofi.parse-hosts: false diff --git a/filesets/base/x/.xinitrc b/filesets/base/x/.xinitrc new file mode 100755 index 0000000..4d3a1cf --- /dev/null +++ b/filesets/base/x/.xinitrc @@ -0,0 +1,15 @@ +#!/bin/sh + +[ -f ~/.xprofile ] && . ~/.xprofile + +if [ $HOST = 'ianmethyst-desktop-arch' ]; then + xrandr --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --off --output DVI-D-0 --off +fi + +session=${1:-i3} + +case $session in + i3|i3wm ) exec i3;; + steam|steamos ) exec steamos-session;; + * ) exec $1;; +esac diff --git a/filesets/base/x/.xprofile b/filesets/base/x/.xprofile new file mode 100644 index 0000000..6e59f35 --- /dev/null +++ b/filesets/base/x/.xprofile @@ -0,0 +1,15 @@ +#!/bin/sh + +[[ -f ~/.Xdefaults ]] && xrdb -merge -I $HOME ~/.Xdefaults + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +source "$HOME/.envrc" + +eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) +export SSH_AUTH_SOCK diff --git a/filesets/base/zathura/.config/zathura/zathurarc b/filesets/base/zathura/.config/zathura/zathurarc new file mode 100755 index 0000000..2b4a3ac --- /dev/null +++ b/filesets/base/zathura/.config/zathura/zathurarc @@ -0,0 +1,58 @@ +# Zathura configuration file +# See man `man zathurarc' + +# Open document in fit-width mode by default +set adjust-open "best-fit" + +# One page per row by default +set pages-per-row 1 + +# Stop at page boundries +set scroll-page-aware "true" +set scroll-full-overlap 0.01 + +# Zoom settings +set zoom-min 10 +set guioptions "s" + +# Colors and font + +set font "{{typography.mono.font}} {{typography.mono.size}}" + +set default-bg "{{colors.bg}}" +set default-fg "{{colors.fg}}" + +set statusbar-bg "{{colors.light_bg}}" +set statusbar-fg "{{colors.fg}}" + +set inputbar-bg "{{colors.light_bg}}" +set inputbar-fg "{{colors.fg}}" + +set notification-bg "{{colors.cyan}}" +set notification-fg "{{colors.bg}}" + +set notification-error-bg "{{colors.red}}" +set notification-error-fg "{{colors.fg}}" + +set notification-warning-bg "{{colors.yellow}}" +set notification-warning-fg "{{colors.bg}}" + +set highlight-color "{{colors.yellow}}" +set highlight-active-color "{{colors.green}}" + +set completion-bg "{{colors.bg}}" +set completion-fg "{{colors.fg}}" + +set completion-highlight-bg "{{colors.yellow}}" +set completion-highlight-fg "{{colors.bg}}" + +set recolor true +set recolor-keephue false + +set recolor-darkcolor "{{colors.fg}}" +set recolor-lightcolor "{{colors.bg}}" + +set render-loading false +set scroll-step 50 + +set selection-clipboard clipboard diff --git a/filesets/base/zsh/.zshrc b/filesets/base/zsh/.zshrc new file mode 100755 index 0000000..d42e219 --- /dev/null +++ b/filesets/base/zsh/.zshrc @@ -0,0 +1,230 @@ +# Skip all this for non-interactive shells +[[ -z "$PS1" ]] && return + +######### +# zplug # +######### + +export ZPLUG_HOME=~/.zplug +source $ZPLUG_HOME/init.zsh + +zplug 'zplug/zplug', hook-build:'zplug --self-manage' + +# Set the priority when loading +# e.g., zsh-syntax-highlighting must be loaded + +# after executing compinit command and sourcing other plugins +# (If the defer tag is given 2 or above, run after compinit command) +zplug "zsh-users/zsh-syntax-highlighting", defer:2 + +# Manage local plugins +# zplug "~/.zsh", from:local + +# Theme +# zplug "dracula/zsh", as:theme +# zplug "marszall87/nodeys-zsh-theme", as:theme +zplug "themes/frisk", as:theme, from:oh-my-zsh + +# Plugins +zplug "zsh-users/zsh-autosuggestions" +zplug "zsh-users/zsh-history-substring-search" +zplug "zsh-users/zsh-completions" +zplug "laurenkt/zsh-vimto" +zplug "MichaelAquilina/zsh-autoswitch-virtualenv" +# zplug "paulmelnikow/zsh-startup-timer" +# zplug "lib/nvm", from:oh-my-zsh + +# Install plugins if there are plugins that have not been installed +if ! zplug check --verbose; then + printf "Install? [y/N]: " + if read -q; then + echo; zplug install + fi +fi + +# Then, source plugins and add commands to $PATH +zplug load + +################ +# Zsh settings # +################ + +# Vi mode +bindkey -v +export KEYTIMEOUT=1 + +# backspace and ^h working even after +# returning from command mode +bindkey '^?' backward-delete-char +bindkey '^h' backward-delete-char + +# ctrl-w removed word backwards +bindkey '^w' backward-kill-word + +# ctrl-r starts searching history backward +bindkey '^r' history-incremental-search-backward + +# History +HISTFILE="$HOME/.zsh_history" +HISTSIZE=10000000 +SAVEHIST=$HISTSIZE +setopt INC_APPEND_HISTORY +setopt HIST_IGNORE_SPACE +setopt SHARE_HISTORY +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_REDUCE_BLANKS + +# Other options + +# Prompts for confirmation after 'rm *' etc +setopt RM_STAR_WAIT + +#Background processes aren't killed on exit of shell +setopt AUTO_CONTINUE + +# Don’t write over existing files with >, use >! instead +setopt NOCLOBBER + +# Completion +zmodload zsh/complist +autoload -Uz compinit +compinit +zstyle :compinstall filename '${HOME}/.zshrc' + +zstyle ':completion:*' menu select +setopt COMPLETE_ALIASES + +zstyle :compinstall filename '${HOME}/.zshrc' + +zstyle ':completion:*:pacman:*' force-list always +zstyle ':completion:*:*:pacman:*' menu yes select + +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} + +zstyle ':completion::complete:*' gain-privileges 1 + +# Completion selection by menu for kill +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:kill:*' force-list always +zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' + +zstyle ':completion:*:*:killall:*' menu yes select +zstyle ':completion:*:killall:*' force-list always + +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path ~/.zsh/cache + +# Calculator +# autoload zcalc + +# Keybindings +typeset -g -A key + +key[Home]="${terminfo[khome]}" +key[End]="${terminfo[kend]}" +key[Insert]="${terminfo[kich1]}" +key[Backspace]="${terminfo[kbs]}" +key[Delete]="${terminfo[kdch1]}" +key[Up]="${terminfo[kcuu1]}" +key[Down]="${terminfo[kcud1]}" +key[Left]="${terminfo[kcub1]}" +key[Right]="${terminfo[kcuf1]}" +key[PageUp]="${terminfo[kpp]}" +key[PageDown]="${terminfo[knp]}" +key[Shift-Tab]="${terminfo[kcbt]}" + +# setup key accordingly +[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line +[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode +[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char +[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" history-substring-search-up +[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" history-substring-search-down +[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char +[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char +[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history +[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history +[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete + +# Finally, make sure the terminal is in application mode, when zle is +# active. Only then are the values from $terminfo valid. +if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then + autoload -Uz add-zle-hook-widget + function zle_application_mode_start { echoti smkx } + function zle_application_mode_stop { echoti rmkx } + add-zle-hook-widget -Uz zle-line-init zle_application_mode_start + add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop +fi + +key[Control-Left]="${terminfo[kLFT5]}" +key[Control-Right]="${terminfo[kRIT5]}" + +[[ -n "${key[Control-Left]}" ]] && bindkey -- "${key[Control-Left]}" backward-word +[[ -n "${key[Control-Right]}" ]] && bindkey -- "${key[Control-Right]}" forward-word + +# fzf + +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh + +# emacs + +function vterm_printf(){ + if [ -n "$TMUX" ]; then + # Tell tmux to pass the escape sequences through + # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) + printf "\ePtmux;\e\e]%s\007\e\\" "$1" + elif [ "${TERM%%-*}" = "screen" ]; then + # GNU screen (screen, screen-256color, screen-256color-bce) + printf "\eP\e]%s\007\e\\" "$1" + else + printf "\e]%s\e\\" "$1" + fi +} + +# Completely clear the buffer. With this, everything that is not on screen +# is erased. +if [[ "$INSIDE_EMACS" = 'vterm' ]]; then + alias clear='vterm_printf "51;Evterm-clear-scrollback";tput clear' +fi + +# With vterm_cmd you can execute Emacs commands directly from the shell. +# For example, vterm_cmd message "HI" will print "HI". +# To enable new commands, you have to customize Emacs's variable +# vterm-eval-cmds. +vterm_cmd() { + local vterm_elisp + vterm_elisp="" + while [ $# -gt 0 ]; do + vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")" + shift + done + vterm_printf "51;E$vterm_elisp" +} + +# This is to change the title of the buffer based on information provided by the +# shell. See, http://tldp.org/HOWTO/Xterm-Title-4.html, for the meaning of the +# various symbols. +autoload -U add-zsh-hook +add-zsh-hook -Uz chpwd (){ print -Pn "\e]2;%m:%2~\a" } + +# Sync directory and host in the shell with Emacs's current directory. +# You may need to manually specify the hostname instead of $(hostname) in case +# $(hostname) does not return the correct string to connect to the server. +# +# The escape sequence "51;A" has also the role of identifying the end of the +# prompt +vterm_prompt_end() { + vterm_printf "51;A$(whoami)@$(hostname):$(pwd)"; +} +setopt PROMPT_SUBST +PROMPT=$PROMPT'%{$(vterm_prompt_end)%}' + +# Load environment +[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc" + +# Load aliases +[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc" + diff --git a/hooks/post.sh b/hooks/post.sh new file mode 100755 index 0000000..e5c0571 --- /dev/null +++ b/hooks/post.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +echo "Linking dotfiles dir" +ln -s "$DTTR_OUT" "$HOME/.dotfiles" + +echo "Linking individual dotfiles" +cd "$HOME/.dotfiles" +for dir in $(find . -maxdepth 1 -type d -printf "%f\n" | grep -v '\.'); do + stow -d "$HOME/.dotfiles" -t "$HOME" "$dir" +done + +ln -s "$HOME/.Xdefaults" "$HOME/.Xresources" + +if [ -n "$DISPLAY" ]; then + echo "Loading X settings" + xrdb "$HOME/.Xdefaults" +fi + +if [ "$TERM" = "xterm-kitty" ]; then + echo "Reloading kitty terminals" + kitty @ set-colors -a -c ~/.config/kitty/kitty.conf +fi + +if [ -n "$I3SOCK" ]; then + echo "Reloading i3" + i3-msg restart & +fi + +systemctl --user is-active --quiet emacs +emacs_running=$? + +if [ emacs_running = 0 ]; then + sh -c "doom sync && systemctl --user restart emacs && notify-send 'Emacs finished reloading'" &> /dev/null & +else + sh -c "doom sync && notify-send 'Emacs finished reloading'" &> /dev/null & +fi + +disown + +echo "Syncing packer.nvim" +nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' + +exit 0 diff --git a/hooks/pre.sh b/hooks/pre.sh new file mode 100755 index 0000000..81cecf0 --- /dev/null +++ b/hooks/pre.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -euo pipefail + +OLDIR="$PWD" +cd "$DTTR_OUT" + +if [ -L "$HOME/.Xresources" ]; then + unlink "$HOME/.Xresources" +fi + +# Create directories to symlink single files +for dir in $(find . -type d); do + _path=$(echo "$dir" | cut -d'/' -f3-) + c=$(echo "$_path" | wc -m) + if [ $c -gt 1 ]; then + abspath="$HOME/$_path" + [ ! -d "$abspath" ] && mkdir -p "$abspath" + fi +done + +if [ -d "$HOME/.dotfiles" ]; then + cd "$HOME/.dotfiles" + for dir in $(find . -maxdepth 1 -type d -printf "%f\n" | grep -v '\.'); do + stow -D -d "$HOME/.dotfiles" -t "$HOME" "$dir" &> /dev/null + done + + cd $OLDIR +fi + +echo "Unlinking dotfiles dir" +if [ -L "$HOME/.dotfiles" ]; then + unlink "$HOME/.dotfiles" +fi diff --git a/typographies/base.toml b/typographies/base.toml new file mode 100644 index 0000000..4da258e --- /dev/null +++ b/typographies/base.toml @@ -0,0 +1,31 @@ +name = "Base" + +[custom] + +[custom.mono] +font = "Iosevka" +weight = "Medium" +bold = "Bold" +italic = "Oblique" +bold_italic = "Bold Oblique" +size = 14 + +[custom.sans] +font = "Source Sans Pro" +weight = "Regular" +bold = "Bold" +italic = "Italic" +bold_italic = "Bold Italic" +size = 14 + +[custom.serif] +font = "Noto Serif" +weight = "Regular" +bold = "Bold" +italic = "Italic" +bold_italic = "Bold Italic" +size = 14 + +[custom.emoji] +font = "Noto Color Emoji" +size = 14 diff --git a/typographies/iosevka-nerd.toml b/typographies/iosevka-nerd.toml new file mode 100644 index 0000000..c23009d --- /dev/null +++ b/typographies/iosevka-nerd.toml @@ -0,0 +1,16 @@ +name = "Iosevka Nerd Font" +extends = "base" + +[custom] + +[custom.mono] +font = "Iosevka Nerd Font" +weight = "Medium" +bold = "Bold" +italic = "Oblique" +bold_italic = "Bold Oblique" +size = 14 + +[custom.kitty] +font = "Iosevka" +append = "Nerd Font Complete Monospace"