From 0dfdabd3d7c2aaee37900103c37a96317f3ada07 Mon Sep 17 00:00:00 2001 From: Justin Gassner Date: Wed, 10 Jan 2024 13:29:11 +0100 Subject: config --- .bash_profile | 8 ++++ .bashrc | 2 + .config/chromium-flags.conf | 28 ++++++++++++++ .config/git/config | 1 + .config/mpop/config | 21 ++++++++++ .config/mpv/input.conf | 9 +++++ .config/mpv/mpv.conf | 11 ++++++ .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 | 4 ++ .config/mutt/muttrc | 44 +++++++++++++++++++++ .config/mutt/solarized-dark | 43 +++++++++++++++++++++ .config/nvim/ale_linters/tex/textidote.vim | 32 +++++++++++++++ .config/nvim/init.vim | 20 ++++++++-- .config/nvim/pack/plugins/start/gitsigns.nvim | 2 +- .../nvim/pack/plugins/start/my-quicktex-keywords | 2 +- .config/nvim/pack/plugins/start/vimtex | 2 +- .config/pacman/makepkg.conf | 2 + .../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/vifm/vifmrc | 9 +++-- .config/yt-dlp/config | 2 +- .config/zathura/zathurarc | 18 +++++++++ .gitignore | 1 + .gitmodules | 3 ++ .local/bin/clean | 15 ++++++-- .local/bin/edit-bookmarks | 37 ++++++++++++++++++ .local/bin/ledsoff | 7 ++++ .local/bin/opendoc | 8 ++++ .local/bin/png-remove-alpha-and-optimize | 9 +++++ .local/bin/reconnect-trackpoint-and-touchpad | 4 ++ .local/bin/remove-first-page | 14 +++++++ .xinitrc | 1 + 43 files changed, 480 insertions(+), 14 deletions(-) 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 create mode 100755 .local/bin/edit-bookmarks create mode 100755 .local/bin/ledsoff create mode 100755 .local/bin/opendoc create mode 100755 .local/bin/png-remove-alpha-and-optimize create mode 100755 .local/bin/reconnect-trackpoint-and-touchpad create mode 100755 .local/bin/remove-first-page create mode 100644 .xinitrc diff --git a/.bash_profile b/.bash_profile index bd355cb..3ac48f2 100644 --- a/.bash_profile +++ b/.bash_profile @@ -7,5 +7,13 @@ 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 + +if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then + exec startx +fi diff --git a/.bashrc b/.bashrc index 31f182e..1a32da5 100644 --- a/.bashrc +++ b/.bashrc @@ -20,3 +20,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 36c4e36..c23f535 100644 --- a/.config/git/config +++ b/.config/git/config @@ -3,6 +3,7 @@ [user] name = Justin Gassner email = justin.gassner@mailbox.org + signingkey = 913967C1BCC08CDD88BCE8F2273E75DFCFB25863 [advice] statusHints = false [init] diff --git a/.config/mpop/config b/.config/mpop/config new file mode 100644 index 0000000..e5406a1 --- /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 C4:EC:D8:DA:11:6D:A3:06:EB:64:5A:A1:BE:4C:33:31:3B:90:CD:60:55:98:49:EC:A7:FF:B5:0A:01:15:78:9C +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..425a716 --- /dev/null +++ b/.config/mpv/mpv.conf @@ -0,0 +1,11 @@ +# mpv configuration + +vo=gpu +hwdec=vaapi +fullscreen=yes + +ao=pipewire + +scale=bilinear + +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..7db69a6 --- /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 C4:EC:D8:DA:11:6D:A3:06:EB:64:5A:A1:BE:4C:33:31:3B:90:CD:60:55:98:49:EC:A7:FF:B5:0A:01:15:78:9C +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..c79abcf --- /dev/null +++ b/.config/mutt/mailcap @@ -0,0 +1,4 @@ +application/pdf; zathura %s +image/*; nsxiv -b %s +#text/html; chromium %s &> /dev/null; nametemplate=%s.html +text/html; /usr/bin/xdg-open %s ; nametemplate=%s.html; copiousoutput 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 db5ff31..a0395e3 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -19,6 +19,8 @@ set shiftwidth=2 set softtabstop=2 set expandtab +set clipboard=unnamed + " Filter the command history without leaving the home row (PV34) cnoremap cnoremap @@ -38,6 +40,7 @@ augroup END set spelllang=en_gb +set wildcharm= let mapleader = ' ' autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=250} @@ -68,11 +71,14 @@ nmap i (ale_info) nmap (ale_previous_wrap) nmap (ale_next_wrap) let g:ale_linters = { + \ 'PKGBUILD' : ['shellcheck'], + \ 'lua' : ['luacheck', 'lua_language_server'], \ 'sh' : ['shellcheck'], - \ 'text' : ['cspell', 'languagetool'], + \ 'text' : ['cspell', 'languagetool'], \ 'yaml' : ['yamllint'], \} let g:ale_fixers = { + \ '*' : ['remove_trailing_lines', 'trim_whitespace'], \ 'css' : ['prettier'], \ 'html' : ['prettier'], \ 'javascript' : ['prettier'], @@ -88,14 +94,13 @@ let g:ale_markdown_markdownlint_options = '--disable MD025 --' let g:ale_tex_chktex_options = '-I -n1 -n3 -n24' " VimTeX does '-n1 -n3 -n8 -n25 -n36' let g:ale_sh_shfmt_options = '--indent 2 --case-indent --binary-next-line' -set omnifunc=ale#completion#OmniFunc - " ----- Gitsigns ----- lua require('gitsigns').setup() " ----- QuickTex ----- let g:quicktex_usedefault = 0 -let g:quicktex_excludechar = ['\$', '(', ')', '\[', ']', '{', '}', '\.', ',', ':', ';', '-', '+', '*', '"'] +let g:quicktex_excludechar = ['\$', '(', ')', '\[', ']', '{', '}', '\.', ',', ':', ';', '-', '+', '*', '"', ''''] +nmap g :GenerateQuicktexDictionaries " ----- Vifm ----- nmap f :Vifm @@ -103,9 +108,16 @@ nmap f :Vifm " ----- VimTeX ----- nmap c (vimtex-compile) nmap v (vimtex-view) +nmap t (vimtex-toc-toggle) 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/nvim/pack/plugins/start/gitsigns.nvim b/.config/nvim/pack/plugins/start/gitsigns.nvim index d195f0c..bdeba1c 160000 --- a/.config/nvim/pack/plugins/start/gitsigns.nvim +++ b/.config/nvim/pack/plugins/start/gitsigns.nvim @@ -1 +1 @@ -Subproject commit d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9 +Subproject commit bdeba1cec3faddd89146690c10b9a87949c0ee66 diff --git a/.config/nvim/pack/plugins/start/my-quicktex-keywords b/.config/nvim/pack/plugins/start/my-quicktex-keywords index 6007ece..f41c812 160000 --- a/.config/nvim/pack/plugins/start/my-quicktex-keywords +++ b/.config/nvim/pack/plugins/start/my-quicktex-keywords @@ -1 +1 @@ -Subproject commit 6007ece6a7d712e091fef5a62985b3291748953a +Subproject commit f41c8124953f118f945f42de7a1b7b4b407a06a7 diff --git a/.config/nvim/pack/plugins/start/vimtex b/.config/nvim/pack/plugins/start/vimtex index 6179414..f9b19d0 160000 --- a/.config/nvim/pack/plugins/start/vimtex +++ b/.config/nvim/pack/plugins/start/vimtex @@ -1 +1 @@ -Subproject commit 6179414f2eb3db977a513b7b19c23e7e62a0f388 +Subproject commit f9b19d09ee6f0ba70dad0b5c2e710dd700681000 diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf index 4888e1c..a912428 100644 --- a/.config/pacman/makepkg.conf +++ b/.config/pacman/makepkg.conf @@ -6,4 +6,6 @@ CXXFLAGS="${CFLAGS}" MAKEFLAGS="-j$(nproc)" PKGEXT=".pkg.tar.zst" +BUILDDIR=/tmp/makepkg + # vim: ft=config 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..ed3c77d --- /dev/null +++ b/.config/systemd/user/ledsoff.service @@ -0,0 +1,9 @@ +[Unit] +Description=Turn various LEDs off on 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/vifm/vifmrc b/.config/vifm/vifmrc index 1b551a8..2631681 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -14,19 +14,22 @@ set sortnumbers set statusline=" %t %= %A %8u:%-6g %7E %18d " set syscalls set timefmt="%Y-%m-%d %H:%M" -set vicmd="nvim" +set vicmd=nvim set vifminfo=tui,dhistory,savedirs,chistory,shistory,phistory,fhistory set wildmenu filextype *.djvu,*.epub,*.pdf,*.ps zathura %c 2>/dev/null & -filextype *.bmp,*.gif,*.jpeg,*.jpg,*jxl,*.png,*.tif,*.tiff,*.webp nsxiv -a -b %f & +filextype *.bmp,*.gif,*.jpeg,*.jpg,*.jxl,*.png,*.tif,*.tiff,*.webp nsxiv -a -b %f & filetype *.mp3,*.ogg mpv %f -filextype *.mp4,*.mp4.part,*.webm,*.webm.part,*.mkv mpv --no-terminal %f & +filextype *.mp4,*.mp4.part,*.webm,*.webm.part,*.mkv mpv --no-terminal %f 2>/dev/null & filextype *.html,*.htm chromium %f & filetype *.[1-8] man ./%c filetype *.tar,*.tar.bz2,*.tar.gz,*.tar.xz,*.tar.zst,*.tgz tar xf %f & +filextype *.ods,*.odt,*.doc libreoffice %f 2>/dev/null & filetype *.rar unrar %f & filetype *.zip unzip %f & +filextype *.xcf gimp %f & +filextype *.xopp xournalpp %f 2>/dev/null & command! diff vim -d %b command! du ncdu diff --git a/.config/yt-dlp/config b/.config/yt-dlp/config index e0eb3af..9e1cca4 100644 --- a/.config/yt-dlp/config +++ b/.config/yt-dlp/config @@ -3,7 +3,7 @@ --ignore-errors --format '308+251/271+251/303+251/299+140/248+251/137+140/302+251/298+140/247+251/136+140/22/best' --embed-chapters ---paths temp:/tmp/yt-dlp/ +#--paths temp:/tmp/yt-dlp/ --output '%(upload_date)s %(title)s-%(id)s.%(ext)s' # vim: ft=config diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100644 index 0000000..0253b28 --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1,18 @@ +# zathura configuration + +map D toggle_page_mode +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 ad8ef9f..5f820a8 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 b30ac19..70161a7 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..2df47f6 100755 --- a/.local/bin/clean +++ b/.local/bin/clean @@ -1,17 +1,26 @@ #!/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/Trash/ rm -rfv .config/vifm/vifminfo.json* 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..5fb73e0 --- /dev/null +++ b/.local/bin/opendoc @@ -0,0 +1,8 @@ +#!/bin/bash + +cd ~/library/ || exit 1 +file=$(find -L . \( -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/.local/bin/remove-first-page b/.local/bin/remove-first-page new file mode 100755 index 0000000..6e46706 --- /dev/null +++ b/.local/bin/remove-first-page @@ -0,0 +1,14 @@ +#!/usr/bin/bash + +remove_first_page_pdf() { + pdftk "$1" cat 2-end output "$1".new.pdf +} + +case "$1" in + *.pdf) + remove_first_page_pdf "$1" + ;; + *) + echo "Not a pdf file." + ;; +esac diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..431377a --- /dev/null +++ b/.xinitrc @@ -0,0 +1 @@ +exec dwm -- cgit v1.2.3-70-g09d2