summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2023-08-25 17:55:32 +0200
committerJustin Gassner <justin.gassner@mailbox.org>2023-09-18 12:39:47 +0200
commit159003fd48ef797dc9ef9d52fc753bec8d8ff72b (patch)
treeff542e87318854a46c93a73d3d1ce202929a1947
parentafb499d81dc22ccc00fbd999862360a3e6f16cdb (diff)
downloaddotfiles-x1.tar.zst
configx1
-rw-r--r--.bash_profile4
-rw-r--r--.bashrc2
-rw-r--r--.config/chromium-flags.conf28
-rw-r--r--.config/git/config2
-rw-r--r--.config/mpop/config21
-rw-r--r--.config/mpv/input.conf9
-rw-r--r--.config/mpv/mpv.conf8
-rw-r--r--.config/mpv/scripts/display-chapter-titles.lua10
m---------.config/mpv/scripts/sponsorblock_minimal0
-rw-r--r--.config/mpv/scripts/turn-off-dpms.lua45
-rw-r--r--.config/msmtp/config21
-rw-r--r--.config/mutt/mailcap3
-rw-r--r--.config/mutt/muttrc44
-rw-r--r--.config/mutt/solarized-dark43
-rw-r--r--.config/nvim/ale_linters/tex/textidote.vim32
-rw-r--r--.config/nvim/init.vim8
l---------.config/systemd/user/default.target.wants/ledsoff.service1
-rw-r--r--.config/systemd/user/ledsoff.service9
-rw-r--r--.config/systemd/user/nextcloud-sync.service8
-rw-r--r--.config/systemd/user/nextcloud-sync.timer10
l---------.config/systemd/user/timers.target.wants/borgmatic-user.timer1
l---------.config/systemd/user/timers.target.wants/nextcloud-sync.timer1
l---------.config/systemd/user/timers.target.wants/yt-dlp.timer1
-rw-r--r--.config/systemd/user/yt-dlp.service9
-rw-r--r--.config/systemd/user/yt-dlp.timer10
-rw-r--r--.config/user-dirs.dirs8
-rw-r--r--.config/zathura/zathurarc17
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
-rwxr-xr-x.local/bin/clean14
-rwxr-xr-x.local/bin/edit-bookmarks37
-rwxr-xr-x.local/bin/ledsoff7
-rwxr-xr-x.local/bin/opendoc8
-rwxr-xr-x.local/bin/png-remove-alpha-and-optimize9
-rwxr-xr-x.local/bin/reconnect-trackpoint-and-touchpad4
-rw-r--r--.xinitrc2
36 files changed, 437 insertions, 3 deletions
diff --git a/.bash_profile b/.bash_profile
index bd355cb..9621209 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -7,5 +7,9 @@ export LESSHISTFILE=-
export EDITOR=nvim
export VISUAL=$EDITOR
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
+export PASSWORD_STORE_DIR=~/.local/share/pass
+export PASSWORD_STORE_GENERATED_LENGTH=16
+export MAIL=~/.mail
+export XAUTHORITY=$XDG_RUNTIME_DIR/Xauthority
[[ -f ~/.bashrc ]] && . ~/.bashrc
diff --git a/.bashrc b/.bashrc
index 485408c..3036037 100644
--- a/.bashrc
+++ b/.bashrc
@@ -21,3 +21,5 @@ alias f=vifm
alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
source /usr/share/bash-completion/completions/git
__git_complete config __git_main
+
+source ~/.local/share/bash-completion/eat
diff --git a/.config/chromium-flags.conf b/.config/chromium-flags.conf
new file mode 100644
index 0000000..df521f0
--- /dev/null
+++ b/.config/chromium-flags.conf
@@ -0,0 +1,28 @@
+# ungoogled chromium configuration
+
+# chromium options
+--start-maximized
+--ignore-gpu-blocklist
+--enable-gpu-rasterization
+--enable-zero-copy
+--disk-cache-dir=/tmp/chromium-cache
+--enable-features=VaapiVideoDecoder
+--disable-features=ChromeLabs,SidePanel
+
+# introduced by ungoogled-chromium
+--disable-beforeunload
+--extension-mime-request-handling=always-prompt-for-install
+--fingerprinting-canvas-image-data-noise
+--fingerprinting-canvas-measuretext-noise
+--fingerprinting-client-rects-noise
+--force-punycode-hostnames
+--hide-crashed-bubble
+--popups-to-tabs
+--disable-sharing-hub
+--hide-fullscreen-exit-ui
+--hide-sidepanel-button
+--remove-grab-handle
+--remove-tabsearch-button
+--show-avatar-button=never
+--tab-hover-cards=tooltip
+--enable-features=ClearDataOnExit,DisableLinkDrag,DisableQRGenerator
diff --git a/.config/git/config b/.config/git/config
index e2ee9bf..4473d78 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -3,9 +3,11 @@
[user]
name = Justin Gassner
email = justin.gassner@mailbox.org
+ signingkey = 913967C1BCC08CDD88BCE8F2273E75DFCFB25863
[advice]
statusHints = false
[init]
defaultBranch = master
+ templateDir = ~/templates/git-hooks/
# vim: ft=gitconfig
diff --git a/.config/mpop/config b/.config/mpop/config
new file mode 100644
index 0000000..98dcef9
--- /dev/null
+++ b/.config/mpop/config
@@ -0,0 +1,21 @@
+# mpop configuration
+
+defaults
+tls on
+delivery maildir ~/.mail/inbox
+uidls_file /tmp/%U_at_%H
+received_header off
+
+account default
+host pop3.mailbox.org
+tls_fingerprint 5C:38:82:47:F6:19:88:81:AA:FB:75:4C:D4:2C:EB:97:79:32:94:C2:62:6E:CC:00:97:E9:38:7B:91:88:D2:B2
+user justin.gassner@mailbox.org
+passwordeval pass mailbox
+
+account fau
+host faumail.fau.de
+tls_fingerprint 8D:68:85:86:EF:45:0E:55:C9:0B:81:68:2A:A5:15:3C:08:58:95:AC:07:E3:19:86:20:63:03:64:B5:4F:D7:CA
+user justin.gassner@fau.de
+passwordeval pass fau-mail
+
+# vim: ft=mpop
diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf
new file mode 100644
index 0000000..e1df464
--- /dev/null
+++ b/.config/mpv/input.conf
@@ -0,0 +1,9 @@
+Alt+RIGHT add video-rotate 90
+Alt+LEFT add video-rotate -90
+Alt+- add video-zoom -0.25
+Alt+= add video-zoom 0.25
+Alt+j add video-pan-x -0.05
+Alt+l add video-pan-x 0.05
+Alt+i add video-pan-y 0.05
+Alt+k add video-pan-y -0.05
+Alt+BS set video-zoom 0; set video-pan-x 0; set video-pan-y 0
diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf
new file mode 100644
index 0000000..12f97d3
--- /dev/null
+++ b/.config/mpv/mpv.conf
@@ -0,0 +1,8 @@
+# mpv configuration
+
+vo=gpu
+hwdec=vaapi
+fullscreen=yes
+pulse-latency-hacks=yes
+
+script-opts=sponsorblock_minimal-categories=["sponsor","selfpromo","interaction","intro","outro","preview","music_offtopic"]
diff --git a/.config/mpv/scripts/display-chapter-titles.lua b/.config/mpv/scripts/display-chapter-titles.lua
new file mode 100644
index 0000000..4ef7700
--- /dev/null
+++ b/.config/mpv/scripts/display-chapter-titles.lua
@@ -0,0 +1,10 @@
+local function showChapterTitle()
+ local chapterTitle = mp.get_property_osd("chapter-metadata/by-key/title")
+ mp.osd_message(chapterTitle, 4)
+end
+
+local function startObserving()
+ mp.observe_property("chapter", nil, showChapterTitle)
+end
+
+mp.add_key_binding("Ctrl+p", "showChapter", startObserving)
diff --git a/.config/mpv/scripts/sponsorblock_minimal b/.config/mpv/scripts/sponsorblock_minimal
new file mode 160000
+Subproject ca2844b8cf7674bfccd282d389a50427742251d
diff --git a/.config/mpv/scripts/turn-off-dpms.lua b/.config/mpv/scripts/turn-off-dpms.lua
new file mode 100644
index 0000000..d20a99e
--- /dev/null
+++ b/.config/mpv/scripts/turn-off-dpms.lua
@@ -0,0 +1,45 @@
+-- originally written by nilninull
+
+local dpms_mod = nil
+
+local function on_property_change(name, value)
+ print("RUN on property change", value, dpms_mod)
+ if dpms_mod == nil and value then
+ -- This code was checked on xset 1.2.3
+ if os.execute("[ `xset q | sed -n '/^DPMS/,${/^ DPMS/s/^ DPMS is //p}'` == Enabled ]") == 0 then
+ dpms_mod = true
+ else
+ dpms_mod = false
+ end
+ end
+end
+
+mp.observe_property("vo-configured", "bool", on_property_change)
+
+local function dpms_mod_stop(event)
+ if dpms_mod then
+ os.execute("xset +dpms")
+ end
+end
+
+mp.register_event("shutdown", dpms_mod_stop)
+
+local function dpms_on_play(event)
+ if dpms_mod then
+ os.execute("xset -dpms")
+ end
+end
+
+mp.register_event("playback-restart", dpms_on_play)
+
+local function dpms_on_pause(name, value)
+ if dpms_mod then
+ if value then
+ os.execute("xset +dpms")
+ else
+ os.execute("xset -dpms")
+ end
+ end
+end
+
+mp.observe_property("pause", "bool", dpms_on_pause)
diff --git a/.config/msmtp/config b/.config/msmtp/config
new file mode 100644
index 0000000..b982361
--- /dev/null
+++ b/.config/msmtp/config
@@ -0,0 +1,21 @@
+# msmtp configuration
+
+defaults
+tls on
+auth plain
+
+account default
+host smtp.mailbox.org
+tls_fingerprint 5C:38:82:47:F6:19:88:81:AA:FB:75:4C:D4:2C:EB:97:79:32:94:C2:62:6E:CC:00:97:E9:38:7B:91:88:D2:B2
+user justin.gassner@mailbox.org
+passwordeval pass mailbox
+from justin.gassner@mailbox.org
+
+account fau
+host smtp-auth.fau.de
+tls_fingerprint 8D:68:85:86:EF:45:0E:55:C9:0B:81:68:2A:A5:15:3C:08:58:95:AC:07:E3:19:86:20:63:03:64:B5:4F:D7:CA
+user justin.gassner@fau.de
+passwordeval pass fau-mail
+from justin.gassner@fau.de
+
+# vim: ft=msmtp
diff --git a/.config/mutt/mailcap b/.config/mutt/mailcap
new file mode 100644
index 0000000..ce60481
--- /dev/null
+++ b/.config/mutt/mailcap
@@ -0,0 +1,3 @@
+application/pdf; zathura %s
+image/*; nsxiv -b %s
+text/html; chromium %s &> /dev/null; nametemplate=%s.html
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc
new file mode 100644
index 0000000..8d3d61d
--- /dev/null
+++ b/.config/mutt/muttrc
@@ -0,0 +1,44 @@
+# mutt configuration
+
+set folder = "$MAIL"
+set mbox_type = "Maildir"
+set spoolfile = '+inbox'
+set postponed = '+drafts'
+set record = '+sent'
+
+set sendmail = '/usr/bin/msmtp'
+set use_from = yes
+set realname = 'Justin Gassner'
+set from = 'justin.gassner@mailbox.org'
+set envelope_from = yes
+
+set send_charset = 'utf-8'
+set pager_index_lines = 10
+
+set mailcap_path = ~/.config/mutt/mailcap
+
+ignore *
+unignore from subject to cc
+
+set crypt_use_gpgme = yes
+set crypt_replysign = yes
+set crypt_replyencrypt = yes
+set crypt_replysignencrypted = yes
+set crypt_verify_sig = yes
+
+source ~/.config/mutt/solarized-dark
+
+set alias_file = ~/.local/share/mutt/aliases
+source $alias_file
+
+bind index g first-entry
+bind index G last-entry
+bind pager g top
+bind pager G bottom
+bind pager j next-line
+bind pager k previous-line
+
+macro generic '<esc>1' ':set from=justin.gassner@mailbox.org'
+macro generic '<esc>2' ':set from=justin.gassner@fau.de'
+
+# vim: ft=muttrc
diff --git a/.config/mutt/solarized-dark b/.config/mutt/solarized-dark
new file mode 100644
index 0000000..4e51c68
--- /dev/null
+++ b/.config/mutt/solarized-dark
@@ -0,0 +1,43 @@
+# dark solarized colorscheme for mutt
+
+color normal color12 default
+color error color1 default
+color tilde color10 default
+color message color6 default
+color markers color10 default
+color attachment white default
+color status color7 color11
+color tree yellow default
+
+color index color11 default ~R # read messages
+color index color6 default ~N # new messages
+color index color6 default ~O # old messages
+color index color5 default ~F # flagged
+color index color8 color1 ~D # deleted messages
+
+color hdrdefault color12 color0
+color header color4 color0 "^(Subject)"
+
+color quoted color4 default
+color quoted1 color6 default
+color quoted2 color2 default
+color quoted3 color3 default
+color quoted4 color9 default
+color quoted5 color1 default
+
+color signature color11 default
+
+color bold black default
+color underline black default
+color normal default default
+
+color body color1 default "(BAD signature)"
+color body color3 default "(Problem signature)"
+color body color2 default "(Good signature)"
+color body color3 default "(Warning)"
+color body color3 default "(WARNING)"
+color body color2 default "Good"
+color body brightyellow default "^gpg: "
+color body brightyellow red "^gpg: BAD signature from.*"
+
+# vim: ft=muttrc
diff --git a/.config/nvim/ale_linters/tex/textidote.vim b/.config/nvim/ale_linters/tex/textidote.vim
new file mode 100644
index 0000000..9640ef4
--- /dev/null
+++ b/.config/nvim/ale_linters/tex/textidote.vim
@@ -0,0 +1,32 @@
+" Author: Jordi Altayo <jordiag@kth.se>
+" Description: support for textidote grammar and syntax checker
+
+call ale#Set('tex_textidote_executable', 'textidote')
+call ale#Set('tex_textidote_options', '')
+
+function! ale_linters#tex#textidote#Handle(buffer, lines) abort
+ let l:pattern = '.*' . expand('%:t:r') . '\.tex(L\(\d\+\)C\(\d\+\)-L\d\+C\d\+): \(.*\)".*"'
+ let l:output = []
+
+ for l:match in ale#util#GetMatches(a:lines, l:pattern)
+ call add(l:output, {
+ \ 'lnum': l:match[1] + 0,
+ \ 'col' : l:match[2] + 0,
+ \ 'text': l:match[3],
+ \ 'type': 'E',
+ \})
+ endfor
+
+ return l:output
+endfunction
+
+function! ale_linters#tex#textidote#GetCommand(buffer) abort
+ return '%e --no-color --output singleline' . ale#Pad(ale#Var(a:buffer, 'tex_textidote_options')) . ale#Pad('%s')
+endfunction
+
+call ale#linter#Define('tex', {
+\ 'name': 'textidote',
+\ 'executable': {b -> ale#Var(b, 'tex_textidote_executable')},
+\ 'command': function('ale_linters#tex#textidote#GetCommand'),
+\ 'callback': 'ale_linters#tex#textidote#Handle',
+\})
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index e7e1c9f..e2c6bc6 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -31,6 +31,7 @@ nnoremap gk k
set spelllang=en_gb
+set wildcharm=<C-Z>
let mapleader = ' '
autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=250}
@@ -85,6 +86,7 @@ set omnifunc=ale#completion#OmniFunc
" ----- QuickTex -----
let g:quicktex_usedefault = 0
let g:quicktex_excludechar = ['\$', '(', ')', '\[', ']', '{', '}', '\.', ',', ':', ';', '-', '+', '*', '"']
+nmap <leader>g :GenerateQuicktexDictionaries<CR>
" ----- VimTeX -----
nmap <leader>c <Plug>(vimtex-compile)
@@ -93,5 +95,11 @@ let g:vimtex_view_method = 'zathura'
let g:vimtex_quickfix_open_on_warning = 0
let g:vimtex_indent_enabled = 0
let g:vimtex_indent_on_ampersands = 0
+ "\ 'lt_directory' : '~/code/LanguageTool-6.0/',
+let g:vimtex_grammar_vlty = {
+ \ 'lt_command' : 'languagetool',
+ \ 'shell_options' : '--equation-punctuation display',
+ \ 'show_suggestions' : '1',
+ \}
" vim: ft=vim
diff --git a/.config/systemd/user/default.target.wants/ledsoff.service b/.config/systemd/user/default.target.wants/ledsoff.service
new file mode 120000
index 0000000..fe8c928
--- /dev/null
+++ b/.config/systemd/user/default.target.wants/ledsoff.service
@@ -0,0 +1 @@
+/home/justin/.config/systemd/user/ledsoff.service \ No newline at end of file
diff --git a/.config/systemd/user/ledsoff.service b/.config/systemd/user/ledsoff.service
new file mode 100644
index 0000000..0e184cf
--- /dev/null
+++ b/.config/systemd/user/ledsoff.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Turn verious LEDs off at startup
+
+[Service]
+Type=oneshot
+ExecStart=/home/justin/.local/bin/ledsoff
+
+[Install]
+WantedBy=default.target
diff --git a/.config/systemd/user/nextcloud-sync.service b/.config/systemd/user/nextcloud-sync.service
new file mode 100644
index 0000000..48522a9
--- /dev/null
+++ b/.config/systemd/user/nextcloud-sync.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Sync with Nextcloud
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=oneshot
+ExecStart=/home/justin/.local/bin/jxir-cloud-sync
diff --git a/.config/systemd/user/nextcloud-sync.timer b/.config/systemd/user/nextcloud-sync.timer
new file mode 100644
index 0000000..ee174d7
--- /dev/null
+++ b/.config/systemd/user/nextcloud-sync.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Sync with Nextcloud every hour
+
+[Timer]
+OnCalendar=hourly
+RandomizedDelaySec=5min
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/.config/systemd/user/timers.target.wants/borgmatic-user.timer b/.config/systemd/user/timers.target.wants/borgmatic-user.timer
new file mode 120000
index 0000000..f4e0b9f
--- /dev/null
+++ b/.config/systemd/user/timers.target.wants/borgmatic-user.timer
@@ -0,0 +1 @@
+/usr/lib/systemd/user/borgmatic-user.timer \ No newline at end of file
diff --git a/.config/systemd/user/timers.target.wants/nextcloud-sync.timer b/.config/systemd/user/timers.target.wants/nextcloud-sync.timer
new file mode 120000
index 0000000..017a827
--- /dev/null
+++ b/.config/systemd/user/timers.target.wants/nextcloud-sync.timer
@@ -0,0 +1 @@
+/home/justin/.config/systemd/user/nextcloud-sync.timer \ No newline at end of file
diff --git a/.config/systemd/user/timers.target.wants/yt-dlp.timer b/.config/systemd/user/timers.target.wants/yt-dlp.timer
new file mode 120000
index 0000000..4aa2266
--- /dev/null
+++ b/.config/systemd/user/timers.target.wants/yt-dlp.timer
@@ -0,0 +1 @@
+/home/justin/.config/systemd/user/yt-dlp.timer \ No newline at end of file
diff --git a/.config/systemd/user/yt-dlp.service b/.config/systemd/user/yt-dlp.service
new file mode 100644
index 0000000..8d8d66c
--- /dev/null
+++ b/.config/systemd/user/yt-dlp.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Download new YouTube videos
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=oneshot
+ExecStart=/home/justin/videos/youtube/download
+ExecStart=/home/justin/videos/gabi-fastner/download
diff --git a/.config/systemd/user/yt-dlp.timer b/.config/systemd/user/yt-dlp.timer
new file mode 100644
index 0000000..34329cb
--- /dev/null
+++ b/.config/systemd/user/yt-dlp.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Download new YouTube videos hourly
+
+[Timer]
+OnCalendar=00/1:00
+RandomizedDelaySec=10min
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs
new file mode 100644
index 0000000..e2d5328
--- /dev/null
+++ b/.config/user-dirs.dirs
@@ -0,0 +1,8 @@
+XDG_DESKTOP_DIR="$HOME/"
+XDG_DOWNLOAD_DIR="$HOME/downloads"
+XDG_TEMPLATES_DIR="$HOME/templates"
+XDG_PUBLICSHARE_DIR="$HOME/"
+XDG_DOCUMENTS_DIR="$HOME/documents"
+XDG_MUSIC_DIR="$HOME/music"
+XDG_PICTURES_DIR="$HOME/pictures"
+XDG_VIDEOS_DIR="$HOME/videos"
diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc
new file mode 100644
index 0000000..ff15957
--- /dev/null
+++ b/.config/zathura/zathurarc
@@ -0,0 +1,17 @@
+# zathura configuration
+
+map d scroll half-down
+map u scroll half-up
+map b scroll full-up
+map M mark_evaluate
+
+set guioptions ""
+set page-padding 10
+set window-title-basename true
+set window-title-page true
+set font "DejaVu Sans 14"
+
+# https://git.pwmt.org/pwmt/zathura/-/issues/151
+set sandbox none
+
+# vim: ft=config
diff --git a/.gitignore b/.gitignore
index 4ad8256..edd5e16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
/*
!.config/
+.config/GIMP/
.config/dconf/
.config/borg/
.config/borgmatic/
diff --git a/.gitmodules b/.gitmodules
index 7dc3ce5..1b71701 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -7,6 +7,9 @@
[submodule ".config/nvim/pack/plugins/start/vimtex"]
path = .config/nvim/pack/plugins/start/vimtex
url = https://github.com/lervag/vimtex.git
+[submodule ".config/mpv/scripts/sponsorblock_minimal"]
+ path = .config/mpv/scripts/sponsorblock_minimal
+ url = https://codeberg.org/jouni/mpv_sponsorblock_minimal.git
[submodule ".config/nvim/pack/plugins/start/my-quicktex-keywords"]
path = .config/nvim/pack/plugins/start/my-quicktex-keywords
url = git.jxir.de:my-quicktex-keywords
diff --git a/.local/bin/clean b/.local/bin/clean
index 1c82398..3b5b300 100755
--- a/.local/bin/clean
+++ b/.local/bin/clean
@@ -1,7 +1,10 @@
#!/usr/bin/bash
-cd ~
+cd ~ || exit
rm -rfv .cache/
+rm -rfv .config/Qtrac\ Ltd./
+rm -rfv .config/dconf/
+rm -rfv .config/gtk-*
rm -rfv .config/htop/
rm -rfv .config/procps/
rm -rfv .config/vifm/vifminfo.json*
@@ -9,9 +12,14 @@ rm -rfv .local/state/nvim/log
rm -rfv .local/state/nvim/shada/
rm -rfv .local/state/nvim/swap/
rm -rfv .local/share/vifm/Trash/
+rm -rfv .local/share/xorg/
rm -rfv .npm/
rm -rfv .nvimlog
-rm -rfv .viminfo
+rm -rfv .parallel/
+rm -rfv .pki/
+rm -rfv .ssh/known_hosts.old
+rm -rfv .terminfo/
+rm -rfv .texlive/
find . -name .git -type d -execdir git gc --prune=now \;
-cd ~/.dotfiles/ && git gc --prune=now
+git --git-dir="$HOME/.dotfiles/" gc --prune=now
diff --git a/.local/bin/edit-bookmarks b/.local/bin/edit-bookmarks
new file mode 100755
index 0000000..f030fd2
--- /dev/null
+++ b/.local/bin/edit-bookmarks
@@ -0,0 +1,37 @@
+#!/usr/bin/bash
+
+bookmarks=/tmp/bookmarks.txt
+
+edit_bookmarks_pdf() {
+ # extract bookmarks
+ pdftk "$1" data_dump output $bookmarks
+
+ # edit bookmarks.txt
+ nvim $bookmarks
+
+ # set bookmarks back to document
+ pdftk "$1" update_info $bookmarks output "$1".new.pdf
+}
+
+edit_bookmarks_djvu() {
+ # extract bookmarks
+ djvused -e "print-outline" "$1" >$bookmarks
+
+ # edit bookmarks.txt
+ nvim $bookmarks
+
+ # set bookmarks back to document
+ djvused -s -e "set-outline $bookmarks" "$1"
+}
+
+case "$1" in
+ *.pdf)
+ edit_bookmarks_pdf "$1"
+ ;;
+ *.djvu)
+ edit_bookmarks_djvu "$1"
+ ;;
+ *)
+ echo "Not a pdf or djvu file."
+ ;;
+esac
diff --git a/.local/bin/ledsoff b/.local/bin/ledsoff
new file mode 100755
index 0000000..64b5a2a
--- /dev/null
+++ b/.local/bin/ledsoff
@@ -0,0 +1,7 @@
+#!/usr/bin/bash
+
+brightnessctl -q -d 'platform::mute' set 0
+brightnessctl -q -d 'platform::micmute' set 0
+brightnessctl -q -d 'tpacpi::power' set 0
+brightnessctl -q -d 'tpacpi::lid_logo_dot' set 0
+brightnessctl -q -d 'tpacpi::kbd_backlight' set 0
diff --git a/.local/bin/opendoc b/.local/bin/opendoc
new file mode 100755
index 0000000..5641763
--- /dev/null
+++ b/.local/bin/opendoc
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+cd ~/library/ || exit 1
+file=$(find . \( -iname '*.pdf' -or -iname '*djvu' \) -type f \
+ -printf '%P\n' | sort | dmenu -i -l 10)
+if test -f "$file"; then
+ zathura "$file" &
+fi
diff --git a/.local/bin/png-remove-alpha-and-optimize b/.local/bin/png-remove-alpha-and-optimize
new file mode 100755
index 0000000..f1b59c2
--- /dev/null
+++ b/.local/bin/png-remove-alpha-and-optimize
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+for file; do
+ size=$(stat -c%s "$file")
+ convert "$file" -alpha off PNG24:"$file"
+ oxipng --strip all --zopfli "$file"
+ newsize=$(stat -c%s "$file")
+ echo $(bc <<<"100*$newsize/$size")% "($size => $newsize)" ":" "$file"
+done
diff --git a/.local/bin/reconnect-trackpoint-and-touchpad b/.local/bin/reconnect-trackpoint-and-touchpad
new file mode 100755
index 0000000..4909dcc
--- /dev/null
+++ b/.local/bin/reconnect-trackpoint-and-touchpad
@@ -0,0 +1,4 @@
+#!/usr/bin/bash
+
+printf none >/sys/bus/serio/devices/serio1/drvctl
+printf reconnect >/sys/bus/serio/devices/serio1/drvctl
diff --git a/.xinitrc b/.xinitrc
new file mode 100644
index 0000000..91f7a90
--- /dev/null
+++ b/.xinitrc
@@ -0,0 +1,2 @@
+picom --config /dev/null --daemon --fading --backend xrender --vsync
+exec dwm