├── .Xresources
├── .config
├── DOT_MANAGEMENT.md
├── X11
│ └── xinitrc
├── alacritty
│ └── alacritty.yml
├── dunst
│ └── dunstrc
├── fontconfig
│ └── fonts.conf
├── git
│ └── config
├── i3
│ └── config
├── mpv
│ ├── input.conf
│ ├── mpv.conf
│ └── scripts
│ │ └── autoload.lua
├── mutt
│ ├── .cache
│ │ └── .gitignore
│ ├── mailboxrc
│ ├── mailcap
│ ├── muttcol
│ ├── muttimage.sh
│ ├── muttrc
│ └── workrc
├── nvim
├── polybar
│ ├── config
│ └── launch.sh
├── pypoetry
│ └── config.toml
├── pythonrc
├── ranger
│ ├── commands.py
│ ├── rc.conf
│ ├── rifle.conf
│ └── scope.sh
├── ruff
│ └── pyproject.toml
├── spicetify
│ ├── Themes
│ │ └── wal_theme
│ │ │ ├── color.ini
│ │ │ └── user.css
│ └── config.ini
├── sxiv
│ └── exec
│ │ └── key-handler
├── tmuxinator
│ ├── buddy.yml
│ ├── lw.yml
│ ├── tmuxinator.zsh
│ └── twain.yml
├── zathura
│ └── zathurarc
└── zsh
│ ├── .zshrc
│ ├── aliasrc
│ ├── antibody_plugins.txt
│ └── functionrc
├── .gnupg
├── gpg-agent.conf
├── gpg.conf
└── gpg.rc
├── .ideavimrc
├── .pdbrc
├── .pylintrc
├── .skhdrc
├── .tmux.conf
├── .vim
├── init.lua
├── lazy-lock.json
└── lua
│ └── core
│ ├── autocmd.lua
│ ├── lazy.lua
│ ├── mappings.lua
│ ├── options.lua
│ ├── plugins
│ ├── 00-mason.lua
│ ├── barbeque.lua
│ ├── better-whitespace.lua
│ ├── blink.lua
│ ├── bufdelete.lua
│ ├── cmp.lua
│ ├── cokeline.lua
│ ├── comment.lua
│ ├── conform.lua
│ ├── copilot.lua
│ ├── csv.lua
│ ├── dap.lua
│ ├── diffview.lua
│ ├── dockerfile.lua
│ ├── elixir.lua
│ ├── fastfold.lua
│ ├── fugitive.lua
│ ├── gitsigns.lua
│ ├── gutentags.lua
│ ├── i3.lua
│ ├── illuminate.lua
│ ├── indent-blankline.lua
│ ├── lint.lua
│ ├── lsp
│ │ ├── lsp.lua
│ │ └── utils.lua
│ ├── lspconfig.lua
│ ├── lualine.lua
│ ├── markdown-preview.lua
│ ├── neotest.lua
│ ├── noice.lua
│ ├── nvim-tree.lua
│ ├── peekaboo.lua
│ ├── render-markdown.lua
│ ├── repeat.lua
│ ├── sleuth.lua
│ ├── slime.lua
│ ├── spectre.lua
│ ├── splitjoin.lua
│ ├── startuptime.lua
│ ├── surround.lua
│ ├── telescope.lua
│ ├── theme.lua
│ ├── themes
│ │ ├── catppuccin.lua
│ │ ├── gruvbox.lua
│ │ └── tokyonight.lua
│ ├── tmux.lua
│ ├── todo-comments.lua
│ ├── toml.lua
│ ├── traces.lua
│ ├── treesitter.lua
│ ├── trouble.lua
│ ├── vim-json.lua
│ ├── vim-rooter.lua
│ ├── vimtex.lua
│ ├── vimwiki.lua
│ └── which-key.lua
│ ├── settings.lua
│ └── utils.lua
├── .vimrc.less
├── .vintrc.yaml
├── .wezterm.lua
├── .yabairc
├── .zprofile
├── LICENSE.md
├── README.md
└── Scripts
├── coinprice.sh
├── ding.ogx
├── dunst.sh
├── imgur.sh
├── install.sh
├── keymap.sh
├── lock.sh
├── mailnotify.sh
├── movesinks.sh
├── pavolume.sh
├── rofi.sh
├── rofi_books.sh
├── screenshot_monitor.sh
├── screenshot_region.sh
├── vpncheck.sh
├── work.sh
└── workvpn.sh
/.Xresources:
--------------------------------------------------------------------------------
1 | ! ~/.Xresources
2 | ! default dpi is 96 - prefer multiples thereof
3 |
4 | #define FONT Terminus (TTF)
5 |
6 | #ifndef SIZE
7 | #ifndef DPI
8 | #if WIDTH > 4000
9 | #define SIZE 36
10 | #define DPI 192
11 | #else
12 | #define SIZE 22
13 | #define DPI 96
14 | #endif
15 | #endif
16 | #endif
17 |
18 | ! rofi setup
19 | rofi.color-enabled: true
20 | rofi.separator-style: solid
21 | rofi.font: FONT SIZE
22 | rofi.bw: 2
23 | rofi.columns: 1
24 | rofi.yoffset: 0
25 | rofi.fake-transparency: false
26 | rofi.hide-scrollbar: true
27 |
28 | rofi.location: 0
29 | rofi.width: 30
30 | rofi.lines: 10
31 | rofi.fixed-num-lines: true
32 |
33 | ! general font setup for applications ignoring fontconfig
34 | ! https://wiki.archlinux.org/index.php/Font_configuration#Fontconfig_configuration
35 | ! Xft.autohint: 0
36 | ! Xft.antialias: 1
37 | ! Xft.hinting: true
38 | ! Xft.hintstyle: hintfull
39 | ! Xft.rgba: rgb
40 | ! Xft.lcdfilter: lcddefault
41 | Xft.dpi: 96
42 |
--------------------------------------------------------------------------------
/.config/DOT_MANAGEMENT.md:
--------------------------------------------------------------------------------
1 | All credit for this method goes to [jaagr](https://github.com/jaagr/dots/blob/master/README.md).
2 | Same goes for following documentation.
3 | Modified by ecly.
4 |
5 | #### Management
6 | ---------------------------------
7 | Files are added to the repository by calling `dot add $HOME/.config/file` and when
8 | issuing `git status` - only changes to files explicitly added will be shown.
9 |
10 | To get a list of files not tracked by git, use `dot untracked` or `dot untracked-at $HOME/path/to/foo/bar`
11 | to only show files in a specific subdirectory.
12 |
13 | ~~~ sh
14 | alias dot='git --git-dir=$HOME/.dots.git/ --work-tree=$HOME'
15 | ~~~
16 |
17 | #### Setup
18 | ~~~ sh
19 | git init --bare $HOME/.dots.git
20 | dot remote add origin https://github.com/ecly/dotfiles.git
21 | ~~~
22 |
23 | #### Configuration
24 | ~~~ sh
25 | dot config status.showUntrackedFiles no
26 |
27 | # Useful aliases
28 | dot config alias.untracked "status -u ."
29 | dot config alias.untracked-at "status -u"
30 | ~~~
31 |
32 | #### Usage
33 | ~~~ sh
34 | # Use the dot alias like you would use the git command
35 | dot status
36 | dot add --update ...
37 | dot commit -m "..."
38 | dot push
39 |
40 | # Listing files (not tracked by git)
41 | dot untracked
42 | dot status -u .config/
43 |
44 | # Listing files (tracked by git)
45 | dot ls-files
46 | dot ls-files .config/polybar/
47 | ~~~
48 |
49 | #### Replication
50 | ~~~ sh
51 | git clone --recursive --separate-git-dir=$HOME/.dots.git https://github.com/ecly/dotfiles.git /tmp/dots
52 | rsync -rvl --exclude ".git" /tmp/dots/ $HOME/
53 | rm -r /tmp/dots
54 | dot submodule update --init --recursive $HOME/
55 | ~~~
56 |
57 | #### Extra
58 | If you don't want eg. LICENSE.md and README.md to clutter your home dir.
59 | ~~~ sh
60 | git update-index --assume-unchanged LICENSE.md
61 | ~~~
62 | To later undo this do:
63 |
64 | ~~~ sh
65 | git update-index --no-assume-unchanged LICENSE.md
66 | ~~~
67 |
--------------------------------------------------------------------------------
/.config/X11/xinitrc:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | wal -n -R # generate and expose colors with wal based on cache
3 | [[ -f "$HOME/.Xresources" ]] && xrdb -merge -I"$HOME" "$HOME/.Xresources"
4 | [[ -f "$HOME/Scripts/keymap.sh" ]] && sh "$HOME/Scripts/keymap.sh"
5 |
6 | # when on laptop, with patched xrandr version, set display to perfect 2x scaling
7 | # https://forums.linuxmint.com/viewtopic.php?t=159064
8 | PATCHED="$HOME/Scripts/xrandr/xrandr"
9 | [[ -f $PATCHED ]] && [[ "$HOSTNAME" -eq "trsh" ]] && \
10 | $PATCHED --output DP-2 --mode 3840x2160 --scale "0.5x0.5"
11 |
12 | exec i3
13 |
--------------------------------------------------------------------------------
/.config/alacritty/alacritty.yml:
--------------------------------------------------------------------------------
1 | font:
2 | normal:
3 | family: "Terminess Nerd Font"
4 | style: Regular
5 | bold:
6 | family: "Terminus (TTF)"
7 | style: Bold
8 | italic:
9 | family: "Terminus (TTF)"
10 | style: Italic
11 | size: 16.5
12 | offset:
13 | x: 0
14 | y: -2
15 | glyph_offset:
16 | x: 0
17 | y: 0
18 | window:
19 | padding:
20 | x: 10
21 | y: 10
22 | env:
23 | TERM: xterm-256color
24 | hints:
25 | enabled:
26 | - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
27 | [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
28 | command: xdg-open
29 | post_processing: true
30 | mouse:
31 | enabled: true
32 | mods: Control
33 |
--------------------------------------------------------------------------------
/.config/dunst/dunstrc:
--------------------------------------------------------------------------------
1 | [global]
2 | font = "Terminus (TTF) 16"
3 | markup = yes
4 | format = "%s\n%b"
5 | sort = yes
6 | indicate_hidden = yes
7 | alignment = center
8 | show_age_threshold = 60
9 | word_wrap = yes
10 | ignore_newline = no
11 | width = 300
12 | height = 200
13 | offset = 10x45
14 | transparency = 0
15 | idle_threshold = 120
16 | monitor = 0
17 | follow = mouse
18 | sticky_history = yes
19 | line_height = 0
20 | separator_height = 2
21 | padding = 8
22 | horizontal_padding = 8
23 | separator_color = "#585858"
24 | frame_width = 4
25 | close = ctrl+space
26 | close_all = ctrl+shift+space
27 | history = ctrl+period
28 | context = ctrl+shift+period
29 |
30 | [urgency_low]
31 | timeout = 5
32 | # color0
33 | background = "#282828"
34 | # color15
35 | foreground = "#fbf1c7"
36 | # color2
37 | frame_color = "#b8bb26"
38 |
39 |
40 | [urgency_normal]
41 | timeout = 5
42 | background = "#282828"
43 | foreground = "#fbf1c7"
44 | frame_color = "#b8bb26"
45 |
46 | [urgency_critical]
47 | timeout = 0
48 | background = "#282828"
49 | foreground = "#fbf1c7"
50 | frame_color = "#b8bb26"
51 |
--------------------------------------------------------------------------------
/.config/fontconfig/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | true
8 |
9 |
10 |
11 |
12 | true
13 |
14 |
15 |
16 |
17 | hintfull
18 |
19 |
20 |
21 |
22 | lcddefault
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.config/git/config:
--------------------------------------------------------------------------------
1 | [filter "media"]
2 | required = true
3 | clean = git media clean %f
4 | smudge = git media smudge %f
5 | [user]
6 | name = Emil Lynegaard
7 | email = ecly@mailbox.org
8 | [core]
9 | editor = nvim
10 | autocrlf = input
11 | pager = delta
12 | [interactive]
13 | diffFilter = delta --color-only
14 | [delta]
15 | navigate = True # use n and N to move between diff sections
16 | features = side-by-side line-numbers decorations
17 | whitespace-error-style = 22 reverse
18 | [delta "decorations"]
19 | commit-decoration-style = bold yellow box ul
20 | file-style = bold yellow ul
21 | [diff]
22 | tool = vimdiff
23 | colorMoved = default
24 | [branch]
25 | autosetuprebase = always
26 | [merge]
27 | summary = true
28 | log = true
29 | tool = vimdiff
30 | conflictstyle = diff3
31 | prompt = false
32 | [mergetool]
33 | prompt = false
34 | keepBackup = false
35 | [color]
36 | ui = auto
37 | diff = auto
38 | status = auto
39 | branch = auto
40 | interactive = auto
41 | grep = auto
42 | [alias]
43 | co = checkout
44 | mt = mergetool
45 | st = status -sb
46 | lg = log --graph --pretty=format:'%C(yellow)%h%C(auto)%d%Creset %s %C(white)- %an, %ar%Creset'
47 | hide = update-index --assume-unchanged
48 | unhide = update-index --no-assume-unchanged
49 | [credential]
50 | helper = store
51 | [pull]
52 | rebase = true
53 | [rerere]
54 | enabled = true
55 | [submodule]
56 | recurse = true
57 |
--------------------------------------------------------------------------------
/.config/mpv/input.conf:
--------------------------------------------------------------------------------
1 | # mpv keybindings
2 | #
3 | # Location of user-defined bindings: ~/.config/mpv/input.conf
4 | #
5 | # Lines starting with # are comments. Use SHARP to assign the # key.
6 | # Copy this file and uncomment and edit the bindings you want to change.
7 | #
8 | # List of commands and further details: DOCS/man/input.rst
9 | # List of special keys: --input-keylist
10 | # Keybindings testing mode: mpv --input-test --force-window --idle
11 | #
12 | # Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
13 | #
14 | # Strings need to be quoted and escaped:
15 | # KEY show-text "This is a single backslash: \\ and a quote: \" !"
16 | #
17 | # You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
18 | # the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
19 | #
20 | # The default keybindings are hardcoded into the mpv binary.
21 | # You can disable them completely with: --no-input-default-bindings
22 |
23 | # Developer note:
24 | # On compilation, this file is baked into the mpv binary, and all lines are
25 | # uncommented (unless '#' is followed by a space) - thus this file defines the
26 | # default key bindings.
27 |
28 | # If this is enabled, treat all the following bindings as default.
29 | #default-bindings start
30 |
31 | #MBTN_LEFT ignore # don't do anything
32 | #MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off
33 | #MBTN_RIGHT cycle pause # toggle pause on/off
34 |
35 | # Mouse wheels, touchpad or other input devices that have axes
36 | # if the input devices supports precise scrolling it will also scale the
37 | # numeric value accordingly
38 | #WHEEL_UP seek 10
39 | #WHEEL_DOWN seek -10
40 | #WHEEL_LEFT add volume -2
41 | #WHEEL_RIGHT add volume 2
42 |
43 | ## Seek units are in seconds, but note that these are limited by keyframes
44 | #RIGHT seek 5
45 | #LEFT seek -5
46 | #UP seek 60
47 | #DOWN seek -60
48 | # Do smaller, always exact (non-keyframe-limited), seeks with shift.
49 | # Don't show them on the OSD (no-osd).
50 | #Shift+RIGHT no-osd seek 1 exact
51 | #Shift+LEFT no-osd seek -1 exact
52 | #Shift+UP no-osd seek 5 exact
53 | #Shift+DOWN no-osd seek -5 exact
54 | # Skip to previous/next subtitle (subject to some restrictions; see manpage)
55 | #Ctrl+LEFT no-osd sub-seek -1
56 | #Ctrl+RIGHT no-osd sub-seek 1
57 | #PGUP add chapter 1 # skip to next chapter
58 | #PGDWN add chapter -1 # skip to previous chapter
59 | #Shift+PGUP seek 600
60 | #Shift+PGDWN seek -600
61 | #[ multiply speed 1/1.1 # scale playback speed
62 | #] multiply speed 1.1
63 | #{ multiply speed 0.5
64 | #} multiply speed 2.0
65 | #BS set speed 1.0 # reset speed to normal
66 | #q quit
67 | #Q quit-watch-later
68 | #q {encode} quit 4
69 | #ESC set fullscreen no
70 | #ESC {encode} quit 4
71 | #p cycle pause # toggle pause/playback mode
72 | #. frame-step # advance one frame and pause
73 | #, frame-back-step # go back by one frame and pause
74 | #SPACE cycle pause
75 | #> playlist-next # skip to next file
76 | #ENTER playlist-next # skip to next file
77 | #< playlist-prev # skip to previous file
78 | #O no-osd cycle-values osd-level 3 1 # cycle through OSD mode
79 | #o show-progress
80 | #P show-progress
81 | #i script-binding stats/display-stats
82 | #I script-binding stats/display-stats-toggle
83 | #z add sub-delay -0.1 # subtract 100 ms delay from subs
84 | #x add sub-delay +0.1 # add
85 | #ctrl++ add audio-delay 0.100 # this changes audio/video sync
86 | #ctrl+- add audio-delay -0.100
87 | #9 add volume -2
88 | #/ add volume -2
89 | #0 add volume 2
90 | #* add volume 2
91 | #m cycle mute
92 | #1 add contrast -1
93 | #2 add contrast 1
94 | #3 add brightness -1
95 | #4 add brightness 1
96 | #5 add gamma -1
97 | #6 add gamma 1
98 | #7 add saturation -1
99 | #8 add saturation 1
100 | #Alt+0 set window-scale 0.5
101 | #Alt+1 set window-scale 1.0
102 | #Alt+2 set window-scale 2.0
103 | # toggle deinterlacer (automatically inserts or removes required filter)
104 | #d cycle deinterlace
105 | #r add sub-pos -1 # move subtitles up
106 | #t add sub-pos +1 # down
107 | #v cycle sub-visibility
108 | # stretch SSA/ASS subtitles with anamorphic videos to match historical
109 | #V cycle sub-ass-vsfilter-aspect-compat
110 | # switch between applying no style overrides to SSA/ASS subtitles, and
111 | # overriding them almost completely with the normal subtitle style
112 | #u cycle-values sub-ass-override "force" "no"
113 | #j cycle sub # cycle through subtitles
114 | #J cycle sub down # ...backwards
115 | #SHARP cycle audio # switch audio streams
116 | #_ cycle video
117 | #T cycle ontop # toggle video window ontop of other windows
118 | #f cycle fullscreen # toggle fullscreen
119 | #s async screenshot # take a screenshot
120 | #S async screenshot video # ...without subtitles
121 | #Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled
122 | #Alt+s screenshot each-frame # automatically screenshot every frame
123 | #w add panscan -0.1 # zoom out with -panscan 0 -fs
124 | #e add panscan +0.1 # in
125 | # cycle video aspect ratios; "-1" is the container aspect
126 | #A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
127 | #POWER quit
128 | #PLAY cycle pause
129 | #PAUSE cycle pause
130 | #PLAYPAUSE cycle pause
131 | #STOP quit
132 | #FORWARD seek 60
133 | #REWIND seek -60
134 | #NEXT playlist-next
135 | #PREV playlist-prev
136 | #VOLUME_UP add volume 2
137 | #VOLUME_DOWN add volume -2
138 | #MUTE cycle mute
139 | #CLOSE_WIN quit
140 | #CLOSE_WIN {encode} quit 4
141 | #E cycle edition # next edition
142 | #l ab-loop # Set/clear A-B loop points
143 | #L cycle-values loop-file "inf" "no" # toggle infinite looping
144 | #ctrl+c quit 4
145 | #DEL script-binding osc/visibility # cycle OSC display
146 |
147 | # Apple Remote section
148 | #AR_PLAY cycle pause
149 | #AR_PLAY_HOLD quit
150 | #AR_CENTER cycle pause
151 | #AR_CENTER_HOLD quit
152 | #AR_NEXT seek 10
153 | #AR_NEXT_HOLD seek 120
154 | #AR_PREV seek -10
155 | #AR_PREV_HOLD seek -120
156 | #AR_MENU show-progress
157 | #AR_MENU_HOLD cycle mute
158 | #AR_VUP add volume 2
159 | #AR_VUP_HOLD add chapter 1
160 | #AR_VDOWN add volume -2
161 | #AR_VDOWN_HOLD add chapter -1
162 |
163 | #
164 | # Legacy bindings (may or may not be removed in the future)
165 | #
166 | #! add chapter -1 # skip to previous chapter
167 | #@ add chapter 1 # next
168 |
169 | #
170 | # Not assigned by default
171 | # (not an exhaustive list of unbound commands)
172 | #
173 |
174 | # ? add sub-scale +0.1 # increase subtitle font size
175 | # ? add sub-scale -0.1 # decrease subtitle font size
176 | # ? sub-step -1 # immediately display next subtitle
177 | # ? sub-step +1 # previous
178 | # ? cycle angle # switch DVD/Bluray angle
179 | # ? add balance -0.1 # adjust audio balance in favor of left
180 | # ? add balance 0.1 # right
181 | # ? cycle sub-forced-only # toggle DVD forced subs
182 | # ? cycle program # cycle transport stream programs
183 | # ? stop # stop playback (quit or enter idle mode)
184 |
--------------------------------------------------------------------------------
/.config/mpv/mpv.conf:
--------------------------------------------------------------------------------
1 | ###--- Personal prefs---###
2 | volume=100
3 | sub-font="Iosevka"
4 | sub-font-size=55
5 | sub-scale=1
6 | save-position-on-quit
7 |
8 | # Display time elapsed and playtime in the top left corner
9 | #osd-level=3
10 |
11 | # Default sub/audio lang.
12 | slang=enUS,en,eng,ptBR,pt
13 | alang=jp,jpn,enUS,en,eng,ptBR,pt
14 |
15 | ###--- Quality settings ---###
16 | #https://wiki.archlinux.org/index.php/mpv
17 | profile=opengl-hq
18 | #if bad performance, uncomment line below
19 | #deband=no
20 |
21 | # High-quality scale settings, can be disabled for performance
22 | scale=ewa_lanczossharp
23 | cscale=ewa_lanczossoft
24 |
25 | # Interpolation (a.k.a. smoothmotion) related settings
26 | video-sync=display-resample
27 |
28 | # Misc
29 | blend-subtitles
30 |
--------------------------------------------------------------------------------
/.config/mpv/scripts/autoload.lua:
--------------------------------------------------------------------------------
1 | -- This script automatically loads playlist entries before and after the
2 | -- the currently played file. It does so by scanning the directory a file is
3 | -- located in when starting playback. It sorts the directory entries
4 | -- alphabetically, and adds entries before and after the current file to
5 | -- the internal playlist. (It stops if the it would add an already existing
6 | -- playlist entry at the same position - this makes it "stable".)
7 | -- Add at most 5000 * 2 files when starting a file (before + after).
8 | MAXENTRIES = 5000
9 |
10 | local options = require 'mp.options'
11 |
12 | o = {
13 | disabled = false
14 | }
15 | options.read_options(o)
16 |
17 | function Set (t)
18 | local set = {}
19 | for _, v in pairs(t) do set[v] = true end
20 | return set
21 | end
22 |
23 | EXTENSIONS = Set {
24 | 'mkv', 'avi', 'mp4', 'ogv', 'webm', 'rmvb', 'flv', 'wmv', 'mpeg', 'mpg', 'm4v', '3gp',
25 | 'mp3', 'wav', 'ogv', 'flac', 'm4a', 'wma',
26 | }
27 |
28 | mputils = require 'mp.utils'
29 |
30 | function add_files_at(index, files)
31 | index = index - 1
32 | local oldcount = mp.get_property_number("playlist-count", 1)
33 | for i = 1, #files do
34 | mp.commandv("loadfile", files[i], "append")
35 | mp.commandv("playlist-move", oldcount + i - 1, index + i - 1)
36 | end
37 | end
38 |
39 | function get_extension(path)
40 | match = string.match(path, "%.([^%.]+)$" )
41 | if match == nil then
42 | return "nomatch"
43 | else
44 | return match
45 | end
46 | end
47 |
48 | table.filter = function(t, iter)
49 | for i = #t, 1, -1 do
50 | if not iter(t[i]) then
51 | table.remove(t, i)
52 | end
53 | end
54 | end
55 |
56 | function find_and_add_entries()
57 | local path = mp.get_property("path", "")
58 | local dir, filename = mputils.split_path(path)
59 | if o.disabled or #dir == 0 then
60 | return
61 | end
62 | local pl_count = mp.get_property_number("playlist-count", 1)
63 | if (pl_count > 1 and autoload == nil) or
64 | (pl_count == 1 and EXTENSIONS[string.lower(get_extension(filename))] == nil) then
65 | return
66 | else
67 | autoload = true
68 | end
69 |
70 | local files = mputils.readdir(dir, "files")
71 | if files == nil then
72 | return
73 | end
74 | table.filter(files, function (v, k)
75 | if string.match(v, "^%.") then
76 | return false
77 | end
78 | local ext = get_extension(v)
79 | if ext == nil then
80 | return false
81 | end
82 | return EXTENSIONS[string.lower(ext)]
83 | end)
84 | table.sort(files, function (a, b)
85 | local len = string.len(a) - string.len(b)
86 | if len ~= 0 then -- case for ordering filename ending with such as X.Y.Z
87 | local ext = string.len(get_extension(a)) + 1
88 | a = string.sub(a, 1, -ext)
89 | b = string.sub(b, 1, -ext)
90 | end
91 | return string.lower(a) < string.lower(b)
92 | end)
93 |
94 | if dir == "." then
95 | dir = ""
96 | end
97 |
98 | local pl = mp.get_property_native("playlist", {})
99 | local pl_current = mp.get_property_number("playlist-pos", 0) + 1
100 | -- Find the current pl entry (dir+"/"+filename) in the sorted dir list
101 | local current
102 | for i = 1, #files do
103 | if files[i] == filename then
104 | current = i
105 | break
106 | end
107 | end
108 | if current == nil then
109 | return
110 | end
111 |
112 | local append = {[-1] = {}, [1] = {}}
113 | for direction = -1, 1, 2 do -- 2 iterations, with direction = -1 and +1
114 | for i = 1, MAXENTRIES do
115 | local file = files[current + i * direction]
116 | local pl_e = pl[pl_current + i * direction]
117 | if file == nil or file[1] == "." then
118 | break
119 | end
120 |
121 | local filepath = dir .. file
122 | if pl_e then
123 | -- If there's a playlist entry, and it's the same file, stop.
124 | if pl_e.filename == filepath then
125 | break
126 | end
127 | end
128 |
129 | if direction == -1 then
130 | if pl_current == 1 then -- never add additional entries in the middle
131 | mp.msg.info("Prepending " .. file)
132 | table.insert(append[-1], 1, filepath)
133 | end
134 | else
135 | mp.msg.info("Adding " .. file)
136 | table.insert(append[1], filepath)
137 | end
138 | end
139 | end
140 |
141 | add_files_at(pl_current + 1, append[1])
142 | add_files_at(pl_current, append[-1])
143 | end
144 |
145 | mp.register_event("start-file", find_and_add_entries)
146 |
--------------------------------------------------------------------------------
/.config/mutt/.cache/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
5 |
--------------------------------------------------------------------------------
/.config/mutt/mailboxrc:
--------------------------------------------------------------------------------
1 | # vim: filetype=muttrc
2 |
3 | unmailboxes *
4 | set imap_user = "$my_mailbox_email"
5 | set imap_pass = "$my_mailbox_password"
6 | set smtp_url = "smtp://$my_mailbox_email@smtp.mailbox.org:587/"
7 | set smtp_pass = "$my_mailbox_password"
8 | set from = "$my_mailbox_email"
9 | set realname = "$my_name"
10 | set folder = "imaps://imap.mailbox.org:993"
11 | set spoolfile = "+INBOX"
12 | set postponed = "+Drafts"
13 | set trash = "+Trash"
14 | set record = "+Sent"
15 | mailboxes "+INBOX" "+Drafts" "+Trash" "+Sent" "+Archive" "+Junk"
16 |
17 | set status_format = "$from: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]"
18 |
19 | macro index ,i "=Inbox" "Go to Inbox"
20 | macro index ,s "=Sent" "Go to Sent"
21 | macro index ,d "=Drafts" "Go to Drafts"
22 | macro index ,j "=Junk" "Go to Junk"
23 | macro index ,t "=Trash" "Go to Trash"
24 | macro index ,a "=Archive" "Go to Archive"
25 |
26 | # Save mail to Archive
27 | macro index A ":set confirmappend=no delete=yes\n=Archive\n:set confirmappend=yes delete=ask-yes\n"
28 |
29 | account-hook $folder "set imap_user=$my_mailbox_email imap_pass=$my_mailbox_password"
30 |
--------------------------------------------------------------------------------
/.config/mutt/mailcap:
--------------------------------------------------------------------------------
1 | text/html; w3m -I %{charset} -T text/html; copiousoutput;
2 | #application/pdf; mv %s %s.pdf && zathura %s.pdf > /dev/null; needsterminal;
3 | application/pdf; zathura %s > /dev/null; needsterminal;
4 | image/*; ~/.config/mutt/muttimage.sh %s ; copiousoutput
5 |
--------------------------------------------------------------------------------
/.config/mutt/muttimage.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | #### Determine size of Terminal
4 | height=`stty size | awk 'BEGIN {FS = " "} {print $1;}'`
5 | width=`stty size | awk 'BEGIN {FS = " "} {print $2;}'`
6 |
7 | ### Display Image / offset with mutt bar
8 | echo -e "2;3;\n0;1;210;20;$((width*7-250));$((height*14-100));0;0;0;0;$1\n4;\n3;" | /usr/lib/w3m/w3mimgdisplay &
9 |
--------------------------------------------------------------------------------
/.config/mutt/muttrc:
--------------------------------------------------------------------------------
1 | # Folder hooks for multiple accounts
2 | folder-hook 'mailboxrc' 'source ~/.config/mutt/mailboxrc'
3 | folder-hook 'workrc' 'source ~/.config/mutt/workrc'
4 |
5 | # Unbinds prior to sourcing to avoid warnings.
6 | bind index,editor,browser,attach,pager g noop
7 |
8 | # Important config for live account
9 | source "gpg -d ~/.config/mutt/mutt_secret_cfg.gpg |"
10 | source "~/.config/mutt/mailboxrc" # Default account
11 | source "~/.config/mutt/muttcol"
12 |
13 | # Other settings
14 | set editor ="nvim +13 -c 'set nobackup' -c 'set noswapfile' -c 'set nowritebackup' -c 'set tw=72 ft=mail noautoindent'"
15 | set imap_keepalive = 180
16 | unset imap_passive
17 | set imap_check_subscribed
18 | set imap_list_subscribed
19 | set smtp_authenticators = "login"
20 | set imap_idle
21 | set timeout = 15
22 | set mail_check = 90
23 | set mailcap_path = ~/.config/mutt/mailcap
24 | set date_format = "%m/%d %I:%M"
25 | # set index_format = "%2C %Z %d %-15.15F %s (%-4.4c)"
26 | set index_format=" %?M? ↳&%4C? %Z %D %-15.15n %s"
27 | # see possible args:
28 | # https://neomutt.org/guide/reference.html#status-format
29 | set new_mail_command="sh ~/Scripts/mailnotify.sh %f %n %u &"
30 | set header_cache = ~/.config/mutt/.cache
31 | set certificate_file = ~/.config/mutt/certificates
32 | set wait_key = no
33 | set status_format = "$from: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]"
34 |
35 | # Settings inspired by https://gist.github.com/bnagy/8914f712f689cc01c267
36 | set hidden_host
37 | set fast_reply # skip initial prompts when replying
38 | set noallow_8bit # 8bit isn't safe via Demon.
39 | set ascii_chars=yes # use ascii characters when displaying trees
40 | set edit_headers= yes # Include headers in message for easy change
41 | set nomark_old # Don't mark unread new msgs as old.
42 | set nobeep # We don't need no beeping software.
43 | set nostrict_threads # Lets have some fuzzy threading.
44 | set noconfirmappend # Just append, don't hassle me (when moving mail)
45 | set pager_stop # Don't skip msgs on next page.
46 | set tilde # Fill out messages with '~'.
47 | set include # Include the message in replies.
48 | # unset record # don't save local copies of sent mail - only desirable for autosaves such as gmail
49 |
50 | auto_view text/html
51 | alternative_order text/plain text/enriched text/html
52 | auto_view application/pdf
53 |
54 | ###-- General security settings---###
55 | set ssl_force_tls=yes
56 | set ssl_starttls=yes
57 | set ssl_use_sslv3=yes
58 | set ssl_use_tlsv1=no
59 | set ssl_use_tlsv1_1=no
60 | set ssl_use_tlsv1_2=yes
61 | set ssl_verify_dates=yes
62 | set ssl_verify_host=yes
63 |
64 | set certificate_file=~/.config/mutt/certificates
65 |
66 | ###--- Mutt sorting ---###
67 | set sort=threads
68 | set sort_browser=date
69 | set sort_aux=reverse-last-date-received
70 |
71 | ###--- Coloring ---###
72 | mono bold bold
73 | mono underline underline
74 | mono indicator reverse
75 | color index yellow default '.*'
76 | color index_author red default '.*'
77 | color index_number blue default
78 | color index_subject cyan default '.s'
79 | color index_size green default
80 | color normal default default
81 | color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
82 | color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
83 |
84 |
85 | ###--- Bindings ---###
86 | # Unbinds
87 | bind generic,compose,attach,pager g noop
88 | bind generic,compose,attach,pager,index d noop
89 |
90 | # Don't ask - just move this Archived
91 | macro index S ":set confirmappend=no delete=yes\n=Archived\n:set confirmappend=yes delete=ask-yes\n"
92 |
93 | # Account changing
94 | macro index,pager ,1 'source ~/.config/mutt/mailboxrc!'
95 | macro index,pager ,2 'source ~/.config/mutt/workrc!'
96 |
97 | # Mailbox navigation
98 | # --- Sourced --- #
99 |
100 | # Use w3m for url view
101 | # macro index,pager \cv |urlview\n
102 | macro index,pager,attach,compose \cv " urlscan" "call urlscan to extract URLs out of a message"
103 |
104 |
105 | # Editor
106 | bind editor ^T complete
107 | bind editor complete-query
108 | bind editor noop
109 | bind attach view-mailcap
110 |
111 | # Moving around
112 | bind attach,browser,index gg first-entry
113 | # bind attach,browser,index G last-entry - used go fetch
114 | bind pager gg top
115 | bind pager G bottom
116 | bind pager k previous-line
117 | bind pager j next-line
118 |
119 | # Scrolling
120 | bind attach,browser,pager,index \CF next-page
121 | bind attach,browser,pager,index \CB previous-page
122 | bind attach,browser,pager,index \Cu half-up
123 | bind attach,browser,pager,index \Cd half-down
124 | bind browser,pager \Ce next-line
125 | bind browser,pager \Cy previous-line
126 | bind index \Ce next-line
127 | bind index \Cy previous-line
128 |
129 | # Threads
130 | bind browser,pager,index N search-opposite
131 | bind pager,index dT delete-thread
132 | bind pager,index dt delete-subthread
133 | bind pager,index gt next-thread
134 | bind pager,index gT previous-thread
135 | bind index za collapse-thread
136 | bind index zA collapse-all # Missing :folddisable/foldenabl
137 |
138 | # Index navigation
139 | bind index noop
140 | bind index \cd half-down
141 | bind index \cu half-up
142 | bind index dd delete-message
143 | bind index U undelete-message
144 | bind index F search
145 | bind index R group-reply
146 | bind index previous-entry
147 | bind index next-entry
148 | bind index delete-message
149 | # bind index n next-entry / overrides next search item
150 | bind index p previous-entry
151 | macro index Q ":set quit=yes\nq" "Quit mutt without asking"
152 | bind index C noop
153 | bind index - collapse-thread
154 | bind index _ collapse-all
155 | bind index tag-entry
156 | macro index \cr "T~N;WNT~O;WO\CT~T" "mark all messages read"
157 |
158 | # Refreshing 'go fetch'
159 | bind index G imap-fetch-mail
160 |
--------------------------------------------------------------------------------
/.config/mutt/workrc:
--------------------------------------------------------------------------------
1 | # vim: filetype=muttrc
2 |
3 | unmailboxes *
4 |
5 | # imap settings
6 | set imap_user = "$my_work_email"
7 | set imap_pass = "$my_work_password"
8 | set folder = "imaps://outlook.office365.com/"
9 |
10 | # smtp settings
11 | set smtp_url = "smtp://$my_work_email@outlook.office365.com:587/"
12 | set smtp_pass = "$my_work_password"
13 | set ssl_force_tls = yes
14 | set smtp_authenticators = "login"
15 |
16 | set from = "$my_work_email"
17 | set realname = "$my_name"
18 | set hostname = "$my_work_hostname"
19 | set spoolfile = "+INBOX"
20 | set postponed = "+Drafts"
21 | set trash = "+Deleted Items"
22 | set record = "+Sent Items"
23 | mailboxes "+INBOX" "+Drafts" "+Deleted Items" "+Sent Items" "+Junk Email" "+Archive"
24 |
25 | set status_format = "$from: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]"
26 |
27 | macro index ,i "=INBOX" "Go to Inbox"
28 | macro index ,s "=Sent Items" "Go to Sent"
29 | macro index ,d "=Drafts" "Go to Drafts"
30 | macro index ,j "=Junk Email" "Go to Junk"
31 | macro index ,t "=Deleted Items" "Go to Trash"
32 | macro index ,a "=Archive" "Go to Archive"
33 |
34 | macro index A ":set confirmappend=no delete=yes\n=Archive\n:set confirmappend=yes delete=ask-yes\n"
35 |
36 | account-hook $folder "set imap_user=$my_work_email imap_pass=$my_work_password"
37 |
--------------------------------------------------------------------------------
/.config/nvim:
--------------------------------------------------------------------------------
1 | ../.vim
--------------------------------------------------------------------------------
/.config/polybar/config:
--------------------------------------------------------------------------------
1 | ;=====================================================
2 | ;
3 | ; To learn more about how to configure Polybar
4 | ; go to https://github.com/jaagr/polybar
5 | ;
6 | ; The README contains alot of information
7 | ;
8 | ;=====================================================
9 |
10 | [colors]
11 | background = ${xrdb:color0:#222}
12 | background-alt = ${xrdb:color3:#222}
13 | foreground = ${xrdb:color7:#222}
14 | foreground-alt = ${xrdb:color2:#555}
15 | highlight = ${xrdb:color2:#f00}
16 | urgent = #f00
17 |
18 | [settings]
19 | screenchange-reload = true
20 |
21 | [global/wm]
22 | margin-top = 3
23 | margin-bottom = 3
24 |
25 | [bar/main]
26 | monitor = ${env:MONITOR}
27 | width = 100%
28 | height = 35
29 | ;offset-x = 1%
30 | offset-y = 0%
31 | radius = 0.0
32 | fixed-center = true
33 |
34 | background = ${colors.background}
35 | foreground = ${colors.foreground}
36 |
37 | line-size = 2
38 | line-color = #f00
39 |
40 | border-color = #00000000
41 |
42 | padding-left = 1
43 | padding-right = 2
44 | padding-top = 2
45 | padding-bottom = 2
46 |
47 | module-margin-left = 1
48 | module-margin-right = 1
49 |
50 | font-0 = "Terminus (TTF):pixelsize=16;2"
51 | font-1 = "TerminessTTF Nerd Font Mono:pixelsize=26;4"
52 |
53 | modules-left = i3icons
54 | modules-center = date
55 | modules-right = vpncheck cpu memory pulseaudio keyboard battery
56 |
57 | ;fix tray position
58 | ;override-redirect = true
59 | tray-detached = false
60 | tray-position = none
61 | tray-offset-x = 0
62 | tray-offset-y = 0
63 | tray-maxsize = 26
64 | tray-padding = 0
65 | tray-scale = 1
66 | tray-background = ${colors.background}
67 |
68 | [module/xwindow]
69 | type = internal/xwindow
70 | label = %title:0:30:...%
71 | label-foreground = ${colors.foreground}
72 |
73 | [module/i3]
74 | type = internal/i3
75 | format =
76 |
77 | index-sort = true
78 | enable-click = false
79 | enable-scroll = false
80 |
81 | ws-icon-0 = "1;web"
82 | ws-icon-1 = "2;dev"
83 | ws-icon-2 = "3;ent"
84 | ws-icon-3 = "4;com"
85 | ws-icon-4 = "5;vid"
86 | ws-icon-5 = "6;bit"
87 | ws-icon-7 = "7;rnd"
88 | ws-icon-8 = "8;rnd"
89 | ws-icon-9 = "9;rnd"
90 |
91 | ; Only show workspaces on the same output as the bar
92 | pin-workspaces = false
93 |
94 | label-mode = %icon%
95 | label-mode-foreground = ${colors.foreground}
96 | label-mode-background = ${colors.background}
97 |
98 | ; focused = Active workspace on focused monitor
99 | label-focused = %icon%
100 | label-focused-foreground = ${colors.highlight}
101 | label-focused-background = ${colors.background}
102 | label-focused-underline = ${colors.highlight}
103 | label-focused-padding = 1
104 |
105 | ; unfocused = Inactive workspace on any monitor
106 | label-unfocused = %icon%
107 | label-unfocused-foreground = ${colors.highlight}
108 | label-unfocused-background = ${colors.background}
109 | label-unfocused-padding = 1
110 |
111 | ; urgent = Workspace with urgency hint set
112 | label-urgent = %icon%
113 | label-urgent-foreground = ${colors.foreground-alt}
114 | label-urgent-background = ${colors.background}
115 |
116 | label-visible = %icon%
117 | label-visible-padding = 1
118 |
119 | [module/i3icons]
120 | inherit = module/i3
121 |
122 | # icon definition found in ~/.config/polybar/launch.sh
123 | ws-icon-0 = ${env:POLY_WS_ICON_0}
124 | ws-icon-1 = ${env:POLY_WS_ICON_1}
125 | ws-icon-2 = ${env:POLY_WS_ICON_2}
126 | ws-icon-3 = ${env:POLY_WS_ICON_3}
127 | ws-icon-4 = ${env:POLY_WS_ICON_4}
128 | ws-icon-5 = ${env:POLY_WS_ICON_5}
129 | ws-icon-6 = ${env:POLY_WS_ICON_6}
130 | ws-icon-7 = ${env:POLY_WS_ICON_7}
131 | ws-icon-8 = ${env:POLY_WS_ICON_8}
132 | ;ws-icon-default =
133 |
134 | [module/cpu]
135 | type = internal/cpu
136 | interval = 2
137 | format-prefix = " "
138 | format-prefix-foreground = ${colors.foreground-alt}
139 |
140 | format =