From 159003fd48ef797dc9ef9d52fc753bec8d8ff72b Mon Sep 17 00:00:00 2001 From: Justin Gassner Date: Fri, 25 Aug 2023 17:55:32 +0200 Subject: config --- .config/chromium-flags.conf | 28 ++++++++++++++ .config/git/config | 2 + .config/mpop/config | 21 ++++++++++ .config/mpv/input.conf | 9 +++++ .config/mpv/mpv.conf | 8 ++++ .config/mpv/scripts/display-chapter-titles.lua | 10 +++++ .config/mpv/scripts/sponsorblock_minimal | 1 + .config/mpv/scripts/turn-off-dpms.lua | 45 ++++++++++++++++++++++ .config/msmtp/config | 21 ++++++++++ .config/mutt/mailcap | 3 ++ .config/mutt/muttrc | 44 +++++++++++++++++++++ .config/mutt/solarized-dark | 43 +++++++++++++++++++++ .config/nvim/ale_linters/tex/textidote.vim | 32 +++++++++++++++ .config/nvim/init.vim | 8 ++++ .../user/default.target.wants/ledsoff.service | 1 + .config/systemd/user/ledsoff.service | 9 +++++ .config/systemd/user/nextcloud-sync.service | 8 ++++ .config/systemd/user/nextcloud-sync.timer | 10 +++++ .../user/timers.target.wants/borgmatic-user.timer | 1 + .../user/timers.target.wants/nextcloud-sync.timer | 1 + .../systemd/user/timers.target.wants/yt-dlp.timer | 1 + .config/systemd/user/yt-dlp.service | 9 +++++ .config/systemd/user/yt-dlp.timer | 10 +++++ .config/user-dirs.dirs | 8 ++++ .config/zathura/zathurarc | 17 ++++++++ 25 files changed, 350 insertions(+) create mode 100644 .config/chromium-flags.conf create mode 100644 .config/mpop/config create mode 100644 .config/mpv/input.conf create mode 100644 .config/mpv/mpv.conf create mode 100644 .config/mpv/scripts/display-chapter-titles.lua create mode 160000 .config/mpv/scripts/sponsorblock_minimal create mode 100644 .config/mpv/scripts/turn-off-dpms.lua create mode 100644 .config/msmtp/config create mode 100644 .config/mutt/mailcap create mode 100644 .config/mutt/muttrc create mode 100644 .config/mutt/solarized-dark create mode 100644 .config/nvim/ale_linters/tex/textidote.vim create mode 120000 .config/systemd/user/default.target.wants/ledsoff.service create mode 100644 .config/systemd/user/ledsoff.service create mode 100644 .config/systemd/user/nextcloud-sync.service create mode 100644 .config/systemd/user/nextcloud-sync.timer create mode 120000 .config/systemd/user/timers.target.wants/borgmatic-user.timer create mode 120000 .config/systemd/user/timers.target.wants/nextcloud-sync.timer create mode 120000 .config/systemd/user/timers.target.wants/yt-dlp.timer create mode 100644 .config/systemd/user/yt-dlp.service create mode 100644 .config/systemd/user/yt-dlp.timer create mode 100644 .config/user-dirs.dirs create mode 100644 .config/zathura/zathurarc (limited to '.config') 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 index 0000000..ca2844b --- /dev/null +++ b/.config/mpv/scripts/sponsorblock_minimal @@ -0,0 +1 @@ +Subproject commit ca2844b8cf7674bfccd282d389a50427742251d3 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 '1' ':set from=justin.gassner@mailbox.org' +macro generic '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 +" 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= 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 g :GenerateQuicktexDictionaries " ----- VimTeX ----- nmap c (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 -- cgit v1.2.3-70-g09d2