Compare commits
19 Commits
5c345b8a8c
...
master
Author | SHA1 | Date | |
---|---|---|---|
a4a1f44e4e
|
|||
93f5122723
|
|||
951eebe79b
|
|||
5bf85682ed
|
|||
75e7744f01
|
|||
56e4a5ebfb
|
|||
76e72f4d46
|
|||
a73c95b3a6
|
|||
562a454d63
|
|||
1dcd003a8d
|
|||
52af3677cf
|
|||
c12e14fb65
|
|||
7d07cb92de
|
|||
4188c07932
|
|||
585f192551
|
|||
809a7210e0
|
|||
162bce097d
|
|||
ab72387a96
|
|||
69212cf836
|
@ -27,13 +27,13 @@
|
||||
width = 300
|
||||
|
||||
# The maximum height of a single notification, excluding the frame.
|
||||
height = 300
|
||||
height = (0, 300)
|
||||
|
||||
# Position the notification in the top right corner
|
||||
origin = top-right
|
||||
|
||||
# Offset from the origin
|
||||
offset = 0x26
|
||||
offset = (0, 26)
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
|
124
.config/mbsync/config
Normal file
124
.config/mbsync/config
Normal file
@ -0,0 +1,124 @@
|
||||
IMAPStore alexander@bocken.org-remote
|
||||
Host mail.bocken.org
|
||||
Port 993
|
||||
User alexander
|
||||
PassCmd "pass alexander@bocken.org"
|
||||
AuthMechs LOGIN
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore alexander@bocken.org-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/alexander@bocken.org/
|
||||
Inbox /home/alex/.local/share/mail/alexander@bocken.org/INBOX
|
||||
|
||||
Channel alexander@bocken.org
|
||||
Expunge Both
|
||||
Far :alexander@bocken.org-remote:
|
||||
Near :alexander@bocken.org-local:
|
||||
Patterns * !"[Gmail]/All Mail"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
||||
|
||||
IMAPStore abocken@ethz.ch-remote
|
||||
Host outlook.office365.com
|
||||
Port 993
|
||||
User abocken@ethz.ch
|
||||
PassCmd "mutt_oauth2.py ~/.local/share/mail/eth.token"
|
||||
AuthMechs XOAUTH2
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore abocken@ethz.ch-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/abocken@ethz.ch/
|
||||
Inbox /home/alex/.local/share/mail/abocken@ethz.ch/INBOX
|
||||
|
||||
Channel abocken@ethz.ch
|
||||
Expunge Both
|
||||
Far :abocken@ethz.ch-remote:
|
||||
Near :abocken@ethz.ch-local:
|
||||
Patterns * !"[Gmail]/All Mail"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
||||
|
||||
#IMAPStore abocken@ethz.ch-remote
|
||||
#Host mail.ethz.ch
|
||||
#Port 993
|
||||
#User abocken
|
||||
#PassCmd "pass 'ETH/nETHz - abocken@ethz.ch'"
|
||||
#AuthMechs LOGIN
|
||||
#TLSType IMAPS
|
||||
#CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
#
|
||||
#MaildirStore abocken@ethz.ch-local
|
||||
#Subfolders Verbatim
|
||||
#Path /home/alex/.local/share/mail/abocken@ethz.ch/
|
||||
#Inbox /home/alex/.local/share/mail/abocken@ethz.ch/INBOX
|
||||
#
|
||||
#Channel abocken@ethz.ch
|
||||
#Expunge Both
|
||||
#Far :abocken@ethz.ch-remote:
|
||||
#Near :abocken@ethz.ch-local:
|
||||
#Patterns * !"[Gmail]/All Mail"
|
||||
#Create Both
|
||||
#SyncState *
|
||||
#MaxMessages 0
|
||||
#ExpireUnread no
|
||||
|
||||
|
||||
IMAPStore alexander@aaathats3as.com-remote
|
||||
Host mail.cock.li
|
||||
Port 993
|
||||
User alexander@aaathats3as.com
|
||||
PassCmd "pass eMail/aaathats3as.com"
|
||||
AuthMechs LOGIN
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore alexander@aaathats3as.com-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/alexander@aaathats3as.com/
|
||||
Inbox /home/alex/.local/share/mail/alexander@aaathats3as.com/INBOX
|
||||
|
||||
Channel alexander@aaathats3as.com
|
||||
Expunge Both
|
||||
Far :alexander@aaathats3as.com-remote:
|
||||
Near :alexander@aaathats3as.com-local:
|
||||
Patterns * !"[Gmail]/All Mail"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
||||
|
||||
IMAPStore account@bocken.org-remote
|
||||
Host mail.bocken.org
|
||||
Port 993
|
||||
User account
|
||||
PassCmd "pass account@bocken.org"
|
||||
AuthMechs LOGIN
|
||||
TLSType IMAPS
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
MaildirStore account@bocken.org-local
|
||||
Subfolders Verbatim
|
||||
Path /home/alex/.local/share/mail/account@bocken.org/
|
||||
Inbox /home/alex/.local/share/mail/account@bocken.org/INBOX
|
||||
|
||||
Channel account@bocken.org
|
||||
Expunge Both
|
||||
Far :account@bocken.org-remote:
|
||||
Near :account@bocken.org-local:
|
||||
Patterns * !"[Gmail]/All Mail" !"*fts-flatcurve*" !"*virtual*"
|
||||
Create Both
|
||||
SyncState *
|
||||
MaxMessages 0
|
||||
ExpireUnread no
|
||||
# End profile
|
@ -1,5 +1,6 @@
|
||||
music_directory "~/msc"
|
||||
playlist_directory "~/.config/mpd/playlists"
|
||||
state_file "~/.local/share/mpd/state"
|
||||
|
||||
auto_update "yes"
|
||||
bind_to_address "127.0.0.1"
|
||||
|
@ -15,7 +15,7 @@ local function reset_y()
|
||||
end
|
||||
|
||||
-- Function to handle 'y' keypress
|
||||
local function handle_y()
|
||||
local function handle_yanker()
|
||||
reset_y()
|
||||
y_pressed = true
|
||||
-- Start a timer to reset the state after 2 seconds
|
||||
@ -24,7 +24,7 @@ end
|
||||
|
||||
-- Function to handle 'n' keypress
|
||||
-- Copy the filename to clipboard
|
||||
local function handle_n()
|
||||
local function handle_filename()
|
||||
if y_pressed then
|
||||
local filename = mp.get_property("filename")
|
||||
-- Use a method to copy 'filename' to clipboard (platform-specific)
|
||||
@ -39,7 +39,7 @@ end
|
||||
|
||||
-- Function to handle 'd' keypress
|
||||
-- Copy the directory to clipboard
|
||||
local function handle_d()
|
||||
local function handle_dir()
|
||||
if y_pressed then
|
||||
local filepath = mp.get_property("path")
|
||||
local directory = string.match(filepath, "(.*/)")
|
||||
@ -50,7 +50,7 @@ local function handle_d()
|
||||
end
|
||||
|
||||
-- Function to handle 'p' keypress
|
||||
local function handle_p()
|
||||
local function handle_path()
|
||||
if y_pressed then
|
||||
local full_path = mp.get_property("path")
|
||||
os.execute("printf %s " .. full_path .. " | xclip -selection clipboard")
|
||||
@ -59,7 +59,22 @@ local function handle_p()
|
||||
end
|
||||
end
|
||||
|
||||
mp.add_key_binding("y", "check_y", handle_y)
|
||||
mp.add_key_binding("n", "check_n", handle_n)
|
||||
mp.add_key_binding("p", "check_p", handle_p)
|
||||
mp.add_key_binding("d", "check_d", handle_d)
|
||||
-- Function to copy the title to clipboard
|
||||
local function handle_title()
|
||||
if y_pressed then
|
||||
local title = mp.get_property("media-title")
|
||||
if title and title ~= mp.get_property("filename") then
|
||||
os.execute("printf %s" .. title .. " | xclip -selection clipboard")
|
||||
mp.osd_message("Copied title " .. title .. " to clipboard", 3)
|
||||
else
|
||||
handle_filename() -- Call the function to copy the filename
|
||||
end
|
||||
reset_y()
|
||||
end
|
||||
end
|
||||
|
||||
mp.add_key_binding("y", "check_y", handle_yanker)
|
||||
mp.add_key_binding("n", "check_n", handle_filename)
|
||||
mp.add_key_binding("p", "check_p", handle_path)
|
||||
mp.add_key_binding("d", "check_d", handle_dir)
|
||||
mp.add_key_binding("t", "check_t", handle_title)
|
||||
|
30
.config/mpv/scripts/mark.lua
Normal file
30
.config/mpv/scripts/mark.lua
Normal file
@ -0,0 +1,30 @@
|
||||
-- mpv script to mark videos
|
||||
local utils = require 'mp.utils'
|
||||
local marked_videos = {}
|
||||
local marked_file = "marked"
|
||||
|
||||
function toggle_mark()
|
||||
local path = mp.get_property("path")
|
||||
if marked_videos[path] then
|
||||
marked_videos[path] = nil
|
||||
mp.osd_message("Unmarked: " .. path)
|
||||
else
|
||||
marked_videos[path] = true
|
||||
mp.osd_message("Marked: " .. path)
|
||||
end
|
||||
end
|
||||
|
||||
function save_marks()
|
||||
-- Do not write anything if "marked_videos" is empty
|
||||
if next(marked_videos) == nil then
|
||||
return
|
||||
end
|
||||
local file = io.open(marked_file, "a")
|
||||
for path, _ in pairs(marked_videos) do
|
||||
file:write(path .. "\n")
|
||||
end
|
||||
file:close()
|
||||
end
|
||||
|
||||
mp.add_key_binding("M", "toggle_mark", toggle_mark)
|
||||
mp.register_event("shutdown", save_marks)
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"suggest.enablePreselect": false,
|
||||
"suggest.noselect": true,
|
||||
"svelte.enable-ts-plugin": true
|
||||
"svelte.enable-ts-plugin": true,
|
||||
"pyright.inlayHints.variableTypes": false
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
let mapleader =","
|
||||
let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}]
|
||||
|
||||
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||
@ -7,6 +8,8 @@ if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autolo
|
||||
autocmd VimEnter * PlugInstall
|
||||
endif
|
||||
|
||||
let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}]
|
||||
|
||||
call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"'))
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'preservim/nerdtree'
|
||||
@ -28,10 +31,11 @@ Plug 'othree/html5.vim'
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
||||
Plug 'github/copilot.vim',
|
||||
Plug 'dmadisetti/AirLatex.vim', {'branch': 'main'}
|
||||
Plug 'nathangrigg/vim-beancount'
|
||||
call plug#end()
|
||||
|
||||
let g:vimwiki_list = [{'path': '~/dox/notes/', 'index': 'Main'}]
|
||||
|
||||
set title
|
||||
set bg=light
|
||||
set go=a
|
||||
@ -124,7 +128,7 @@ let g:jukit_convert_open_default = -1
|
||||
|
||||
let g:jukit_hist_use_ueberzug = 0
|
||||
" - Set to 1 to use Überzug to display saved outputs instead of an ipython split window
|
||||
let g:jukit_ueberzug_use_cached = 0
|
||||
let g:jukit_ueberzug_use_cached = 1
|
||||
" - Whether to cache created images of saved outputs. If set to 0, will convert saved outputs to png from scratch each time. Note that this will make displaying saved outputs significantly slower.
|
||||
let g:jukit_ueberzug_pos = [0.25, 0.25, 0.4, 0.6]
|
||||
" - position and dimension of Überzug window WITH output split present - [x, y, width, height]. Use `:call jukit#ueberzug#set_default_pos()` to modify/visualize.
|
||||
@ -145,7 +149,7 @@ let g:jukit_ueberzug_jupyter_cmd = 'jupyter'
|
||||
" - path to jupyter executable. By default it just uses the jupyter command found in your environment. If you started an output split in a virtual environment, make sure that you either have jupyter installed in that environment or set the absolute path to the python3 command.
|
||||
let g:jukit_ueberzug_cutycapt_cmd = 'CutyCapt'
|
||||
" - path to cutycapt executable
|
||||
let g:jukit_ueberzug_imagemagick_cmd = 'convert'
|
||||
let g:jukit_ueberzug_imagemagick_cmd = 'magick'
|
||||
" - path to imagemagick (`convert` command) executable
|
||||
|
||||
" Nerd tree
|
||||
@ -166,12 +170,6 @@ let R_start_libs = 'base,stats,graphics,grDevices,utils,methods'
|
||||
let R_hl_term = 0
|
||||
" let Rout_more_colors = 1
|
||||
|
||||
" AirLatex
|
||||
" your login-name
|
||||
" let g:AirLatexCookieDB="~/.mozilla/firefox/do0jepvp.default-release/cookies.sqlite"
|
||||
let g:AirLatexCookie="cookies:overleaf2_session=s%3AtveT0u3Xn8VXTJmkUuSpO2p1o5SLGNYI.ARSAQd4K%2FO7L5ilui54Ht7voJWjD%2BxctQ1ngTRrlo6A"
|
||||
" let g:AirLatexUsername="cookies:overleaf_session2=s%3AMANcnaAAj4VeIgXsNIiCINZ0QgwtYNzn.9x0PVRqOp8egbGYpnIHuffJUxmH%2F%2F2W%2FFnTBPmDny1M"
|
||||
|
||||
"This allows for change paste motion cp{motion}
|
||||
nmap <silent> cp :set opfunc=ChangePaste<CR>g@
|
||||
function! ChangePaste(type, ...)
|
||||
@ -179,11 +177,6 @@ function! ChangePaste(type, ...)
|
||||
silent exe "normal! p"
|
||||
endfunction
|
||||
|
||||
" optional: set server name
|
||||
let g:AirLatexDomain="www.overleaf.com"
|
||||
|
||||
let g:AirLatexAllowInsecure=0
|
||||
|
||||
" vimtex:
|
||||
let g:vimtex_view_method = 'zathura'
|
||||
let g:vimtex_compiler_latexmk = { 'build_dir' : '',
|
||||
|
34
.config/papis/config
Normal file
34
.config/papis/config
Normal file
@ -0,0 +1,34 @@
|
||||
[papers]
|
||||
dir = ~/dox/papers
|
||||
extra-bibtex-keys = ["doc_url"]
|
||||
use-git = True
|
||||
formatter = jinja2
|
||||
|
||||
# Format folder & file in format <year>-<last_name_first_author>-<paper_title>
|
||||
add-file-name = {{ doc.year }}-{{ (doc.author_list[0].family if doc.author_list else "AUTHOR_MISSING") }}-{{ ' '.join(doc.title.split()[:10]) }}
|
||||
add-folder-name = {{ doc.year }}-{{ (doc.author_list[0].family if doc.author_list else "AUTHOR_MISSING") }}-{{ ' '.join(doc.title.split()[:10]) }}
|
||||
ref-format = {{doc.author_list[0].family if doc.author_list else "AUTHOR MISSING"}}{{doc.year}}{{doc.title.title().translate(None, ' -')[:15]}}
|
||||
|
||||
# Defaults simply converted to jinja2
|
||||
header-format = <ansired>{{doc.html_escape.title}}</ansired>\n <ansigreen>{{doc.html_escape.author}}</ansigreen>\n <ansiblue>({{doc.html_escape.year}})</ansiblue> [<ansiyellow>{{doc.html_escape.tags}}</ansiyellow>]
|
||||
match-format = {{doc.tags}}{{doc.subfolder}}{{doc.title}}{{doc.author}}{{doc.year}}
|
||||
document-description-format = {{doc.title}} - {{doc.author}}
|
||||
multiple-authors-format = {{au.family}}, {{au.given}}
|
||||
browse-query-format = {{doc.title}} {{doc.author}}
|
||||
notes-name = notes.md
|
||||
|
||||
[books]
|
||||
dir = ~/dox/books
|
||||
add-file-name = {doc[author]}{doc[title]}
|
||||
use-git = True
|
||||
|
||||
[settings]
|
||||
opentool = rifle
|
||||
default-library = papers
|
||||
file-browser = ranger
|
||||
|
||||
|
||||
[tui]
|
||||
editmode = vi
|
||||
options_list.selected_margin_style = bg:ansigreen fg:ansired
|
||||
options_list.unselected_margin_style =
|
@ -101,7 +101,7 @@ fade-out-step = 0.03;
|
||||
|
||||
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||
# inactive-opacity = 1
|
||||
inactive-opacity = 0.8;
|
||||
inactive-opacity = 1.0;
|
||||
|
||||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||
# frame-opacity = 1.0
|
||||
|
@ -16,3 +16,4 @@ map g goto top
|
||||
map <C-s> exec zathura_backward_search.sh
|
||||
map <A-Return> exec "openfilebrowser $FILE"
|
||||
map <C-h> exec "movepdf $FILE"
|
||||
map y exec "copyfilepath $FILE"
|
||||
|
2
.local/bin/scanner
Executable file
2
.local/bin/scanner
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
QT_SCALE_FACTOR=1.6666666666666666 skanlite
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
pgrep openconnect > /dev/null || if ping -c 1 -W 1 -q webprint.ethz.ch > /dev/null
|
||||
if ping -c 1 -W 1 -q webprint.ethz.ch > /dev/null;
|
||||
then
|
||||
printf '🔬'
|
||||
fi
|
||||
|
@ -4,21 +4,10 @@ for file in $@; do
|
||||
INPUTPDF=/tmp/file.pdf
|
||||
cp -f "$file" $INPUTPDF
|
||||
printf '\\documentclass[a4paper,final]{article}
|
||||
\\usepackage{pdfpages}
|
||||
\\usepackage{ifpdf,ifxetex,everyshi}
|
||||
\\makeatletter
|
||||
\\ifpdf
|
||||
\\EveryShipout{\\ifodd\\c@page\\else\\pdfpageattr{/Rotate 180}\\fi}%%
|
||||
\\fi
|
||||
\\ifxetex
|
||||
\\EveryShipout{\\ifodd\\c@page\\special{pdf: put @thispage << /Rotate 180 >>}%%
|
||||
\\fi
|
||||
}
|
||||
\\fi
|
||||
\\makeatother
|
||||
\\begin{document}
|
||||
\\includepdf[pages=-, nup=1x2, booklet=true, landscape]{%s}
|
||||
\\end{document}' "$INPUTPDF" > /tmp/tmp$$.tex
|
||||
\\usepackage{pdfpages}
|
||||
\\begin{document}
|
||||
\\includepdf[pages=-, nup=2x1, booklet=true, landscape]{%s}
|
||||
\\end{document}' "$INPUTPDF" > /tmp/tmp$$.tex
|
||||
cd /tmp || exit
|
||||
pdflatex /tmp/tmp$$.tex
|
||||
only_filename="$(echo "$file" | awk -F/ '{print $NF}')"
|
||||
|
3
.local/bin/tools/copyfilepath
Executable file
3
.local/bin/tools/copyfilepath
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
printf %s "$*" | xclip -selection clipboard &&
|
||||
notify-send "Copied to clipboard: $*"
|
@ -14,6 +14,17 @@ if echo "$1" | grep -qE 'youtube.*list'; then
|
||||
sed 's/^/https:\/\/www.youtube.com\/watch?v=/' |
|
||||
xargs mpv --ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]/best[ext=mp4]/best' ||
|
||||
notify-send "startmpv" "An error has occured with playlist $playlist_id"
|
||||
elif echo "$1" | grep -qE 'rumble.com'; then
|
||||
notify-send "startmpv" "Rumble videos are not supported by mpv, first ripping, then playing..."
|
||||
(
|
||||
cd /tmp
|
||||
yt-dlp "$1" &
|
||||
# get the filename of the downloaded video
|
||||
filename="$(yt-dlp -e "$1")"
|
||||
sleep 5
|
||||
mpv /tmp/$filename*part
|
||||
rm /tmp/$filename*part
|
||||
)
|
||||
else
|
||||
mpv --ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]/best[ext=mp4]/best' "$1"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user